Skip to article
Join the team ↗
Robot engineering/Journal

Camera latency correction

Camera images arrive after capture. The system corrects the earlier position estimate, then updates it using the robot’s recorded movement.

Vision observation log replay
Vision inputs2 × Limelight
Inertial inputPigeon 2
CAN FD samplingUp to 250 Hz
Other CAN sampling100 Hz
01

Match the image to its capture time

The robot can move between the moment a camera captures an image and the moment software receives it. Using the image as a measurement of the current position would apply the correction at the wrong time.

Instead, the system finds the position and heading recorded at capture time. It corrects that earlier estimate, then applies the wheel and gyro movement recorded since capture to update the current estimate.

02

Check each measurement

Two Limelight cameras provide independent samples. Each camera prefers MegaTag 2 and falls back to MegaTag 1 when MT2 is unavailable. A single frame is used only once.

The system adjusts measurement confidence based on tag image area, robot speed, turning rate and camera calibration. It rejects ambiguous measurements, implausible heights and positions outside the field. MT2 already uses gyro heading, so that heading is not reused as independent evidence.

03

Review the logs

AdvantageKit records camera inputs, candidate position estimates and the reason each measurement was accepted or rejected. AdvantageScope can replay these decisions after a run.

The interactive panel shows how far a robot travels during a camera delay at constant speed. This distance illustrates the timing problem; it is not a measured position error.

SOURCES & FURTHER READINGTechnical manual · pp. 16–18↗Open the localization chapter↗
CONTINUE EXPLORING

Related reading.

All stories
Engineering / 2 min

Autonomous control

Follow a planned route while coordinating intake, feeding and shooting.

↗
Engineering / 2 min

Swerve drive

Each wheel controls its speed and steering angle. The robot can move sideways, turn, or combine both movements.

↗
Preparing robot models: 0 of 4 ready.