25 std::shared_ptr<AbstractMotor> irightSideMotor,
26 std::shared_ptr<ContinuousRotarySensor> ileftEnc,
27 std::shared_ptr<ContinuousRotarySensor> irightEnc,
79 void tank(
double ileftSpeed,
double irightSpeed,
double ithreshold = 0)
override;
88 void arcade(
double iforwardSpeed,
double iyaw,
double ithreshold = 0)
override;
100 void curvature(
double iforwardSpeed,
double icurvature,
double ithreshold = 0)
override;
107 void left(
double ispeed)
override;
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.
std::shared_ptr< AbstractMotor > leftSideMotor
std::shared_ptr< AbstractMotor > getRightSideMotor() const
Returns the left side motor.
void arcade(double iforwardSpeed, double iyaw, double ithreshold=0) override
Drive the robot with an arcade drive layout.
std::shared_ptr< ContinuousRotarySensor > rightSensor
std::shared_ptr< AbstractMotor > getLeftSideMotor() const
Returns the left side motor.
void setMaxVelocity(double imaxVelocity) override
Sets a new maximum velocity in RPM.
void driveVector(double iySpeed, double izRotation) override
Drive the robot in an arc (using open-loop control).
void forward(double ispeed) override
Drive the robot forwards (using open-loop control).
double getMaxVelocity() const override
void setBrakeMode(AbstractMotor::brakeMode mode) override
Set the brake mode for each motor.
std::valarray< std::int32_t > getSensorVals() const override
Read the sensors.
std::shared_ptr< AbstractMotor > rightSideMotor
void setEncoderUnits(AbstractMotor::encoderUnits units) override
Set the encoder units for each motor.
void stop() override
Stop the robot (set all the motors to 0).
void curvature(double iforwardSpeed, double icurvature, double ithreshold=0) override
Drive the robot with a curvature drive layout.
void tank(double ileftSpeed, double irightSpeed, double ithreshold=0) override
Drive the robot with a tank drive layout.
void driveVectorVoltage(double iforwardSpeed, double iyaw) override
Drive the robot in an arc.
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).
double getMaxVoltage() const override
void setMaxVoltage(double imaxVoltage) override
Sets a new maximum voltage in mV in the range [0-12000].
void setGearing(AbstractMotor::gearset gearset) override
Set the gearset for each motor.
void right(double ispeed) override
Power the right side motors.
std::shared_ptr< ContinuousRotarySensor > leftSensor
void rotate(double ispeed) override
Turn the robot clockwise (using open-loop control).
void left(double ispeed) override
Power the left side motors.
void resetSensors() override
Reset the sensors to their zero point.