A VEX V5 autonomous template with odometry, path following, MCL and a simulator.
Works with or without tracking wheels.
📘 Documentation ·
⬇️ Download ·
The Path Example auton in the simulator. Watch it play.
- Odometry from drive encoders and/or tracking wheels plus the IMU, in any tracking wheel setup
- Motions: drive, turn and swing to a heading or point, arcs (
curveCircle), move to point, boomerang to a pose, and motion chaining - Drive types: tank, X-drive, mecanum and H-drive, with strafing motions (
strafeToPose(),strafe()) and field-centric driver control - Async motions: run a motion in the background and time mechanisms to it with
waitUntilTraveled(),waitUntilNear()andcancelMotion() - Motion profiling:
driveProfiled()andturnProfiled()with a feedforward model of your drive - Path following: smooth paths through waypoints or drawn in path.jerryio, with pure pursuit or RAMSETE
- Distance resets and Monte Carlo Localization to keep odometry from drifting
- Simulator: run your real autons on a computer, in VEXcode or PROS, and watch a replay on an Override field
- Auton selector on the Brain and controller, driver curves, a universal PID class, and a stall exit
- Easy updates: everything you change lives in
custom/, and one VS Code task updates the rest
See the features overview and what's new.
- Install VS Code and the VEX Robotics Extension
- Download
RW-Template.zipfrom Releases (not "Source code"), unzip it, and open the folder in VS Code - Set your ports in
custom/src/robot-config.cpp, and your wheel measurements as in Tuning Your Robot - Run the Tuning Test auton and tune the PID constants until it stops on target
- Write your autons in
custom/src/autonomous.cpp. Which motion should I use?
Updating? In VS Code's menu bar (top of the screen on a Mac), click Terminal > Run Task... > Update RW-Template. Your custom folder stays as it is. Projects from 4.0.0 and older update by hand once.
Using PROS? Run these in your project's PROS terminal:
pros c add-depot RW-Template https://raw.githubusercontent.com/richardbwang/RW-Template/depot/stable.json
pros c apply RW-Template
See Using PROS for the rest.
The full guide is on the documentation site.
Ask on our Discord or open an issue.
Built on work by Team 5225A, 2654E, NlGanma, 1516X, jpearman, path.jerryio, LemLib, EZ-Template, JAR-Template, mikLib, mclib and others. See Credits for the full list, and thanks to everyone who has contributed on GitHub.
If you find this template useful, please star this repository and subscribe to 1698V on YouTube to follow the team's progress and learn more about our programming.