Odom reset on time jump in the past (#1333)

* Odom reset on time jump

* Adding more logs to debug

* refactored

* dont skip frame on clock jump

* Making clock check independent of the topic stamp check

* fixed post check

* Making diagnostic more robust to time jump

* Added node name to warning

* make sync warning msg working in case of time jump

* not need to reset timer

* reset timer

* timer auto reset already

* typo

* Added more time checks to make sure we don't republish a tf frame with stamp from a topic in the future

* dont send tf if time jump happened while processing

* fixed errors

* addressing comments

* fixing time comparison
This commit is contained in:
matlabbe
2025-07-03 17:50:38 -07:00
committed by GitHub
parent fa342bd853
commit 3cc9db8f87
5 changed files with 136 additions and 32 deletions
@@ -87,7 +87,7 @@ protected:
tf::TransformListener & tfListener() {return tfListener_;}
double waitForTransformDuration() const {return waitForTransform_?waitForTransformDuration_:0.0;}
rtabmap::Transform velocityGuess() const;
double previousStamp() const {return previousStamp_;}
ros::Time previousStamp() const {return previousStamp_;}
virtual void postProcessData(const rtabmap::SensorData & data, const std_msgs::Header & header) const {}
private:
@@ -158,7 +158,8 @@ private:
bool icpParams_;
rtabmap::Transform guess_;
rtabmap::Transform guessPreviousPose_;
double previousStamp_;
ros::Time previousStamp_;
ros::Time previousClockTime_;
double expectedUpdateRate_;
double maxUpdateRate_;
double minUpdateRate_;