Skip to content

Commit

Permalink
Add option to select lidar detection model (autowarefoundation#450)
Browse files Browse the repository at this point in the history
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
  • Loading branch information
wep21 committed Oct 12, 2021
1 parent 5354891 commit 60d4372
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<arg name="camera_info7" default="/camera_info7"/>
<arg name="image_number" default="1" description="choose image raw number(0-7)"/>
<arg name="use_vector_map" default="true" description="use vector map in prediction"/>
<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`"/>

<!-- Jetson AGX -->
<!-- <include file="$(find-pkg-share tensorrt_yolo)/launch/yolo.launch.xml">
Expand Down Expand Up @@ -80,15 +81,24 @@
</include>
</group>

<group>
<group if="$(eval &quot;'$(var lidar_detection_model)'=='centerpoint'&quot;)">
<push-ros-namespace namespace="centerpoint"/>
<include file="$(find-pkg-share lidar_centerpoint)/launch/lidar_centerpoint.launch.xml">
<arg name="output/objects" value="objects" />
</include>
</group>

<group if="$(eval &quot;'$(var lidar_detection_model)'=='apollo'&quot;)">
<push-ros-namespace namespace="apollo"/>
<include file="$(find-pkg-share lidar_apollo_instance_segmentation)/launch/lidar_apollo_instance_segmentation.launch.xml" />
<include file="$(find-pkg-share shape_estimation)/launch/shape_estimation.launch.xml">
<arg name="output/objects" value="objects"/>
<arg name="use_map_current" value="$(var use_vector_map)"/>
</include>
</group>

<include file="$(find-pkg-share object_merger)/launch/object_association_merger.launch.xml">
<arg name="input/object0" value="centerpoint/objects"/>
<arg name="input/object0" value="$(var lidar_detection_model)/objects"/>
<arg name="input/object1" value="euclidean/camera_lidar_fusion/short_range_objects"/>
<arg name="output/object" value="objects"/>
</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<launch>
<arg name="mode" default="camera_lidar_fusion" description="options: `camera_lidar_fusion`, `lidar` or `camera`"/>
<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`"/>
<!-- "camera_lidar_fusion", "lidar" or "camera" -->
<arg name="image_raw0" default="/image_raw" description="image raw topic name"/>
<arg name="camera_info0" default="/camera_info" description="camera info topic name"/>
Expand Down Expand Up @@ -43,12 +44,14 @@
<arg name="camera_info7" value="$(var camera_info7)"/>
<arg name="image_number" value="$(var image_number)"/>
<arg name="use_vector_map" value="$(var use_vector_map)"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
</include>
</group>
<!-- lidar based detection-->
<group if="$(eval '&quot;$(var mode)&quot;==&quot;lidar&quot;')">
<include file="$(find-pkg-share perception_launch)/launch/object_recognition/detection/lidar_based_detection.launch.xml">
<arg name="use_vector_map" value="$(var use_vector_map)"/>
<arg name="lidar_detection_model" value="$(var lidar_detection_model)"/>
</include>
</group>
<!-- camera based detection-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0"?>
<launch>
<arg name="use_vector_map" default="true" description="use vector map in prediction"/>
<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`"/>

<!-- Clustering-->
<!-- Clustering -->
<group>
<include file="$(find-pkg-share euclidean_cluster)/launch/voxel_grid_based_euclidean_cluster.launch.xml">
<arg name="output_clusters" value="clusters"/>
Expand All @@ -18,7 +19,7 @@
</group>

<!-- CenterPoint -->
<group>
<group if="$(eval &quot;'$(var lidar_detection_model)'=='centerpoint'&quot;)">
<push-ros-namespace namespace="centerpoint"/>
<group>
<include file="$(find-pkg-share lidar_centerpoint)/launch/lidar_centerpoint.launch.xml" />
Expand All @@ -32,10 +33,29 @@
</group>
</group>

<!-- Lidar Apollo Instance Segmentation -->
<group if="$(eval &quot;'$(var lidar_detection_model)'=='apollo'&quot;)">
<push-ros-namespace namespace="apollo"/>
<group>
<include file="$(find-pkg-share lidar_apollo_instance_segmentation)/launch/lidar_apollo_instance_segmentation.launch.xml" />
<include file="$(find-pkg-share shape_estimation)/launch/shape_estimation.launch.xml">
<arg name="output/objects" value="objects"/>
<arg name="use_map_current" value="$(var use_vector_map)"/>
</include>
</group>
<group>
<include file="$(find-pkg-share dynamic_object_visualization)/launch/dynamic_object_visualizer.launch.xml">
<arg name="input" value="objects"/>
<arg name="with_feature" value="true"/>
<arg name="only_known_objects" value="true"/>
</include>
</group>
</group>

<!-- Merger -->
<group>
<include file="$(find-pkg-share object_merger)/launch/object_association_merger.launch.xml">
<arg name="input/object0" value="centerpoint/objects"/>
<arg name="input/object0" value="$(var lidar_detection_model)/objects"/>
<arg name="input/object1" value="detection_by_tracker/objects"/>
<arg name="output/object" value="objects"/>
</include>
Expand Down

0 comments on commit 60d4372

Please sign in to comment.