From 714db941d63936f35667ffb0cfac2125c4a6f19f 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 1/2] 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 523add57..ba75c4c8 100644 --- a/aip_x2_launch/launch/lidar.launch.xml +++ b/aip_x2_launch/launch/lidar.launch.xml @@ -7,6 +7,7 @@ + @@ -27,6 +28,9 @@ + + + @@ -48,6 +52,9 @@ + + + @@ -71,6 +78,9 @@ + + + @@ -93,6 +103,9 @@ + + + @@ -117,6 +130,9 @@ + + + @@ -139,6 +155,9 @@ + + + @@ -163,6 +182,9 @@ + + + @@ -185,6 +207,9 @@ + + + diff --git a/aip_x2_launch/launch/pandar_node_container.launch.py b/aip_x2_launch/launch/pandar_node_container.launch.py index 43db6570..8d8b13cf 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("blockage_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 ae0ab3d4919c7b6fb8505930f1d51976eef2f43a Mon Sep 17 00:00:00 2001 From: badai nguyen <94814556+badai-nguyen@users.noreply.github.com> Date: Fri, 29 Mar 2024 15:21:42 +0900 Subject: [PATCH 2/2] chore(blockage_diag): add option param for x2 (#224) Signed-off-by: badai-nguyen --- aip_x2_launch/config/blockage_diagnostics_param_file.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aip_x2_launch/config/blockage_diagnostics_param_file.yaml b/aip_x2_launch/config/blockage_diagnostics_param_file.yaml index c6ce8e11..e43b2039 100644 --- a/aip_x2_launch/config/blockage_diagnostics_param_file.yaml +++ b/aip_x2_launch/config/blockage_diagnostics_param_file.yaml @@ -4,6 +4,8 @@ blockage_count_threshold: 50 blockage_buffering_frames: 2 blockage_buffering_interval: 1 + enable_dust_diag: false + publish_debug_image: false dust_ratio_threshold: 0.2 dust_count_threshold: 10 dust_kernel_size: 2