35 std::shared_ptr<Odometry> iodometry,
36 std::shared_ptr<ChassisController> icontroller,
38 QLength imoveThreshold = 0_mm,
39 QAngle iturnThreshold = 0_deg,
56 bool ibackwards =
false,
57 const QLength &ioffset = 0_mm)
override;
A version of the ReadOnlyChassisModel that also supports write methods, such as setting motor speed.
std::shared_ptr< ChassisController > controller
DefaultOdomChassisController(DefaultOdomChassisController &&other)=delete
DefaultOdomChassisController & operator=(const DefaultOdomChassisController &other)=delete
void turnAngleAsync(QAngle idegTarget) override
Turns chassis to desired angle (turns in the direction of smallest angle) (ex.
std::shared_ptr< Logger > logger
void moveRaw(double itarget) override
This delegates to the input ChassisController.
void turnRaw(double idegTarget) override
This delegates to the input ChassisController.
std::shared_ptr< ChassisController > getChassisController()
void moveDistance(QLength itarget) override
This delegates to the input ChassisController.
void turnRawAsync(double idegTarget) override
This delegates to the input ChassisController.
void waitUntilSettled() override
This delegates to the input ChassisController.
void turnAngle(QAngle idegTarget) override
Turns chassis to desired angle (turns in the direction of smallest angle) (ex.
DefaultOdomChassisController(const TimeUtil &itimeUtil, std::shared_ptr< Odometry > iodometry, std::shared_ptr< ChassisController > icontroller, const StateMode &imode=StateMode::FRAME_TRANSFORMATION, QLength imoveThreshold=0_mm, QAngle iturnThreshold=0_deg, std::shared_ptr< Logger > ilogger=Logger::getDefaultLogger())
Odometry based chassis controller that moves using a separately constructed chassis controller.
void moveDistanceAsync(QLength itarget) override
This delegates to the input ChassisController.
void turnToPoint(const Point &ipoint) override
Turns the robot to face a point in the odom frame.
AbstractMotor::GearsetRatioPair getGearsetRatioPair() const override
This delegates to the input ChassisController.
DefaultOdomChassisController & operator=(DefaultOdomChassisController &&other)=delete
std::shared_ptr< ChassisModel > getModel() override
This delegates to the input ChassisController.
double getMaxVelocity() const override
This delegates to the input ChassisController.
DefaultOdomChassisController(const DefaultOdomChassisController &)=delete
ChassisModel & model() override
This delegates to the input ChassisController.
void turnToAngle(const QAngle &iangle) override
This delegates to the input ChassisController.
bool isSettled() override
This delegates to the input ChassisController.
void driveToPoint(const Point &ipoint, bool ibackwards=false, const QLength &ioffset=0_mm) override
Drives the robot straight to a point in the odom frame.
ChassisController & chassisController()
void moveRawAsync(double itarget) override
This delegates to the input ChassisController.
void setTurnsMirrored(bool ishouldMirror) override
This delegates to the input ChassisController.
void stop() override
This delegates to the input ChassisController.
ChassisScales getChassisScales() const override
This delegates to the input ChassisController.
void setMaxVelocity(double imaxVelocity) override
This delegates to the input ChassisController.
static std::shared_ptr< Logger > getDefaultLogger()
Utility class for holding an AbstractTimer, AbstractRate, and SettledUtil together in one class since...
StateMode
The mode for the OdomState calculated by Odometry.
@ FRAME_TRANSFORMATION
+x is forward, +y is right, 0 degrees is along +x
A simple structure representing the full ratio between motor and wheel.