| 247 | } |
| 248 | |
| 249 | bool 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 | |
| 264 | void ObservationBuffer::ResetLastUpdated() |
| 265 | { |
nothing calls this directly
no outgoing calls
no test coverage detected