Skip to main content

VPRLocalRelocalization

Service type: fourier_msgs/srv/VPRLocalRelocalization

Service name: /slam/trigger_local_relocalization

Description

Trigger local relocalization inside a polygon in the map frame. An empty polygon_vertices array falls back to global relocalization, equivalent to /slam/global_relocalization.

Request

FieldTypeDescription
polygon_verticesgeometry_msgs/Point32[]Vertices of the 2D search polygon in the map frame; z values are ignored.

Response

FieldTypeDescription
successboolWhether the request was accepted and relocalization started.
messagestringResult description.
candidate_countint32Number of keyframes selected inside the polygon; zero when no vertices are supplied.

Prerequisites

  • The system is in localization mode.
  • A map has been loaded.

Examples

Example 1

Bash
ros2 service call /slam/trigger_local_relocalization \
fourier_msgs/srv/VPRLocalRelocalization \
"{polygon_vertices: [{x: 0.0, y: 0.0, z: 0.0}, {x: 5.0, y: 0.0, z: 0.0}, {x: 5.0, y: 5.0, z: 0.0}, {x: 0.0, y: 5.0, z: 0.0}]}"
ServiceDescription
/slam/global_relocalizationTrigger global relocalization.