From f31c1d5a43cdc621f4cfffcd81abe0bf5959d7cd Mon Sep 17 00:00:00 2001 From: vividf Date: Thu, 29 Aug 2024 14:23:48 +0900 Subject: [PATCH 1/2] feat: filter load from parameter file Signed-off-by: vividf --- common_sensor_launch/config/filter.param.yaml | 8 ++++++++ .../launch/nebula_node_container.launch.py | 18 ++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 common_sensor_launch/config/filter.param.yaml diff --git a/common_sensor_launch/config/filter.param.yaml b/common_sensor_launch/config/filter.param.yaml new file mode 100644 index 00000000..abd39689 --- /dev/null +++ b/common_sensor_launch/config/filter.param.yaml @@ -0,0 +1,8 @@ +/**: + ros__parameters: + input_frame: "" + output_frame: "" + max_queue_size: 5 + use_indices: false + latched_indices: false + approximate_sync: false diff --git a/common_sensor_launch/launch/nebula_node_container.launch.py b/common_sensor_launch/launch/nebula_node_container.launch.py index 49e0b958..f11e2d40 100644 --- a/common_sensor_launch/launch/nebula_node_container.launch.py +++ b/common_sensor_launch/launch/nebula_node_container.launch.py @@ -86,6 +86,10 @@ def create_parameter_dict(*args): ), "Sensor calib file under calibration/ was not found: {}".format(sensor_calib_fp) # Pointcloud preprocessor parameters + filter_param = ParameterFile( + param_file=LaunchConfiguration("filter_param_path").perform(context), + allow_substs=True, + ) distortion_corrector_node_param = ParameterFile( param_file=LaunchConfiguration("distortion_correction_node_param_path").perform(context), allow_substs=True, @@ -154,7 +158,7 @@ def create_parameter_dict(*args): ("input", "pointcloud_raw_ex"), ("output", "self_cropped/pointcloud_ex"), ], - parameters=[cropbox_parameters], + parameters=[filter_param, cropbox_parameters], extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], ) ) @@ -213,7 +217,7 @@ def create_parameter_dict(*args): ("input", "rectified/pointcloud_ex"), ("output", "pointcloud_before_sync"), ], - parameters=[ring_outlier_filter_parameters], + parameters=[filter_param, ring_outlier_filter_parameters], extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], ) ) @@ -303,6 +307,16 @@ def add_launch_arg(name: str, default_value=None, description=None): add_launch_arg( "vehicle_mirror_param_file", description="path to the file of vehicle mirror position yaml" ) + + add_launch_arg( + "filter_param_path", + os.path.join( + common_sensor_share_dir, + "config", + "filter.param.yaml", + ), + description="path to parameter file of filter", + ) add_launch_arg( "distortion_correction_node_param_path", os.path.join( From 4936fed2679d9059ef70eaed66e1c01d7cf8f7af Mon Sep 17 00:00:00 2001 From: vividf Date: Thu, 29 Aug 2024 14:49:57 +0900 Subject: [PATCH 2/2] chore: add parameter file Signed-off-by: vividf --- common_sensor_launch/launch/nebula_node_container.launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common_sensor_launch/launch/nebula_node_container.launch.py b/common_sensor_launch/launch/nebula_node_container.launch.py index f11e2d40..e58ead22 100644 --- a/common_sensor_launch/launch/nebula_node_container.launch.py +++ b/common_sensor_launch/launch/nebula_node_container.launch.py @@ -180,7 +180,7 @@ def create_parameter_dict(*args): ("input", "self_cropped/pointcloud_ex"), ("output", "mirror_cropped/pointcloud_ex"), ], - parameters=[cropbox_parameters], + parameters=[filter_param, cropbox_parameters], extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], ) )