30 const std::shared_ptr<ReadOnlyChassisModel> &imodel,
66 std::shared_ptr<ReadOnlyChassisModel>
getModel()
override;
75 std::unique_ptr<AbstractRate>
rate;
76 std::unique_ptr<AbstractTimer>
timer;
77 std::shared_ptr<ReadOnlyChassisModel>
model;
91 const QTime &ideltaT);
static std::shared_ptr< Logger > getDefaultLogger()
Utility class for holding an AbstractTimer, AbstractRate, and SettledUtil together in one class since...
void step() override
Do one odometry step.
void setScales(const ChassisScales &ichassisScales) override
Sets the drive and turn scales.
std::valarray< std::int32_t > lastTicks
ChassisScales getScales() override
virtual ~TwoEncoderOdometry()=default
std::valarray< std::int32_t > newTicks
OdomState getState(const StateMode &imode=StateMode::FRAME_TRANSFORMATION) const override
Returns the current state.
std::shared_ptr< ReadOnlyChassisModel > getModel() override
std::shared_ptr< Logger > logger
virtual OdomState odomMathStep(const std::valarray< std::int32_t > &itickDiff, const QTime &ideltaT)
Does the math, side-effect free, for one odom step.
TwoEncoderOdometry(const TimeUtil &itimeUtil, const std::shared_ptr< ReadOnlyChassisModel > &imodel, const ChassisScales &ichassisScales, const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger())
TwoEncoderOdometry.
std::unique_ptr< AbstractRate > rate
const std::int32_t maximumTickDiff
std::unique_ptr< AbstractTimer > timer
std::valarray< std::int32_t > tickDiff
void setState(const OdomState &istate, const StateMode &imode=StateMode::FRAME_TRANSFORMATION) override
Sets a new state to be the current state.
ChassisScales chassisScales
std::shared_ptr< ReadOnlyChassisModel > model
StateMode
The mode for the OdomState calculated by Odometry.
@ FRAME_TRANSFORMATION
+x is forward, +y is right, 0 degrees is along +x