Enable deploying code for the raspberry pis
Also, sets up a systemd service to start all the code.
Change-Id: If993426b36d0910497579ad86e330699f8a7d2e7
diff --git a/y2020/control_loops/drivetrain/localizer.cc b/y2020/control_loops/drivetrain/localizer.cc
index 927eec0..4b164b5 100644
--- a/y2020/control_loops/drivetrain/localizer.cc
+++ b/y2020/control_loops/drivetrain/localizer.cc
@@ -115,6 +115,14 @@
aos::monotonic_clock::time_point capture_time(
std::chrono::nanoseconds(result.image_monotonic_timestamp_ns()) -
monotonic_offset);
+ VLOG(1) << "Got monotonic offset of "
+ << aos::time::DurationInSeconds(monotonic_offset)
+ << " when at time of " << event_loop_->monotonic_now()
+ << " and capture time estimate of " << capture_time;
+ if (capture_time > event_loop_->monotonic_now()) {
+ LOG(WARNING) << "Got camera frame from the future.";
+ return;
+ }
CHECK(result.has_camera_calibration());
// Per the ImageMatchResult specification, we can actually determine whether
// the camera is the turret camera just from the presence of the