Skip to content

Commit

Permalink
refactor(pose_initializer): rework parameters
Browse files Browse the repository at this point in the history
Signed-off-by: PhoebeWu21 <[email protected]>
  • Loading branch information
PhoebeWu21 committed Dec 5, 2023
1 parent c988357 commit a626d53
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 35 deletions.
9 changes: 9 additions & 0 deletions localization/pose_initializer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ This node depends on the map height fitter library.

### Parameters

| Name | Type | Description |
| --------------------- | ---- | ---------------------------------------------------------------------------------------- |
| `ekf_enabled` | bool | If true, EKF localizer is activated. |
| `ndt_enabled` | bool | If true, the pose will be estimated by NDT scan matcher, otherwise it is passed through. |
| `stop_check_enabled` | bool | If true, initialization is accepted only when the vehicle is stopped. |
| `stop_check_duration` | bool | The duration used for the stop check above. |
| `gnss_enabled` | bool | If true, use the GNSS pose when no pose is specified. |
| `gnss_pose_timeout` | bool | The duration that the GNSS pose is valid. |

{{ json_to_markdown("localization/pose_initializer/schema/pose_initializer.schema.json") }}

### Services
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
ros__parameters:
gnss_pose_timeout: 3.0 # [sec]
stop_check_duration: 3.0 # [sec]
ekf_enabled: true
gnss_enabled: true
yabloc_enabled: true
ndt_enabled: true
stop_check_enabled: true

# from gnss
gnss_particle_covariance:
Expand Down
10 changes: 10 additions & 0 deletions localization/pose_initializer/launch/pose_initializer.launch.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
<launch>
<arg name="config_file" default="$(find-pkg-share pose_initializer)/config/pose_initializer.param.yaml"/>
<arg name="ndt_enabled"/>
<arg name="gnss_enabled"/>
<arg name="ekf_enabled"/>
<arg name="yabloc_enabled"/>
<arg name="stop_check_enabled"/>

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

<node pkg="pose_initializer" exec="pose_initializer_node" name="pose_initializer_node">
<param from="$(var config_file)"/>
<param name="ndt_enabled" value="$(var ndt_enabled)"/>
<param name="gnss_enabled" value="$(var gnss_enabled)"/>
<param name="ekf_enabled" value="$(var ekf_enabled)"/>
<param name="yabloc_enabled" value="$(var yabloc_enabled)"/>
<param name="stop_check_enabled" value="$(var stop_check_enabled)"/>

<remap from="yabloc_align" to="/localization/pose_estimator/yabloc/initializer/yabloc_align_srv"/>
<remap from="ndt_align" to="/localization/pose_estimator/ndt_align_srv"/>
Expand Down
30 changes: 0 additions & 30 deletions localization/pose_initializer/schema/pose_initializer.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,12 @@
"default": "3.0",
"minimum": 0.0
},
"stop_check_enabled": {
"type": "boolean",
"description": "If true, initialization is accepted only when the vehicle is stopped.",
"default": "true"
},
"stop_check_duration": {
"type": "number",
"description": "The duration used for the stop check above. [sec]",
"default": "3.0",
"minimum": 0.0
},
"ekf_enabled": {
"type": "boolean",
"description": "If true, EKF localizer is activated.",
"default": "true"
},
"gnss_enabled": {
"type": "boolean",
"description": "If true, use the GNSS pose when no pose is specified.",
"default": "true"
},
"yabloc_enabled": {
"type": "boolean",
"description": "If true, YabLocModule is used.",
"default": "true"
},
"ndt_enabled": {
"type": "boolean",
"description": "If true, the pose will be estimated by NDT scan matcher, otherwise it is passed through.",
"default": "true"
},
"gnss_particle_covariance": {
"type": "array",
"description": "gnss particle covariance",
Expand All @@ -57,11 +32,6 @@
"required": [
"gnss_pose_timeout",
"stop_check_duration",
"ekf_enabled",
"gnss_enabled",
"yabloc_enabled",
"ndt_enabled",
"stop_check_enabled",
"gnss_particle_covariance",
"output_pose_covariance"
],
Expand Down

0 comments on commit a626d53

Please sign in to comment.