Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add radar pipeline #892

Merged
merged 13 commits into from
Oct 7, 2023
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<launch>
<!-- Interface param -->
<!-- Interface parameters -->
<arg name="output/objects" default="objects"/>

<!-- LiDAR param -->
<!-- LiDAR parameters -->
<arg name="input/pointcloud"/>
<arg name="input/obstacle_segmentation/pointcloud" default="/perception/obstacle_segmentation/pointcloud"/>
<arg name="container_name" default="pointcloud_container"/>
Expand All @@ -18,7 +18,7 @@
<arg name="trust_distance" default="30.0"/>
<arg name="use_roi_based_cluster" default="false"/>

<!-- Camera param -->
<!-- Camera parameters -->
<arg name="image_raw0" default="/image_raw" description="image raw topic name"/>
<arg name="camera_info0" default="/camera_info" description="camera info topic name"/>
<arg name="detection_rois0" default="/perception/object_recognition/detection/rois0" description="detection rois output topic name"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?xml version="1.0"?>
<launch>
<!-- Interface param -->
<!-- Interface parameters -->
<arg name="output/objects" default="objects"/>

<!-- LiDAR param -->
<!-- LiDAR parameters -->
<arg name="input/pointcloud"/>
<arg name="input/obstacle_segmentation/pointcloud" default="/perception/obstacle_segmentation/pointcloud"/>
<arg name="container_name" default="pointcloud_container"/>

<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`, `pointpainting`, `clustering`"/>
<arg name="score_threshold" default="0.35"/>
<arg name="lidar_detection_score_threshold" default="0.35"/>

<arg name="use_object_filter" default="true" description="use object filter"/>
<arg name="use_pointcloud_container" default="false" description="use pointcloud container for detection preprocessor"/>
<arg name="use_validator" default="true" description="use obstacle_pointcloud based validator"/>
<arg name="remove_unknown" default="true"/>
<arg name="trust_distance" default="30.0"/>

<!-- Camera param -->
<!-- Camera parameters -->
<arg name="image_raw0" default="/image_raw" description="image raw topic name"/>
<arg name="camera_info0" default="/camera_info" description="camera info topic name"/>
<arg name="detection_rois0" default="/perception/object_recognition/detection/rois0" description="detection rois output topic name"/>
Expand All @@ -44,8 +44,11 @@
<arg name="detection_rois7" default="/perception/object_recognition/detection/rois7"/>
<arg name="image_number" default="1" description="choose image raw number(1-8)"/>

<!-- Radar param -->
<!-- Radar parameters -->
<arg name="input/radar" default="/sensing/radar/detected_objects"/>
<arg name="radar_lanelet_filtering_range_param" default="$(find-pkg-share detected_object_validation)/config/object_lanelet_filter.param.yaml"/>
<arg name="use_near_radar_fusion" default="false"/>
<arg name="far_object_merger_sync_queue_size" default="20"/>

<!-- Jetson AGX -->
<!-- <include file="$(find-pkg-share tensorrt_yolo)/launch/yolo.launch.xml">
Expand All @@ -60,7 +63,7 @@
<arg name="image_number" value="$(var image_number)"/>
</include> -->

<!-- Radar detection-->
<!-- Radar detection -->
<group>
<push-ros-namespace namespace="radar"/>
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/radar_based_detection.launch.xml">
Expand Down Expand Up @@ -102,6 +105,48 @@
</include>
</group>

<!-- roi based clustering -->
<group>
<include file="$(find-pkg-share image_projection_based_fusion)/launch/roi_pointcloud_fusion.launch.xml" if="$(var use_roi_based_cluster)">
<arg name="input/camera_info0" value="$(var camera_info0)"/>
<arg name="input/rois0" value="$(var detection_rois0)"/>
<arg name="input/camera_info1" value="$(var camera_info1)"/>
<arg name="input/rois1" value="$(var detection_rois1)"/>
<arg name="input/camera_info2" value="$(var camera_info2)"/>
<arg name="input/rois2" value="$(var detection_rois2)"/>
<arg name="input/camera_info3" value="$(var camera_info3)"/>
<arg name="input/rois3" value="$(var detection_rois3)"/>
<arg name="input/camera_info4" value="$(var camera_info4)"/>
<arg name="input/rois4" value="$(var detection_rois4)"/>
<arg name="input/camera_info5" value="$(var camera_info5)"/>
<arg name="input/rois5" value="$(var detection_rois5)"/>
<arg name="input/camera_info6" value="$(var camera_info6)"/>
<arg name="input/rois6" value="$(var detection_rois6)"/>
<arg name="input/camera_info7" value="$(var camera_info7)"/>
<arg name="input/rois7" value="$(var detection_rois7)"/>
<arg name="input/rois_number" value="$(var image_number)"/>
<arg name="input/image0" value="$(var image_raw0)"/>
<arg name="input/image1" value="$(var image_raw1)"/>
<arg name="input/image2" value="$(var image_raw2)"/>
<arg name="input/image3" value="$(var image_raw3)"/>
<arg name="input/image4" value="$(var image_raw4)"/>
<arg name="input/image5" value="$(var image_raw5)"/>
<arg name="input/image6" value="$(var image_raw6)"/>
<arg name="input/image7" value="$(var image_raw7)"/>
<arg name="input/pointcloud" value="/perception/object_recognition/detection/pointcloud_map_filtered/pointcloud"/>
<arg name="output_clusters" value="roi_cluster/clusters"/>
</include>
</group>

<!-- simple_cluster_merger -->
<group>
<include file="$(find-pkg-share cluster_merger)/launch/cluster_merger.launch.xml" if="$(var use_roi_based_cluster)">
<arg name="input/cluster0" value="euclidean_cluster/clusters"/>
<arg name="input/cluster1" value="roi_cluster/clusters"/>
<arg name="output/clusters" value="clusters"/>
</include>
</group>

Comment on lines +109 to +150

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scepter914 I think this code is duplicated? It is already existed in.

<!-- roi based clustering -->
<group>
<include file="$(find-pkg-share image_projection_based_fusion)/launch/roi_pointcloud_fusion.launch.xml" if="$(var use_roi_based_cluster)">
<arg name="input/camera_info0" value="$(var camera_info0)"/>
<arg name="input/rois0" value="$(var detection_rois0)"/>
<arg name="input/camera_info1" value="$(var camera_info1)"/>
<arg name="input/rois1" value="$(var detection_rois1)"/>
<arg name="input/camera_info2" value="$(var camera_info2)"/>
<arg name="input/rois2" value="$(var detection_rois2)"/>
<arg name="input/camera_info3" value="$(var camera_info3)"/>
<arg name="input/rois3" value="$(var detection_rois3)"/>
<arg name="input/camera_info4" value="$(var camera_info4)"/>
<arg name="input/rois4" value="$(var detection_rois4)"/>
<arg name="input/camera_info5" value="$(var camera_info5)"/>
<arg name="input/rois5" value="$(var detection_rois5)"/>
<arg name="input/camera_info6" value="$(var camera_info6)"/>
<arg name="input/rois6" value="$(var detection_rois6)"/>
<arg name="input/camera_info7" value="$(var camera_info7)"/>
<arg name="input/rois7" value="$(var detection_rois7)"/>
<arg name="input/rois_number" value="$(var image_number)"/>
<arg name="input/image0" value="$(var image_raw0)"/>
<arg name="input/image1" value="$(var image_raw1)"/>
<arg name="input/image2" value="$(var image_raw2)"/>
<arg name="input/image3" value="$(var image_raw3)"/>
<arg name="input/image4" value="$(var image_raw4)"/>
<arg name="input/image5" value="$(var image_raw5)"/>
<arg name="input/image6" value="$(var image_raw6)"/>
<arg name="input/image7" value="$(var image_raw7)"/>
<arg name="input/pointcloud" value="/perception/object_recognition/detection/pointcloud_map_filtered/pointcloud"/>
<arg name="output_clusters" value="roi_cluster/clusters"/>
</include>
</group>

I am sorry maybe it was my fault to put it after eculidean clustering.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed at af3d958

Copy link

@badai-nguyen badai-nguyen Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scepter914 thank you. It works now. Could you remove

<!-- simple_cluster_merger -->
<group>
<include file="$(find-pkg-share cluster_merger)/launch/cluster_merger.launch.xml" if="$(var use_roi_based_cluster)">
<arg name="input/cluster0" value="euclidean_cluster/clusters"/>
<arg name="input/cluster1" value="roi_cluster/clusters"/>
<arg name="output/clusters" value="clusters"/>
</include>
</group>

this is also duplicated with

<!-- simple_cluster_merger -->
<group>
<include file="$(find-pkg-share cluster_merger)/launch/cluster_merger.launch.xml" if="$(var use_roi_based_cluster)">
<arg name="input/cluster0" value="euclidean_cluster/clusters"/>
<arg name="input/cluster1" value="roi_cluster/clusters"/>
<arg name="output/clusters" value="clusters"/>
</include>
</group>
.

🙏

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed at 7f88d81

<group>
<include file="$(find-pkg-share shape_estimation)/launch/shape_estimation.launch.xml">
<arg name="input/objects" value="clusters"/>
Expand All @@ -113,6 +158,8 @@
<let name="input/clustering" value="/perception/object_recognition/detection/clustering/clusters"/>
<push-ros-namespace namespace="camera_lidar_fusion"/>
<!-- Fusion camera-lidar to classify -->

<!-- euclidean clustering -->
<group>
<include file="$(find-pkg-share image_projection_based_fusion)/launch/roi_cluster_fusion.launch.xml">
<arg name="input/camera_info0" value="$(var camera_info0)"/>
Expand Down Expand Up @@ -218,7 +265,7 @@
<include file="$(find-pkg-share lidar_centerpoint)/launch/lidar_centerpoint.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
<arg name="output/objects" value="objects"/>
<arg name="score_threshold" value="$(var score_threshold)"/>
<arg name="score_threshold" value="$(var lidar_detection_score_threshold)"/>
<arg name="model_name" value="$(var centerpoint_model_name)"/>
<arg name="model_path" value="$(var centerpoint_model_path)"/>
<arg name="model_param_path" value="$(var lidar_model_param_path)/$(var centerpoint_model_name).param.yaml"/>
Expand Down Expand Up @@ -290,17 +337,20 @@
</include>
</group>

<!-- Radar fusion-->
<!-- Radar fusion -->
<group>
<include file="$(find-pkg-share radar_fusion_to_detected_object)/launch/radar_object_fusion_to_detected_object.launch.xml">
<include file="$(find-pkg-share radar_fusion_to_detected_object)/launch/radar_object_fusion_to_detected_object.launch.xml" if="$(var use_near_radar_fusion)">
<arg name="input/objects" value="$(var lidar_detection_model)/objects"/>
<arg name="input/radars" value="radar/noise_filtered_objects"/>
<arg name="output/objects" value="radar_fusion/objects"/>
</include>
</group>

<!-- Camera late fusion-->
<!-- Camera late fusion -->
<group>
<let name="target_objects" value="radar_fusion/objects" if="$(var use_near_radar_fusion)"/>
<let name="target_objects" value="$(var lidar_detection_model)/objects" unless="$(var use_near_radar_fusion)"/>

<include file="$(find-pkg-share image_projection_based_fusion)/launch/roi_detected_object_fusion.launch.xml">
<arg name="input/camera_info0" value="$(var camera_info0)"/>
<arg name="input/rois0" value="$(var detection_rois0)"/>
Expand All @@ -327,7 +377,7 @@
<arg name="input/image5" value="$(var image_raw5)"/>
<arg name="input/image6" value="$(var image_raw6)"/>
<arg name="input/image7" value="$(var image_raw7)"/>
<arg name="input/objects" value="radar_fusion/objects"/>
<arg name="input/objects" value="$(var target_objects)"/>
<arg name="output/objects" value="$(var lidar_detection_model)/roi_fusion/objects"/>
</include>
</group>
Expand Down Expand Up @@ -381,16 +431,27 @@
<group if="$(eval &quot;'$(var objects_filter_method)'=='lanelet_filter'&quot;)">
<include file="$(find-pkg-share detected_object_validation)/launch/object_lanelet_filter.launch.xml" if="$(var use_object_filter)">
<arg name="input/object" value="objects_before_filter"/>
<arg name="output/object" value="$(var output/objects)"/>
<arg name="output/object" value="near_objects"/>
<arg name="filtering_range_param" value="$(var object_recognition_detection_object_lanelet_filter_param_path)"/>
</include>
</group>

<group if="$(eval &quot;'$(var objects_filter_method)'=='position_filter'&quot;)">
<include file="$(find-pkg-share detected_object_validation)/launch/object_position_filter.launch.xml" if="$(var use_object_filter)">
<arg name="input/object" value="objects_before_filter"/>
<arg name="output/object" value="$(var output/objects)"/>
<arg name="output/object" value="near_objects"/>
<arg name="filtering_range_param" value="$(var object_recognition_detection_object_position_filter_param_path)"/>
</include>
</group>

<!-- Merge far_objects and near_objects. This merger will be removed after tracking fusion operates stably. -->
<include file="$(find-pkg-share object_merger)/launch/object_association_merger.launch.xml">
<arg name="input/object0" value="near_objects"/>
<arg name="input/object1" value="radar/far_objects"/>
<arg name="output/object" value="$(var output/objects)"/>
<arg name="priority_mode" value="0"/>
<arg name="data_association_matrix_path" value="$(var object_recognition_detection_object_merger_data_association_matrix_param_path)"/>
<arg name="distance_threshold_list_path" value="$(var object_recognition_detection_object_merger_distance_threshold_list_path)"/>
<arg name="sync_queue_size" value="$(var far_object_merger_sync_queue_size)"/>
</include>
</launch>
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?xml version="1.0"?>
<launch>
<!-- Interface parameters -->
<arg name="mode" default="lidar" description="options: `camera_lidar_radar_fusion`, `camera_lidar_fusion`, `lidar_radar_fusion`, `lidar` or `radar`"/>

<!-- lidar param -->
<!-- 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"/>
<arg name="use_pointcloud_container" default="false" description="use pointcloud container for detection preprocessor"/>
<arg name="container_name" default="pointcloud_container"/>

<!-- camera param -->
<!-- Camera parameters -->
<arg name="image_raw0" default="/image_raw" description="image raw topic name"/>
<arg name="camera_info0" default="/camera_info" description="camera info topic name"/>
<arg name="image_raw1" default=""/>
Expand All @@ -28,14 +29,15 @@
<arg name="camera_info7" default=""/>
<arg name="image_number" default="1" description="choose image raw number(1-8)"/>

<!-- camera lidar fusion param -->
<!-- Radar parameters -->
<arg name="input/radar" default="/sensing/radar/detected_objects"/>
<arg name="radar_lanelet_filtering_range_param" default="$(find-pkg-share detected_object_validation)/config/object_lanelet_filter.param.yaml"/>

<!-- Camera-LiDAR fusion parameters -->
<arg name="remove_unknown" default="true"/>
<arg name="trust_distance" default="30.0"/>

<!-- radar param -->
<arg name="input/radar" default="/sensing/radar/detected_objects"/>

<!-- 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">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
Expand Down Expand Up @@ -64,12 +66,11 @@
<arg name="remove_unknown" value="$(var remove_unknown)"/>
<arg name="trust_distance" value="$(var trust_distance)"/>
<arg name="input/radar" value="$(var input/radar)"/>
<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="radar_lanelet_filtering_range_param" value="$(var radar_lanelet_filtering_range_param)"/>
</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">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
Expand Down Expand Up @@ -100,7 +101,7 @@
</include>
</group>

<!-- lidar radar 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">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
Expand All @@ -110,11 +111,11 @@
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="input/radar" value="$(var input/radar)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="radar_lanelet_filtering_range_param" value="$(var radar_lanelet_filtering_range_param)"/>
</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">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
Expand All @@ -127,11 +128,12 @@
</include>
</group>

<!-- radar based detection-->
<!-- 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">
<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)"/>
</include>
</group>
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<arg name="use_pointcloud_container" default="false" description="use pointcloud container for detection preprocessor"/>
<arg name="container_name" default="pointcloud_container"/>
<arg name="use_validator" default="true" description="use obstacle_pointcloud based validator"/>
<arg name="score_threshold" default="0.35"/>
<arg name="lidar_detection_score_threshold" default="0.35"/>
<arg name="centerpoint_model_name" default="centerpoint_tiny"/>
<arg name="centerpoint_model_path" default="$(find-pkg-share lidar_centerpoint)/data"/>
<arg name="lidar_model_param_path" default="$(find-pkg-share lidar_centerpoint)/config"/>
Expand Down Expand Up @@ -70,7 +70,7 @@
<include file="$(find-pkg-share lidar_centerpoint)/launch/lidar_centerpoint.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
<arg name="output/objects" value="objects"/>
<arg name="score_threshold" value="$(var score_threshold)"/>
<arg name="score_threshold" value="$(var lidar_detection_score_threshold)"/>
<arg name="model_name" value="$(var centerpoint_model_name)"/>
<arg name="model_path" value="$(var centerpoint_model_path)"/>
<arg name="model_param_path" value="$(var lidar_model_param_path)/$(var centerpoint_model_name).param.yaml"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<?xml version="1.0"?>
<launch>
<!-- lidar param -->
<!-- LiDAR parameters -->
<arg name="input/pointcloud"/>
<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`, `clustering`"/>
<arg name="use_object_filter" default="true" description="use object filter"/>
<arg name="use_pointcloud_container" default="false" description="use pointcloud container for detection preprocessor"/>
<arg name="container_name" default="pointcloud_container"/>
<arg name="score_threshold" default="0.20"/>
<arg name="lidar_detection_score_threshold" default="0.35"/>

<!-- radar param -->
<!-- Radar parameters -->
<arg name="input/radar" default="/sensing/radar/detected_objects"/>
<arg name="radar_lanelet_filtering_range_param" default="$(find-pkg-share detected_object_validation)/config/object_lanelet_filter.param.yaml"/>

<!-- lidar based detection-->
<!-- LiDAR detection-->
<group>
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/lidar_based_detection.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
Expand All @@ -22,11 +23,11 @@
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="score_threshold" value="$(var score_threshold)"/>
<arg name="lidar_detection_score_threshold" value="$(var lidar_detection_score_threshold)"/>
</include>
</group>

<!-- radar detection-->
<!-- Radar detection-->
<group>
<push-ros-namespace namespace="radar"/>
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/radar_based_detection.launch.xml">
Expand All @@ -42,7 +43,7 @@
</include>
</group>

<!-- lidar radar fusion-->
<!-- LiDAR-Radar fusion-->
<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"/>
Expand Down
Loading
Loading