Skip to content

Commit

Permalink
fix PathJoinSubstitution
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikN committed May 24, 2024
1 parent 2c7b85e commit e085e34
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rosbot_utils/rosbot_utils/flash_firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
import sys

import requests
from launch_ros.substitutions import FindPackageShare
from launch.substitutions import (
PathJoinSubstitution,
)
from launch_ros.substitutions import FindPackageShare

# Global variable to hold the subprocess reference
subproc = None
Expand Down Expand Up @@ -53,7 +56,8 @@ def find_firmware_file():
package_install_directory = FindPackageShare("rosbot_utils")

# Construct the path to the firmware directory
firmware_dir = os.path.join(package_install_directory, "firmware")
# firmware_dir = os.path.join(package_install_directory, "firmware")
firmware_dir = PathJoinSubstitution([package_install_directory, "firmware"])
firmware_files = glob.glob(os.path.join(firmware_dir, f"firmware-{firmware_version}.bin"))

if not firmware_files:
Expand Down

0 comments on commit e085e34

Please sign in to comment.