Skip to content

Commit 02bc6d8

Browse files
refactor(pose_initializer): rework parameters (#5773)
* refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <wwcphoebe@gmail.com> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <wwcphoebe@gmail.com> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <wwcphoebe@gmail.com> * style(pre-commit): autofix * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <wwcphoebe@gmail.com> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <wwcphoebe@gmail.com> --------- Signed-off-by: PhoebeWu21 <wwcphoebe@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c859790 commit 02bc6d8

File tree

4 files changed

+93
-7
lines changed

4 files changed

+93
-7
lines changed

localization/pose_initializer/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ This node depends on the map height fitter library.
2222
| `gnss_enabled` | bool | If true, use the GNSS pose when no pose is specified. |
2323
| `gnss_pose_timeout` | bool | The duration that the GNSS pose is valid. |
2424

25+
{{ json_to_markdown("localization/pose_initializer/schema/pose_initializer.schema.json") }}
26+
2527
### Services
2628

2729
| Name | Type | Description |

localization/pose_initializer/config/pose_initializer.param.yaml

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

611
# from gnss
712
gnss_particle_covariance:

localization/pose_initializer/launch/pose_initializer.launch.xml

+1-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@
99
<arg name="sub_gnss_pose_cov" default="sub_gnss_pose_cov"/>
1010

1111
<node pkg="pose_initializer" exec="pose_initializer_node" name="pose_initializer_node">
12-
<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)"/>
18-
12+
<param from="$(var config_file)" allow_substs="true"/>
1913
<remap from="yabloc_align" to="/localization/pose_estimator/yabloc/initializer/yabloc_align_srv"/>
2014
<remap from="ndt_align" to="/localization/pose_estimator/ndt_align_srv"/>
2115
<remap from="stop_check_twist" to="/sensing/vehicle_velocity_converter/twist_with_covariance"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Parameters for Pose Initializer Node",
4+
"type": "object",
5+
"definitions": {
6+
"pose_initializer": {
7+
"type": "object",
8+
"properties": {
9+
"gnss_pose_timeout": {
10+
"type": "number",
11+
"description": "The duration that the GNSS pose is valid. [sec]",
12+
"default": "3.0",
13+
"minimum": 0.0
14+
},
15+
"stop_check_enabled": {
16+
"type": "string",
17+
"description": "If true, initialization is accepted only when the vehicle is stopped.",
18+
"default": "true"
19+
},
20+
"stop_check_duration": {
21+
"type": "number",
22+
"description": "The duration used for the stop check above. [sec]",
23+
"default": "3.0",
24+
"minimum": 0.0
25+
},
26+
"ekf_enabled": {
27+
"type": "string",
28+
"description": "If true, EKF localizer is activated.",
29+
"default": "true"
30+
},
31+
"gnss_enabled": {
32+
"type": "string",
33+
"description": "If true, use the GNSS pose when no pose is specified.",
34+
"default": "true"
35+
},
36+
"yabloc_enabled": {
37+
"type": "string",
38+
"description": "If true, YabLocModule is used.",
39+
"default": "true"
40+
},
41+
"ndt_enabled": {
42+
"type": "string",
43+
"description": "If true, the pose will be estimated by NDT scan matcher, otherwise it is passed through.",
44+
"default": "true"
45+
},
46+
"gnss_particle_covariance": {
47+
"type": "array",
48+
"description": "gnss particle covariance",
49+
"default": "[1.0, 0.0, 0.0, 0.0, 0.0, 0.0,\n 0.0, 1.0, 0.0, 0.0, 0.0, 0.0,\n 0.0, 0.0, 0.01, 0.0, 0.0, 0.0,\n 0.0, 0.0, 0.0, 0.01, 0.0, 0.0,\n 0.0, 0.0, 0.0, 0.0, 0.01, 0.0,\n 0.0, 0.0, 0.0, 0.0, 0.0, 10.0]"
50+
},
51+
"output_pose_covariance": {
52+
"type": "array",
53+
"description": "output pose covariance",
54+
"default": "[1.0, 0.0, 0.0, 0.0, 0.0, 0.0,\n 0.0, 1.0, 0.0, 0.0, 0.0, 0.0,\n 0.0, 0.0, 0.01, 0.0, 0.0, 0.0,\n 0.0, 0.0, 0.0, 0.01, 0.0, 0.0,\n 0.0, 0.0, 0.0, 0.0, 0.01, 0.0,\n 0.0, 0.0, 0.0, 0.0, 0.0, 0.2]"
55+
}
56+
},
57+
"required": [
58+
"gnss_pose_timeout",
59+
"stop_check_duration",
60+
"ekf_enabled",
61+
"gnss_enabled",
62+
"yabloc_enabled",
63+
"ndt_enabled",
64+
"stop_check_enabled",
65+
"gnss_particle_covariance",
66+
"output_pose_covariance"
67+
],
68+
"additionalProperties": false
69+
}
70+
},
71+
"properties": {
72+
"/**": {
73+
"type": "object",
74+
"properties": {
75+
"ros__parameters": {
76+
"$ref": "#/definitions/pose_initializer"
77+
}
78+
},
79+
"required": ["ros__parameters"],
80+
"additionalProperties": false
81+
}
82+
},
83+
"required": ["/**"],
84+
"additionalProperties": false
85+
}

0 commit comments

Comments
 (0)