ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I personally use the move_base package with ROS Indigo to run both Dijkstra and A*. In my launch file i have:
<!-- Move_Base node -->
<node pkg="move_base" type="move_base" name="move_base" output="screen" >
<rosparam file="/path/to/file/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="/path/to/file/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="/path/to/file/local_costmap_params.yaml" command="load" />
<rosparam file="/path/to/file/global_costmap_params.yaml" command="load" />
<rosparam file="/path/to/file/base_local_planner_params.yaml" command="load" />
</node>
Inside base_local_planner_params.yaml I specify
# Global Planner Parameters
BaseGlobalPlanner:
allow_unknown: false
use_dijkstra: false #Use A* instead
use_quadratic: true
use_grid_path: false
old_navfn_behavior: false
The use_dijikstra parameter is the one that specifies whether A* or Dijkstra will be used.
IMPORTANT NOTES:
1) ROS indigo uses navfn by default, which can only do Dijkstra. In order to use A* you must download global_planner.
2) Once things are setup you should verify that the parameters are actually getting loaded correctly by using rosparam. This type of thing won't give you an error and so you could be using Dijkstra for a long time while thinking that your actually using A*.
3) If the parameters aren't being loaded correctly, the first thing I usually check is the namespaces (ns). They can be tricky.