Previous
Navigation service
The navigation service API provides methods for controlling autonomous GPS-based navigation. Use these methods to set the navigation mode, manage waypoints, monitor the robot’s location, and query obstacles and paths.
Get the current navigation mode.
Returns: Mode (MANUAL, WAYPOINT, or EXPLORE)
Set the navigation mode.
| Parameter | Type | Description |
|---|---|---|
mode | Mode | The mode to set: MODE_MANUAL, MODE_WAYPOINT. |
In Manual mode, the navigation service is passive. You control the base directly. In Waypoint mode, the service takes control of the base and navigates to unvisited waypoints.
Switching from Waypoint to Manual stops the current motion plan but preserves all waypoints. Switching back to Waypoint resumes from the next unvisited waypoint.
Get the robot’s current GPS location and compass heading.
Returns: GeoPoint with latitude and longitude, plus compass heading
in degrees (0 = north, 90 = east, 180 = south, 270 = west).
Get all unvisited waypoints. Visited waypoints are not included.
Returns: list of Waypoint objects, each with an id and location
(GeoPoint).
Add a GPS waypoint to the navigation queue. Waypoints are visited in the order they are added.
| Parameter | Type | Description |
|---|---|---|
location | GeoPoint | The GPS coordinates (latitude, longitude) of the waypoint. |
Remove a waypoint by its ID. Use this to skip a waypoint the robot can’t reach, or to clear the queue.
| Parameter | Type | Description |
|---|---|---|
id | string | The waypoint ID from GetWaypoints. |
Get all known obstacles, including both static obstacles from configuration and transient obstacles detected by vision services.
Returns: list of GeoGeometry objects.
Get the planned paths to waypoints, if any exist.
Returns: list of Path objects, each with a destination waypoint ID
and a list of GeoPoints defining the path.
Get the navigation service’s properties, including the map type.
Returns: MapType (NONE or GPS).
Send an arbitrary command to the navigation service. This is model-specific and depends on the implementation.
| Parameter | Type | Description |
|---|---|---|
command | map | Key-value pairs defining the command. |
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!