Skip to content

Commit 5c97d9e

Browse files
committed
add description in readme
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
1 parent 3be96ef commit 5c97d9e

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

localization/pose_initializer/README.md

+80
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,83 @@ This node depends on the map height fitter library.
4646
This `pose_initializer` is used via default AD API. For detailed description of the API description, please refer to [the description of `default_ad_api`](https://github.com/autowarefoundation/autoware.universe/blob/main/system/default_ad_api/document/localization.md).
4747

4848
<img src="../../system/default_ad_api/document/images/localization.drawio.svg" alt="drawing" width="800"/>
49+
50+
## Initialize pose via CLI
51+
52+
### Using the GNSS estimated position
53+
54+
```
55+
ros2 service call /localization/initialize tier4_localization_msgs/srv/InitializeLocalization
56+
```
57+
The GNSS estimated position is used as the initial guess, and the localization algorithm automatically estimates a more accurate position.
58+
59+
60+
### Using the input position
61+
```
62+
ros2 service call /localization/initialize tier4_localization_msgs/srv/InitializeLocalization "
63+
pose_with_covariance:
64+
- header:
65+
frame_id: map
66+
pose:
67+
pose:
68+
position:
69+
x: 89571.1640625
70+
y: 42301.1875
71+
z: -3.1565165519714355
72+
orientation:
73+
x: 0.0
74+
y: 0.0
75+
z: 0.28072773940524687
76+
w: 0.9597874433062874
77+
covariance: [0.25, 0, 0, 0, 0, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.06853891909122467]
78+
method: 0
79+
"
80+
```
81+
The input position is used as the initial guess, and the localization algorithm automatically estimates a more accurate position.
82+
83+
### Direct initial position set
84+
```
85+
ros2 service call /localization/initialize tier4_localization_msgs/srv/InitializeLocalization "
86+
pose_with_covariance:
87+
- header:
88+
frame_id: map
89+
pose:
90+
pose:
91+
position:
92+
x: 89571.1640625
93+
y: 42301.1875
94+
z: -3.1565165519714355
95+
orientation:
96+
x: 0.0
97+
y: 0.0
98+
z: 0.28072773940524687
99+
w: 0.9597874433062874
100+
covariance: [0.25, 0, 0, 0, 0, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.06853891909122467]
101+
method: 1
102+
"
103+
```
104+
The initial position is set directly by the input position without going through localization algorithm.
105+
106+
107+
108+
### Via ros2 topic pub
109+
```
110+
ros2 topic pub --once /initialpose geometry_msgs/msg/PoseWithCovarianceStamped "
111+
header:
112+
frame_id: map
113+
pose:
114+
pose:
115+
position:
116+
x: 89571.1640625
117+
y: 42301.1875
118+
z: 0.0
119+
orientation:
120+
x: 0.0
121+
y: 0.0
122+
z: 0.28072773940524687
123+
w: 0.9597874433062874
124+
"
125+
```
126+
127+
It behaves the same as "initialpose (from rviz)".
128+
The position.z and the covariance will be overwritten by [ad_api_adaptors](https://github.com/autowarefoundation/autoware.universe/tree/main/system/default_ad_api_helpers/ad_api_adaptors), so there is no need to input them.

0 commit comments

Comments
 (0)