0
$\begingroup$

Rosanswers logo

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/190858/how-to-go-about-this-engineering-problem-using-navigation-stack/ -- 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/layered-costmap-problem/

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.


Originally posted by Garrick on ROS Answers with karma: 96 on 2014-09-01

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by David Lu with karma: 10932 on 2014-09-01

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Garrick on 2014-09-01:
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.

Comment by Garrick on 2014-09-01:
I know you can initialize from a static map here: http://wiki.ros.org/costmap_2d/hydro/staticmap 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.

Comment by David Lu on 2014-09-03:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.