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

Obstacles remain in costmap despite observation_persistence being set

asked 2018-01-17 03:30:52 -0600

Felix Widmaier gravatar image

updated 2018-01-17 03:53:18 -0600

My question is mostly a duplicate of this one but since it was closed without answer long ago, I open a new one.

I expected that when observations are removed after the given time, the corresponding obstacle should disappear from the costmap. However, this does not happen, the obstacles stay there forever.

Is this a bug and the observation_persistence parameter is not working as intended? Or is it expected behaviour? In this case, what is the purpose of this parameter?

In any case: Is there a way how I can achieve my desired behaviour (i.e. obstacles disappear after some time from the costmap when they are no longer supported by current observations)?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-01-17 19:53:56 -0600

David Lu gravatar image

One [not well maintained] solution: https://github.com/DLu/decaying_obsta...

edit flag offensive delete link more

Comments

oh man this is this awesome. Thanks David!!!! Lu!

psammut gravatar image psammut  ( 2018-01-23 19:49:01 -0600 )edit

@Felix Widmaier did you ever get this work for you? Mine still leaves fantom obstacles. :(

psammut gravatar image psammut  ( 2018-01-24 10:19:32 -0600 )edit

@psammut: Unfortunately, I did not yet have the time to give it a try (currently I simply clear the whole costmap from time to time).

Felix Widmaier gravatar image Felix Widmaier  ( 2018-01-25 02:15:26 -0600 )edit

@David Lu is this package available for ROS kinetic ?

isuru_m gravatar image isuru_m  ( 2021-10-01 03:11:28 -0600 )edit
0

answered 2019-01-14 01:06:18 -0600

kenlee gravatar image

@Felix Widmaier,I found the reason for this problem is the way to handle the maximum laser scan range. By change the file laser_geometry.cpp at line 110 from

if (preservative || ((range < range_cutoff) && (range >= scan_in.range_min))) //if valid or preservative

to

if (preservative || ((range <= range_cutoff) && (range >= scan_in.range_min))) //if valid or preservative

and line 421 from

if (range < range_cutoff && range >= scan_in.range_min)

to

if (range <= range_cutoff && range >= scan_in.range_min)

the problem can be solved.

Good luck!

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2018-01-17 03:30:52 -0600

Seen: 1,152 times

Last updated: Jan 17 '18