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

Unexpected influence of moving objects on costmap

asked 2018-09-20 03:02:57 -0600

Philip W gravatar image

updated 2018-09-21 01:53:33 -0600

I'm using the range_sensor_layer as a plugin to costmap_2d in order to create a costmap from two ultrasound sensors.

The basic setup works as expected. The sensors make range measurements and those get represented in the costmap as expected. However, when an object moves towards the ultrasound sensors, the updated costmap looks odd to me.

Before the object starts to move towards the robot, you can clearly see the object results in a "wall" in the costmap. Now, when the object moves towards the sensors i would expect the "wall" moving in the costmap, too. However, the "wall" stays where it was and instead little spikes arise from the "wall" towards the robot, where each spike points towards one of the ultrasound sensors.

image description

My yaml for costmap2d looks like this:

footprint: [[-0.325, -0.325], [-0.325, 0.325], [0.325, 0.325], [0.46, 0.0], [0.325, -0.325]]
rolling_window: true
static_map: false

  - {name: sonar, type: "range_sensor_layer::RangeSensorLayer"}

  topics: ["/ultrasound_front_left", "/ultrasound_front_right"]
  clear_on_max_reading: true

Is this the expected behavior? Can it be configured that the entire "wall" moves in the costmap?

edit retag flag offensive close merge delete


I would have uploaded a screenshot from rviz

I've just given you sufficient karma to do that, so please attach the screenshot.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-20 04:37:04 -0600 )edit

Is this the expected behavior? Can it be configured that the entire "wall" moves in the costmap?

I'm not an expert, but sonars are directional sensors. If you only have two, how would you expect the costmap plugin to "know" that "the wall" is actually one object, instead of a set of separate ..

gvdhoorn gravatar image gvdhoorn  ( 2018-09-20 04:38:24 -0600 )edit

.. measurements?

Guessing here, but there just aren't enough measurements to fully represent the object.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-20 04:39:21 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-11-14 09:57:17 -0600

opo gravatar image

A cell will be marked as occupied as long as it is not rewritten as free later on. Seems to me that your sensor is statically pointed, or focused in one direction.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-09-20 03:02:57 -0600

Seen: 287 times

Last updated: Nov 14 '18