Drivetrain
A way to use tankdrive in wombat.
Constructor
Config
Type | Name | Description | See Also |
---|---|---|---|
std::string | path | The path in the networktables | |
wom::Gearbox | left1 | The first gearbox on the left | Gearbox |
wom::Gearbox | left2 | The second gearbox on the left | Gearbox |
wom::Gearbox | left3 | The third gearbox on the left | Gearbox |
wom::Gearbox | right1 | The first gearbox on the right | Gearbox |
wom::Gearbox | right2 | The second gearbox on the right | Gearbox |
wom::Gearbox | right3 | The third gearbox on the right | Gearbox |
Example
TankDriveState
An enum of states for the tankdrive.
Name | Value | Description |
---|---|---|
kIdle | 0 | The drivetrain is idle |
kTank | 1 | The drivetrain is driving in tank mode |
Example
TankSpeeds
A struct of speeds for the tankdrive.
Type | Name | Description | See Also |
---|---|---|---|
double | left | The speed of the left side | |
double | right | The speed of the right side |
Example
Methods
GetConfig
Gets the config of the drivetrain.
Returns wom::TankDriveConfig
(see above)
Usage
GetState
Gets the state of the drivetrain.
Returns wom::TankDriveState
(see above)
Usage
SetState
Sets the state of the drivetrain.
Usage
SetSpeed
Sets the speed of the drivetrain.
Usage
GetSpeeds
Gets the speeds of the drivetrain.
Returns wom::TankSpeeds
(see above)