From a694f2ed8d4c1e272a4e647a4bfa308ae947ddc4 Mon Sep 17 00:00:00 2001 From: badai-nguyen Date: Mon, 18 Mar 2024 23:27:00 +0900 Subject: [PATCH 1/2] chore: update blockage param for aip_x2_launch Signed-off-by: badai-nguyen --- aip_x2_launch/launch/lidar.launch.xml | 29 +++++++++++++++++-- .../launch/pandar_node_container.launch.py | 10 ++++++- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/aip_x2_launch/launch/lidar.launch.xml b/aip_x2_launch/launch/lidar.launch.xml index 6f478053..9ccf52af 100644 --- a/aip_x2_launch/launch/lidar.launch.xml +++ b/aip_x2_launch/launch/lidar.launch.xml @@ -4,9 +4,9 @@ - + @@ -26,6 +26,9 @@ + + + @@ -46,6 +49,9 @@ + + + @@ -68,6 +74,9 @@ + + + @@ -89,6 +98,9 @@ + + + @@ -112,6 +124,9 @@ + + + @@ -133,6 +148,9 @@ + + + @@ -156,6 +174,9 @@ + + + @@ -177,6 +198,9 @@ + + + @@ -189,8 +213,7 @@ - - + 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"], From e51bff407ce86a48bfca88c783356cd8e9c513f6 Mon Sep 17 00:00:00 2001 From: badai-nguyen Date: Mon, 18 Mar 2024 23:54:11 +0900 Subject: [PATCH 2/2] chore: update param config Signed-off-by: badai-nguyen --- aip_x2_launch/config/blockage_diagnostics_param_file.yaml | 1 + 1 file changed, 1 insertion(+) 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