Base Component
Most robots with wheeled bases will comprise at least the following:
A board component that can run a viam-server instance. That is to say, a computing device with general purpose input/output (GPIO) pins such as a Raspberry Pi or other single-board computer with GPIO.
Two or more motors with wheels attached
A power supply for the board
A power supply for the motors
Some sort of chassis to hold everything together
For example:

An example of a wiring diagram for a base that has one motor on each side is shown below. Note that this will vary greatly depending on choice of motors, motor drivers, power supply, and board.

Configuration
Configuring a base involves configuring the drive motors and ensuring the base attributes section contains the names of all motors that move the base right or left, respectively. Configure each motor according to its type. You can find more information on wiring and configuring different types of motors in the motor topic. The board controlling the base must also be configured.
An example configuration file, including the board, motors, and base:
{
"components": [
{
"attributes": {},
"model": "pi",
"name": "follow-pi",
"type": "board"
},
{
"attributes": {
"board": "follow-pi",
"max_rpm": 300,
"pins": {
"dir": "16",
"pwm": "15"
}
},
"model": "gpio",
"name": "rightm",
"type": "motor"
},
{
"attributes": {
"board": "follow-pi",
"max_rpm": 300,
"pins": {
"dir": "13",
"pwm": "11"
}
},
"model": "gpio",
"name": "leftm",
"type": "motor"
},
{
"attributes": {
"left": [
"leftm"
],
"right": [
"rightm"
],
"wheel_circumference_mm": 183,
"width_mm": 195
},
"model": "wheeled",
"name": "tread-base",
"type": "base"
}
]
}

Required Attributes
| Name | Type | Description |
|---|---|---|
type | string | Use "base" for any base component |
model | string | Select "wheeled" unless you have a "boat". |
name | string | Name your base. |
left | array of strings | List with the names of all drive motors on the left side of the base. There may be one or more motors. |
right | array of strings | List with the names of all drive motors on the right side of the base. There may be one or more motors. |
wheel_circumference_mm | int | The outermost circumference (not diameter!) of the drive wheels in millimeters. Used for odometry, so try to enter your best approximation of the effective circumference. |
width_mm | int | Width of the base in millimeters. In other words, the distance between the approximate centers of the right and left wheels. |
Optional Attributes
spin_slip_factor (float): Used in steering calculations to correct for slippage between the wheels and the floor.
To be calibrated by the user.