Why your auton drifts
Your block code works great when the robot is cool. Then the motors warm up and the same program misses. Here's why, and what fixes it for good.
Block code guesses. Odometry measures. Most block programs say things like drive forward for 2 seconds or spin motors 600 degrees . The robot does that, then moves on. It never checks where it actually ended up. That works until something changes: Hot motors get weaker. V5 motors protect themselves by cutting power when they heat up. Same time, less distance. The battery drains. A tired battery pushes less hard. Wheels slip. When you bump a game element, the drive wheels can spin without the robot moving. The motor "thinks" it went farther than it did. Lab: Hot motor test simulation Motor temperature 25°C Wheel slip 0% Run both programs Goal: stop on the line at 48 in The top robot runs a "drive for time" block program that was tuned when the motors were cool. The bottom robot uses odometry: it keeps driving until its tracking wheel says it has gone 48 inches. Crank the temperature up and run it again. Big idea: Odometry means the robot keeps track of where it is on the field, the way you could count your steps with your eyes closed. Instead of "drive 2 seconds," you tell it "go to this spot," and it keeps adjusting until it gets there. What tracking wheels add You already put tracking wheels on the robot. They're small unpowered wheels that touch the floor and spin a sensor. Since no motor drives them, they only turn when the robot really moves. Slipping, hot motors and weak batteries can't fool them. LemLib is a free code library that reads those wheels, figures out the robot's position about 100 times a second, and drives to the spots you ask for. Your job: tell LemLib about your robot, then tell it where to go.
Ends with a 10-question quiz.
Next mission: The field is a graph
All Odometry Academy missions
- Why your auton drifts · about 30 min
- The field is a graph · about 30 min
- How tracking wheels count · about 35 min
- From blocks to C++ · about 35 min
- Build your robot's config · about 45 min
- Test your odometry · about 35 min
- Your first moves · about 40 min
- Auton Builder · about 35 min
- Tuning with PID · about 45 min
- Plan an autonomous route · about 40 min
- Fix-it guide · about 30 min
- Install PROS + LemLib · about 40 min