11#include <initializer_list>
43 virtual void driveVector(
double iforwardSpeed,
double iyaw) = 0;
61 virtual void rotate(
double ispeed) = 0;
75 virtual void tank(
double ileftSpeed,
double irightSpeed,
double ithreshold = 0) = 0;
84 virtual void arcade(
double iforwardSpeed,
double iyaw,
double ithreshold = 0) = 0;
96 virtual void curvature(
double iforwardSpeed,
double icurvature,
double ithreshold = 0) = 0;
103 virtual void left(
double ispeed) = 0;
110 virtual void right(
double ispeed) = 0;
brakeMode
Indicates the 'brake mode' of a motor.
gearset
Indicates the internal gear ratio of a motor.
encoderUnits
Indicates the units used by the motor encoders.
A version of the ReadOnlyChassisModel that also supports write methods, such as setting motor speed.
virtual void tank(double ileftSpeed, double irightSpeed, double ithreshold=0)=0
Drive the robot with a tank drive layout.
virtual void setBrakeMode(AbstractMotor::brakeMode mode)=0
Set the brake mode for each motor.
virtual void curvature(double iforwardSpeed, double icurvature, double ithreshold=0)=0
Drive the robot with a curvature drive layout.
virtual void right(double ispeed)=0
Power the right side motors.
virtual void setMaxVoltage(double imaxVoltage)=0
Sets a new maximum voltage in mV in the range [0-12000].
virtual double getMaxVoltage() const =0
virtual void arcade(double iforwardSpeed, double iyaw, double ithreshold=0)=0
Drive the robot with an arcade drive layout.
virtual void driveVectorVoltage(double iforwardSpeed, double iyaw)=0
Drive the robot in an arc.
virtual void resetSensors()=0
Reset the sensors to their zero point.
ChassisModel(const ChassisModel &)=delete
virtual void setGearing(AbstractMotor::gearset gearset)=0
Set the gearset for each motor.
virtual void left(double ispeed)=0
Power the left side motors.
virtual void driveVector(double iforwardSpeed, double iyaw)=0
Drive the robot in an arc (using open-loop control).
virtual double getMaxVelocity() const =0
ChassisModel & operator=(const ChassisModel &)=delete
virtual void stop()=0
Stop the robot (set all the motors to 0).
virtual void forward(double ispeed)=0
Drive the robot forwards (using open-loop control).
virtual void setMaxVelocity(double imaxVelocity)=0
Sets a new maximum velocity in RPM.
virtual void setEncoderUnits(AbstractMotor::encoderUnits units)=0
Set the encoder units for each motor.
virtual void rotate(double ispeed)=0
Turn the robot clockwise (using open-loop control).
A version of the ChassisModel that only supports read methods, such as querying sensor values.