Skip to content

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.

1,000+downloads

How it works

1

Set up your robot

Ports and wheel measurements in one file.

Configuration

2

Tune it

Run the Tuning Test, or get a feel for it in the playground first.

PID Playground

3

Write autons

Drives, turns, curves, paths, and mechanisms timed to the drive.

Which motion?

4

Test on your computer

Watch a replay in the simulator before you touch the field.

Simulator

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.

    Configuration

  • Motions for every job


    Drive, turn, swing, arc, move to point, boomerang to a pose, and chain them together without stopping.

    Which motion should I use?

  • Async motions


    Run a motion in the background and time mechanisms to it with waitUntilTraveled(), waitUntilNear() and cancelMotion().

    Async motions

  • Motion profiling


    driveProfiled() and turnProfiled() speed up, cruise and slow down smoothly using a feedforward model of your drive.

    Motion profiles

  • Path following


    Smooth paths through waypoints or drawn in path.jerryio, followed with pure pursuit or RAMSETE.

    Path following

  • Distance resets and MCL


    Reset position off the walls, or let Monte Carlo Localization keep correcting odometry while you drive.

    Localization

  • Simulator


    Run your real autons on a computer and watch a replay on an Override field. No robot needed.

    Simulator

  • Any drivetrain


    Tank, X-drive, mecanum or H-drive. Strafe to a point while turning, and drive field-centric in driver control.

    Drive types

  • VEXcode or PROS


    The same motions, settings and simulator either way. On PROS, two commands add it to your project.

    Using PROS

  • Easy updates


    Everything you change lives in custom/. One VS Code task updates the rest to the newest version.

    Updating

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.

Join the Discord