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.
If you want to test your base as you configure it, physically assemble the base, connect it to your machine’s computer, and turn it on.
Then, 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, open the base’s TEST panel on the CONFIGURE or CONTROL tabs to view the controls to enable keyboard or discrete control over your machine’s movement.
In the Quick move section, 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.
You can also move straight, spin, set power or set velocity from the base panel.
If you do not see the base card in the TEST panel, check the LOGS tab for possible setup or configuration errors.
Troubleshooting
- Check your machine logs on the LOGS tab to check for errors.
- Review this base model’s documentation to ensure you have configured all required attributes.
- Review your configuration for any motors that are components of the base. Check that the names of the motor components match the list of motors you configured on the base.
- If a motor is spinning in an unexpected direction, try using the
dir_flip
attribute in its config, or try swapping the wires running to the motor to change its direction. - Check that all wires are securely attached to the correct pins.
- If you are using a battery to power the base, check that it is adequately charged. If the motors are drawing more power than the battery can supply, the single-board computer may be power cycling. Consider using a wall power supply for testing purposes to rule out this issue.
- Click on the TEST panel on the CONFIGURE or CONTROL tab and test if you can use the base there.
If none of these steps work, reach out to us on the Community Discord and we will be happy to help.
Next steps
For more configuration and usage info, see:
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!