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

attaching Costmap2DROS object to existing costmaps (i.e. from movebase)

asked 2014-09-01 04:24:21 -0500

Garrick gravatar image

Hi all. I think i'm finally on the right track to solving my problem. If you would like to see the original problem, I asked about it here http://answers.ros.org/question/19085... -- still no responses though :(

I should be able to set up individual layers using specific sensors similar to what is described here: http://answers.ros.org/question/83471...

Ultimately, I'm going to set up 2 static layers, and I need to save the map generated by one of these static layer and I will load it next time the navigation stack runs.

I think the way of doing this is by using accessing the Costmap2DROS C++ object detailed here: http://wiki.ros.org/costmap_2d

Looking at the API, it makes sense that I would be able to create a new one of these objects in a .cpp file, but I don't know how I would go about getting the Costmap2DROS objects that move_base creates when it is launched.

Does anyone have any idea as to how to obtain a C++ interface to the global and local costmaps that move_base instantiates when you run similar launch files to what is on the tutorials? Maybe you can create the object with a parameter such as the topic or node name or something.

Thanks if anyone can help.

Also, i'm on indigo so maybe the Costmap2DROS object is not called that anymore.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-09-01 21:34:36 -0500

David Lu gravatar image

Perhaps this is beside the point, but have you tried http://wiki.ros.org/map_server#map_sa...

edit flag offensive delete link more

Comments

Thanks for the reply David. The thing is I'm going to be running 2 static layers, but I need to save and initialize only one of these. I can't save and initialize the superposition of them (i.e the costmap topic). Is there are way to use map_saver to save an inividual layer? If so this is fine.

Garrick gravatar image Garrick  ( 2014-09-01 21:44:08 -0500 )edit

I know you can initialize from a static map here: http://wiki.ros.org/costmap_2d/hydro/... But that would require being able to save the map generated from the individual static layer. Can you do this? I could maybe just create another costmap_2d with just the 1 static layer, then use that.

Garrick gravatar image Garrick  ( 2014-09-01 21:50:15 -0500 )edit

Right now, there is not a method for saving an individual layer. You can dynamically disable some of the layers, through dynamic_reconfigure, and then save the whole costmap. If you think its important, add a ticket for publishing individual layers.

David Lu gravatar image David Lu  ( 2014-09-03 19:33:12 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-09-01 04:24:21 -0500

Seen: 675 times

Last updated: Sep 01 '14