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 
The obs time is being kept as micro seconds I think. We can change that.
On Aug 22, 2014 9:16 PM, "Dejan Pangercic" <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");
> > +    }
> > +
> > +    if((current_time - list.obs_timestamp / 1.0e6) > obs_persistance){
>
> you use this line for instance. current_time is already in seconds
> (ros::Time::now().toSec()), obs_timestamp not documented (but i assume secs
> too) - why still dividing to get to secs?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/bosch-ros-pkg/navigation/pull/18/files#r16628645>.
>