From 16c0b4166b8e46f6395dddea845837673a229f76 Mon Sep 17 00:00:00 2001 From: henrykotze Date: Wed, 3 Apr 2024 11:33:32 +0200 Subject: [PATCH] gz-bridge: use correct prev_timestamp for dt calc - with the addition of the navsat plugin in PR#22638, the callback would reassign the previous timestamp used in the calculations of the angular_velocity causing derivative type noise in the groundtruth measurements --- src/modules/simulation/gz_bridge/GZBridge.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/modules/simulation/gz_bridge/GZBridge.cpp b/src/modules/simulation/gz_bridge/GZBridge.cpp index 2821213272c2..56c6d028a0cd 100644 --- a/src/modules/simulation/gz_bridge/GZBridge.cpp +++ b/src/modules/simulation/gz_bridge/GZBridge.cpp @@ -719,8 +719,6 @@ void GZBridge::navSatCallback(const gz::msgs::NavSat &nav_sat) updateClock(nav_sat.header().stamp().sec(), nav_sat.header().stamp().nsec()); } - _timestamp_prev = time_us; - // initialize gps position if (!_pos_ref.isInitialized()) { _pos_ref.initReference(nav_sat.latitude_deg(), nav_sat.longitude_deg(), hrt_absolute_time());