Ask Your Question

costmap_2d with nothing but a clearing footprint?

asked 2016-08-12 19:09:32 -0500

lucasw gravatar image

updated 2016-08-15 13:52:32 -0500

I'd like to set up a costmap_2d initialized to be 100% unknown or obstacles, and have it do nothing except clear grid locations within the footprint. I don't want to have a static map that is unchangeable, just provide initial values that can be cleared by moving the footprint over them.

As it is now the static map doesn't get altered by the obstacle layer, it preserves it regardless of the footprint moving over it.

Do I need to create a fake sensor that will put an obstacle in every grid location when I want to initialize it?

This is with jade.

* Update *

I've tried to publish a point cloud into the obstacle layer that drops a point into every grid location, but even then the footprint is only cleared within the current footprint, if I move the footprint the old obstacle grid points now outside the footprint are restored.

Publishing a single large point cloud that attempts to cover the entire grid (this isn't quite working either, it is only clearing a circle, but more likely that is my fault) also causes the costmap node to issue a huge costmap_update every cycle, even though nothing is changing or getting updated, and it complains about not being able to keep up: [Map update loop missed its desired rate of 10.0000Hz... the loop actually took 1.4570 seconds].

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-08-18 08:03:03 -0500

David Lu gravatar image

The nature of the static layer is that it cannot be changed. You can initialize everything to be unknown using the track_unknown_space parameter.

edit flag offensive delete link more

answered 2016-08-15 13:53:48 -0500

lucasw gravatar image

It's looking like the costmap_2d node is completely wrong for this task, unless I'm just missing a parameter or two that would get the desired behavior.

I think the solution will be a custom node that publishes an OccupancyGrid and subscribes to the footprint, and uses an opencv function to draw the footprint onto the grid when it updates and this will get the desired obstacle clearing behavior.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-08-12 19:09:32 -0500

Seen: 243 times

Last updated: Aug 18 '16