|
JMotor
|
Drivetrain that controls a mecanum wheeled robot. More...
#include <JDrivetrainMecanum.h>


Classes | |
| struct | MotorFloats |
| struct | Motors |
Public Member Functions | |
| JDrivetrainMecanum (JMotorController &_FRmotor, JMotorController &_FLmotor, JMotorController &_BLmotor, JMotorController &_BRmotor, JTwoDTransform _robotToWheelScalar) | |
| void | run () |
| call this in loop. it calls any encoder or motor update functions | |
| bool | setEnable (bool _enable) |
| enables or disables movement | |
| bool | enable () |
| enables movement | |
| bool | disable () |
| disables movement | |
| bool | getEnable () |
| gets the current state (enabled or disabled) | |
| JTwoDTransform | getVel (bool _run=false) |
| JTwoDTransform | getDist (bool _run=false) |
| void | setVel (JTwoDTransform _vel, bool _run=false) |
| sets a velocity for the drivetrain to move at | |
| void | setDistSetpoint (JTwoDTransform _dist, bool _run=false) |
| void | setDistDelta (JTwoDTransform _dist, bool _run=false) |
| void | resetDist () |
| JTwoDTransform | getMaxVel () |
| returns the approximate maximum velocity of the drivetrain, if the drivetrain is told to move at max velocity, it should set the motors to full power. | |
| float | getMotorVel (unsigned char i) |
| void | setMotorVel (float vel, unsigned char i, bool _run=false) |
| void | setMotorDistSetpoint (float distSetpoint, unsigned char i, bool _run=false) |
| void | setMotorDistDelta (float distDelta, unsigned char i, bool _run=false) |
| unsigned char | getNumberMotors () |
| JTwoDTransform | getRobotToWheelScalar () |
| void | setRobotToWheelScalar (JTwoDTransform scalar) |
Public Attributes | |
| struct JDrivetrainMecanum::Motors | motors |
Protected Member Functions | |
| void | toWheels (JTwoDTransform t, MotorFloats &m) |
| void | toTransform (MotorFloats m, JTwoDTransform &w) |
Protected Attributes | |
| JTwoDTransform | robotToWheelScalar |
Drivetrain that controls a mecanum wheeled robot.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from JDrivetrain.
|
inlinevirtual |
gets the current state (enabled or disabled)
| (bool) | true=enabled false=movement disabled |
Implements JDrivetrainBasic.
|
inlinevirtual |
returns the approximate maximum velocity of the drivetrain, if the drivetrain is told to move at max velocity, it should set the motors to full power.
| (JTwoDTransform) | maximum velocity (in whatever units your drivetrain and motors are set up for) |
Implements JDrivetrainBasic.
|
inlinevirtual |
Reimplemented from JDrivetrain.
|
inlinevirtual |
Reimplemented from JDrivetrain.
|
inline |
|
inlinevirtual |
Reimplemented from JDrivetrain.
|
inlinevirtual |
Reimplemented from JDrivetrain.
|
inlinevirtual |
call this in loop. it calls any encoder or motor update functions
Implements JDrivetrainBasic.
|
inlinevirtual |
Reimplemented from JDrivetrain.
|
inlinevirtual |
Reimplemented from JDrivetrain.
|
inlinevirtual |
enables or disables movement
| _enable | (bool) true=enabled false=movement disabled |
| did | the state change |
Implements JDrivetrainBasic.
|
inlinevirtual |
Reimplemented from JDrivetrain.
|
inlinevirtual |
Reimplemented from JDrivetrain.
|
inlinevirtual |
Reimplemented from JDrivetrain.
|
inline |
|
inlinevirtual |
sets a velocity for the drivetrain to move at
| _vel | (JTwoDTransform) velocity to move at |
| _run | (bool, default=true) if true setVel will call run() for you, if false you must call it yourself |
| None |
Implements JDrivetrainBasic.
|
inlineprotected |
|
inlineprotected |
| struct JDrivetrainMecanum::Motors JDrivetrainMecanum::motors |
|
protected |