|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
#include <threeEncoderSkidSteerModel.hpp>
Public Member Functions | |
| ThreeEncoderSkidSteerModel (std::shared_ptr< AbstractMotor > ileftSideMotor, std::shared_ptr< AbstractMotor > irightSideMotor, std::shared_ptr< ContinuousRotarySensor > ileftEnc, std::shared_ptr< ContinuousRotarySensor > irightEnc, std::shared_ptr< ContinuousRotarySensor > imiddleEnc, double imaxVelocity, double imaxVoltage) | |
| Model for a skid steer drive (wheels parallel with robot's direction of motion). | |
| std::valarray< std::int32_t > | getSensorVals () const override |
| Read the sensors. | |
| void | resetSensors () override |
| Reset the sensors to their zero point. | |
Public Member Functions inherited from okapi::SkidSteerModel | |
| SkidSteerModel (std::shared_ptr< AbstractMotor > ileftSideMotor, std::shared_ptr< AbstractMotor > irightSideMotor, std::shared_ptr< ContinuousRotarySensor > ileftEnc, std::shared_ptr< ContinuousRotarySensor > irightEnc, double imaxVelocity, double imaxVoltage) | |
| Model for a skid steer drive (wheels parallel with robot's direction of motion). | |
| void | forward (double ispeed) override |
| Drive the robot forwards (using open-loop control). | |
| void | driveVector (double iySpeed, double izRotation) override |
| Drive the robot in an arc (using open-loop control). | |
| void | driveVectorVoltage (double iforwardSpeed, double iyaw) override |
| Drive the robot in an arc. | |
| void | rotate (double ispeed) override |
| Turn the robot clockwise (using open-loop control). | |
| void | stop () override |
| Stop the robot (set all the motors to 0). | |
| void | tank (double ileftSpeed, double irightSpeed, double ithreshold=0) override |
| Drive the robot with a tank drive layout. | |
| void | arcade (double iforwardSpeed, double iyaw, double ithreshold=0) override |
| Drive the robot with an arcade drive layout. | |
| void | curvature (double iforwardSpeed, double icurvature, double ithreshold=0) override |
| Drive the robot with a curvature drive layout. | |
| void | left (double ispeed) override |
| Power the left side motors. | |
| void | right (double ispeed) override |
| Power the right side motors. | |
| void | setBrakeMode (AbstractMotor::brakeMode mode) override |
| Set the brake mode for each motor. | |
| void | setEncoderUnits (AbstractMotor::encoderUnits units) override |
| Set the encoder units for each motor. | |
| void | setGearing (AbstractMotor::gearset gearset) override |
| Set the gearset for each motor. | |
| void | setMaxVelocity (double imaxVelocity) override |
| Sets a new maximum velocity in RPM. | |
| double | getMaxVelocity () const override |
| void | setMaxVoltage (double imaxVoltage) override |
Sets a new maximum voltage in mV in the range [0-12000]. | |
| double | getMaxVoltage () const override |
| std::shared_ptr< AbstractMotor > | getLeftSideMotor () const |
| Returns the left side motor. | |
| std::shared_ptr< AbstractMotor > | getRightSideMotor () const |
| Returns the left side motor. | |
Public Member Functions inherited from okapi::ChassisModel | |
| ChassisModel ()=default | |
| ChassisModel (const ChassisModel &)=delete | |
| ChassisModel & | operator= (const ChassisModel &)=delete |
Public Member Functions inherited from okapi::ReadOnlyChassisModel | |
| virtual | ~ReadOnlyChassisModel ()=default |
Protected Attributes | |
| std::shared_ptr< ContinuousRotarySensor > | middleSensor |
Protected Attributes inherited from okapi::SkidSteerModel | |
| double | maxVelocity |
| double | maxVoltage |
| std::shared_ptr< AbstractMotor > | leftSideMotor |
| std::shared_ptr< AbstractMotor > | rightSideMotor |
| std::shared_ptr< ContinuousRotarySensor > | leftSensor |
| std::shared_ptr< ContinuousRotarySensor > | rightSensor |
Definition at line 11 of file threeEncoderSkidSteerModel.hpp.
| okapi::ThreeEncoderSkidSteerModel::ThreeEncoderSkidSteerModel | ( | std::shared_ptr< AbstractMotor > | ileftSideMotor, |
| std::shared_ptr< AbstractMotor > | irightSideMotor, | ||
| std::shared_ptr< ContinuousRotarySensor > | ileftEnc, | ||
| std::shared_ptr< ContinuousRotarySensor > | irightEnc, | ||
| std::shared_ptr< ContinuousRotarySensor > | imiddleEnc, | ||
| double | imaxVelocity, | ||
| double | imaxVoltage | ||
| ) |
Model for a skid steer drive (wheels parallel with robot's direction of motion).
When all motors are powered +127, the robot should move forward in a straight line.
| ileftSideMotor | left side motor |
| irightSideMotor | right side motor |
| ileftEnc | left side encoder |
| imiddleEnc | middle encoder (mounted perpendicular to the left and right side encoders) |
| irightEnc | right side encoder |
|
overridevirtual |
Read the sensors.
Reimplemented from okapi::SkidSteerModel.
|
overridevirtual |
Reset the sensors to their zero point.
Reimplemented from okapi::SkidSteerModel.
|
protected |
Definition at line 44 of file threeEncoderSkidSteerModel.hpp.