From 59c0a99d19bb3e4c09b6348242caba53f51ce886 Mon Sep 17 00:00:00 2001 From: kotaro-hihara Date: Fri, 7 Feb 2025 10:06:04 +0900 Subject: [PATCH] fix(aip_gen2_x2_launch): fix lidar.launch.xml to update nebula (#388) * add ptp_lock_threshold and udp_only * add upd_only * add sensor_model and launch_hw * add dual_return_distance_threshold * add blockage_diagnostics_param_file * use nebula_node_container.py from lidar.launch.xml * fix argument error * fix sensor_frame to frame_id * add min_range, max_range * remove unused launch file * add params for dual_return_filter --- .../config/dual_return_filter.param.yaml | 13 +- .../launch/hesai_OT128.launch.xml | 74 --------- .../launch/hesai_QT128.launch.xml | 72 --------- aip_x2_gen2_launch/launch/lidar.launch.xml | 145 ++++++++++++++---- .../launch/nebula_node_container.launch.py | 11 +- 5 files changed, 127 insertions(+), 188 deletions(-) delete mode 100644 aip_x2_gen2_launch/launch/hesai_OT128.launch.xml delete mode 100644 aip_x2_gen2_launch/launch/hesai_QT128.launch.xml diff --git a/aip_x2_gen2_launch/config/dual_return_filter.param.yaml b/aip_x2_gen2_launch/config/dual_return_filter.param.yaml index 75168e7b..a87fef47 100644 --- a/aip_x2_gen2_launch/config/dual_return_filter.param.yaml +++ b/aip_x2_gen2_launch/config/dual_return_filter.param.yaml @@ -1,13 +1,16 @@ /**: ros__parameters: - roi_mode: "Fixed_azimuth_ROI" # description="options: `No_ROI`, `Fixed_xyz_ROI` or `Fixed_azimuth_ROI`"/> - weak_first_local_noise_threshold: 2 # description="for No_ROI roi_mode, recommended value is 10" /> - visibility_error_threshold: 0.95 - visibility_warn_threshold: 0.97 - max_distance: 10.0 x_max: 18.0 x_min: -12.0 y_max: 2.0 y_min: -2.0 z_max: 10.0 z_min: 0.0 + max_distance: 10.0 + max_azimuth_diff: 50.0 + weak_first_distance_ratio: 1.004 + general_distance_ratio: 1.03 + weak_first_local_noise_threshold: 2 + roi_mode: "Fixed_azimuth_ROI" + visibility_error_threshold: 0.92 + visibility_warn_threshold: 0.95 diff --git a/aip_x2_gen2_launch/launch/hesai_OT128.launch.xml b/aip_x2_gen2_launch/launch/hesai_OT128.launch.xml deleted file mode 100644 index 8bbaddca..00000000 --- a/aip_x2_gen2_launch/launch/hesai_OT128.launch.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aip_x2_gen2_launch/launch/hesai_QT128.launch.xml b/aip_x2_gen2_launch/launch/hesai_QT128.launch.xml deleted file mode 100644 index 67b9f0b8..00000000 --- a/aip_x2_gen2_launch/launch/hesai_QT128.launch.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aip_x2_gen2_launch/launch/lidar.launch.xml b/aip_x2_gen2_launch/launch/lidar.launch.xml index bddb9a2a..6ab41beb 100644 --- a/aip_x2_gen2_launch/launch/lidar.launch.xml +++ b/aip_x2_gen2_launch/launch/lidar.launch.xml @@ -27,9 +27,10 @@ - + + - + @@ -37,15 +38,18 @@ - + + + - + + + - @@ -55,14 +59,20 @@ + + + + + - + + - + @@ -70,12 +80,16 @@ - + + + - + + + @@ -87,14 +101,20 @@ + + + + + - + + - + @@ -102,12 +122,16 @@ - + + + - + + + @@ -119,14 +143,20 @@ + + + + + - + + - + @@ -134,12 +164,16 @@ - + + + - + + + @@ -151,15 +185,21 @@ + + + + + - + + - + @@ -167,12 +207,16 @@ - + + + - + + + @@ -184,14 +228,20 @@ + + + + + - + + - + @@ -199,12 +249,16 @@ - + + + - + + + @@ -216,14 +270,20 @@ + + + + + - + + - + @@ -231,12 +291,16 @@ - + + + - + + + @@ -248,14 +312,20 @@ + + + + + - + + - + @@ -263,12 +333,16 @@ - + + + - + + + @@ -280,6 +354,11 @@ + + + + + diff --git a/aip_x2_gen2_launch/launch/nebula_node_container.launch.py b/aip_x2_gen2_launch/launch/nebula_node_container.launch.py index e8a4a55a..c288f0e5 100644 --- a/aip_x2_gen2_launch/launch/nebula_node_container.launch.py +++ b/aip_x2_gen2_launch/launch/nebula_node_container.launch.py @@ -19,8 +19,6 @@ # from launch.conditions import LaunchConfigurationNotEquals from launch.conditions import IfCondition -from launch.conditions import LaunchConfigurationEquals -from launch.conditions import LaunchConfigurationNotEquals from launch.conditions import UnlessCondition from launch.substitutions import LaunchConfiguration from launch_ros.actions import ComposableNodeContainer @@ -110,9 +108,11 @@ def str2vector(string): "ptp_transport_type", "ptp_switch_type", "ptp_domain", + "ptp_lock_threshold", "diag_span", "calibration_file", "launch_hw", + "udp_only", ), "retry_hw": True, }, @@ -243,13 +243,13 @@ def str2vector(string): ring_outlier_filter_loader = LoadComposableNodes( composable_node_descriptions=[ring_outlier_filter_component], target_container=container, - condition=LaunchConfigurationNotEquals("return_mode", "Dual"), + condition=launch.conditions.UnlessCondition(LaunchConfiguration("use_dual_return_filter")), ) dual_return_filter_loader = LoadComposableNodes( composable_node_descriptions=[dual_return_filter_component], target_container=container, - condition=LaunchConfigurationEquals("return_mode", "Dual"), + condition=launch.conditions.IfCondition(LaunchConfiguration("use_dual_return_filter")), ) blockage_diag_loader = LoadComposableNodes( @@ -288,6 +288,8 @@ def add_launch_arg(name: str, default_value=None, description=None): add_launch_arg("host_ip", "255.255.255.255", "host ip address") add_launch_arg("sync_angle", "0") add_launch_arg("cut_angle", "0.0") + add_launch_arg("ptp_lock_threshold", "100") + add_launch_arg("udp_only", "false") # add_launch_arg("point_filters", "{}", "point filter definitions in JSON format") add_launch_arg("base_frame", "base_link", "base frame id") add_launch_arg("min_range", "0.3", "minimum view range for Velodyne sensors") @@ -331,6 +333,7 @@ def add_launch_arg(name: str, default_value=None, description=None): add_launch_arg("calibration_file", "") add_launch_arg("output_as_sensor_frame", "True", "output final pointcloud in sensor frame") + add_launch_arg("use_dual_return_filter", "false") set_container_executable = SetLaunchConfiguration( "container_executable",