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.
Click on the rover name at the top to go to the rental rover’s Control tab where you can drive the machine and interact with each of the machine’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.
The base component is the platform that the other parts of a mobile machine attach to.
viam_base component to expand the base control pane to reveal the camera feed and driving interfaces.
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.
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.
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:
Different movement types:
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.
- Set the refresh frequency
- Export screenshots
- View point cloud data (for machines with depth cameras)
The motor components enable you to move the base.
The motors are named
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:
The board component is the signal wire hub of a machine 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 machine configuration
On the Viam app, navigate to the Components subtab, under Config. There you can view the configuration for each component in the machine: attributes, component dependencies, pin assignments, and more.
The board component component is the signal wire hub of a machine.
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
board, and Model
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
Renc and configure the pins to
When configuring encoded motors for your own robot, you must configure the encoders before the motors because the motors depend on the encoders.
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.
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
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.
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
For more information on choosing the correct video path, refer to our webcam documentation.
The web gamepad component has the Type
input_controller and the Model
If you connect a generic gamepad controller to your computer, you can use it to control your machine.
If you are configuring your own machine, 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:
The names for base and input_controller correspond to the naming scheme from the Components tab.
The ‘Builder’ configuration mode provides a user-friendly, guided experience for you. In the background, the Viam app translates the Viam machine 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.
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: