From 2c88ea4a8cc2017e432db0a0de29d10e12fb38d1 Mon Sep 17 00:00:00 2001 From: badai nguyen <94814556+badai-nguyen@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:26:25 +0900 Subject: [PATCH] chore(blockage_diag): update param for aip_x2_launch (#223) * chore: update blockage param for aip_x2_launch Signed-off-by: badai-nguyen * chore: update param config Signed-off-by: badai-nguyen --------- Signed-off-by: badai-nguyen --- .../blockage_diagnostics_param_file.yaml | 1 + aip_x2_launch/launch/lidar.launch.xml | 25 +++++++++++++++++++ .../launch/pandar_node_container.launch.py | 10 +++++++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/aip_x2_launch/config/blockage_diagnostics_param_file.yaml b/aip_x2_launch/config/blockage_diagnostics_param_file.yaml index b8b62b50..c6ce8e11 100644 --- a/aip_x2_launch/config/blockage_diagnostics_param_file.yaml +++ b/aip_x2_launch/config/blockage_diagnostics_param_file.yaml @@ -9,3 +9,4 @@ dust_kernel_size: 2 dust_buffering_frames: 10 dust_buffering_interval: 1 + blockage_kernel: 10 diff --git a/aip_x2_launch/launch/lidar.launch.xml b/aip_x2_launch/launch/lidar.launch.xml index 6f478053..557304bb 100644 --- a/aip_x2_launch/launch/lidar.launch.xml +++ b/aip_x2_launch/launch/lidar.launch.xml @@ -7,6 +7,7 @@ + @@ -26,6 +27,9 @@ + + + @@ -46,6 +50,9 @@ + + + @@ -68,6 +75,9 @@ + + + @@ -89,6 +99,9 @@ + + + @@ -112,6 +125,9 @@ + + + @@ -133,6 +149,9 @@ + + + @@ -156,6 +175,9 @@ + + + @@ -177,6 +199,9 @@ + + + diff --git a/aip_x2_launch/launch/pandar_node_container.launch.py b/aip_x2_launch/launch/pandar_node_container.launch.py index cfb39cc4..ee0291d5 100644 --- a/aip_x2_launch/launch/pandar_node_container.launch.py +++ b/aip_x2_launch/launch/pandar_node_container.launch.py @@ -43,6 +43,10 @@ def get_pandar_monitor_info(): return p +def str2vector(string): + return [float(x) for x in string.strip("[]").split(",")] + + def get_vehicle_info(context): # TODO(TIER IV): Use Parameter Substitution after we drop Galactic support # https://github.com/ros2/launch_ros/blob/master/launch_ros/launch_ros/substitutions/parameter.py @@ -232,6 +236,7 @@ def create_parameter_dict(*args): extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], ) + distance_range = str2vector(context.perform_substitution(LaunchConfiguration("distance_range"))) blockage_diag_component = ComposableNode( package="pointcloud_preprocessor", plugin="pointcloud_preprocessor::BlockageDiagComponent", @@ -245,7 +250,9 @@ def create_parameter_dict(*args): "angle_range": LaunchConfiguration("angle_range"), "horizontal_ring_id": LaunchConfiguration("horizontal_ring_id"), "vertical_bins": LaunchConfiguration("vertical_bins"), - "model": LaunchConfiguration("model"), + "is_channel_order_top2down": LaunchConfiguration("is_channel_order_top2down"), + "max_distance_range": distance_range[1], + "horizontal_resolution": LaunchConfiguration("horizontal_resolution"), } ] + [load_composable_node_param("blockage_diagnostics_param_file")], @@ -323,6 +330,7 @@ def add_launch_arg(name: str, default_value=None): add_launch_arg("input_frame", LaunchConfiguration("base_frame")) add_launch_arg("output_frame", LaunchConfiguration("base_frame")) add_launch_arg("dual_return_filter_param_file") + add_launch_arg("horizontal_resolution", "0.4") add_launch_arg( "blockage_diagnostics_param_file", [FindPackageShare("aip_x2_launch"), "/config/blockage_diagnostics_param_file.yaml"],