Skip to content

Commit

Permalink
Odom diagnostic: set max_update_rate as target frequency to catch whe…
Browse files Browse the repository at this point in the history
…n actual processing time is too slow (e.g., current rate is smaller than max rate)
  • Loading branch information
matlabbe committed Feb 8, 2024
1 parent 7845e53 commit 337c494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtabmap_odom/src/OdometryROS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ void OdometryROS::processData(SensorData & data, const std_msgs::Header & header
{
double curentRate = 1.0/(ros::WallTime::now()-time).toSec();
syncDiagnostic_->tick(header.stamp,
maxUpdateRate_>0 && maxUpdateRate_ < curentRate ? maxUpdateRate_:
maxUpdateRate_>0 ? maxUpdateRate_:
expectedUpdateRate_>0 && expectedUpdateRate_ < curentRate ? expectedUpdateRate_:
previousStamp_ == 0.0 || header.stamp.toSec() - previousStamp_ > 1.0/curentRate?0:curentRate);
}
Expand Down

0 comments on commit 337c494

Please sign in to comment.