Localization & Odometry
Learn how FTC robots estimate their position on the field.
For a robot to autonomously move around the field accurately, it needs to know where it is.
A human driver can look at the field and understand the robot's location. An autonomous program does not have that ability. Instead, the robot must estimate its own position using sensors.
This process is called localization.
Localization allows a robot to determine its:
- X position
- Y position
- Heading (rotation)
Together, these values are called the robot's pose.
Pose = (X Position, Y Position, Heading)Why Localization Matters
A simple autonomous routine could move the robot using predetermined commands:
Drive forward
Turn right
Drive forward
ScoreHowever, this assumes every movement is perfect.
In reality, robots experience:
- Wheel slip
- Uneven surfaces
- Battery voltage changes
- Mechanical inconsistencies
- Collisions
Even small errors accumulate over time.
For example, if the robot turns slightly too far during every movement, it may end up several feet away from its intended location by the end of the autonomous routine.
Localization allows the robot to continuously estimate its position and correct itself.
What is Odometry?
Odometry is a method of estimating movement using measurements from sensors.
In FTC, odometry most commonly uses encoder measurements to determine how far the robot has moved.
Since encoders measure wheel rotation, the robot can calculate:
- Distance traveled
- Direction traveled
- Change in heading
These measurements are combined to estimate the robot's current pose.
Drive Encoder Localization
Another option is using the built-in encoders on the drivetrain motors.
Advantages:
- Requires no additional hardware
- Simple to set up
- Good for beginner robots
Disadvantages:
- Less accurate while strafing
- Affected by wheel slip
- Less consistent than dedicated odometry wheels
For simple autonomous routines, drive encoders may be sufficient. For competitive robots, dedicated odometry is usually preferred.
Dead Wheel Odometry
Most competitive FTC robots use dead wheel odometry.
Dead wheels are unpowered tracking wheels that rotate freely as the robot moves. Because they are not connected to the drivetrain, they measure movement more accurately without being affected as much by wheel slip.
A common setup uses two/three tracking wheels:
- One/Two parallel wheels to measure forward/backward movement and rotation
- One perpendicular wheel to measure sideways movement
By combining the encoder values from these wheels, the robot can estimate its movement across the field.
IMU Integration
Encoders are useful for measuring movement, but they are not perfect at measuring rotation.
For example, wheel slip can cause the robot to believe it rotated differently than it actually did.
An IMU provides direct heading measurements that can improve localization accuracy.
Many localization systems combine encoder data and IMU heading to create a more accurate estimate of the robot's pose.
Localization and Pathing
Localization is the foundation of modern autonomous systems.
Pathing libraries such as Road Runner and Pedro Pathing use localization data to determine:
- Where the robot currently is
- Where it needs to go
- How to correct errors during movement
Without accurate localization, even a perfectly generated path will not be followed correctly.
What's Next?
Localization allows your robot to understand where it is on the field.
The next step is using that information to automatically follow paths.
Was this resource helpful?
