Skip to content

Commit

Permalink
exclude hw_interface_node to outside container
Browse files Browse the repository at this point in the history
Signed-off-by: Kento Yabuuchi <[email protected]>
  • Loading branch information
KYabuuchi committed Apr 1, 2024
1 parent 593a7b5 commit fc756c1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 42 deletions.
25 changes: 15 additions & 10 deletions common_sensor_launch/launch/hesai_OT128.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<arg name="container_name" default="hesai_node_container"/>

<include file="$(find-pkg-share common_sensor_launch)/launch/nebula_node_container.launch.py">
<arg name="launch_driver" value="$(var launch_driver)"/>
<arg name="launch_driver" value="false"/> <!-- Enforce to disable -->
<arg name="sensor_model" value="$(var model)"/>
<arg name="return_mode" value="$(var return_mode)"/>
<arg name="frame_id" value="$(var sensor_frame)"/>
Expand All @@ -39,23 +39,28 @@
<arg name="setup_sensor" value="false"/>
</include>

<node pkg="nebula_ros" name="hesai_driver_ros_wrapper_node" exec="hesai_driver_ros_wrapper_node">
<remap from="aw_points" to="pointcloud_raw" />
<remap from="aw_points_ex" to="pointcloud_raw_ex" />
<param name="calibration_file" value="$(find-pkg-share nebula_decoders)/calibration/hesai/$(var model).csv"/>
<node pkg="nebula_ros" name="hesai_hw_interface_ros_wrapper_node" exec="hesai_hw_interface_ros_wrapper_node">
<param name="sensor_model" value="$(var model)"/>
<param name="calibration_file" value="$(find-pkg-share nebula_decoders)/calibration/hesai/$(var model).csv"/>

<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="host_ip" value="$(var host_ip)"/>
<param name="scane_phase" value="$(var scan_phase)"/>
<param name="return_mode" value="$(var return_mode)"/>
<param name="min_range" value="0.3"/>
<param name="max_range" value="300.0"/>
<param name="frame_id" value="$(var sensor_frame)"/>
<param name="scane_phase" value="$(var scan_phase)"/>
<param name="rotation_speed" value="600"/>
<param name="data_port" value="$(var data_port)"/>
<param name="gnss_port" value="2380"/>
<param name="cloud_min_angle" value="$(var cloud_min_angle)"/>
<param name="cloud_max_angle" value="$(var cloud_max_angle)"/>
<param name="packet_mtu_size" value="1500"/>
<param name="dual_return_distance_threshold" value="$(var dual_return_distance_threshold)"/>
<param name="setup_sensor" value="false"/>
<param name="ptp_profile" value="802.1as"/>
<param name="ptp_transport_type" value="L2"/>
<param name="ptp_switch_type" value="$NON_TSN"/>
<param name="ptp_domain" value="1"/>
<param name="retry_hw" value="false"/>
</node>

</launch>
60 changes: 28 additions & 32 deletions common_sensor_launch/launch/nebula_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,39 +128,35 @@ def create_parameter_dict(*args):
)
)

# NOTE: Exclude the OT128 driver to outside the container
if sensor_model != "Pandar128E4X":
nodes.append(
ComposableNode(
package="nebula_ros",
plugin=sensor_make + "HwMonitorRosWrapper",
name=sensor_make.lower() + "_hw_monitor_ros_wrapper_node",
parameters=[
{
"sensor_model": sensor_model,
**create_parameter_dict(
"return_mode",
"frame_id",
"scan_phase",
"sensor_ip",
"host_ip",
"data_port",
"gnss_port",
"packet_mtu_size",
"rotation_speed",
"cloud_min_angle",
"cloud_max_angle",
"diag_span",
"dual_return_distance_threshold",
"delay_monitor_ms",
),
},
],
extra_arguments=[
{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}
],
)
nodes.append(
ComposableNode(
package="nebula_ros",
plugin=sensor_make + "HwMonitorRosWrapper",
name=sensor_make.lower() + "_hw_monitor_ros_wrapper_node",
parameters=[
{
"sensor_model": sensor_model,
**create_parameter_dict(
"return_mode",
"frame_id",
"scan_phase",
"sensor_ip",
"host_ip",
"data_port",
"gnss_port",
"packet_mtu_size",
"rotation_speed",
"cloud_min_angle",
"cloud_max_angle",
"diag_span",
"dual_return_distance_threshold",
"delay_monitor_ms",
),
},
],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)

cropbox_parameters = create_parameter_dict("input_frame", "output_frame")
cropbox_parameters["negative"] = True
Expand Down

0 comments on commit fc756c1

Please sign in to comment.