Autonomous navigation code examples

September 23, 2024 ยท View on GitHub

GraphNav provides place-based localization and locomotion services. Developers can record and play back maps for the robot to follow, navigating between waypoints and traversing edges between waypoints on the map.

The Spot SDK includes python code examples to help you get started with autonomous navigation. Refer to the following examples to learn about exercising the GraphNav API.

Code exampleDescription
recording_command_lineDemonstrates GraphNav recording service requests to record, create, and download a map from the robot.
graph_nav_command_lineDemonstrates how to use GraphNav requests to:
  • Upload maps to the robot
  • Initialize the robot
  • Get the current localization of the robot on a map
  • Navigate the map (using either a specific route or a destination waypoint id)
  • Clear the existing map on the robot
remote_mission_serviceDemonstrates how to implement a RemoteMissionService and run it. This is how we support triggering off-robot code as part of Autowalk.
view_mapAn example program for opening, parsing, and viewing a GraphNav map. This example can be used with GraphNav maps generated using Autowalk or using the GraphNav APIs.
area_callbacksAn example program for writing Area Callbacks which can extend the capabilities of GraphNav by triggering callbacks to user code when entering, crossing, and leaving a region of the map.