From 34be7e9de599ca880f68797e80f7033ca9320a21 Mon Sep 17 00:00:00 2001 From: Shintaro Sakoda Date: Thu, 3 Oct 2024 14:43:17 +0900 Subject: [PATCH 1/2] Fixed ring_outlier_filter_node_param Signed-off-by: Shintaro Sakoda --- .../launch/nebula_node_container.launch.py | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/common_sensor_launch/launch/nebula_node_container.launch.py b/common_sensor_launch/launch/nebula_node_container.launch.py index bcd5ec5c..ff56c075 100644 --- a/common_sensor_launch/launch/nebula_node_container.launch.py +++ b/common_sensor_launch/launch/nebula_node_container.launch.py @@ -26,6 +26,7 @@ from launch_ros.actions import LoadComposableNodes from launch_ros.descriptions import ComposableNode from launch_ros.substitutions import FindPackageShare +from launch_ros.parameter_descriptions import ParameterFile import yaml @@ -221,13 +222,20 @@ def create_parameter_dict(*args): ) ) + ring_outlier_filter_node_param = ParameterFile( + param_file=LaunchConfiguration("ring_outlier_filter_node_param_file").perform( + context + ), + allow_substs=True, + ) + # Ring Outlier Filter is the last component in the pipeline, so control the output frame here - if LaunchConfiguration("output_as_sensor_frame").perform(context): - ring_outlier_filter_parameters = {"output_frame": LaunchConfiguration("frame_id")} + if LaunchConfiguration("output_as_sensor_frame").perform(context).lower() == "true": + ring_outlier_output_frame = {"output_frame": LaunchConfiguration("frame_id")} else: - ring_outlier_filter_parameters = { - "output_frame": "" - } # keep the output frame as the input frame + # keep the output frame as the input frame + ring_outlier_output_frame = {"output_frame": ""} + nodes.append( ComposableNode( package="autoware_pointcloud_preprocessor", @@ -237,7 +245,7 @@ def create_parameter_dict(*args): ("input", "rectified/pointcloud_ex"), ("output", "pointcloud_before_sync"), ], - parameters=[ring_outlier_filter_parameters], + parameters=[ring_outlier_filter_node_param, ring_outlier_output_frame], extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], ) ) From d4f1e1141fa27edec26260abba2d7f5f3aee63c2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 05:49:59 +0000 Subject: [PATCH 2/2] ci(pre-commit): autofix --- common_sensor_launch/launch/nebula_node_container.launch.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common_sensor_launch/launch/nebula_node_container.launch.py b/common_sensor_launch/launch/nebula_node_container.launch.py index ff56c075..94e74638 100644 --- a/common_sensor_launch/launch/nebula_node_container.launch.py +++ b/common_sensor_launch/launch/nebula_node_container.launch.py @@ -25,8 +25,8 @@ from launch_ros.actions import ComposableNodeContainer from launch_ros.actions import LoadComposableNodes from launch_ros.descriptions import ComposableNode -from launch_ros.substitutions import FindPackageShare from launch_ros.parameter_descriptions import ParameterFile +from launch_ros.substitutions import FindPackageShare import yaml @@ -223,9 +223,7 @@ def create_parameter_dict(*args): ) ring_outlier_filter_node_param = ParameterFile( - param_file=LaunchConfiguration("ring_outlier_filter_node_param_file").perform( - context - ), + param_file=LaunchConfiguration("ring_outlier_filter_node_param_file").perform(context), allow_substs=True, )