MCPcopy Create free account
hub / github.com/RoboMaster/RoboRTS / IsCurrent

Method IsCurrent

roborts_costmap/src/observation_buffer.cpp:249–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249bool ObservationBuffer::IsCurrent() const
250{
251 if (expected_update_rate_ == ros::Duration(0.0))
252 return true;
253
254 bool current = (ros::Time::now() - last_updated_).toSec() <= expected_update_rate_.toSec();
255 if (!current)
256 {
257 ROS_WARN(
258 "The %s observation buffer has not been updated for %.2f seconds, and it should be updated every %.2f seconds.",
259 topic_name_.c_str(), (ros::Time::now() - last_updated_).toSec(), expected_update_rate_.toSec());
260 }
261 return current;
262}
263
264void ObservationBuffer::ResetLastUpdated()
265{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected