From c60b3870eb86790c803183f5d92038e6bda7997c Mon Sep 17 00:00:00 2001 From: Max SCHMELLER Date: Tue, 24 Sep 2024 18:27:47 +0900 Subject: [PATCH 1/2] chore(nebula_node_container): make launchers work with Nebula v0.2.0 Signed-off-by: Max SCHMELLER --- .../launch/nebula_node_container.launch.py | 45 ++++--------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/common_sensor_launch/launch/nebula_node_container.launch.py b/common_sensor_launch/launch/nebula_node_container.launch.py index d1f978a..1f0214c 100644 --- a/common_sensor_launch/launch/nebula_node_container.launch.py +++ b/common_sensor_launch/launch/nebula_node_container.launch.py @@ -113,16 +113,18 @@ def create_parameter_dict(*args): nodes.append( ComposableNode( package="nebula_ros", - plugin=sensor_make + "DriverRosWrapper", - name=sensor_make.lower() + "_driver_ros_wrapper_node", + plugin=sensor_make + "RosWrapper", + name=sensor_make.lower() + "_ros_wrapper_node", parameters=[ { "calibration_file": sensor_calib_fp, "sensor_model": sensor_model, + "launch_hw": LaunchConfiguration("launch_driver"), **create_parameter_dict( "host_ip", "sensor_ip", "data_port", + "gnss_port", "return_mode", "min_range", "max_range", @@ -131,6 +133,9 @@ def create_parameter_dict(*args): "cloud_min_angle", "cloud_max_angle", "dual_return_distance_threshold", + "rotation_speed", + "packet_mtu_size", + "setup_sensor", ), }, ], @@ -237,41 +242,7 @@ def create_parameter_dict(*args): output="both", ) - driver_component = ComposableNode( - package="nebula_ros", - plugin=sensor_make + "HwInterfaceRosWrapper", - # node is created in a global context, need to avoid name clash - name=sensor_make.lower() + "_hw_interface_ros_wrapper_node", - parameters=[ - { - "sensor_model": sensor_model, - "calibration_file": sensor_calib_fp, - **create_parameter_dict( - "sensor_ip", - "host_ip", - "scan_phase", - "return_mode", - "frame_id", - "rotation_speed", - "data_port", - "gnss_port", - "cloud_min_angle", - "cloud_max_angle", - "packet_mtu_size", - "dual_return_distance_threshold", - "setup_sensor", - ), - } - ], - ) - - driver_component_loader = LoadComposableNodes( - composable_node_descriptions=[driver_component], - target_container=container, - condition=IfCondition(LaunchConfiguration("launch_driver")), - ) - - return [container, driver_component_loader] + return [container] def generate_launch_description(): From c984afbe86690577bd1788bdc1dfa633a03a7a3e Mon Sep 17 00:00:00 2001 From: Max SCHMELLER Date: Wed, 25 Sep 2024 10:48:04 +0900 Subject: [PATCH 2/2] chore(nebula_node_container): clean up imports Signed-off-by: Max SCHMELLER --- common_sensor_launch/launch/nebula_node_container.launch.py | 1 - 1 file changed, 1 deletion(-) diff --git a/common_sensor_launch/launch/nebula_node_container.launch.py b/common_sensor_launch/launch/nebula_node_container.launch.py index 1f0214c..a5bdb08 100644 --- a/common_sensor_launch/launch/nebula_node_container.launch.py +++ b/common_sensor_launch/launch/nebula_node_container.launch.py @@ -23,7 +23,6 @@ from launch.conditions import UnlessCondition from launch.substitutions import LaunchConfiguration from launch_ros.actions import ComposableNodeContainer -from launch_ros.actions import LoadComposableNodes from launch_ros.descriptions import ComposableNode from launch_ros.parameter_descriptions import ParameterFile import yaml