Refresh map on navigation
Hello
I'm using the navigation_stack for make a robot move autonomously. So far I've managed to make the robot move and avoid obstacles, but only if I use a reference map. With this reference map, the robot uses the AMCL package and then gets its localization on the map.
What I get now is that the robot go from one point to another without a known map. To fix this, I thought of using a laser to generate a map periodically, and transfer this map to AMCL package.
The problem is that I don't know how to pass the map built to AMCL. I tried to post on the topic /map the information of the constructed map, but then when I visualize it with Rviz see only gray. Besides the move_base package tells me:
Request for map failed, trying again ...
So there's something I'm missing.
Maybe sending the map with the map_server would be easier, but I haven't found documentation of how to use it from the code.
Can anyone tell me how I can transfer this map constructed to navigation_stack? Or if there is an easier way to get what you want.
Thanks in advance.