Skip to content

Commit a626d53

Browse files
committed
refactor(pose_initializer): rework parameters
Signed-off-by: PhoebeWu21 <wwcphoebe@gmail.com>
1 parent c988357 commit a626d53

File tree

4 files changed

+19
-35
lines changed

4 files changed

+19
-35
lines changed

localization/pose_initializer/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ This node depends on the map height fitter library.
1313

1414
### Parameters
1515

16+
| Name | Type | Description |
17+
| --------------------- | ---- | ---------------------------------------------------------------------------------------- |
18+
| `ekf_enabled` | bool | If true, EKF localizer is activated. |
19+
| `ndt_enabled` | bool | If true, the pose will be estimated by NDT scan matcher, otherwise it is passed through. |
20+
| `stop_check_enabled` | bool | If true, initialization is accepted only when the vehicle is stopped. |
21+
| `stop_check_duration` | bool | The duration used for the stop check above. |
22+
| `gnss_enabled` | bool | If true, use the GNSS pose when no pose is specified. |
23+
| `gnss_pose_timeout` | bool | The duration that the GNSS pose is valid. |
24+
1625
{{ json_to_markdown("localization/pose_initializer/schema/pose_initializer.schema.json") }}
1726

1827
### Services

localization/pose_initializer/config/pose_initializer.param.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
ros__parameters:
33
gnss_pose_timeout: 3.0 # [sec]
44
stop_check_duration: 3.0 # [sec]
5-
ekf_enabled: true
6-
gnss_enabled: true
7-
yabloc_enabled: true
8-
ndt_enabled: true
9-
stop_check_enabled: true
105

116
# from gnss
127
gnss_particle_covariance:

localization/pose_initializer/launch/pose_initializer.launch.xml

+10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
<launch>
22
<arg name="config_file" default="$(find-pkg-share pose_initializer)/config/pose_initializer.param.yaml"/>
3+
<arg name="ndt_enabled"/>
4+
<arg name="gnss_enabled"/>
5+
<arg name="ekf_enabled"/>
6+
<arg name="yabloc_enabled"/>
7+
<arg name="stop_check_enabled"/>
38

49
<arg name="sub_gnss_pose_cov" default="sub_gnss_pose_cov"/>
510

611
<node pkg="pose_initializer" exec="pose_initializer_node" name="pose_initializer_node">
712
<param from="$(var config_file)"/>
13+
<param name="ndt_enabled" value="$(var ndt_enabled)"/>
14+
<param name="gnss_enabled" value="$(var gnss_enabled)"/>
15+
<param name="ekf_enabled" value="$(var ekf_enabled)"/>
16+
<param name="yabloc_enabled" value="$(var yabloc_enabled)"/>
17+
<param name="stop_check_enabled" value="$(var stop_check_enabled)"/>
818

919
<remap from="yabloc_align" to="/localization/pose_estimator/yabloc/initializer/yabloc_align_srv"/>
1020
<remap from="ndt_align" to="/localization/pose_estimator/ndt_align_srv"/>

localization/pose_initializer/schema/pose_initializer.schema.json

-30
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,12 @@
1212
"default": "3.0",
1313
"minimum": 0.0
1414
},
15-
"stop_check_enabled": {
16-
"type": "boolean",
17-
"description": "If true, initialization is accepted only when the vehicle is stopped.",
18-
"default": "true"
19-
},
2015
"stop_check_duration": {
2116
"type": "number",
2217
"description": "The duration used for the stop check above. [sec]",
2318
"default": "3.0",
2419
"minimum": 0.0
2520
},
26-
"ekf_enabled": {
27-
"type": "boolean",
28-
"description": "If true, EKF localizer is activated.",
29-
"default": "true"
30-
},
31-
"gnss_enabled": {
32-
"type": "boolean",
33-
"description": "If true, use the GNSS pose when no pose is specified.",
34-
"default": "true"
35-
},
36-
"yabloc_enabled": {
37-
"type": "boolean",
38-
"description": "If true, YabLocModule is used.",
39-
"default": "true"
40-
},
41-
"ndt_enabled": {
42-
"type": "boolean",
43-
"description": "If true, the pose will be estimated by NDT scan matcher, otherwise it is passed through.",
44-
"default": "true"
45-
},
4621
"gnss_particle_covariance": {
4722
"type": "array",
4823
"description": "gnss particle covariance",
@@ -57,11 +32,6 @@
5732
"required": [
5833
"gnss_pose_timeout",
5934
"stop_check_duration",
60-
"ekf_enabled",
61-
"gnss_enabled",
62-
"yabloc_enabled",
63-
"ndt_enabled",
64-
"stop_check_enabled",
6535
"gnss_particle_covariance",
6636
"output_pose_covariance"
6737
],

0 commit comments

Comments
 (0)