Global layer timeout topic with height

Updated the obstacle timeout so that you can specify to clear old obstacles based on the topic

Enable this by setting the following for each sensor for which you require the obstacles to timeout (this only works for global maps) 
e.g.
bump: { clear_old: true, max_obstacle_persistance: 3.0}

Time is in seconds.

Option to enable height checking before clearing obstacle

set check_height_before_clearing : true in the voxel layer 
added.


On Sun, Aug 24, 2014 at 10:19 PM, Kaijen Hsiao <notifications@github.com>
wrote:

> In costmap_2d/plugins/voxel_layer.cpp:
>
> > @@ -103,17 +96,23 @@ void VoxelLayer::resetOldCosts(double* min_x, double* min_y,
> >    int error_count = 0;
> >    for(int i=0; i < new_obs_list.size(); i++){
> >      CostMapList &list = new_obs_list[i];
> > -    if((current_time - list.obs_timestamp / 1.0e6) > max_obstacle_persistance_){
> > +    std::map<std::string, double>::iterator it;
> > +    it = observation_timeout.find(list.topic);
> > +
> > +    double obs_persistance = max_obstacle_persistance_;
> > +    if(it != observation_timeout.end()){
> > +      obs_persistance = it->second;
> > +      ROS_DEBUG("Topic : %s - Timeout : %f\n", list.topic.c_str(), obs_persistance);
> > +    }
> > +    else{
> > +      ROS_ERROR("Asked to clear cost for non-timeout topic\n");
>
> shouldn't there be a continue or some such after this line?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/bosch-ros-pkg/navigation/pull/18/files#r16642447>.
>