Skip to content

Commit

Permalink
refactor(tier4_perception_launch): refactor object_recognition/detect…
Browse files Browse the repository at this point in the history
…ion launcher (#6152)

* refactor: align mode parameters

Signed-off-by: Taekjin LEE <[email protected]>

* refactor: cluster detector and merger

Signed-off-by: Taekjin LEE <[email protected]>

* refactor: separate object merger launches

Signed-off-by: Taekjin LEE <[email protected]>

* refactor: radar detector module

Signed-off-by: Taekjin LEE <[email protected]>

* refactor: lidar detector modules

Signed-off-by: Taekjin LEE <[email protected]>

* chore: fix mis spell, align typo, clean-up

Signed-off-by: Taekjin LEE <[email protected]>

---------

Signed-off-by: Taekjin LEE <[email protected]>
  • Loading branch information
technolojin authored Jan 24, 2024
1 parent 1aba0ac commit 2719ad4
Show file tree
Hide file tree
Showing 10 changed files with 563 additions and 809 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Interface parameters -->
<arg name="mode" default="lidar" description="options: `camera_lidar_radar_fusion`, `camera_lidar_fusion`, `lidar_radar_fusion`, `lidar` or `radar`"/>

<!-- LiDAR parameters -->
<!-- Lidar parameters -->
<arg name="input/pointcloud"/>
<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`, `pointpainting`, `clustering`"/>
<arg name="use_object_filter" default="true" description="use object filter"/>
Expand Down Expand Up @@ -34,9 +34,10 @@
<arg name="radar_lanelet_filtering_range_param" default="$(find-pkg-share detected_object_validation)/config/object_lanelet_filter.param.yaml"/>
<arg name="radar_object_clustering_param_path" default="$(find-pkg-share radar_object_clustering)/config/radar_object_clustering.param.yaml"/>

<!-- Camera-LiDAR-Radar fusion based detection -->
<!-- Camera-Lidar-Radar fusion based detection -->
<group if="$(eval '&quot;$(var mode)&quot;==&quot;camera_lidar_radar_fusion&quot;')">
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/camera_lidar_radar_fusion_based_detection.launch.xml">
<!-- Camera-Lidar detectors -->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/camera_lidar_detector.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
<arg name="image_raw0" value="$(var image_raw0)"/>
<arg name="camera_info0" value="$(var camera_info0)"/>
Expand All @@ -57,23 +58,61 @@
<arg name="image_number" value="$(var image_number)"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="use_roi_based_cluster" value="$(var use_roi_based_cluster)"/>
<arg name="detection_by_tracker_param_path" value="$(var detection_by_tracker_param_path)"/>
<arg name="input/radar" value="$(var input/radar)"/>
<arg name="radar_lanelet_filtering_range_param" value="$(var radar_lanelet_filtering_range_param)"/>
<arg name="roi_cluster_fusion_param_path" value="$(var roi_cluster_fusion_param_path)"/>
<arg name="roi_pointcloud_fusion_param_path" value="$(var roi_pointcloud_fusion_param_path)"/>
</include>
<!-- Lidar dnn-based detectors-->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/lidar_dnn_detector.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
</include>
<!-- Radar detector-->
<group>
<push-ros-namespace namespace="radar"/>
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/radar_detector.launch.xml">
<arg name="input/radar" value="$(var input/radar)"/>
<arg name="output/objects" value="far_objects"/>
<arg name="filter/angle_threshold" value="1.0472"/>
<arg name="filter/velocity_threshold" value="3.0"/>
<arg name="split/velocity_threshold" value="4.5"/>
<arg name="split_range" value="70.0"/>
<arg name="radar_lanelet_filtering_range_param" value="$(var radar_lanelet_filtering_range_param)"/>
<arg name="radar_object_clustering_param_path" value="$(var radar_object_clustering_param_path)"/>
</include>
</group>
<!-- Object merger -->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/merger/camera_lidar_radar_merger.launch.xml">
<arg name="image_raw0" value="$(var image_raw0)"/>
<arg name="camera_info0" value="$(var camera_info0)"/>
<arg name="image_raw1" value="$(var image_raw1)"/>
<arg name="camera_info1" value="$(var camera_info1)"/>
<arg name="image_raw2" value="$(var image_raw2)"/>
<arg name="camera_info2" value="$(var camera_info2)"/>
<arg name="image_raw3" value="$(var image_raw3)"/>
<arg name="camera_info3" value="$(var camera_info3)"/>
<arg name="image_raw4" value="$(var image_raw4)"/>
<arg name="camera_info4" value="$(var camera_info4)"/>
<arg name="image_raw5" value="$(var image_raw5)"/>
<arg name="camera_info5" value="$(var camera_info5)"/>
<arg name="image_raw6" value="$(var image_raw6)"/>
<arg name="camera_info6" value="$(var camera_info6)"/>
<arg name="image_raw7" value="$(var image_raw7)"/>
<arg name="camera_info7" value="$(var camera_info7)"/>
<arg name="image_number" value="$(var image_number)"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="roi_detected_object_fusion_param_path" value="$(var roi_detected_object_fusion_param_path)"/>
</include>
</group>

<!-- Camera-LiDAR fusion based detection -->
<!-- Camera-Lidar fusion based detection -->
<group if="$(eval '&quot;$(var mode)&quot;==&quot;camera_lidar_fusion&quot;')">
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/camera_lidar_fusion_based_detection.launch.xml">
<!-- Camera-Lidar detectors -->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/camera_lidar_detector.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
<arg name="image_raw0" value="$(var image_raw0)"/>
<arg name="camera_info0" value="$(var camera_info0)"/>
Expand All @@ -94,47 +133,107 @@
<arg name="image_number" value="$(var image_number)"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="use_roi_based_cluster" value="$(var use_roi_based_cluster)"/>
<arg name="detection_by_tracker_param_path" value="$(var detection_by_tracker_param_path)"/>
</include>
<!-- Lidar dnn-based detectors-->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/lidar_dnn_detector.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
</include>
<!-- Object merger -->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/merger/camera_lidar_merger.launch.xml">
<arg name="image_raw0" value="$(var image_raw0)"/>
<arg name="camera_info0" value="$(var camera_info0)"/>
<arg name="image_raw1" value="$(var image_raw1)"/>
<arg name="camera_info1" value="$(var camera_info1)"/>
<arg name="image_raw2" value="$(var image_raw2)"/>
<arg name="camera_info2" value="$(var camera_info2)"/>
<arg name="image_raw3" value="$(var image_raw3)"/>
<arg name="camera_info3" value="$(var camera_info3)"/>
<arg name="image_raw4" value="$(var image_raw4)"/>
<arg name="camera_info4" value="$(var camera_info4)"/>
<arg name="image_raw5" value="$(var image_raw5)"/>
<arg name="camera_info5" value="$(var camera_info5)"/>
<arg name="image_raw6" value="$(var image_raw6)"/>
<arg name="camera_info6" value="$(var camera_info6)"/>
<arg name="image_raw7" value="$(var image_raw7)"/>
<arg name="camera_info7" value="$(var camera_info7)"/>
<arg name="image_number" value="$(var image_number)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
</include>
</group>

<!-- LiDAR-Radar fusion based detection -->
<!-- Lidar-Radar fusion based detection -->
<group if="$(eval '&quot;$(var mode)&quot;==&quot;lidar_radar_fusion&quot;')">
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/lidar_radar_based_detection.launch.xml">
<!-- Radar detector-->
<group>
<push-ros-namespace namespace="radar"/>
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/radar_detector.launch.xml">
<arg name="input/radar" value="$(var input/radar)"/>
<arg name="output/objects" value="far_objects"/>
<arg name="radar_lanelet_filtering_range_param" value="$(var radar_lanelet_filtering_range_param)"/>
<arg name="radar_object_clustering_param_path" value="$(var radar_object_clustering_param_path)"/>
</include>
</group>
<!-- Lidar dnn-based detectors-->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/lidar_dnn_detector.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
</include>
<!-- Lidar rule-based detectors-->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/lidar_rule_detector.launch.xml">
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="input/radar" value="$(var input/radar)"/>
<arg name="radar_lanelet_filtering_range_param" value="$(var radar_lanelet_filtering_range_param)"/>
</include>
<!-- Lidar object merger -->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/merger/lidar_merger.launch.xml">
<arg name="output/objects" value="lidar/objects"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
</include>
<!-- Lidar-Radar object merger-->
<include file="$(find-pkg-share radar_fusion_to_detected_object)/launch/radar_object_fusion_to_detected_object.launch.xml">
<arg name="input/objects" value="lidar/objects"/>
<arg name="input/radars" value="radar/noise_filtered_objects"/>
<arg name="output/objects" value="objects"/>
</include>
</group>

<!-- LiDAR based detection -->
<!-- Lidar based detection -->
<group if="$(eval '&quot;$(var mode)&quot;==&quot;lidar&quot;')">
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/lidar_based_detection.launch.xml">
<!-- Lidar dnn-based detectors-->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/lidar_dnn_detector.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
</include>
<!-- Lidar rule-based detectors-->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/lidar_rule_detector.launch.xml">
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="detection_by_tracker_param_path" value="$(var detection_by_tracker_param_path)"/>
</include>
<!-- Lidar object merger -->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/merger/lidar_merger.launch.xml">
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
</include>
</group>

<!-- Radar based detection -->
<group if="$(eval '&quot;$(var mode)&quot;==&quot;radar&quot;')">
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/radar_based_detection.launch.xml">
<!-- Radar detector-->
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/detector/radar_detector.launch.xml">
<arg name="input/radar" value="$(var input/radar)"/>
<arg name="output/objects" value="objects"/>
<arg name="radar_lanelet_filtering_range_param" value="$(var radar_lanelet_filtering_range_param)"/>
Expand Down
Loading

0 comments on commit 2719ad4

Please sign in to comment.