From 38eb0725b5c4012d5e9714c47826e6351b3ec6e7 Mon Sep 17 00:00:00 2001 From: badai-nguyen Date: Mon, 18 Mar 2024 23:58:36 +0900 Subject: [PATCH] Revert "fix: remove x2 redundant param" This reverts commit fa935883bae2f973dbfc51f64f7ed4bc3f896b0e. --- aip_x2_launch/launch/lidar.launch.xml | 8 ++++++++ aip_x2_launch/launch/pandar_node_container.launch.py | 8 ++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/aip_x2_launch/launch/lidar.launch.xml b/aip_x2_launch/launch/lidar.launch.xml index 9ccf52af..a6bf2c3d 100644 --- a/aip_x2_launch/launch/lidar.launch.xml +++ b/aip_x2_launch/launch/lidar.launch.xml @@ -27,6 +27,7 @@ + @@ -50,6 +51,7 @@ + @@ -75,6 +77,7 @@ + @@ -99,6 +102,7 @@ + @@ -125,6 +129,7 @@ + @@ -149,6 +154,7 @@ + @@ -175,6 +181,7 @@ + @@ -199,6 +206,7 @@ + diff --git a/aip_x2_launch/launch/pandar_node_container.launch.py b/aip_x2_launch/launch/pandar_node_container.launch.py index ee0291d5..c6f1da37 100644 --- a/aip_x2_launch/launch/pandar_node_container.launch.py +++ b/aip_x2_launch/launch/pandar_node_container.launch.py @@ -43,10 +43,6 @@ 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 @@ -236,7 +232,6 @@ 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", @@ -251,7 +246,7 @@ def create_parameter_dict(*args): "horizontal_ring_id": LaunchConfiguration("horizontal_ring_id"), "vertical_bins": LaunchConfiguration("vertical_bins"), "is_channel_order_top2down": LaunchConfiguration("is_channel_order_top2down"), - "max_distance_range": distance_range[1], + "max_distance_range": LaunchConfiguration("max_distance_range"), "horizontal_resolution": LaunchConfiguration("horizontal_resolution"), } ] @@ -331,6 +326,7 @@ def add_launch_arg(name: str, default_value=None): 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("max_distance_range", "200.0") add_launch_arg( "blockage_diagnostics_param_file", [FindPackageShare("aip_x2_launch"), "/config/blockage_diagnostics_param_file.yaml"],