refactored time jump detection

This commit is contained in:
matlabbe
2025-07-04 22:01:22 +00:00
parent 3cc9db8f87
commit 0ba59996e6
2 changed files with 0 additions and 19 deletions
-18
View File
@@ -1023,15 +1023,6 @@ bool CoreWrapper::odomUpdate(const nav_msgs::OdometryConstPtr & odomMsg, ros::Ti
{
if(!paused_)
{
// Check time jump in the past
if(stamp < previousStamp_) {
ROS_WARN("Detected time jump in the past of %f sec (previous stamp=%f, current stamp=%f). Resetting internal stamps and abort!",
previousStamp_.toSec() - stamp.toSec(), previousStamp_.toSec(), stamp.toSec());
previousStamp_ = ros::Time();
tfListener_.clear();
return false;
}
Transform odom = rtabmap_conversions::transformFromPoseMsg(odomMsg->pose.pose);
if(!odom.isNull())
{
@@ -1143,15 +1134,6 @@ bool CoreWrapper::odomTFUpdate(const ros::Time & stamp)
{
if(!paused_)
{
// Check time jump in the past
if(stamp < previousStamp_) {
ROS_WARN("Detected time jump in the past of %f sec (previous stamp=%f, current stamp=%f). Resetting internal stamps and abort!",
previousStamp_.toSec() - stamp.toSec(), previousStamp_.toSec(), stamp.toSec());
previousStamp_ = ros::Time();
tfListener_.clear();
return false;
}
// Odom TF ready?
Transform odom = rtabmap_conversions::getTransform(odomFrameId_, frameId_, stamp, tfListener_, waitForTransform_?waitForTransformDuration_:0.0);
if(odom.isNull())