![]() |
RaidZeroLib
Coroutine robot framework for VEX V5
|
Left and right wheels that roll forward give the heading; a wheel that rolls sideways adds sideways motion. More...
#include <ThreeEncoderOdometry.hpp>
Classes | |
| struct | Config |
Public Member Functions | |
| ThreeEncoderOdometry (Sensor< Length > &left, Sensor< Length > &right, Sensor< Length > &sideways, Config config) | |
| Public Member Functions inherited from rz::Odometry | |
| const Pose & | pose () const noexcept |
| void | setPose (const Pose &pose) noexcept |
| Sets where the robot is now, e.g. its starting position at the start of autonomous. distance() is unchanged. | |
| Sensor< Rotation > & | heading () noexcept |
| The heading on the field (the pose's rotation), counterclockwise positive. | |
| Sensor< Length > & | distance () noexcept |
| How far the robot has driven along its own forward axis in total; driving backward counts down. | |
| Public Member Functions inherited from rz::Component | |
| Component (const Component &)=delete | |
| Component & | operator= (const Component &)=delete |
| Component (Component &&)=delete | |
| Component & | operator= (Component &&)=delete |
| virtual | ~Component () |
| std::string_view | name () const noexcept |
| Used in log and error messages. | |
Protected Member Functions | |
| Twist | displacement () override |
| How the robot moved in its own frame since the previous tick. | |
| Protected Member Functions inherited from rz::Odometry | |
| Odometry (std::string_view name) | |
| Protected Member Functions inherited from rz::Component | |
| Component (std::string_view name) | |
Additional Inherited Members | |
| Static Public Member Functions inherited from rz::Component | |
| static Task | runAll () |
| Runs the loop of every component constructed so far, in construction order, until cancelled. rz::robot runs it; tests without rz::robot run it alongside their script. | |
Left and right wheels that roll forward give the heading; a wheel that rolls sideways adds sideways motion.
The pose tracks the point midway between the left and right wheels.
| rz::ThreeEncoderOdometry::ThreeEncoderOdometry | ( | Sensor< Length > & | left, |
| Sensor< Length > & | right, | ||
| Sensor< Length > & | sideways, | ||
| Config | config ) |
| std::invalid_argument | if the track width is not positive. |
|
nodiscardoverrideprotectedvirtual |
How the robot moved in its own frame since the previous tick.
Implements rz::Odometry.