So in my launch file there was a problem with map_server
, meaning a map wasn't available for AMCL, which caused move_base
to hang at requesting the costmaps. The action server is started at the very end of move_base
initialization, so this is all occurring before the start call. No errors resulted meaning it was hard to identify.
As for rosrun move_base move_base
, it probably also hangs for the same reason. However, nothing is printed to console to tell you what's going on. Anyway, problem solved.
EDIT: Aug 14 '17
For me, the move_base
action server didn't start because I wasn't providing it with a map, as it used a static map for its global costmap. If you aren't using gmapping
, or don't plan on using AMCL, the best way to get going is to simply use a rolling window global costmap. This will be very similar to your local costmap, but perhaps use a larger resolution and larger size. You should then be able to use move_base
without issue, as it will build the maps itself, rather than looking for an external one.
It only makes sense to use a static global costmap if you are usually going to be working in the same area, as opposed to using your robot in a different location every time. In this case, you should spend some time using gmapping
to populate a map with obstacles, which can then be used as a static costmap. The gmapping
node uses a laser to create a map in real-time, where each cell is either occupied, free, or unknown. The gmapping
node can then share this map to move_base
, which can inflate obstacles etc, and use it as the static global costmap. By default, gmapping
publishes to /map, and move_base
listens to /map. After using gmapping
to map your area, use rosrun map_server map_saver map:=/map
to save the map as a local YAML file and corresponding image.
The next time you come to navigate in the same area, turn off gmapping
and use an instance of map_server
to load the previously saved map. This way, the move_base
node has access to the previously created map, and can efficiently plan a long distance path. If you want, you can also use AMCL to localize within the same map and provide the odom -> map
transform which gmapping
was providing, but this isn't related to any issue with the move_base
server not loading.
So in summary, if your server isn't loading, check that there is something publishing to the /map topic if using a static costmap.