Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(pose_initializer): rework parameters #5773

Merged
2 changes: 2 additions & 0 deletions localization/pose_initializer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ This node depends on the map height fitter library.
| `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

| Name | Type | Description |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
ros__parameters:
gnss_pose_timeout: 3.0 # [sec]
stop_check_duration: 3.0 # [sec]
ekf_enabled: $(var ekf_enabled)
gnss_enabled: $(var gnss_enabled)
yabloc_enabled: $(var yabloc_enabled)
ndt_enabled: $(var ndt_enabled)
stop_check_enabled: $(var stop_check_enabled)

# from gnss
gnss_particle_covariance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@
<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)"/>

<param from="$(var config_file)" allow_substs="true"/>
<remap from="yabloc_align" to="/localization/pose_estimator/yabloc/initializer/yabloc_align_srv"/>
<remap from="ndt_align" to="/localization/pose_estimator/ndt_align_srv"/>
<remap from="stop_check_twist" to="/sensing/vehicle_velocity_converter/twist_with_covariance"/>
Expand Down
85 changes: 85 additions & 0 deletions localization/pose_initializer/schema/pose_initializer.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for Pose Initializer Node",
"type": "object",
"definitions": {
"pose_initializer": {
"type": "object",
"properties": {
"gnss_pose_timeout": {
"type": "number",
"description": "The duration that the GNSS pose is valid. [sec]",
"default": "3.0",
"minimum": 0.0
},
"stop_check_enabled": {
"type": "string",
"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": "string",
"description": "If true, EKF localizer is activated.",
"default": "true"
},
"gnss_enabled": {
"type": "string",
"description": "If true, use the GNSS pose when no pose is specified.",
"default": "true"
},
"yabloc_enabled": {
"type": "string",
"description": "If true, YabLocModule is used.",
"default": "true"
},
"ndt_enabled": {
"type": "string",
"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",
"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]"
},
"output_pose_covariance": {
"type": "array",
"description": "output pose covariance",
"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]"
}
},
"required": [
"gnss_pose_timeout",
"stop_check_duration",
"ekf_enabled",
"gnss_enabled",
"yabloc_enabled",
"ndt_enabled",
"stop_check_enabled",
"gnss_particle_covariance",
"output_pose_covariance"
],
"additionalProperties": false
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/pose_initializer"
}
},
"required": ["ros__parameters"],
"additionalProperties": false
}
},
"required": ["/**"],
"additionalProperties": false
}
Loading