C++ for competitive VEX robots. Virtual Skills State Champion and World Finalist.
What the code does
Odometry keeps track of where the robot is on the field by adding up small movements from its sensors. Autonomous routines use that position to follow a path. PID control handles the last part, correcting the gap between where the robot is and where it is supposed to be.
Competition
In VEX we were Virtual Skills State Champion and a World Finalist. The competition code for High Stakes is on GitHub.
Software and hardware
The code depends on the physical robot, including things like wheel size and where the sensors sit. The software and the robot's design had to be worked out together.
What goes wrong
Wheels slip, and odometry errors add up over a run. A path that looks right in the plan can end up somewhere else on the field. The drawing above shows that gap.
Links
