From 9cfda07c9e3233a3015eb79130f664f890bf15f5 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Thu, 6 May 2021 22:13:13 +0200 Subject: [PATCH] Use standstill flag in locationd (#20838) old-commit-hash: fc3da5eaf9e9448825115e19dd59e1a2657ab249 --- selfdrive/locationd/locationd.cc | 3 +-- selfdrive/test/process_replay/ref_commit | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/selfdrive/locationd/locationd.cc b/selfdrive/locationd/locationd.cc index 1f9b7deeab..d43f78261f 100755 --- a/selfdrive/locationd/locationd.cc +++ b/selfdrive/locationd/locationd.cc @@ -245,9 +245,8 @@ void Localizer::handle_gps(double current_time, const cereal::GpsLocationData::R } void Localizer::handle_car_state(double current_time, const cereal::CarState::Reader& log) { - //this->kf->predict_and_observe(current_time, OBSERVATION_ODOMETRIC_SPEED, { (VectorXd(1) << log.getVEgoRaw()).finished() }); this->car_speed = std::abs(log.getVEgo()); - if (this->car_speed < 1e-3) { + if (log.getStandstill()) { this->kf->predict_and_observe(current_time, OBSERVATION_NO_ROT, { Vector3d(0.0, 0.0, 0.0) }); } } diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index e1516107d2..00445d00ea 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -fcfadaaad7f452fdbb69c1057058327b0d2004bf \ No newline at end of file +e9db5723ef348954118643501a92cf0715402fea \ No newline at end of file