# Clearing and marking obstacles using range_sensor_layer

Hi all,

So, I have been using range_sensor_layer to insert obstacles detected by the sonar sensors into the costmap. It seems to be working pretty well but I have couple of concerns:
1. If there are no obstacles in front of the sensor, why does it insert obstacles at the maximum range of that sonar? For example, if the maximum range is 3m, although there are no obstacles in front of the sensor, still it will insert an obstacle at 3m from the sensor.
2. This is more of a doubt. I added a parameter to specify the range so that obstacles only within that range will be inserted into the costmap. Whenever, there are no obstacles in front of the sonar, I do clear_sensor_cone = true which clears the entire costmap but what I want is that obstacles which have already been inserted into the costmap should not be cleared unless sonar tells that the obstacle is not there anymore. What is the best way to do something like this?

Naman Kumar

edit retag close merge delete

HI there, Did you ever get this right, Im not having the identical problem but i cant seem to clear the obstacles inserted by the range sensor layer, if I stand in front of it, it inserts obstacle and then does not remove it?

( 2015-10-15 12:50:58 -0600 )edit

Did you ever find a solution for inserted obstacles at maximum range?

( 2016-06-28 20:49:29 -0600 )edit
1

For anyone who finds their way here like I did, the answer is at http://answers.ros.org/question/23831...

( 2016-06-29 22:07:20 -0600 )edit