|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
#include <odomState.hpp>
Public Member Functions | |
| std::string | str (QLength idistanceUnit, QAngle iangleUnit) const |
| Get a string for the current odometry state (optionally with the specified units). | |
| std::string | str (QLength idistanceUnit=meter, std::string distUnitName="_m", QAngle iangleUnit=degree, std::string angleUnitName="_deg") const |
| Get a string for the current odometry state (optionally with the specified units). | |
| bool | operator== (const OdomState &rhs) const |
| bool | operator!= (const OdomState &rhs) const |
Public Attributes | |
| QLength | x {0_m} |
| QLength | y {0_m} |
| QAngle | theta {0_deg} |
Definition at line 14 of file odomState.hpp.
| bool okapi::OdomState::operator!= | ( | const OdomState & | rhs | ) | const |
| bool okapi::OdomState::operator== | ( | const OdomState & | rhs | ) | const |
| std::string okapi::OdomState::str | ( | QLength | idistanceUnit, |
| QAngle | iangleUnit | ||
| ) | const |
Get a string for the current odometry state (optionally with the specified units).
Examples:
OdomState::str(1_m, 1_deg): The default (no arguments specified).OdomState::str(1_tile, 1_radian): distance tiles and angle radians.Throws std::domain_error if the units passed are undefined.
| idistanceUnit | The units you want your distance to be in. This must be an exact, predefined QLength (such as foot, meter, inch, tile etc.). |
| iangleUnit | The units you want your angle to be in. This must be an exact, predefined QAngle (degree or radian). |
| std::string okapi::OdomState::str | ( | QLength | idistanceUnit = meter, |
| std::string | distUnitName = "_m", |
||
| QAngle | iangleUnit = degree, |
||
| std::string | angleUnitName = "_deg" |
||
| ) | const |
Get a string for the current odometry state (optionally with the specified units).
Examples:
OdomState::str(1_m, "_m", 1_deg, "_deg"): The default (no arguments specified), prints in meters and degrees.OdomState::str(1_in, "_in", 1_deg, "_deg") or OdomState::str(1_in, "\"", 1_deg, "°"): to print values in inches and degrees with different suffixes.OdomState::str(6_tile / 100, "%", 360_deg / 100, "%") to get the distance values in % of the vex field, and angle values in % of a full rotation.| idistanceUnit | The units you want your distance to be in. The x or y position will be output in multiples of this length. |
| distUnitName | The suffix you as your distance unit. |
| iangleUnit | The units you want your angle to be in. The angle will be output in multiples of this unit. |
| angleUnitName | The suffix you want as your angle unit. |
| QAngle okapi::OdomState::theta {0_deg} |
Definition at line 17 of file odomState.hpp.
| QLength okapi::OdomState::x {0_m} |
Definition at line 15 of file odomState.hpp.
| QLength okapi::OdomState::y {0_m} |
Definition at line 16 of file odomState.hpp.