|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
#include <threeEncoderOdometry.hpp>
Public Member Functions | |
| ThreeEncoderOdometry (const TimeUtil &itimeUtil, const std::shared_ptr< ReadOnlyChassisModel > &imodel, const ChassisScales &ichassisScales, const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger()) | |
| Odometry. | |
Public Member Functions inherited from okapi::TwoEncoderOdometry | |
| TwoEncoderOdometry (const TimeUtil &itimeUtil, const std::shared_ptr< ReadOnlyChassisModel > &imodel, const ChassisScales &ichassisScales, const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger()) | |
| TwoEncoderOdometry. | |
| virtual | ~TwoEncoderOdometry ()=default |
| void | setScales (const ChassisScales &ichassisScales) override |
| Sets the drive and turn scales. | |
| void | step () override |
| Do one odometry step. | |
| OdomState | getState (const StateMode &imode=StateMode::FRAME_TRANSFORMATION) const override |
| Returns the current state. | |
| void | setState (const OdomState &istate, const StateMode &imode=StateMode::FRAME_TRANSFORMATION) override |
| Sets a new state to be the current state. | |
| std::shared_ptr< ReadOnlyChassisModel > | getModel () override |
| ChassisScales | getScales () override |
Public Member Functions inherited from okapi::Odometry | |
| Odometry ()=default | |
| Odometry. | |
| virtual | ~Odometry ()=default |
Protected Member Functions | |
| OdomState | odomMathStep (const std::valarray< std::int32_t > &itickDiff, const QTime &ideltaT) override |
| Does the math, side-effect free, for one odom step. | |
Additional Inherited Members | |
Protected Attributes inherited from okapi::TwoEncoderOdometry | |
| std::shared_ptr< Logger > | logger |
| std::unique_ptr< AbstractRate > | rate |
| std::unique_ptr< AbstractTimer > | timer |
| std::shared_ptr< ReadOnlyChassisModel > | model |
| ChassisScales | chassisScales |
| OdomState | state |
| std::valarray< std::int32_t > | newTicks {0, 0, 0} |
| std::valarray< std::int32_t > | tickDiff {0, 0, 0} |
| std::valarray< std::int32_t > | lastTicks {0, 0, 0} |
| const std::int32_t | maximumTickDiff {1000} |
Definition at line 14 of file threeEncoderOdometry.hpp.
| okapi::ThreeEncoderOdometry::ThreeEncoderOdometry | ( | const TimeUtil & | itimeUtil, |
| const std::shared_ptr< ReadOnlyChassisModel > & | imodel, | ||
| const ChassisScales & | ichassisScales, | ||
| const std::shared_ptr< Logger > & | ilogger = Logger::getDefaultLogger() |
||
| ) |
Tracks the movement of the robot and estimates its position in coordinates relative to the start (assumed to be (0, 0)).
| itimeUtil | The TimeUtil. |
| imodel | The chassis model for reading sensors. |
| ichassisScales | See ChassisScales docs (the middle wheel scale is the third member) |
| iwheelVelDelta | The maximum delta between wheel velocities to consider the robot as driving straight. |
| ilogger | The logger this instance will log to. |
|
overrideprotectedvirtual |
Does the math, side-effect free, for one odom step.
| itickDiff | The tick difference from the previous step to this step. |
| ideltaT | The time difference from the previous step to this step. |
Reimplemented from okapi::TwoEncoderOdometry.