Rosanswers logo


In the sources for the navigation stack, there's a sample costmap_2d config file at navigation/costmap_2d/launch/example_params.yaml. In the part pertaining to the base_scan source, there's an undocumented parameter called 'expected_update_rate':

observation_sources: base_scan
base_scan: {data_type: LaserScan, expected_update_rate: 0.4,
  observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}

Is this what it sounds like (laser update rate in Hz)? 0.4 is kind of a weird value for a scanning laser so thought I'd check.



Originally posted by Rick Armstrong on ROS Answers with karma: 567 on 2014-09-06

Post score: 0


1 Answer 1


Rosanswers logo

Answered my own question. It's really an "interval" rather than a "rate":


bool ObservationBuffer::isCurrent() const
  if (expected_update_rate_ == ros::Duration(0.0))
    return true;

  bool current = (ros::Time::now() - last_updated_).toSec() <= expected_update_rate_.toSec();
  if (!current)
        "The %s observation buffer has not been updated for %.2f seconds, and it should be updated every %.2f seconds.",
        topic_name_.c_str(), (ros::Time::now() - last_updated_).toSec(), expected_update_rate_.toSec());
  return current;

Originally posted by Rick Armstrong with karma: 567 on 2014-09-06

This answer was ACCEPTED on the original site

Post score: 2


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.