Skip to content

Commit

Permalink
chore(simple_object_merger): add config (autowarefoundation#6212)
Browse files Browse the repository at this point in the history
* chore(simple_object_merger): add config

Signed-off-by: scepter914 <scepter914@gmail.com>

* fix typo

Signed-off-by: scepter914 <scepter914@gmail.com>

* fix config

Signed-off-by: scepter914 <scepter914@gmail.com>

* refactor

Signed-off-by: scepter914 <scepter914@gmail.com>

* merge main branch

Signed-off-by: scepter914 <scepter914@gmail.com>

* apply pre-commit

Signed-off-by: scepter914 <scepter914@gmail.com>

* merge main branch

Signed-off-by: scepter914 <scepter914@gmail.com>

* style(pre-commit): autofix

---------

Signed-off-by: scepter914 <scepter914@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and kyoichi-sugahara committed Feb 1, 2024
1 parent edfca37 commit 0928cb6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
1 change: 1 addition & 0 deletions perception/simple_object_merger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ endif()
# Package
ament_auto_package(
INSTALL_TO_SHARE
config
launch
)
16 changes: 15 additions & 1 deletion perception/simple_object_merger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,19 @@ If the time difference between the first topic of `input_topics` and an input to
- Default parameter: "[]"
This parameter is the name of input topics.
For example, when this packages use for radar objects, `"[/sensing/radar/front_center/detected_objects, /sensing/radar/front_left/detected_objects, /sensing/radar/rear_left/detected_objects, /sensing/radar/rear_center/detected_objects, /sensing/radar/rear_right/detected_objects, /sensing/radar/front_right/detected_objects]"` can be set.
For example, when this packages use for radar objects,
```yaml
input_topics:
[
"/sensing/radar/front_center/detected_objects",
"/sensing/radar/front_left/detected_objects",
"/sensing/radar/rear_left/detected_objects",
"/sensing/radar/rear_center/detected_objects",
"/sensing/radar/rear_right/detected_objects",
"/sensing/radar/front_right/detected_objects",
]
```

can be set in config yaml file.
For now, the time difference is calculated by the header time between the first topic of `input_topics` and the input topics, so the most important objects to detect should be set in the first of `input_topics` list.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**:
ros__parameters:
update_rate_hz: 20.0
new_frame_id: "base_link"
timeout_threshold: 1.0
input_topics: [""]
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
<launch>
<!-- Output -->
<arg name="output/objects" default="~/output/objects"/>
<!-- Parameter -->
<arg name="update_rate_hz" default="20.0"/>
<arg name="new_frame_id" default="base_link"/>
<arg name="timeout_threshold" default="0.1"/>
<arg name="input_topics" default="[]"/>
<arg name="param_path" default="$(find-pkg-share simple_object_merger)/config/simple_object_merger.param.yaml"/>

<!-- Node -->
<node pkg="simple_object_merger" exec="simple_object_merger_node" name="simple_object_merger" output="screen">
<remap from="~/output/objects" to="$(var output/objects)"/>
<param name="update_rate_hz" value="$(var update_rate_hz)"/>
<param name="timeout_threshold" value="$(var timeout_threshold)"/>
<param name="new_frame_id" value="$(var new_frame_id)"/>
<param name="input_topics" value="$(var input_topics)"/>
<param from="$(var param_path)"/>
</node>
</launch>

0 comments on commit 0928cb6

Please sign in to comment.