Skip to content

About

VEX V5 autonomous template for VEXcode/VS Code: PID and odometry (with or without tracking wheels), Monte Carlo Localization, motion profiling, pure pursuit and RAMSETE path following, and a simulator to test autons without a robot.

Topics

Resources

Stars

84 stars

Watchers

8 watching

Forks

Repository files navigation

RW-Template logo

RW-Template

A VEX V5 autonomous template with odometry, path following, MCL and a simulator.
Works with or without tracking wheels.

📘 Documentation · ⬇️ Download · ▶️ Replay Gallery · 💬 Discord

Downloads Stars Join the Discord

A simulator replay: the robot follows an S-curve path and backs along it, ending 0.38 inches from where RW thinks it is
The Path Example auton in the simulator. Watch it play.

🚀 Features

  • 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() and cancelMotion()
  • Motion profiling: driveProfiled() and turnProfiled() 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.

⚡ Quick Start

  1. Install VS Code and the VEX Robotics Extension
  2. Download RW-Template.zip from Releases (not "Source code"), unzip it, and open the folder in VS Code
  3. Set your ports in custom/src/robot-config.cpp, and your wheel measurements as in Tuning Your Robot
  4. Run the Tuning Test auton and tune the PID constants until it stops on target
  5. 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.

💬 Help

Ask on our Discord or open an issue.

🙏 Credits

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.

About

VEX V5 autonomous template for VEXcode/VS Code: PID and odometry (with or without tracking wheels), Monte Carlo Localization, motion profiling, pure pursuit and RAMSETE path following, and a simulator to test autons without a robot.

Topics

Resources

Stars

84 stars

Watchers

8 watching

Forks

Releases

Packages

Contributors

Languages