Skip to content

Commit 1b37970

Browse files
MasatoSaekipre-commit-ci[bot]Shin-kyotoknzo25
authored
chore(perception): refactor perception launch (autowarefoundation#10186)
* fundamental change Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * style(pre-commit): autofix * fix typo Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * fix params and modify some packages Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * pre-commit Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * fix Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * fix spell check Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * fix typo Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * integrate model and label path Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * style(pre-commit): autofix * for pre-commit Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * run pre-commit Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * for awsim Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * for simulatior Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * style(pre-commit): autofix * fix grammer in launcher Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * add schema for yolox_tlr Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * style(pre-commit): autofix * fix file name Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * fix Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * rename Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * modify arg name to Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * fix typo Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * change param name Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> * style(pre-commit): autofix * chore Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> --------- Signed-off-by: MasatoSaeki <masato.saeki@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Shintaro Tomie <58775300+Shin-kyoto@users.noreply.github.com> Co-authored-by: Kenzo Lobos Tsunekawa <kenzo.lobos@tier4.jp>
1 parent 2594504 commit 1b37970

File tree

37 files changed

+589
-438
lines changed

37 files changed

+589
-438
lines changed

launch/tier4_perception_launch/launch/perception.launch.xml

+48-38
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,18 @@
3434
<arg name="occupancy_grid_map_param_path"/>
3535
<arg name="occupancy_grid_map_updater"/>
3636
<arg name="occupancy_grid_map_updater_param_path"/>
37-
<arg name="traffic_light_arbiter_param_path"/>
38-
<arg name="traffic_light_multi_camera_fusion_param_path"/>
3937
<arg name="lidar_detection_model"/>
38+
<arg name="each_traffic_light_map_based_detector_param_path"/>
39+
<arg name="traffic_light_fine_detector_param_path"/>
40+
<arg name="yolox_traffic_light_detector_param_path"/>
41+
<arg name="car_traffic_light_classifier_param_path"/>
42+
<arg name="pedestrian_traffic_light_classifier_param_path"/>
43+
<arg name="traffic_light_roi_visualizer_param_path"/>
44+
<arg name="traffic_light_selector_param_path"/>
45+
<arg name="traffic_light_occlusion_predictor_param_path"/>
46+
<arg name="traffic_light_multi_camera_fusion_param_path"/>
47+
<arg name="traffic_light_arbiter_param_path"/>
48+
<arg name="crosswalk_traffic_light_estimator_param_path"/>
4049

4150
<!-- ML model parameters -->
4251
<arg name="lidar_detection_model_type" default="$(eval &quot;'$(var lidar_detection_model)'.split('/')[0]&quot;)"/>
@@ -98,31 +107,22 @@
98107
<arg name="use_obstacle_segmentation_single_frame_filter" description="use single frame filter at the ground segmentation"/>
99108
<arg name="use_obstacle_segmentation_time_series_filter" description="use time series filter at the ground segmentation"/>
100109

101-
<!-- Traffic light recognition parameters -->
102-
<arg name="use_traffic_light_recognition" default="false"/>
103-
<arg name="traffic_light_recognition/use_ml_detector" default="false" description="where ml model is used for TL detection"/>
104-
<arg name="traffic_light_recognition/ml_detection_model_type" default="fine_detection_model" description="select ml model for TL detection: fine_detection_model or whole_image_detection_model"/>
105-
<arg name="traffic_light_recognition/whole_image_detector_model_path" default="$(var data_path)/tensorrt_yolox"/>
106-
<arg name="traffic_light_recognition/whole_image_detector_model_name" default="yolox_s_car_ped_tl_detector_960_960_batch_1.onnx"/>
107-
<arg name="traffic_light_recognition/fusion_only" default="false"/>
108-
<arg name="all_traffic_light_camera" default="[camera6, camera7]" description="choose camera which use for traffic light recognition"/>
109-
<arg
110-
name="traffic_light_fine_detector_model_path"
111-
default="$(var data_path)/traffic_light_fine_detector"
112-
description="options: `tlr_yolox_s_batch_**`. The batch number must be either one of 1, 4, 6"
113-
/>
114-
<arg name="traffic_light_fine_detector_model_name" default="tlr_car_ped_yolox_s_batch_6" description="options: `tlr_car_ped_yolox_s_batch_**`. The batch number must be either one of 1, 4, 6"/>
115-
<arg name="traffic_light_classifier_model_path" default="$(var data_path)/traffic_light_classifier" description="classifier onnx model path"/>
116-
<arg
117-
name="car_traffic_light_classifier_model_name"
118-
default="traffic_light_classifier_mobilenetv2_batch_6"
119-
description="options: `traffic_light_classifier_mobilenetv2_batch_*` or `traffic_light_classifier_efficientNet_b1_batch_*`. The batch number must be either one of 1, 4, 6"
120-
/>
121-
<arg
122-
name="pedestrian_traffic_light_classifier_model_name"
123-
default="ped_traffic_light_classifier_mobilenetv2_batch_6"
124-
description="options: `ped_traffic_light_classifier_mobilenetv2_batch_*` or `ped_traffic_light_classifier_efficientNet_b1_batch_*`. The batch number must be either one of 1, 4, 6"
125-
/>
110+
<!-- traffic light recognition options to switch launch function/module -->
111+
<arg name="use_traffic_light_recognition"/>
112+
<arg name="traffic_light_recognition/fusion_only"/>
113+
<arg name="traffic_light_recognition/camera_namespaces"/>
114+
<arg name="traffic_light_recognition/use_high_accuracy_detection"/>
115+
<arg name="traffic_light_recognition/high_accuracy_detection_type"/>
116+
117+
<!-- traffic light recognition parameters -->
118+
<arg name="traffic_light_recognition/whole_image_detection/model_path"/>
119+
<arg name="traffic_light_recognition/whole_image_detection/label_path"/>
120+
<arg name="traffic_light_recognition/fine_detection/model_path"/>
121+
<arg name="traffic_light_recognition/fine_detection/label_path"/>
122+
<arg name="traffic_light_recognition/classification/car/model_path"/>
123+
<arg name="traffic_light_recognition/classification/car/label_path"/>
124+
<arg name="traffic_light_recognition/classification/pedestrian/model_path"/>
125+
<arg name="traffic_light_recognition/classification/pedestrian/label_path"/>
126126

127127
<!-- Whether to use detection by tracker -->
128128
<arg name="use_detection_by_tracker" default="true"/>
@@ -310,19 +310,29 @@
310310
<group if="$(var use_traffic_light_recognition)">
311311
<push-ros-namespace namespace="traffic_light_recognition"/>
312312
<include file="$(find-pkg-share tier4_perception_launch)/launch/traffic_light_recognition/traffic_light.launch.xml">
313-
<arg name="use_ml_detector" value="$(var traffic_light_recognition/use_ml_detector)"/>
314-
<arg name="ml_detection_model_type" value="$(var traffic_light_recognition/ml_detection_model_type)"/>
315-
<arg name="whole_image_detector_model_path" value="$(var traffic_light_recognition/whole_image_detector_model_path)"/>
316-
<arg name="whole_image_detector_model_name" value="$(var traffic_light_recognition/whole_image_detector_model_name)"/>
317313
<arg name="fusion_only" value="$(var traffic_light_recognition/fusion_only)"/>
318-
<arg name="all_camera_namespaces" value="$(var all_traffic_light_camera)"/>
319-
<arg name="traffic_light_arbiter_param_path" value="$(var traffic_light_arbiter_param_path)"/>
314+
<arg name="camera_namespaces" value="$(var traffic_light_recognition/camera_namespaces)"/>
315+
<arg name="use_high_accuracy_detection" value="$(var traffic_light_recognition/use_high_accuracy_detection)"/>
316+
<arg name="high_accuracy_detection_type" value="$(var traffic_light_recognition/high_accuracy_detection_type)"/>
317+
<arg name="each_traffic_light_map_based_detector_param_path" value="$(var each_traffic_light_map_based_detector_param_path)"/>
318+
<arg name="traffic_light_fine_detector_param_path" value="$(var traffic_light_fine_detector_param_path)"/>
319+
<arg name="yolox_traffic_light_detector_param_path" value="$(var yolox_traffic_light_detector_param_path)"/>
320+
<arg name="car_traffic_light_classifier_param_path" value="$(var car_traffic_light_classifier_param_path)"/>
321+
<arg name="pedestrian_traffic_light_classifier_param_path" value="$(var pedestrian_traffic_light_classifier_param_path)"/>
322+
<arg name="traffic_light_roi_visualizer_param_path" value="$(var traffic_light_roi_visualizer_param_path)"/>
323+
<arg name="traffic_light_selector_param_path" value="$(var traffic_light_selector_param_path)"/>
324+
<arg name="traffic_light_occlusion_predictor_param_path" value="$(var traffic_light_occlusion_predictor_param_path)"/>
320325
<arg name="traffic_light_multi_camera_fusion_param_path" value="$(var traffic_light_multi_camera_fusion_param_path)"/>
321-
<arg name="traffic_light_fine_detector_model_path" value="$(var traffic_light_fine_detector_model_path)"/>
322-
<arg name="traffic_light_fine_detector_model_name" value="$(var traffic_light_fine_detector_model_name)"/>
323-
<arg name="traffic_light_classifier_model_path" value="$(var traffic_light_classifier_model_path)"/>
324-
<arg name="car_traffic_light_classifier_model_name" value="$(var car_traffic_light_classifier_model_name)"/>
325-
<arg name="pedestrian_traffic_light_classifier_model_name" value="$(var pedestrian_traffic_light_classifier_model_name)"/>
326+
<arg name="traffic_light_arbiter_param_path" value="$(var traffic_light_arbiter_param_path)"/>
327+
<arg name="crosswalk_traffic_light_estimator_param_path" value="$(var crosswalk_traffic_light_estimator_param_path)"/>
328+
<arg name="whole_image_detection/model_path" value="$(var traffic_light_recognition/whole_image_detection/model_path)"/>
329+
<arg name="whole_image_detection/label_path" value="$(var traffic_light_recognition/whole_image_detection/label_path)"/>
330+
<arg name="fine_detection/model_path" value="$(var traffic_light_recognition/fine_detection/model_path)"/>
331+
<arg name="fine_detection/label_path" value="$(var traffic_light_recognition/fine_detection/label_path)"/>
332+
<arg name="classification/car/model_path" value="$(var traffic_light_recognition/classification/car/model_path)"/>
333+
<arg name="classification/car/label_path" value="$(var traffic_light_recognition/classification/car/label_path)"/>
334+
<arg name="classification/pedestrian/model_path" value="$(var traffic_light_recognition/classification/pedestrian/model_path)"/>
335+
<arg name="classification/pedestrian/label_path" value="$(var traffic_light_recognition/classification/pedestrian/label_path)"/>
326336
</include>
327337
</group>
328338
</group>

0 commit comments

Comments
 (0)