Skip to content

Commit e085e34

Browse files
committed
fix PathJoinSubstitution
1 parent 2c7b85e commit e085e34

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

rosbot_utils/rosbot_utils/flash_firmware.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
import sys
2323

2424
import requests
25-
from launch_ros.substitutions import FindPackageShare
25+
from launch.substitutions import (
26+
PathJoinSubstitution,
27+
)
28+
from launch_ros.substitutions import FindPackageShare
2629

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

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

5963
if not firmware_files:

0 commit comments

Comments
 (0)