|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
(top-level) More...
#include "LightLib/lib.hpp"Go to the source code of this file.
Classes | |
| class | Coordinate |
| One waypoint in the legacy injected-path representation. More... | |
Enumerations | |
| enum | DistanceSide { BACK = 0 , RIGHT = 1 , LEFT = 2 } |
| Which side a distance sensor faces for the legacy distance helpers. More... | |
| enum | AutonMode { STANLEY = 0 , ODOM = 1 , PLAIN = 2 , BRAIN = 3 } |
| Auton mode selector for the legacy path runner. More... | |
| enum | Wait { WAIT = 0 , QUICK = 1 , CHAIN = 2 } |
Wait-mode selector for pidWait(). More... | |
Functions | |
Internal math (legacy path helpers) | |
| double | getDistance (Coordinate point1, Coordinate point2) |
| double | getTheta (Coordinate point1, Coordinate point2, light::drive_directions direction) |
| double | getVelocity (double voltage) |
| double | getTimeToPoint (double distance, double velocity) |
| Coordinate | getPoint (Coordinate startPoint, double distance) |
| Coordinate | getPoint (Coordinate startPoint, double v_left, double v_right, double time) |
| std::vector< Coordinate > | injectPoint (Coordinate startPoint, Coordinate endPoint, e_angle_behavior behavior, double left, double right, double theta, double lookAhead) |
| std::vector< Coordinate > | injectPath (std::vector< Coordinate > coordList, double lookAhead) |
Position wrappers | |
| void | setPosition (double x, double y) |
| void | setPosition (double x, double y, double t) |
| double | getDistanceActual (DistanceSide sensor, bool use_theta, double failsafe) |
Wait wrappers | |
| void | pidWait (Wait type) |
| void | pidWaitUntil (okapi::QLength distance) |
| void | pidWaitUntil (okapi::QAngle distance) |
| void | pidWaitUntil (Coordinate coordinate) |
| void | delayMillis (int millis) |
| void | delayMillis (int millis, bool ignore) |
Drive-set wrappers | |
| void | driveSet (double distance, int speed, bool slew) |
| void | driveSet (double distance, int speed) |
| void | driveSmartSet (double distance, int speed) |
Turn-set wrappers | |
| void | turnSet (double theta, int speed, e_angle_behavior behavior) |
| void | turnSet (double theta, int speed) |
| void | turnSet (Coordinate point, drive_directions direction, int speed, e_angle_behavior behavior) |
| void | turnSet (Coordinate point, drive_directions direction, int speed) |
| void | turnSetRelative (double theta, int speed, e_angle_behavior behavior) |
| void | turnSetRelative (double theta, int speed) |
Swing-set wrappers | |
| void | swingSet (light::e_swing side, double theta, double main, double opp, light::e_angle_behavior behavior) |
| void | swingSet (light::e_swing side, double theta, double main, light::e_angle_behavior behavior) |
| void | swingSet (light::e_swing side, double theta, double main, double opp) |
| void | swingSet (light::e_swing side, double theta, double main) |
Path debugging | |
| void | getPath () |
Print the current autonPath to the PROS terminal. | |
| void | getPathInjected () |
Print the post-injection autonPath to the PROS terminal. | |
Variables | |
| const double | WHEEL_DIAMETER = 3.3369184232 |
| Default wheel diameter, inches. | |
| const double | ROBOT_WIDTH = 11.4375 |
| Default robot track width, inches. | |
| const int | KEY = 267267 |
| Misc. magic constant retained for legacy code. | |
| double | angle_offset |
| Heading offset applied by the legacy helpers. | |
| AutonMode | autonMode |
| Active auton mode for the legacy runner. | |
| std::vector< Coordinate > | autonPath |
| Path being executed by the legacy runner. | |
(top-level)
Legacy global-namespace drive helpers — short-name wrappers around the light::Drive API plus a Stanley/path-injection helper that predates the RAMSETE follower.
Most new code should use the light::Drive methods directly. These wrappers remain for older auton routines and for the path-injection / Stanley path-follower entry points.
Definition in file drive.hpp.
| enum AutonMode |
| enum DistanceSide |
| enum Wait |
| void delayMillis | ( | int | millis | ) |
| void delayMillis | ( | int | millis, |
| bool | ignore | ||
| ) |
| void driveSet | ( | double | distance, |
| int | speed | ||
| ) |
| void driveSet | ( | double | distance, |
| int | speed, | ||
| bool | slew | ||
| ) |
| void driveSmartSet | ( | double | distance, |
| int | speed | ||
| ) |
| double getDistance | ( | Coordinate | point1, |
| Coordinate | point2 | ||
| ) |
| double getDistanceActual | ( | DistanceSide | sensor, |
| bool | use_theta, | ||
| double | failsafe | ||
| ) |
| void getPath | ( | ) |
Print the current autonPath to the PROS terminal.
| void getPathInjected | ( | ) |
Print the post-injection autonPath to the PROS terminal.
| Coordinate getPoint | ( | Coordinate | startPoint, |
| double | distance | ||
| ) |
| Coordinate getPoint | ( | Coordinate | startPoint, |
| double | v_left, | ||
| double | v_right, | ||
| double | time | ||
| ) |
| double getTheta | ( | Coordinate | point1, |
| Coordinate | point2, | ||
| light::drive_directions | direction | ||
| ) |
| double getTimeToPoint | ( | double | distance, |
| double | velocity | ||
| ) |
| double getVelocity | ( | double | voltage | ) |
| std::vector< Coordinate > injectPath | ( | std::vector< Coordinate > | coordList, |
| double | lookAhead | ||
| ) |
| std::vector< Coordinate > injectPoint | ( | Coordinate | startPoint, |
| Coordinate | endPoint, | ||
| e_angle_behavior | behavior, | ||
| double | left, | ||
| double | right, | ||
| double | theta, | ||
| double | lookAhead | ||
| ) |
| void pidWait | ( | Wait | type | ) |
| void pidWaitUntil | ( | Coordinate | coordinate | ) |
| void pidWaitUntil | ( | okapi::QAngle | distance | ) |
| void pidWaitUntil | ( | okapi::QLength | distance | ) |
| void setPosition | ( | double | x, |
| double | y | ||
| ) |
| void setPosition | ( | double | x, |
| double | y, | ||
| double | t | ||
| ) |
| void swingSet | ( | light::e_swing | side, |
| double | theta, | ||
| double | main | ||
| ) |
| void swingSet | ( | light::e_swing | side, |
| double | theta, | ||
| double | main, | ||
| double | opp | ||
| ) |
| void swingSet | ( | light::e_swing | side, |
| double | theta, | ||
| double | main, | ||
| double | opp, | ||
| light::e_angle_behavior | behavior | ||
| ) |
| void swingSet | ( | light::e_swing | side, |
| double | theta, | ||
| double | main, | ||
| light::e_angle_behavior | behavior | ||
| ) |
| void turnSet | ( | Coordinate | point, |
| drive_directions | direction, | ||
| int | speed | ||
| ) |
| void turnSet | ( | Coordinate | point, |
| drive_directions | direction, | ||
| int | speed, | ||
| e_angle_behavior | behavior | ||
| ) |
| void turnSet | ( | double | theta, |
| int | speed | ||
| ) |
| void turnSet | ( | double | theta, |
| int | speed, | ||
| e_angle_behavior | behavior | ||
| ) |
| void turnSetRelative | ( | double | theta, |
| int | speed | ||
| ) |
| void turnSetRelative | ( | double | theta, |
| int | speed, | ||
| e_angle_behavior | behavior | ||
| ) |
|
extern |
Heading offset applied by the legacy helpers.
|
extern |
Active auton mode for the legacy runner.
|
extern |
Path being executed by the legacy runner.
| const int KEY = 267267 |
| const double ROBOT_WIDTH = 11.4375 |