Skip to content

Commit

Permalink
refactor: change launch files to support new nebula architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
mojomex committed Jul 18, 2024
1 parent 8a9cc3c commit 87f08e4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 82 deletions.
56 changes: 15 additions & 41 deletions edge_auto_launch/launch/component/hesai_at128.launch.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<launch>
<arg name="live_sensor" default="True"/>
<arg name="live_sensor" default="true"/>
<arg name="sensor_model" default="PandarAT128"/>
<arg name="config_file" default="$(find-pkg-share nebula_ros)/config/lidar/hesai/$(var sensor_model).param.yaml"/>
<arg name="return_mode" default="Strongest"/>
<arg name="frame_id" default="lidar"/>
<arg name="scan_phase" default="0.0"/>
<arg name="namespace" default=""/>
<arg name="calibration_file" default="$(find-pkg-share nebula_decoders)/calibration/hesai/$(var sensor_model).csv"/>
<arg name="correction_file" default="$(find-pkg-share nebula_decoders)/calibration/hesai/$(var sensor_model).dat"/>
<arg name="sensor_ip" default="192.168.1.201"/>
<arg name="host_ip" default="192.168.1.100"/>
Expand All @@ -17,59 +17,33 @@
<arg name="cloud_max_angle" default="360" />
<arg name="dual_return_distance_threshold" default="0.1"/>
<arg name="diag_span" default="1000"/>
<arg name="setup_sensor" default="True"/>
<arg name="setup_sensor" default="true"/>

<group>
<node_container pkg="rclcpp_components" exec="component_container" name="nebula_at128_node" namespace="/">
<composable_node pkg="nebula_ros" plugin="HesaiDriverRosWrapper" name="hesai_driver_roswrapper_node" namespace="$(var namespace)">
<composable_node pkg="nebula_ros" plugin="HesaiRosWrapper" name="hesai_ros_wrapper_node" namespace="$(var namespace)">
<param from="$(var config_file)" allow_substs="true" />
<param name="sensor_model" value="$(var sensor_model)"/>
<param name="return_mode" value="$(var return_mode)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="scan_phase" value="$(var scan_phase)"/>
<param name="calibration_file" value="$(var calibration_file)"/>
<param name="correction_file" value="$(var correction_file)"/>
<remap from="pandar_points" to="pointcloud_raw"/>
<extra_arg name="use_intra_process_comms" value="true"/>
</composable_node>
</node_container>

<load_composable_node target="nebula_at128_node" if="$(var live_sensor)">
<composable_node pkg="nebula_ros" plugin="HesaiHwInterfaceRosWrapper" name="hesai_hw_interface_ros_wrapper_node" namespace="$(var namespace)">
<param name="sensor_model" value="$(var sensor_model)"/>
<param name="return_mode" value="$(var return_mode)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="scan_phase" value="$(var scan_phase)"/>
<param name="sensor_ip" value="$(var sensor_ip)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="launch_hw" value="$(var live_sensor)"/>
<param name="host_ip" value="$(var host_ip)"/>
<param name="sensor_ip" value="$(var sensor_ip)"/>
<param name="data_port" value="$(var data_port)"/>
<param name="gnss_port" value="$(var gnss_port)"/>
<param name="packet_mtu_size" value="$(var packet_mtu_size)"/>
<param name="rotation_speed" value="$(var rotation_speed)"/>
<param name="cloud_min_angle" value="$(var cloud_min_angle)"/>
<param name="cloud_max_angle" value="$(var cloud_max_angle)"/>
<param name="dual_return_distance_threshold" value="$(var dual_return_distance_threshold)"/>
<param name="setup_sensor" value="$(var setup_sensor)"/>
<extra_arg name="use_intra_process_comms" value="true"/>
</composable_node>
<composable_node pkg="nebula_ros" plugin="HesaiHwMonitorRosWrapper" name="hesai_hw_monitor_ros_wrapper_node" namespace="$(var namespace)">
<param name="sensor_model" value="$(var sensor_model)"/>
<param name="return_mode" value="$(var return_mode)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="scan_phase" value="$(var scan_phase)"/>
<param name="sensor_ip" value="$(var sensor_ip)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="host_ip" value="$(var host_ip)"/>
<param name="data_port" value="$(var data_port)"/>
<param name="gnss_port" value="$(var gnss_port)"/>
<param name="packet_mtu_size" value="$(var packet_mtu_size)"/>
<param name="rotation_speed" value="$(var rotation_speed)"/>
<param name="diag_span" value="$(var diag_span)"/>
<param name="cloud_min_angle" value="$(var cloud_min_angle)"/>
<param name="cloud_max_angle" value="$(var cloud_max_angle)"/>
<param name="diag_span" value="$(var diag_span)"/>
<param name="scan_phase" value="$(var scan_phase)"/>
<param name="rotation_speed" value="$(var rotation_speed)"/>
<param name="return_mode" value="$(var return_mode)"/>
<param name="correction_file" value="$(var correction_file)"/>
<param name="dual_return_distance_threshold" value="$(var dual_return_distance_threshold)"/>
<extra_arg name="use_intra_process_comms" value="true"/>
<remap from="pandar_points" to="pointcloud_raw"/>
</composable_node>
</load_composable_node>
</node_container>

</group>
</launch>
55 changes: 14 additions & 41 deletions edge_auto_launch/launch/component/hesai_pandar_xt32.launch.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<launch>
<arg name="live_sensor" default="False"/>
<arg name="live_sensor" default="false"/>
<arg name="sensor_model" default="PandarXT32"/>
<arg name="config_file" default="$(find-pkg-share nebula_ros)/config/lidar/hesai/$(var sensor_model).param.yaml"/>
<arg name="return_mode" default="Dual"/>
<arg name="frame_id" default="lidar"/>
<arg name="scan_phase" default="0.0"/>
<arg name="namespace" default=""/>
<arg name="calibration_file" default="$(find-pkg-share nebula_decoders)/calibration/hesai/$(var sensor_model).csv"/>
<arg name="correction_file" default="$(find-pkg-share nebula_decoders)/calibration/hesai/$(var sensor_model).dat"/>
<arg name="sensor_ip" default="192.168.1.201"/>
<arg name="host_ip" default="192.168.1.100"/>
<arg name="data_port" default="2368"/>
Expand All @@ -17,59 +17,32 @@
<arg name="cloud_max_angle" default="360"/>
<arg name="dual_return_distance_threshold" default="0.1"/>
<arg name="diag_span" default="1000"/>
<arg name="setup_sensor" default="True"/>
<arg name="setup_sensor" default="true"/>

<group>
<node_container pkg="rclcpp_components" exec="component_container" name="nebula_xt32_node" namespace="/">
<composable_node pkg="nebula_ros" plugin="HesaiDriverRosWrapper" name="hesai_driver_roswrapper_node" namespace="$(var namespace)">
<composable_node pkg="nebula_ros" plugin="HesaiRosWrapper" name="hesai_ros_wrapper_node" namespace="$(var namespace)">
<param from="$(var config_file)" allow_substs="true" />
<param name="sensor_model" value="$(var sensor_model)"/>
<param name="return_mode" value="$(var return_mode)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="scan_phase" value="$(var scan_phase)"/>
<param name="calibration_file" value="$(var calibration_file)"/>
<param name="correction_file" value="$(var correction_file)"/>
<remap from="pandar_points" to="pointcloud_raw"/>
<extra_arg name="use_intra_process_comms" value="true"/>
</composable_node>
</node_container>

<load_composable_node target="nebula_xt32_node" if="$(var live_sensor)">
<composable_node pkg="nebula_ros" plugin="HesaiHwInterfaceRosWrapper" name="hesai_hw_interface_ros_wrapper_node" namespace="$(var namespace)">
<param name="sensor_model" value="$(var sensor_model)"/>
<param name="return_mode" value="$(var return_mode)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="scan_phase" value="$(var scan_phase)"/>
<param name="sensor_ip" value="$(var sensor_ip)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="launch_hw" value="$(var live_sensor)"/>
<param name="host_ip" value="$(var host_ip)"/>
<param name="sensor_ip" value="$(var sensor_ip)"/>
<param name="data_port" value="$(var data_port)"/>
<param name="gnss_port" value="$(var gnss_port)"/>
<param name="packet_mtu_size" value="$(var packet_mtu_size)"/>
<param name="rotation_speed" value="$(var rotation_speed)"/>
<param name="cloud_min_angle" value="$(var cloud_min_angle)"/>
<param name="cloud_max_angle" value="$(var cloud_max_angle)"/>
<param name="dual_return_distance_threshold" value="$(var dual_return_distance_threshold)"/>
<param name="setup_sensor" value="$(var setup_sensor)"/>
<extra_arg name="use_intra_process_comms" value="true"/>
</composable_node>
<composable_node pkg="nebula_ros" plugin="HesaiHwMonitorRosWrapper" name="hesai_hw_monitor_ros_wrapper_node" namespace="$(var namespace)">
<param name="sensor_model" value="$(var sensor_model)"/>
<param name="return_mode" value="$(var return_mode)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="scan_phase" value="$(var scan_phase)"/>
<param name="sensor_ip" value="$(var sensor_ip)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="host_ip" value="$(var host_ip)"/>
<param name="data_port" value="$(var data_port)"/>
<param name="gnss_port" value="$(var gnss_port)"/>
<param name="packet_mtu_size" value="$(var packet_mtu_size)"/>
<param name="rotation_speed" value="$(var rotation_speed)"/>
<param name="diag_span" value="$(var diag_span)"/>
<param name="cloud_min_angle" value="$(var cloud_min_angle)"/>
<param name="cloud_max_angle" value="$(var cloud_max_angle)"/>
<param name="diag_span" value="$(var diag_span)"/>
<param name="scan_phase" value="$(var scan_phase)"/>
<param name="rotation_speed" value="$(var rotation_speed)"/>
<param name="return_mode" value="$(var return_mode)"/>
<param name="calibration_file" value="$(var calibration_file)"/>
<param name="dual_return_distance_threshold" value="$(var dual_return_distance_threshold)"/>
<extra_arg name="use_intra_process_comms" value="true"/>
<remap from="pandar_points" to="pointcloud_raw"/>
</composable_node>
</load_composable_node>
</node_container>
</group>
</launch>

0 comments on commit 87f08e4

Please sign in to comment.