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

Is it possible to use the costmap_2d in the robot local frame?

asked 2012-11-20 01:19:30 -0600

updated 2014-01-28 17:14:18 -0600

ngrennan gravatar image

I'm using the costmap_2d implementation in a custom way (not the navigation stack). The costmap_2d provides the rolling_window parameter, but it not assures "a proper local-obstacle-representation". The rolling_window only assures that the robot will remain in the center of the costmap while the orientation may (and typically does) change.

I tried to set the costmap parameters ("global_frame" and "robot_base_frame") both to "base_link" frame. The execution looked to work more or less but the result was not as good as I expected. Old marked obstacles looks like they were moving and following the robot. They look how they should to have been cleared but they haven't been for some reason.

IMHO the clearing raytraces are too slim to remove old obstacles so they remain marked. Since we are working in the local frame obstacles looks like they were moving while the robot look stopped. My conclusions after the experiments is that the default costmap configuration does not look work so well for moving obstacles.

So I have some related questions: - Are there any way to clear all the marker obstacles in each sensor reading? - How can I improve the obstacle clearing when the scan resolution is poor regarding the costmap resolution? - Using ros costmaps as local obstacle world representation is not typical. So, any additional consideration for not to use the costmap as a local representation of the world obstacles?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2012-11-20 01:36:33 -0600

Lorenz gravatar image

You should not set the global frame to the robot's base frame but a fixed frame. Normally, the rolling window is enabled for the local costmap and the global frame is odom. This will prevent obstacles from moving around. The way you are using the costmap is probably not really supported at all and it's just pure luck that it sort of works in your case.

Regarding your second question: Clearing of obstacles always done based on raycasting if the clearing parameter is set for your sensor.

If you want to clear your costmaps programmatically, you can use move_base's clear_costmaps service or implement the corresponding behavior for instance as a recovery behavior plugin. For an example, have a look at the source code of the clear_costmap_recovery service.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-11-20 01:19:30 -0600

Seen: 1,762 times

Last updated: Nov 21 '12