How to change maps for path planning in navigation stack?
I am trying to swap the map that the map server provides at runtime for the navigation stack.
Currently I have made a multiplexer node that saves the output from 2 different map servers that were remapped to different topics, and then publishes the map corresponding to a service request to the /map topic.
However, this does not update the cost map, and our TF tree has issues when I do this as I get the error no tree from LaserScan to Map. The TF error may be because no map is published to /map until the mux node is up, and it coming online later than the move_base node.
First of all, it would be a good idea to check if your hypothesis is correct. I think we can confirm this by starting the mux node first and then running the other nodes.
So I moved the multiplexer to be first on the launch file and the costmap now updates.
However, when I first use the multiplexer the cost map doesn't update, only after I load in a map, then swap the map does the cost map start to load. Any idea the causes/fixes for this?