Previous
Define static obstacles
You have three options for moving a mobile robot base:
Spin
and MoveStraight
using the base APIMoveOnMap
or MoveOnGlobe
commands, respectivelyConfigure the base’s motor components
First, connect the base’s motors to your machine.
Then, navigate to the CONFIGURE tab of your machine’s page in the Viam app. Click the + icon next to your machine part in the left-hand menu and select Component. Search for and select a model that supports your motor.
Complete the motor configuration and use the TEST panel in the configuration card to test that the motor is working.
Repeat this for each motor of your base.
figure a base component
The base component allows you to more easily coordinate the motion of the motors to move the robot’s as a whole.
Use the + button again to add a base component.
The wheeled-base
model supports robotic bases with motors on both sides for differential steering.
Connect code to your base
Go to your machine’s CONNECT tab in the Viam app. Select your preferred programming language and copy the code snippet.
See Create a web app, Create a mobile app, or Create a headless app for more information, depending on your use case.
The following example script drives a rover in a square. For code examples in more languages, see Drive a rover in a square.
To move a base component directly to a destination GPS point, you can use the motion service API’s MoveOnGlobe
command.
If you’d like to plan a more detailed path through a series of waypoints, use the navigation service API. The following tutorial demonstrates how to use GPS navigation with a robot base:
To move a base component to a destination pose on a SLAM map, use the motion service API’s MoveOnMap
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!