Configure a Two-Wheeled Base (viam-micro-server)
A two_wheeled_base
base supports mobile robotic bases with drive motors on both sides (differential steering).
Only bases with two drive wheels are supported by this viam-micro-server
model.
Info
Thetwo_wheeled_base
base model is not currently available as a built-in option in the Viam app, so you cannot use Builder mode to configure this board.
Configure a two_wheeled_base
base as follows:
{
"components": [
{
"name": "<your-base-name>",
"model": "two_wheeled_base",
"type": "base",
"namespace": "rdk",
"attributes": {
"left": "<your-left-motor-name>",
"right": "<your-right-motor-name>"
}
}
]
}
{
"components": [
{
"name": "my-wheeled-base",
"model": "two_wheeled_base",
"type": "base",
"namespace": "rdk",
"attributes": {
"left": "leftm",
"right": "rightm"
},
"depends_on": []
}, ... <INSERT LEFT AND RIGHT MOTOR CONFIGS>
]
}
The following attributes are available for two_wheeled_base
bases:
Name | Type | Required? | Description |
---|---|---|---|
left | string | Required | The name of a drive motor on the left side of the base. |
right | string | Required | The name of a drive motor on the right side of the base. |
Test the base
After you configure the base, go to the CONTROL tab and expand the base component to view the controls to enable keyboard or discrete control over your machine’s movement. If your base makes use of a camera component, the CONTROL tab for your base will also display a Live Feeds section. This section contains buttons to toggle cameras on or off and to arrange how you view the camera feeds.
![The base component in control tab](/components/base/base-control-tab.png)
On the Keyboard tab, you can toggle the keyboard control to active. With the Keyboard toggle active, use W and S to go forward and back, and A and D to arc and spin.
Try driving your base around using the WASD keyboard controls.
Caution
Ensure that your robot has sufficient space to drive around without hitting anyone or anything.
If you navigate to the Discrete tab, you can use movement modes such as Straight
and Spin
and different movement types such as Continuous
and Discrete
and directions such as Forwards
and Backwards
.
If you do not see the base card in the CONTROL tab, check the LOGS tab for possible setup or configuration errors.
Have questions, or want to meet other people working on robots? Join our Community Discord.
If you notice any issues with the documentation, feel free to file an issue or edit this file.
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!