Control A Rented Viam Rover
Try Viam is a way to try out the Viam platform without setting up any hardware yourself. You can take over a Viam Rover in our robotics lab to play around!
The rental rover is made up of a chassis with a Raspberry Pi 4B single board computer, two motors, encoders, and a camera. The Try Viam area also has an overhead camera to provide a view of the rental rover, allowing you to view its movements in real time.
Watch this tutorial video for a walkthrough of Try Viam, including how to reserve a Viam Rover, navigate the Viam platform, and drive the rover:
Control tab
Click on the rover name at the top to go to the rental rover’s Control tab where you can drive the robot and interact with each of the robot’s components.
At the top of the page you can see the randomly assigned name of the rover, the host, and the IP address.
The Control tab contains panels for each of the rover’s components:
- the base,
- the left and right motors,
- the web game pad,
- the board, and
- two cameras.
The order of these components may vary.

Base control
The base component is the platform that the other parts of a mobile robot attach to.
Click the viam_base
component to expand the base control pane to reveal the camera feed and driving interfaces.
Camera views
In the viam_base
component panel, select the cam
for the front-facing camera and the overhead-cam:overheadcam
for an overhead view of your rover.
We recommend enabling both cameras so you can have a better sense of what’s happening in the space.
You can also view and control the camera streams from the individual camera components.
Movement control
To move your rover, click on viam_base. You can use the W, A, S, and D buttons to move forward, turn left, move backwards, and turn right.
If you enable the keyboard toggle, you can also control the rover’s movement with the W, A, S, and D keys and the arrow keys on your keyboard.
Tip
Each time you show or hide a camera, Keyboard Enabled automatically toggles to Keyboard Disabled.
If you change your camera configurations, you must re-enable your keyboard control to control your rover again. This behavior is for safety purposes.
Discrete movement control
If you go from the from Keyboard to the Discrete tab, you can choose between:
Different movement modes:
Straight
orSpin
Different movement types:
Continuous
orDiscrete
In continuous movement mode you can set a speed at which the rover will move indefinitely in the specified direction. In discrete movement mode you can set a speed at which to move and a distance to cover before stopping.
Directions:
Forwards
andBackwards
.
Camera control
While you can view the camera streams from the base component panel, you can access more features on each individual camera component panel. In these panels, you can:
- Set the refresh frequency
- Export screenshots
- View point cloud data (for robots with depth cameras)
cam Stream:
overhead-cam:overheadcam Stream:
Motor control
The motor components enable you to move the base.
The motors are named left
and right
, corresponding to their location on the rover base.
Their initial state is Idle.
You can click on each motor panel and make the motor RUN or STOP.
Run each motor at a different power level to go faster or slower, and toggle rotation directions to go forwards or backwards. You can also see their current positions (based on encoder readings) in real time:
Board control
The board component is the signal wire hub of a robot which allows you to control the states of individual GPIO pins on the board.
For the Viam Rover, the board component is named local
and controls a Raspberry Pi on the Viam Rover.
With it, you can control the states of individual GPIO pins on the board.
Web gamepad control
The web gamepad component is disabled by default, but if you have a compatible gamepad, you can enable the Enabled toggle.
Learn about robot configuration
On the Viam app, navigate to the Components subtab, under Config. There you can view the configuration for each component in the robot: attributes, component dependencies, pin assignments, and more.
Board configuration
The board component component is the signal wire hub of a robot.
Configuring a board component allows you to control the states of individual GPIO pins to command the electrical signals sent through and received by the board.
For the Viam Rover, the board component is a Raspberry Pi with Name local
, Type board
, and Model pi
.
Encoder configuration
An encoder is a device that is used to sense angular position, direction and/or speed of rotation.
In this case, the encoders on the left and right motors are Lenc
and Renc
and configure the pins to le
and re
.
Important
When configuring encoded motors for your own robot, you must configure the encoders before the motors because the motors depend on the encoders.
Motor configuration
Both motors on this rover use the model gpio
which is the model for basic DC motors that are connected to and controlled by the configured board.
The attributes section lists the board the motor is wired to, and since the rover’s motors are encoded the user interface also shows the encoded motor attributes: the encoder name, motor ramp rate limit, encoder ticks per rotation, and max RPM limit.
You can click Go to advanced to view the attributes field in raw JSON format. The Attributes pane contains the current JSON configuration for this component. Click Go to Fancy to return to the default graphical user interface.
Base configuration
The base component is the platform that the other parts of a mobile robot attach to.
By configuring a base component, the individual components are organized to produce coordinated movement and you gain an interface to control the movement of the whole physical base of the robot without needing to send separate commands to individual motors.
The base’s type is base
and its model is wheeled
which configures a robot with wheels on its base, like the Viam Rover.
The left and right attributes configure the motors on the left and right side of the rover, which are named left
and right
, respectively.
The Wheel Circumference (in millimeters) is 217. The Width is the distance between wheel centerlines, 260mm in this case. The Spin Slip Factor of 1.76 is used in steering calculations to account for slippage of the wheels against the ground while turning.
Camera configuration
The camera component configures the webcam that is plugged into the Raspberry Pi of the rover.
The camera component has the Type camera
, the Model webcam
, and the Video Path is video0
.
For more information on choosing the correct video path, refer to our webcam documentation.
Gamepad configuration
The web gamepad component has the Type input_controller
and the Model webgamepad
.
If you connect a generic gamepad controller to your computer, you can use it to control your robot.
If you are configuring your own robot, be aware that using the gamepad requires a service. To see how the service is configured, navigate to the Services section under the Config tab. The Services subtab contains the “Base Remote Control” service which uses three attributes:
- base:
viam_base
- control_mode:
joystickControl
- input_controller:
WebGamepad
The names for base and input_controller correspond to the naming scheme from the Components tab.
Raw JSON
The ‘Builder’ configuration mode provides a user-friendly, guided experience for you. In the background, the Viam app translates the Viam robot configuration into JSON. You can view the complete JSON for your rover by clicking on Raw JSON at the top left of the Config tab.
You can copy this JSON
config between rental rovers.
Next steps
If you have questions, check out our FAQ or join our Discord Community, where you can ask questions and meet other people working on robots.
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!