Skip to content

Commit

Permalink
Tools: update ROS 2 launch file for eProsima integration service
Browse files Browse the repository at this point in the history
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
  • Loading branch information
srmainwaring authored and arshPratap committed Jul 5, 2023
1 parent e84c286 commit 32e4c6c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Tools/ros2/ardupilot_sitl/src/ardupilot_sitl/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,18 +678,23 @@ def generate_action(context: LaunchContext, *args, **kwargs) -> ExecuteProcess:
# - `config_file` is a positional argument
args = [
f"{command} ",
f"{config_file}",
f"{config_file} ",
]

# Optional arguments.
# - `is_prefix_path` is a colon delimited list of paths
is_prefix_path = LaunchConfiguration("is_prefix_path").perform(context)
if is_prefix_path:
for path in is_prefix_path.split(":"):
args.append("--is-prefix-path")
args.append(path)
args.append("--is-prefix-path ")
args.append(f"{path} ")
print(f"is_prefix_path: {path}")

# debug information
# print()
# print(f"cmd: {args}")
# print()

# Create action.
action = ExecuteProcess(
cmd=[args],
Expand Down

0 comments on commit 32e4c6c

Please sign in to comment.