GraphNav Service

September 23, 2024 ยท View on GitHub

The GraphNav service is a place-based localization and locomotion service. You access the GraphNavService on the robot by making RPC calls to localize the robot, navigate a route, or download snapshot data.

Maps are recorded using the GraphNavRecording service or by operating the robot using the tablet controller and using the Autowalk feature to record a map.

Maps contain waypoints and edges. Together, these are known as graphs. The recorded map is used by the robot to follow a sequence of waypoints and edges. During playback, the robot compares its real-time sensor data with sensor data stored during the recording process. This helps the robot determine its location or pose during playback so it can make adjustments.

The GraphNav service is used to navigate between waypoints that are connected by edges in a recorded map. In general, the service tries to stay as close as possible to the recorded routes. The robot has the ability to adapt its route if obstacles are encountered along the way, unless the deviation takes the robot too far away from the recorded route, in which case the robot declares itself stuck.

This place-based navigation scheme allows the robot to traverse building scale maps. Practical limits are dictated by site conditions. Successful map navigation relies on the ability to avoid drastic changes in the environment between recording and replay operations.

Implementing the GraphNav service APIs requires four phases:

  1. Record a map, which can be done by an operator using the Autowalk feature on the controller tablet, by writing a client application that uses the GraphNavRecordingService RPC to record a map, or by using the recording_command_line example.
  2. Upload the recorded map to the robot.
  3. Initialize the robot's location to the map.
  4. Command the robot to navigate to another waypoint in the map.

GraphNavService RPCs

RPCDescription
SetLocalizationTrigger a manual localization. Typically done to provide the initial localization.
NavigateRouteTell GraphNav to navigate/traverse a given route.
NavigateToTell GraphNav to navigate to a waypoint along a route it chooses.
NavigateToAnchorTell GraphNav to navigate to a goal with respect to the current anchoring.
NavigationFeedbackGet feedback on the active navigation command.
GetLocalizationStateGet the localization status, pose, and optionally, current sensor data.
ClearGraphClears the graph structure. Also the localization.
DownloadGraphDownload the full list of waypoint IDs, graph topology and other small info.
UploadGraphUpload the full list of waypoint IDs, graph topology and other small info.
UploadWaypointSnapshotUploads sensor data taken at a particular waypoint. Uses a streaming RPC because of the amount of data in the snapshot.
UploadEdgeSnapshotUploads large edge snapshot as a stream for a particular edge.
DownloadWaypointSnapshotDownload waypoint data from the server.
DownloadEdgeSnapshotDownload edge data from the server.
ValidateGraphVerify that the graph is still valid and all required external services are still available.

GraphNavRecordingService RPCs

Map recording is provided by the GraphNavRecordingService RPC.

RPCDescription
StartRecordingBegin recording a chain of waypoints.
SetRecordingEnvironmentDefine persistent annotations for edges and waypoints.
GetRecordStatusGet feedback on the state of the recording service.
CreateWaypointCreate a waypoint at the current location.
CreateEdgeCreate an edge between two waypoints.
StopRecordingPause the recording service.
GetRecordStatusTells the client the internal state of the record service, and the structure of the map that has been recorded so far.

Once StartRecording is called, the recording service starts creating waypoints, edges, and associated snapshots.