Skip to content

Commit

Permalink
chore(tier4_perception_launch): perception launcher refactoring secon…
Browse files Browse the repository at this point in the history
…d round (autowarefoundation#7440)

* feat: separate filters

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

* fix: object validator to modular

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

* chore: remove default values from subsequent launch files

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

* chore: group interfaces and junctions

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

* Revert "chore: group interfaces and junctions"

This reverts commit 9d723c3.

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

* chore: group interfaces and junctions

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

* fix: radar input

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

* fix: remove defaults from camera inputs

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

* chore: rename camera args

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

* chore: reorder

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

* fix: remove defaults from lidar interface

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

* Add use_pointcloud_map and use_validator arguments to detection.launch.xml

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

* fix: remove default from validators and filters

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

* fix: pointcloud container node name

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

* style(pre-commit): autofix

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

* Add use_low_intensity_cluster_filter argument to launch files

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

* fix: on off detector and merger

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

* fix: radar_far/objects default

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

* fix: radar object filter parameter

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

---------

Signed-off-by: Taekjin LEE <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Simon Eisenmann <[email protected]>
  • Loading branch information
2 people authored and simon-eisenmann-driveblocks committed Jun 26, 2024
1 parent 43be343 commit 6333ddf
Show file tree
Hide file tree
Showing 11 changed files with 540 additions and 440 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<launch>
<!-- Lidar parameters -->
<arg name="input/pointcloud"/>
<arg name="node/pointcloud_container"/>
<arg name="lidar_detection_model" default="centerpoint" description="options: `transfusion`, `centerpoint`, `apollo`, `clustering`"/>

<!-- Lidar detector centerpoint parameters -->
Expand All @@ -27,7 +28,7 @@
<arg name="class_remapper_param_path" value="$(var lidar_model_param_path)/detection_class_remapper.param.yaml"/>

<arg name="use_pointcloud_container" value="true"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="pointcloud_container_name" value="$(var node/pointcloud_container)"/>
</include>
</group>
</group>
Expand All @@ -48,7 +49,7 @@
<arg name="class_remapper_param_path" value="$(var centerpoint_model_path)/detection_class_remapper.param.yaml"/>

<arg name="use_pointcloud_container" value="true"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="pointcloud_container_name" value="$(var node/pointcloud_container)"/>
</include>
</group>
</group>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0"?>
<launch>
<!-- Lidar parameters -->
<arg name="input/obstacle_segmentation/pointcloud" default="/perception/obstacle_segmentation/pointcloud"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="input/pointcloud_map/pointcloud"/>
<arg name="input/obstacle_segmentation/pointcloud"/>
<arg name="node/pointcloud_container"/>
<arg name="use_pointcloud_map"/>

<!-- Pointcloud filter -->
<group>
Expand All @@ -11,7 +13,7 @@
<arg name="output_topic" value="pointcloud_map_filtered/pointcloud"/>
<arg name="use_intra_process" value="true"/>
<arg name="use_multithread" value="true"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="pointcloud_container_name" value="$(var node/pointcloud_container)"/>
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
</include>
</group>
Expand All @@ -21,12 +23,12 @@
<push-ros-namespace namespace="clustering"/>
<group>
<include file="$(find-pkg-share euclidean_cluster)/launch/voxel_grid_based_euclidean_cluster.launch.xml">
<arg name="input_pointcloud" value="/perception/object_recognition/detection/pointcloud_map_filtered/pointcloud"/>
<arg name="input_pointcloud" value="$(var input/pointcloud_map/pointcloud)"/>
<arg name="output_clusters" value="clusters"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>

<arg name="use_pointcloud_container" value="true"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="pointcloud_container_name" value="$(var node/pointcloud_container)"/>
</include>
</group>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<launch>
<!-- Pipeline junctions -->
<arg name="objects_filter_method" default="lanelet_filter" description="lanelet_filter or position_filter"/>
<arg name="objects_filter_method" default="lanelet_filter" description="options: `lanelet_filter` or `position_filter`"/>

<!-- external interfaces -->
<arg name="input/objects" default="clustering/camera_lidar_fusion/objects"/>
<arg name="output/objects" default="clustering/camera_lidar_fusion/filtered/objects"/>
<arg name="input/objects"/>
<arg name="output/objects"/>

<!-- Filter -->
<group if="$(eval &quot;'$(var objects_filter_method)'=='lanelet_filter'&quot;)">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<launch>
<!-- Pipeline junctions -->
<arg name="objects_validation_method" default="obstacle_pointcloud" description="obstacle_pointcloud or occupancy_grid"/>
<arg name="objects_validation_method" description="options: `obstacle_pointcloud` or `occupancy_grid`"/>

<!-- external interfaces -->
<arg name="input/obstacle_pointcloud" default="pointcloud_map_filtered/pointcloud" description="Only required when 'obstacle_pointcloud'"/>
<arg name="input/objects" default="centerpoint/objects"/>
<arg name="output/objects" default="centerpoint/validation/objects"/>
<arg name="input/obstacle_pointcloud" description="Only required when 'obstacle_pointcloud'"/>
<arg name="input/objects"/>
<arg name="output/objects"/>

<!-- Validator -->
<group if="$(eval &quot;'$(var objects_validation_method)'=='obstacle_pointcloud'&quot;)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<arg name="radar_crossing_objects_noise_filter_param_path"/>
<arg name="object_velocity_splitter_param_path" default="$(var object_recognition_detection_object_velocity_splitter_radar_param_path)"/>
<arg name="object_range_splitter_param_path" default="$(var object_recognition_detection_object_range_splitter_radar_param_path)"/>
<arg name="radar_lanelet_filtering_range_param" default="$(find-pkg-share detected_object_validation)/config/object_lanelet_filter.param.yaml"/>
<arg name="radar_lanelet_filtering_range_param_path" 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"/>

<!-- External interfaces -->
<arg name="input/radar" default="/sensing/radar/detected_objects"/>
<arg name="output/objects" default="far_objects"/>
<arg name="input/radar"/>
<arg name="output/objects"/>

<!-- Radar filter pipeline -->
<include file="$(find-pkg-share radar_crossing_objects_noise_filter)/launch/radar_crossing_objects_noise_filter.launch.xml">
Expand All @@ -36,7 +36,7 @@
<include file="$(find-pkg-share detected_object_validation)/launch/object_lanelet_filter.launch.xml">
<arg name="input/object" value="far_high_speed_objects"/>
<arg name="output/object" value="lanelet_filtered_objects"/>
<arg name="filtering_range_param_path" value="$(var radar_lanelet_filtering_range_param_path)"/>
<arg name="filtering_range_param" value="$(var radar_lanelet_filtering_range_param_path)"/>
</include>

<include file="$(find-pkg-share radar_object_clustering)/launch/radar_object_clustering.launch.xml">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,42 @@
<arg name="lidar_detection_model"/>
<arg name="use_detection_by_tracker"/>

<arg name="use_validator" default="true" description="use obstacle_pointcloud based validator"/>
<arg name="use_validator"/>
<arg name="objects_validation_method"/>
<arg name="use_pointcloud_map"/>
<arg name="objects_validation_method" default="obstacle_pointcloud"/>

<arg name="objects_filter_method" default="lanelet_filter"/>
<arg name="use_object_filter" default="true" description="use object filter"/>
<arg name="use_object_filter" description="use object filter"/>
<arg name="objects_filter_method"/>
<let name="without_dbt_and_filter" value="$(eval &quot;'$(var use_detection_by_tracker)'=='false' and '$(var use_object_filter)'=='false' &quot;)"/>

<!-- external interfaces -->
<arg name="input/pointcloud_map/pointcloud" default="/perception/object_recognition/detection/pointcloud_map_filtered/pointcloud"/>
<arg name="input/obstacle_segmentation/pointcloud" default="/perception/obstacle_segmentation/pointcloud"/>
<arg name="number_of_cameras"/>
<arg name="input/camera0/image"/>
<arg name="input/camera0/info"/>
<arg name="input/camera0/rois"/>
<arg name="input/camera1/image"/>
<arg name="input/camera1/info"/>
<arg name="input/camera1/rois"/>
<arg name="input/camera2/image"/>
<arg name="input/camera2/info"/>
<arg name="input/camera2/rois"/>
<arg name="input/camera3/image"/>
<arg name="input/camera3/info"/>
<arg name="input/camera3/rois"/>
<arg name="input/camera4/image"/>
<arg name="input/camera4/info"/>
<arg name="input/camera4/rois"/>
<arg name="input/camera5/image"/>
<arg name="input/camera5/info"/>
<arg name="input/camera5/rois"/>
<arg name="input/camera6/image"/>
<arg name="input/camera6/info"/>
<arg name="input/camera6/rois"/>
<arg name="input/camera7/image"/>
<arg name="input/camera7/info"/>
<arg name="input/camera7/rois"/>
<arg name="input/pointcloud_map/pointcloud"/>
<arg name="input/obstacle_segmentation/pointcloud"/>
<arg name="input/lidar_ml/objects" default="$(var lidar_detection_model)/objects"/>
<arg name="input/lidar_rule/objects" default="clustering/camera_lidar_fusion/objects"/>
<arg name="input/detection_by_tracker/objects" default="detection_by_tracker/objects"/>
Expand Down Expand Up @@ -51,39 +76,39 @@
<!-- Camera ROI fusion -->
<group>
<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)"/>
<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/rois_number" value="$(var number_of_cameras)"/>
<arg name="input/rois0" value="$(var input/camera0/rois)"/>
<arg name="input/rois1" value="$(var input/camera1/rois)"/>
<arg name="input/rois2" value="$(var input/camera2/rois)"/>
<arg name="input/rois3" value="$(var input/camera3/rois)"/>
<arg name="input/rois4" value="$(var input/camera4/rois)"/>
<arg name="input/rois5" value="$(var input/camera5/rois)"/>
<arg name="input/rois6" value="$(var input/camera6/rois)"/>
<arg name="input/rois7" value="$(var input/camera7/rois)"/>
<arg name="input/camera_info0" value="$(var input/camera0/info)"/>
<arg name="input/camera_info1" value="$(var input/camera1/info)"/>
<arg name="input/camera_info2" value="$(var input/camera2/info)"/>
<arg name="input/camera_info3" value="$(var input/camera3/info)"/>
<arg name="input/camera_info4" value="$(var input/camera4/info)"/>
<arg name="input/camera_info5" value="$(var input/camera5/info)"/>
<arg name="input/camera_info6" value="$(var input/camera6/info)"/>
<arg name="input/camera_info7" value="$(var input/camera7/info)"/>
<arg name="input/image0" value="$(var input/camera0/image)"/>
<arg name="input/image1" value="$(var input/camera1/image)"/>
<arg name="input/image2" value="$(var input/camera2/image)"/>
<arg name="input/image3" value="$(var input/camera3/image)"/>
<arg name="input/image4" value="$(var input/camera4/image)"/>
<arg name="input/image5" value="$(var input/camera5/image)"/>
<arg name="input/image6" value="$(var input/camera6/image)"/>
<arg name="input/image7" value="$(var input/camera7/image)"/>
<arg name="input/objects" value="$(var camera_roi_fusion/input/objects)"/>
<arg name="output/objects" value="$(var camera_roi_fusion/output/objects)"/>
<arg name="param_path" value="$(var roi_detected_object_fusion_param_path)"/>
</include>
</group>

<!-- Validator -->
<group>
<group if="$(var use_validator)">
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/filter/object_validator.launch.xml">
<arg name="input/obstacle_pointcloud" value="$(var validator/input/obstacle_pointcloud)"/>
<arg name="input/objects" value="$(var validator/input/objects)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,46 @@
<arg name="use_detection_by_tracker"/>
<arg name="use_near_radar_fusion" default="false"/>

<arg name="use_validator" default="true" description="use obstacle_pointcloud based validator"/>
<arg name="use_validator"/>
<arg name="objects_validation_method"/>
<arg name="use_pointcloud_map"/>
<arg name="objects_validation_method" default="obstacle_pointcloud"/>

<arg name="objects_filter_method" default="lanelet_filter"/>
<arg name="use_object_filter" default="true" description="use object filter"/>
<arg name="use_object_filter" description="use object filter"/>
<arg name="objects_filter_method"/>
<let name="without_dbt_and_filter" value="$(eval &quot;'$(var use_detection_by_tracker)'=='false' and '$(var use_object_filter)'=='false' &quot;)"/>

<!-- external interfaces -->
<arg name="input/pointcloud_map/pointcloud" default="/perception/object_recognition/detection/pointcloud_map_filtered/pointcloud"/>
<arg name="input/obstacle_segmentation/pointcloud" default="/perception/obstacle_segmentation/pointcloud"/>
<arg name="number_of_cameras"/>
<arg name="input/camera0/image"/>
<arg name="input/camera0/info"/>
<arg name="input/camera0/rois"/>
<arg name="input/camera1/image"/>
<arg name="input/camera1/info"/>
<arg name="input/camera1/rois"/>
<arg name="input/camera2/image"/>
<arg name="input/camera2/info"/>
<arg name="input/camera2/rois"/>
<arg name="input/camera3/image"/>
<arg name="input/camera3/info"/>
<arg name="input/camera3/rois"/>
<arg name="input/camera4/image"/>
<arg name="input/camera4/info"/>
<arg name="input/camera4/rois"/>
<arg name="input/camera5/image"/>
<arg name="input/camera5/info"/>
<arg name="input/camera5/rois"/>
<arg name="input/camera6/image"/>
<arg name="input/camera6/info"/>
<arg name="input/camera6/rois"/>
<arg name="input/camera7/image"/>
<arg name="input/camera7/info"/>
<arg name="input/camera7/rois"/>
<arg name="input/pointcloud_map/pointcloud"/>
<arg name="input/obstacle_segmentation/pointcloud"/>
<arg name="input/lidar_ml/objects" default="$(var lidar_detection_model)/objects"/>
<arg name="input/lidar_rule/objects" default="clustering/camera_lidar_fusion/objects"/>
<arg name="input/radar_near/objects" default="radar/noise_filtered_objects"/>
<arg name="input/radar_far/objects" default="radar/noise_filtered_objects"/>
<arg name="input/radar_far/objects" default="radar/far_objects"/>
<arg name="input/detection_by_tracker/objects" default="detection_by_tracker/objects"/>
<arg name="output/objects" default="objects"/>

Expand Down Expand Up @@ -74,39 +99,39 @@
<!-- Camera ROI fusion -->
<group>
<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)"/>
<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/rois_number" value="$(var number_of_cameras)"/>
<arg name="input/rois0" value="$(var input/camera0/rois)"/>
<arg name="input/rois1" value="$(var input/camera1/rois)"/>
<arg name="input/rois2" value="$(var input/camera2/rois)"/>
<arg name="input/rois3" value="$(var input/camera3/rois)"/>
<arg name="input/rois4" value="$(var input/camera4/rois)"/>
<arg name="input/rois5" value="$(var input/camera5/rois)"/>
<arg name="input/rois6" value="$(var input/camera6/rois)"/>
<arg name="input/rois7" value="$(var input/camera7/rois)"/>
<arg name="input/camera_info0" value="$(var input/camera0/info)"/>
<arg name="input/camera_info1" value="$(var input/camera1/info)"/>
<arg name="input/camera_info2" value="$(var input/camera2/info)"/>
<arg name="input/camera_info3" value="$(var input/camera3/info)"/>
<arg name="input/camera_info4" value="$(var input/camera4/info)"/>
<arg name="input/camera_info5" value="$(var input/camera5/info)"/>
<arg name="input/camera_info6" value="$(var input/camera6/info)"/>
<arg name="input/camera_info7" value="$(var input/camera7/info)"/>
<arg name="input/image0" value="$(var input/camera0/image)"/>
<arg name="input/image1" value="$(var input/camera1/image)"/>
<arg name="input/image2" value="$(var input/camera2/image)"/>
<arg name="input/image3" value="$(var input/camera3/image)"/>
<arg name="input/image4" value="$(var input/camera4/image)"/>
<arg name="input/image5" value="$(var input/camera5/image)"/>
<arg name="input/image6" value="$(var input/camera6/image)"/>
<arg name="input/image7" value="$(var input/camera7/image)"/>
<arg name="input/objects" value="$(var camera_roi_fusion/input/objects)"/>
<arg name="output/objects" value="$(var camera_roi_fusion/output/objects)"/>
<arg name="param_path" value="$(var roi_detected_object_fusion_param_path)"/>
</include>
</group>

<!-- Validator -->
<group>
<group if="$(var use_validator)">
<include file="$(find-pkg-share tier4_perception_launch)/launch/object_recognition/detection/filter/object_validator.launch.xml">
<arg name="input/obstacle_pointcloud" value="$(var validator/input/obstacle_pointcloud)"/>
<arg name="input/objects" value="$(var validator/input/objects)"/>
Expand Down
Loading

0 comments on commit 6333ddf

Please sign in to comment.