Get /map topic data into Costmap2DROS.

asked 2015-07-24 18:15:57 -0600

Sebastian gravatar image

I have written a bunch of code that operates on a static map.

To do this, I run map_server and then access the map by using and instance of Costmap2DROS and a static map plugin.

I am mostly done coding and want to try things out on the real robot (which already has gmapping configured). However, I am unable to read the map data that is generated by gmapping so that it can be used by my code.

How do I get the data that gmapping is publishing to the /map topic into my Costmap2DROS object? If I am able to do this, then I could keep just swap in the dynamic map in place of the static one and none of my code would change. Obviously, that is preferable to writing my own class which subscribes to the /map topic and processes it nicely. In that case I would have to re-write a lot of the code that I spent time developing.

edit retag flag offensive close merge delete