Quick Start¶
New to RW-Template? Do these in order. You only edit files in the custom/ folder.
- Ports: in
custom/src/robot-config.cpp, set each motor and sensor to its port (a new device also needs a line incustom/include/robot-config.h). Reverse drive motors as needed sodriveChassis(12, 12)drives forward. X-drive, mecanum or H-drive? Set it up as in Drive Types, which also covers its measurements - Measurements: set
distance_between_wheelsandwheel_distance_in(see Tuning Your Robot) - Driver control: download the program, run it, and drive. Tank drive is the default
- First auton: pick Tuning Test on the Brain screen and run autonomous (with a competition switch, field control, or Timed Run). It drives 60" and turns. Tune the PID constants until it stops on target
- Your autons: write a routine in
custom/src/autonomous.cpp, declare it incustom/include/autonomous.h, and add it to the selector withaddAuton()incustom/src/user.cpp. Which motion should I use? has the options - Optional: try routines in the simulator before running them on the robot
This is what Tuning Test looks like in the simulator: