VEX V5 · Autonomous template
Write an auton.
Watch it drive.
Then run it for real.¶
Odometry, PID, path following, MCL and a simulator, with or without tracking wheels, for VEXcode or PROS. Built by Richard Wang of team 1698V.
How it works¶
See it drive¶
The template's Path Example in the simulator: an S-curve with pure pursuit, then back along it with RAMSETE. Blue is where the robot really went, orange is where RW thought it was. Press Play.
Everything in the box¶
-
Odometry, with or without tracking wheels
Tracks the robot's position from drive encoders and/or tracking wheels plus the IMU. All four setups share one tested implementation.
-
Motions for every job
Drive, turn, swing, arc, move to point, boomerang to a pose, and chain them together without stopping.
-
Async motions
Run a motion in the background and time mechanisms to it with
waitUntilTraveled(),waitUntilNear()andcancelMotion(). -
Motion profiling
driveProfiled()andturnProfiled()speed up, cruise and slow down smoothly using a feedforward model of your drive. -
Path following
Smooth paths through waypoints or drawn in path.jerryio, followed with pure pursuit or RAMSETE.
-
Distance resets and MCL
Reset position off the walls, or let Monte Carlo Localization keep correcting odometry while you drive.
-
Simulator
Run your real autons on a computer and watch a replay on an Override field. No robot needed.
-
Any drivetrain
Tank, X-drive, mecanum or H-drive. Strafe to a point while turning, and drive field-centric in driver control.
-
VEXcode or PROS
The same motions, settings and simulator either way. On PROS, two commands add it to your project.
-
Easy updates
Everything you change lives in
custom/. One VS Code task updates the rest to the newest version.
Also included: a universal PID class, an auton selector on the Brain and controller, driver curves, IMU scale correction, and a stall exit for stuck motions.
Stuck? Come say hi.¶
Ask on the Discord, where other teams using RW hang out too, or open an issue. Follow team 1698V on YouTube.