GraphNav and Robot Locomotion
The GraphNav service provides three RPCs for navigating to different locations on the prior map:
These RPCs let the client specify maximum speed as well as the size of the goal region at the final waypoint.
NavigateTo RPC is the simplest way to command a robot to go to a destination on the map once the robot is localized. GraphNav will decide which route to take, currently the one with the fewest number of edges.
NavigateRoute RPC allows the client to directly specify the path of the robot. This lets the client command the robot to take a longer path as needed. Routes are specified as a list of waypoints and edges. For example, you could make a path that doubles back on itself, allowing the robot to go to a distant waypoint and then back to the start.
Clients that maintain contact with the robot are encouraged to continuously resend the command with a deadline in the near future. This results in the robot stopping quickly if the client stops checking in. Clients that disconnect from an autonomous robot should set a longer deadline and rely on an alternate mechanism to maintain safety.
NavigateToAnchor RPC allows the client to command the robot go to an approximate
x, y, z position relative to the seed frame. This position can also be specified in a global coordinate system (like GPS coordinates, for example).
Status and feedback
API clients should periodically query for navigation status during map replay using the
Unless an error is returned,
NavigationFeedbackResponseis returned with status
STATUS_FOLLOWING_ROUTEand the remaining list of waypoints and edges in the route.
On successful completion, the navigation status changes to
STATUS_REACHED_GOALwhen the robot reaches the end of the commanded route, matching both the position and yaw of the final waypoint.
Clients requiring high precision should check localization with
GetLocalizationState RPC even after reaching the goal, as the robot will be close but not exactly on the goal.
Autonomous navigation errors
The following error types can interrupt an autonomous route:
|Indicates the client changed something that invalidated the route.
|The robot is not localized to the map.
|Localized and not lost but not on the commanded route.
|A new GraphNav command has overridden the command that the user is asking for feedback about.
|Lost means the robot is no longer confident in its localization, and must be re-localized.
|Stuck means that the robot is still localized but is having trouble reaching the destination (usually because of an obstacle in the way).
|Indicates the robot fell or has a hardware problem.
|Indicates the route is over-constrained. Choose a different route.
|Indicates the lease given to GraphNav is no longer valid.
|Indicates a comms problem or the timeout deadline was reached.
|Indicates a crtical perception fault, behavior fault, or LIDAR not working.
|Indicates an error occurred with an Area Callback.