|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
RAMSETE trajectory follower public API. More...
Go to the source code of this file.
Classes | |
| struct | light::PathEvent |
| Mid-path action triggered at a specific input waypoint. More... | |
| struct | light::RamseteConfig |
| RAMSETE controller and chassis-geometry config. More... | |
| struct | light::DriveFF |
| Per-wheel feedforward + simple velocity-loop gains. More... | |
Namespaces | |
| namespace | light |
| Public LightLib odometry / pose-estimation API. | |
Functions | |
| void | light::ramsete_configure (RamseteConfig rc, DriveFF ff, TrajConstraints defaultCons) |
| Configure the RAMSETE follower. | |
| bool | light::followTrajectory (const Trajectory &traj, int timeoutMs=-1, float poseErrBailIn=8.0f) |
| Follow a pre-generated Trajectory. | |
| bool | light::followTrajectory (const std::vector< Waypoint > &wps, const TrajConstraints &cons, bool reversed=false, int timeoutMs=-1, float poseErrBailIn=8.0f) |
| Generate and follow a trajectory from waypoints. | |
| bool | light::followTrajectory (const std::vector< Waypoint > &wps, const TrajConstraints &cons, std::vector< PathEvent > events, bool reversed=false, int timeoutMs=-1, float poseErrBailIn=8.0f) |
| Generate-and-follow variant with mid-path event triggers. | |
| bool | light::runJerryioPath (const char *csv, bool reversed=false, int timeoutMs=-1, float poseErrBailIn=8.0f) |
| Run a waypoint path exported from path.jerryio.com (or any CSV-like text). | |
| bool | light::runJerryioPath (const char *csv, std::vector< PathEvent > events, bool reversed=false, int timeoutMs=-1, float poseErrBailIn=8.0f) |
| Variant with mid-path event triggers. | |
| bool | light::runJerryioPathFromSD (const char *filePath, bool reversed=false, int timeoutMs=-1, float poseErrBailIn=8.0f) |
| Read the CSV from the V5 SD card (e.g. | |
| bool | light::runJerryioPathFromSD (const char *filePath, std::vector< PathEvent > events, bool reversed=false, int timeoutMs=-1, float poseErrBailIn=8.0f) |
| SD-card variant with mid-path event triggers. | |
| void | light::autotune_ekf_noise (int sampleMs=10, int durationMs=5000, int warmupMs=500) |
| Stationary EKF process-noise calibration. | |
| void | light::autotune_mcl_noise (int sampleMs=20, int durationMs=4000, int warmupMs=300) |
| Stationary MCL distance-sensor noise calibration. | |
Characterization routines | |
Each is meant to be run as its own selectable auton. | |
| void | light::characterize_kV_kA_kS (float maxVoltage=10.0f, float rampVps=0.25f) |
| Identify kV / kA / kS by ramping voltage and recording velocity. | |
| float | light::characterize_track_width (int rotations=10) |
| Identify the effective track width by spinning in place. | |
| float | light::characterize_a_lat_max () |
| Identify the maximum sustainable lateral acceleration. | |
| void | light::characterize_friction (float maxVoltage=10.0f, float stepV=0.5f) |
| Friction-FF auto-ID for the non-trajectory PID controllers. | |
Relay-feedback (Åström–Hägglund) PID auto-tune | |
Each routine runs a bang-bang oscillation around the current pose, measures the steady-state amplitude Ku = 4·h/(π·a), Pu = Tu,
kP = 0.6·Ku, kI = 2·kP/Pu, kD = kP·Pu/8 (Z-N classic PID)
then printfs the result AND calls the matching EZ
| |
| void | light::autotune_turn_pid (float reliefV=4.0f, int cycles=6, int timeoutMs=15000, int chunkCycles=2, int coolMs=5000) |
| void | light::autotune_drive_pid (float reliefV=6.0f, int cycles=5, int timeoutMs=15000, int chunkCycles=2, int coolMs=5000) |
| void | light::autotune_swing_pid (float reliefV=4.0f, int cycles=6, int timeoutMs=15000, int chunkCycles=2, int coolMs=5000) |
| void | light::autotune_heading_pid (float forwardV=3.0f, float reliefV=2.0f, int cycles=5, int timeoutMs=15000, int chunkCycles=2, int coolMs=5000) |
RAMSETE trajectory follower public API.
Time-parameterized path following on the VEX tankdrive. The follower owns the motor groups exclusively for the duration of the motion and pauses the EZ-Template drive PID task while it runs.
Definition in file ramsete.hpp.