Skip to content

Commit 98f2a71

Browse files
chore(simple_object_merger): update README (#6146)
* chore(simple_object_merger): update README Signed-off-by: scepter914 <scepter914@gmail.com> * style(pre-commit): autofix * update README Signed-off-by: scepter914 <scepter914@gmail.com> * style(pre-commit): autofix * update README Signed-off-by: scepter914 <scepter914@gmail.com> --------- Signed-off-by: scepter914 <scepter914@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 6bf7532 commit 98f2a71

File tree

1 file changed

+52
-34
lines changed

1 file changed

+52
-34
lines changed
+52-34
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,78 @@
11
# simple_object_merger
22

3-
This package can merge multiple topics of [autoware_auto_perception_msgs/msg/DetectedObject](https://gitlab.com/autowarefoundation/autoware.auto/autoware_auto_msgs/-/blob/master/autoware_auto_perception_msgs/msg/DetectedObject.idl) without data association algorithm.
3+
This package can merge multiple topics of [autoware_auto_perception_msgs/msg/DetectedObject](https://gitlab.com/autowarefoundation/autoware.auto/autoware_auto_msgs/-/blob/master/autoware_auto_perception_msgs/msg/DetectedObject.idl) without low calculation cost.
44

55
## Algorithm
66

77
### Background
88

9-
This package can merge multiple DetectedObjects without matching processing.
10-
[Object_merger](https://github.com/autowarefoundation/autoware.universe/tree/main/perception/object_merger) solve data association algorithm like Hungarian algorithm for matching problem, but it needs computational cost.
11-
In addition, for now, [object_merger](https://github.com/autowarefoundation/autoware.universe/tree/main/perception/object_merger) can handle only 2 DetectedObjects topics and cannot handle more than 2 topics in one node.
12-
To merge 6 DetectedObjects topics, 6 [object_merger](https://github.com/autowarefoundation/autoware.universe/tree/main/perception/object_merger) nodes need to stand.
9+
[Object_merger](https://github.com/autowarefoundation/autoware.universe/tree/main/perception/object_merger) is mainly used for merge process with DetectedObjects. There are 2 characteristics in `Object_merger`. First, `object_merger` solve data association algorithm like Hungarian algorithm for matching problem, but it needs computational cost. Second, `object_merger` can handle only 2 DetectedObjects topics and cannot handle more than 2 topics in one node. To merge 6 DetectedObjects topics, 6 `object_merger` nodes need to stand for now.
1310

14-
So this package aim to merge DetectedObjects simply.
15-
This package do not use data association algorithm to reduce the computational cost, and it can handle more than 2 topics in one node to prevent launching a large number of nodes.
11+
So `simple_object_merger` aim to merge multiple DetectedObjects with low calculation cost.
12+
The package do not use data association algorithm to reduce the computational cost, and it can handle more than 2 topics in one node to prevent launching a large number of nodes.
13+
14+
### Use case
15+
16+
Use case is as below.
17+
18+
- Multiple radar detection
19+
20+
`Simple_object_merger` can be used for multiple radar detection. By combining them into one topic from multiple radar topics with `simple_object_merger`, the pipeline for faraway detection with radar is simpler.
1621

1722
### Limitation
1823

1924
- Sensor data drops and delay
2025

21-
Merged objects will not be published until all topic data is received when initializing.
22-
In addition, to care sensor data drops and delayed, this package has a parameter to judge timeout.
23-
When the latest time of the data of a topic is older than the timeout parameter, it is not merged for output objects.
24-
For now specification of this package, if all topic data is received at first and after that the data drops, and the merged objects are published without objects which is judged as timeout.
25-
The timeout parameter should be determined by sensor cycle time.
26+
Merged objects will not be published until all topic data is received when initializing. In addition, to care sensor data drops and delayed, this package has a parameter to judge timeout. When the latest time of the data of a topic is older than the timeout parameter, it is not merged for output objects. For now specification of this package, if all topic data is received at first and after that the data drops, and the merged objects are published without objects which is judged as timeout.The timeout parameter should be determined by sensor cycle time.
2627

2728
- Post-processing
2829

29-
Because this package does not have matching processing, so it can be used only when post-processing is used.
30-
For now, [clustering processing](https://github.com/autowarefoundation/autoware.universe/tree/main/perception/radar_object_clustering) can be used as post-processing.
30+
Because this package does not have matching processing, there are overlapping objects depending on the input objects. So output objects can be used only when post-processing is used. For now, [clustering processing](https://github.com/autowarefoundation/autoware.universe/tree/main/perception/radar_object_clustering) can be used as post-processing.
3131

32-
### Use case
32+
## Interface
3333

34-
Use case is as below.
34+
### Input
3535

36-
- Multiple radar detection
36+
Input topics is defined by the parameter of `input_topics` (List[string]). The type of input topics is `std::vector<autoware_auto_perception_msgs/msg/DetectedObjects.msg>`.
37+
38+
### Output
39+
40+
- `~/output/objects` (`autoware_auto_perception_msgs/msg/DetectedObjects.msg`)
41+
- Merged objects combined from input topics.
42+
43+
### Parameters
44+
45+
- `update_rate_hz` (double) [hz]
46+
- Default parameter: 20.0
47+
48+
This parameter is update rate for the `onTimer` function.
49+
This parameter should be same as the frame rate of input topics.
3750

38-
This package can be used for multiple radar detection.
39-
Since [clustering processing](https://github.com/autowarefoundation/autoware.universe/tree/main/perception/radar_object_clustering) will be included later process in radar faraway detection, this package can be used.
51+
- `new_frame_id` (string)
52+
- Default parameter: "base_link"
4053

41-
## Input
54+
This parameter is the header frame_id of the output topic.
55+
If output topics use for perception module, it should be set for "base_link"
4256

43-
| Name | Type | Description |
44-
| ---- | ------------------------------------------------------------------ | ------------------------------------------------------ |
45-
| | std::vector<autoware_auto_perception_msgs/msg/DetectedObjects.msg> | 3D detected objects. Topic names are set by parameters |
57+
- `timeout_threshold` (double) [s]
58+
- Default parameter: 0.1
4659

47-
## Output
60+
This parameter is the threshold for timeout judgement.
61+
If the time difference between the first topic of `input_topics` and an input topic is exceeded to this parameter, then the objects of topic is not merged to output objects.
4862

49-
| Name | Type | Description |
50-
| ------------------ | ----------------------------------------------------- | -------------- |
51-
| `~/output/objects` | autoware_auto_perception_msgs/msg/DetectedObjects.msg | Merged objects |
63+
```cpp
64+
for (size_t i = 0; i < input_topic_size; i++) {
65+
double time_diff = rclcpp::Time(objects_data_.at(i)->header.stamp).seconds() -
66+
rclcpp::Time(objects_data_.at(0)->header.stamp).seconds();
67+
if (std::abs(time_diff) < node_param_.timeout_threshold) {
68+
// merge objects
69+
}
70+
}
71+
```
5272
53-
## Parameters
73+
- `input_topics` (List[string])
74+
- Default parameter: "[]"
5475
55-
| Name | Type | Description | Default value |
56-
| :------------------ | :----------- | :----------------------------------- | :------------ |
57-
| `update_rate_hz` | double | Update rate. [hz] | 20.0 |
58-
| `new_frame_id` | string | The header frame_id of output topic. | "base_link" |
59-
| `timeout_threshold` | double | Threshold for timeout judgement [s]. | 1.0 |
60-
| `input_topics` | List[string] | Input topics name. | "[]" |
76+
This parameter is the name of input topics.
77+
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.
78+
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.

0 commit comments

Comments
 (0)