Fix time-compenstation on y2020 localizer
IN order to do some initial tuning of the localizer, I bypassed some of
the time-compensation code--essentially, in calculating the robot pose
implied by the camera, I made use of the current estimated robot
heading, rather than the estimated robot heading from when the image was
taken. Fix that.
Change-Id: Ic5505e3b07e45e1a6bbe10fbc9f7ac568bde3f2e
diff --git a/y2020/control_loops/drivetrain/localizer_test.cc b/y2020/control_loops/drivetrain/localizer_test.cc
index c0995b0..e864330 100644
--- a/y2020/control_loops/drivetrain/localizer_test.cc
+++ b/y2020/control_loops/drivetrain/localizer_test.cc
@@ -443,10 +443,7 @@
RunFor(chrono::seconds(3));
VerifyNearGoal();
- // Note: because the current localizer code doesn't do time-compensation
- // correctly (see comments in localizer.cc), the "perfect" camera updates
- // aren't actually handled perfectly.
- EXPECT_TRUE(VerifyEstimatorAccurate(2e-2));
+ EXPECT_TRUE(VerifyEstimatorAccurate(2e-3));
}
// Tests that camera updates with a constant initial error in the position