Skip to content

Commit

Permalink
chore(traffic_light_multi_camera_fusion): read parameters from yaml f…
Browse files Browse the repository at this point in the history
…ile (autowarefoundation#10144)

* chore(traffic_light_multi_camera_fusion): read parameters from yaml file

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* style(pre-commit): autofix

* add all_traffic_light_camera param to launch.xml

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* fix json schema

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* remove camera namespace parameter from config file

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* revert unnecessary change

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* remove camera_namespaces from required

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

---------

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
TomohitoAndo and pre-commit-ci[bot] committed Feb 19, 2025
1 parent b112310 commit cd6ee6d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
2 changes: 2 additions & 0 deletions launch/tier4_perception_launch/launch/perception.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<arg name="occupancy_grid_map_updater"/>
<arg name="occupancy_grid_map_updater_param_path"/>
<arg name="traffic_light_arbiter_param_path"/>
<arg name="traffic_light_multi_camera_fusion_param_path"/>
<arg name="lidar_detection_model"/>

<!-- ML model parameters -->
Expand Down Expand Up @@ -310,6 +311,7 @@
<arg name="fusion_only" value="$(var traffic_light_recognition/fusion_only)"/>
<arg name="all_camera_namespaces" value="$(var all_traffic_light_camera)"/>
<arg name="traffic_light_arbiter_param_path" value="$(var traffic_light_arbiter_param_path)"/>
<arg name="traffic_light_multi_camera_fusion_param_path" value="$(var traffic_light_multi_camera_fusion_param_path)"/>
<arg name="traffic_light_fine_detector_model_path" value="$(var traffic_light_fine_detector_model_path)"/>
<arg name="traffic_light_fine_detector_model_name" value="$(var traffic_light_fine_detector_model_name)"/>
<arg name="traffic_light_classifier_model_path" value="$(var traffic_light_classifier_model_path)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@

<!-- traffic_light_multi_camera_fusion -->
<group>
<node pkg="autoware_traffic_light_multi_camera_fusion" exec="traffic_light_multi_camera_fusion_node" name="traffic_light_multi_camera_fusion" output="screen">
<param name="camera_namespaces" value="$(var all_camera_namespaces)"/>
<param name="message_lifespan" value="0.09"/>
<param name="approximate_sync" value="false"/>
<remap from="~/input/vector_map" to="/map/vector_map"/>
<remap from="~/output/traffic_signals" to="$(var internal/traffic_signals)"/>
</node>
<include file="$(find-pkg-share autoware_traffic_light_multi_camera_fusion)/launch/traffic_light_multi_camera_fusion.launch.xml">
<arg name="camera_namespaces" value="$(var all_camera_namespaces)"/>
<arg name="param_path" value="$(var traffic_light_multi_camera_fusion_param_path)"/>
<arg name="input/vector_map" value="/map/vector_map"/>
<arg name="output/traffic_signals" value="$(var internal/traffic_signals)"/>
</include>
</group>

<!-- V2X fusion -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/**:
ros__parameters:
camera_namespaces: ["camera6", "camera7"]
message_lifespan: 0.09
approximate_sync: false
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
<arg name="input/vector_map" default="/map/vector_map"/>
<arg name="param_path" default="$(find-pkg-share autoware_traffic_light_multi_camera_fusion)/config/traffic_light_multi_camera_fusion.param.yaml"/>
<arg name="output/traffic_signals" default="/perception/traffic_light_recognition/traffic_signals"/>
<arg name="camera_namespaces" default="[camera6, camera7]"/>

<node pkg="autoware_traffic_light_multi_camera_fusion" exec="traffic_light_multi_camera_fusion_node" name="traffic_light_multi_camera_fusion" output="screen">
<remap from="~/input/vector_map" to="$(var input/vector_map)"/>
<remap from="~/output/traffic_signals" to="$(var output/traffic_signals)"/>
<param from="$(var param_path)"/>
<param name="camera_namespaces" value="$(var camera_namespaces)"/>
</node>
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
"autoware_traffic_light_multi_camera_fusion": {
"type": "object",
"properties": {
"camera_namespaces": {
"type": "array",
"description": "Camera namespaces to be fused.",
"items": {
"type": "string"
},
"default": []
},
"message_lifespan": {
"type": "number",
"description": "The maximum timestamp span to be fused.",
Expand All @@ -25,7 +17,7 @@
"default": false
}
},
"required": ["camera_namespaces", "message_lifespan", "approximate_sync"],
"required": ["message_lifespan", "approximate_sync"],
"additionalProperties": false
}
},
Expand Down

0 comments on commit cd6ee6d

Please sign in to comment.