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:
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.
Upload the recorded map to the robot.
Initialize the robot’s location to the map.
Command the robot to navigate to another waypoint in the map.
|SetLocalization||Trigger a manual localization. Typically done to provide the initial localization.|
|NavigateRoute||Tell GraphNav to navigate/traverse a given route.|
|NavigateTo||Tell GraphNav to navigate to a waypoint along a route it chooses.|
|NavigationFeedback||Get feedback on the active navigation command.|
|GetLocalizationState||Get the localization status, pose, and optionally, current sensor data.|
|ClearGraph||Clears the graph structure. Also the localization.|
|DownloadGraph||Download the full list of waypoint IDs, graph topology and other small info.|
|UploadGraph||Upload the full list of waypoint IDs, graph topology and other small info.|
|UploadWaypointSnapshot||Uploads sensor data taken at a particular waypoint. Uses a streaming RPC because of the amount of data in the snapshot.|
|UploadEdgeSnapshot||Uploads large edge snapshot as a stream for a particular edge.|
|DownloadWaypointSnapshot||Download waypoint data from the server.|
|DownloadEdgeSnapshot||Download edge data from the server.|
Map recording is provided by the GraphNavRecordingService RPC.
|StartRecording||Begin recording a chain of waypoints.|
|SetRecordingEnvironment||Define persistent annotations for edges and waypoints.|
|GetRecordStatus||Get feedback on the state of the recording service.|
|CreateWaypoint||Create a waypoint at the current location.|
|CreateEdge||Create an edge between two waypoints.|
|StopRecording||Pause the recording service.|
Once StartRecording is called, the recording service starts creating waypoints, edges, and associated snapshots.