Skip to content

Commit

Permalink
fix Substition using context
Browse files Browse the repository at this point in the history
Signed-off-by: Kento Yabuuchi <[email protected]>
  • Loading branch information
KYabuuchi committed Aug 26, 2024
1 parent dd5d1c6 commit 447f326
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aip_xx1_gen2_launch/launch/lidar.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def load_yaml(yaml_file_path):
path_dictionary = generate_launch_dictionary()

base_parameters = {}
base_parameters["host_ip"] = LaunchConfiguration("host_ip")
base_parameters["host_ip"] = LaunchConfiguration("host_ip").perform(context)
base_parameters["vehicle_mirror_param_file"] = LaunchConfiguration(
"vehicle_mirror_param_file"
).perform(context)
Expand Down
6 changes: 4 additions & 2 deletions common_sensor_launch/launch/nebula_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ def create_parameter_dict(*args):

# There is an issue where hw_monitor crashes due to data race,
# so the monitor will now only be launched when explicitly specified with a launch command.
launch_hw_monitor: bool = context.perform_substitution(LaunchConfiguration("launch_hw_monitor"))
launch_driver: bool = context.perform_substitution(LaunchConfiguration("launch_driver"))
launch_hw_monitor: bool = IfCondition(LaunchConfiguration("launch_hw_monitor")).evaluate(
context
)
launch_driver: bool = IfCondition(LaunchConfiguration("launch_driver")).evaluate(context)
if launch_hw_monitor and launch_driver:
nodes.append(
ComposableNode(
Expand Down

0 comments on commit 447f326

Please sign in to comment.