ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

costmap_2d observation_sources: 'expected_update_rate'?

asked 2014-09-06 20:59:17 -0600

Rick Armstrong gravatar image

Hello,

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.

Thanks,

Rick

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-09-06 21:25:02 -0600

Rick Armstrong gravatar image

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

costmap_2d/src/observation_buffer.cpp:244:

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)
  {
    ROS_WARN(
        "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;
}
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-09-06 20:59:17 -0600

Seen: 1,364 times

Last updated: Sep 06 '14