Octocanum drive class that allows for variable drive modes. Allows driving with both traction and mecanum wheels. This is accompished by using a form of rockers and pneumatic pistons to switch out wheels.
More...
#include <OctocanumDrive.h>
|
| | OctocanumDrive (SpeedController *mFrontLeft, SpeedController *mFrontRight, SpeedController *mBackRight, SpeedController *mBackLeft, SimplePneumatic *pFrontLeft, SimplePneumatic *pFrontRight, SimplePneumatic *pBackRight, SimplePneumatic *pBackLeft) |
| | Constructor; sets up all motors and pneumatics. Do NOT give it invalid pointers! More...
|
| |
| | ~OctocanumDrive () |
| | Destructor, deletes all the motors and pneumatics. More...
|
| |
| void | drive (float x=0.0, float y=0.0, float r=0.0) |
| | Drives with full translational and rotational capability. More...
|
| |
| void | switchMode (driveMode newMode) |
| | Switches modes. Will. More...
|
| |
| driveMode | getMode () |
| | Gets the current mode of the drivebase. More...
|
| |
| | Drivebase (SpeedController *mFrontLeft, SpeedController *mFrontRight, SpeedController *mBackRight, SpeedController *mBackLeft) |
| | Constructor; sets all motors. More...
|
| |
| virtual | ~Drivebase () |
| | Deletes all motors. More...
|
| |
| virtual void | stop () |
| | Disables the drivebase and sets the command to zero the motor. More...
|
| |
| bool | getEnabled () |
| | Gets the status of the drivebase. More...
|
| |
|
| const string | MotorNames [4] = {"Front-left", "Front-Right", "Back-Right", "Back-Left"} |
| | Motor names that correspond to the MotorPos array; can be used for debug purposes. More...
|
| |
| void | normSpeeds () |
| | Internal function; normalizes wheel speeds to be between -1 and 1. More...
|
| |
Octocanum drive class that allows for variable drive modes. Allows driving with both traction and mecanum wheels. This is accompished by using a form of rockers and pneumatic pistons to switch out wheels.
| Enumerator |
|---|
| mecanum |
|
| traction |
|
Constructor; sets up all motors and pneumatics. Do NOT give it invalid pointers!
- Parameters
-
| mFrontLeft | The front-left motor. |
| mFrontRight | The front-right motor. |
| mBackRight | The back-right motor. |
| mBackLeft | The back left motor. |
| pFrontLeft | The front-left pneumatic, corresponding to the front-left motor. |
| pFrontRight | The front-right pneumatic, corresponding to the front-right motor. |
| pBackRight | The back-right pneumatic, correpsonding to the back-right motor. |
| pBackLeft | The back-left pneumatic, corresponding to the back-left motor. |
| ADBLib::OctocanumDrive::~OctocanumDrive |
( |
| ) |
|
Destructor, deletes all the motors and pneumatics.
| void ADBLib::OctocanumDrive::drive |
( |
float |
x = 0.0, |
|
|
float |
y = 0.0, |
|
|
float |
r = 0.0 |
|
) |
| |
|
virtual |
Drives with full translational and rotational capability.
- Parameters
-
| x | Strafing. Negative is left, positive is right. From -1 to 1. Only available in mecanum mode. |
| y | Forward/Reverse. Positive is forward, negative is reverse. From 1 to -1. |
| r | Rotation. Positive is clockwise, negative is counterclockwise. From 1 to -1. |
Implements ADBLib::Drivebase.
Gets the current mode of the drivebase.
- Returns
- The mode.
| void ADBLib::OctocanumDrive::switchMode |
( |
driveMode |
newMode | ) |
|
Switches modes. Will.
- Parameters
-
| newMode | The mode to switch to. |
The documentation for this class was generated from the following files: