Skip to content

Commit 7afa893

Browse files
committed
chore(radar_object_clustering): fix README
Signed-off-by: scepter914 <scepter914@gmail.com>
1 parent ae3e758 commit 7afa893

File tree

1 file changed

+77
-32
lines changed

1 file changed

+77
-32
lines changed

perception/radar_object_clustering/README.md

+77-32
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@ In other word, this package can combine multiple radar detections from one objec
77

88
![radar_clustering](docs/radar_clustering.drawio.svg)
99

10-
## Algorithm
11-
10+
## Design
1211
### Background
1312

1413
In radars with object output, there are cases that multiple detection results are obtained from one object, especially for large vehicles such as trucks and trailers.
1514
Its multiple detection results cause separation of objects in tracking module.
1615
Therefore, by this package the multiple detection results are clustered into one object in advance.
1716

18-
### Detail Algorithm
17+
### Algorithm
1918

20-
- Sort by distance from `base_link`
19+
- 1. Sort by distance from `base_link`
2120

2221
At first, to prevent changing the result from depending on the order of objects in DetectedObjects, input objects are sorted by distance from `base_link`.
2322
In addition, to apply matching in closeness order considering occlusion, objects are sorted in order of short distance in advance.
2423

25-
- Clustering
24+
- 2. Clustering
2625

2726
If two radar objects are near, and yaw angle direction and velocity between two radar objects is similar (the degree of these is defined by parameters), then these are clustered.
2827
Note that radar characteristic affect parameters for this matching.
@@ -32,13 +31,13 @@ For example, if resolution of range distance or angle is low and accuracy of vel
3231

3332
After grouping for all radar objects, if multiple radar objects are grouping, the kinematics of the new clustered object is calculated from average of that and label and shape of the new clustered object is calculated from top confidence in radar objects.
3433

35-
- Fixed label correction
34+
- 3. Fixed label correction
3635

3736
When the label information from radar outputs lack accuracy, `is_fixed_label` parameter is recommended to set `true`.
3837
If the parameter is true, the label of a clustered object is overwritten by the label set by `fixed_label` parameter.
3938
If this package use for faraway dynamic object detection with radar, the parameter is recommended to set to `VEHICLE`.
4039

41-
- Fixed size correction
40+
- 4. Fixed size correction
4241

4342
When the size information from radar outputs lack accuracy, `is_fixed_size` parameter is recommended to set `true`.
4443
If the parameter is true, the size of a clustered object is overwritten by the label set by `size_x`, `size_y`, and `size_z` parameters.
@@ -51,28 +50,74 @@ Note that to use for [multi_objects_tracker](https://github.com/autowarefoundati
5150
For now, size estimation for clustered object is not implemented.
5251
So `is_fixed_size` parameter is recommended to set `true`, and size parameters is recommended to set to value near to average size of vehicles.
5352

54-
## Input
55-
56-
| Name | Type | Description |
57-
| ----------------- | ----------------------------------------------------- | -------------- |
58-
| `~/input/objects` | autoware_auto_perception_msgs/msg/DetectedObjects.msg | Radar objects. |
59-
60-
## Output
61-
62-
| Name | Type | Description |
63-
| ------------------ | ----------------------------------------------------- | -------------- |
64-
| `~/output/objects` | autoware_auto_perception_msgs/msg/DetectedObjects.msg | Output objects |
65-
66-
## Parameters
67-
68-
| Name | Type | Description | Default value |
69-
| :------------------- | :----- | :---------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
70-
| `angle_threshold` | double | Angle threshold to judge whether radar detections come from one object. [rad] | 0.174 |
71-
| `distance_threshold` | double | Distance threshold to judge whether radar detections come from one object. [m] | 4.0 |
72-
| `velocity_threshold` | double | Velocity threshold to judge whether radar detections come from one object. [m/s] | 2.0 |
73-
| `is_fixed_label` | bool | If this parameter is true, the label of a clustered object is overwritten by the label set by `fixed_label` parameter. | false |
74-
| `fixed_label` | string | If `is_fixed_label` is true, the label of a clustered object is overwritten by this parameter. | "UNKNOWN" |
75-
| `is_fixed_size` | bool | If this parameter is true, the size of a clustered object is overwritten by the label set by `size_x`, `size_y`, and `size_z` parameters. | false |
76-
| `size_x` | double | If `is_fixed_size` is true, the x-axis size of a clustered object is overwritten by this parameter. [m] | 4.0 |
77-
| `size_y` | double | If `is_fixed_size` is true, the y-axis size of a clustered object is overwritten by this parameter. [m] | 1.5 |
78-
| `size_z` | double | If `is_fixed_size` is true, the z-axis size of a clustered object is overwritten by this parameter. [m] | 1.5 |
53+
## Interface
54+
### Input
55+
56+
- `~/input/objects` (`autoware_auto_perception_msgs/msg/DetectedObjects.msg`)
57+
- Radar objects
58+
59+
### Output
60+
61+
- `~/output/objects` (`autoware_auto_perception_msgs/msg/DetectedObjects.msg`)
62+
- Output objects
63+
64+
### Parameter
65+
66+
- `angle_threshold` (double) [rad]
67+
- Default parameter is 0.174.
68+
- `distance_threshold` (double) [m]
69+
- Default parameter is 4.0.
70+
- `velocity_threshold` (double) [m/s]
71+
- Default parameter is 2.0.
72+
73+
These parameter are thresholds for angle, distance, and velocity to judge whether radar detections come from one object in "clustering" processing, which is written in detail at algorithm section.
74+
If all of the difference in angle/distance/velocity from two objects is less than the thresholds, then the two objects are merged to one clustered object.
75+
If these parameter is larger, more objects are merged to one clustered object.
76+
77+
These are used in `isSameObject` function as below.
78+
79+
```cpp
80+
81+
bool RadarObjectClusteringNode::isSameObject(
82+
const DetectedObject & object_1, const DetectedObject & object_2)
83+
{
84+
const double angle_diff = std::abs(tier4_autoware_utils::normalizeRadian(
85+
tf2::getYaw(object_1.kinematics.pose_with_covariance.pose.orientation) -
86+
tf2::getYaw(object_2.kinematics.pose_with_covariance.pose.orientation)));
87+
const double velocity_diff = std::abs(
88+
object_1.kinematics.twist_with_covariance.twist.linear.x -
89+
object_2.kinematics.twist_with_covariance.twist.linear.x);
90+
const double distance = tier4_autoware_utils::calcDistance2d(
91+
object_1.kinematics.pose_with_covariance.pose.position,
92+
object_2.kinematics.pose_with_covariance.pose.position);
93+
94+
if (
95+
distance < node_param_.distance_threshold && angle_diff < node_param_.angle_threshold &&
96+
velocity_diff < node_param_.velocity_threshold) {
97+
return true;
98+
} else {
99+
return false;
100+
}
101+
}
102+
```
103+
104+
- `is_fixed_label` (bool)
105+
- Default parameter is false.
106+
- `fixed_label` (string)
107+
- Default parameter is "UNKNOWN".
108+
109+
`is_fixed_label` is the flag to use fixed label.
110+
If it is true, the label of a clustered object is overwritten by the label set by `fixed_label` parameter.
111+
If the radar objects do not have label information, then it is recommended to use fixed label.
112+
113+
- `is_fixed_size` (bool)
114+
- Default parameter is false.
115+
- `size_x` (double) [m]
116+
- Default parameter is 4.0.
117+
- `size_y` (double) [m]
118+
- Default parameter is 1.5.
119+
- `size_z` (double) [m]
120+
- Default parameter is 1.5.
121+
122+
`is_fixed_label` is the flag to use fixed size parameters.
123+
If it is true, the size of a clustered object is overwritten by the label set by `size_x`, `size_y`, and `size_z` parameters.

0 commit comments

Comments
 (0)