ADBLib  0.5
A simple library for rapid robot code development
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Pages
ADBLib::MecanumDrive Class Reference

Mecanum drive class that uses mecanum wheels for full translation and rotation. More...

#include <MecanumDrive.h>

Inheritance diagram for ADBLib::MecanumDrive:
Collaboration diagram for ADBLib::MecanumDrive:

Public Member Functions

 MecanumDrive (SpeedController *mFrontLeft, SpeedController *mFrontRight, SpeedController *mBackRight, SpeedController *mBackLeft)
 
void drive (float x=0.0, float y=0.0, float r=0.0)
 Uses mecanum wheels to drive. Capable of full translation and rotation. More...
 
- Public Member Functions inherited from ADBLib::Drivebase
 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...
 

Additional Inherited Members

- Public Types inherited from ADBLib::Drivebase
enum  MotorPos { frontLeft, frontRight, backRight, backLeft }
 
- Public Attributes inherited from ADBLib::Drivebase
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...
 
- Protected Member Functions inherited from ADBLib::Drivebase
void normSpeeds ()
 Internal function; normalizes wheel speeds to be between -1 and 1. More...
 
- Protected Attributes inherited from ADBLib::Drivebase
SpeedController * motors [4]
 
bool enabled
 
float speeds [4]
 

Detailed Description

Mecanum drive class that uses mecanum wheels for full translation and rotation.

Constructor & Destructor Documentation

ADBLib::MecanumDrive::MecanumDrive ( SpeedController *  mFrontLeft,
SpeedController *  mFrontRight,
SpeedController *  mBackRight,
SpeedController *  mBackLeft 
)
inline

Member Function Documentation

void ADBLib::MecanumDrive::drive ( float  x = 0.0,
float  y = 0.0,
float  r = 0.0 
)
virtual

Uses mecanum wheels to drive. Capable of full translation and rotation.

Parameters
xStrafing. Negative is left, positive is right. From -1 to 1.
yForward/Reverse. Positive is forward, negative is reverse. From 1 to -1.
rRotation. Positive is clockwise, negative is counterclockwise. From 1 to -1.
Todo:
Test wheel rotations with a real mecanum drive

Implements ADBLib::Drivebase.

Here is the call graph for this function:


The documentation for this class was generated from the following files: