How to change global planner of move_base
Hello, I would like to change global planer from navfn to carrot_planner. I have changed the MoveBase.cfg in navigation/movebase to
gen.add("base_global_planner", str_t, 0, "The name of the plugin for the global planner to use with move_base.", "carrot_planner/CarrotPlanner")
But when I start my turtlebot simulator (gazebo) I think it still uses navfn. If I type rostopic list, there are still all the topics of navfn but no topic of carrot_planner. Is this even the correct way to check what global planner move_base is using?
What am I doing wrong? Or rather what is the proper way to change planner? Keep in mind that I'm still a beginner.
EDIT1: I have tried adding that line in launch file but I don't think it changed anything. Here is my launch file: Here is my move_base cfg file:
#!/usr/bin/env python
PACKAGE = 'move_base'
import roslib;roslib.load_manifest(PACKAGE)
from dynamic_reconfigure.parameter_generator import *
gen = ParameterGenerator()
gen.add("base_global_planner", str_t, 0, "The name of the plugin for the global planner to use with move_base.", "carrot_planner/CarrotPlanner")
gen.add("base_local_planner", str_t, 0, "The name of the plugin for the local planner to use with move_base.", "base_local_planner/TrajectoryPlannerROS")
#gen.add("recovery_behaviors", str_t, 0, "A list of recovery behavior plugins to use with move_base.", "[{name: conservative_reset, type: clear_costmap_recovery/ClearCostmapRecovery}, {name: rotate_recovery, type: rotate_recovery/RotateRecovery}, {name: aggressive_reset, type: clear_costmap_recovery/ClearCostmapRecovery}]")
gen.add("planner_frequency", double_t, 0, "The rate in Hz at which to run the planning loop.", 0, 0, 100)
gen.add("controller_frequency", double_t, 0, "The rate in Hz at which to run the control loop and send velocity commands to the base.", 20, 0, 100)
gen.add("planner_patience", double_t, 0, "How long the planner will wait in seconds in an attempt to find a valid plan before space-clearing operations are performed.", 5.0, 0, 100)
gen.add("controller_patience", double_t, 0, "How long the controller will wait in seconds without receiving a valid control before space-clearing operations are performed.", 5.0, 0, 100)
gen.add("conservative_reset_dist", double_t, 0, "The distance away from the robot in meters at which obstacles will be cleared from the costmap when attempting to clear space in the map.", 3, 0, 50)
gen.add("recovery_behavior_enabled", bool_t, 0, "Whether or not to enable the move_base recovery behaviors to attempt to clear out space.", True)
# Doesnt exist
gen.add("clearing_rotation_allowed", bool_t, 0, "Determines whether or not the robot will attempt an in-place rotation when attempting to clear out space.", True)
gen.add("shutdown_costmaps", bool_t, 0, "Determines whether or not to shutdown the costmaps of the node when move_base is in an inactive state", False)
gen.add("oscillation_timeout", double_t, 0, "How long in seconds to allow for oscillation before executing recovery behaviors.", 0.0, 0, 60)
gen.add("oscillation_distance", double_t, 0, "How far in meters the robot must move to be considered not to be oscillating.", 0.5, 0, 10)
gen.add("restore_defaults", bool_t, 0, "Restore to the original configuration", False)
exit(gen.generate(PACKAGE, "move_base_node", "MoveBase"))
EDIT2: I've updated my ...
can you share your cfg file?
you should insert that line inside your move_base node. in your case that should be somewhere inside your move_base_turtlebot.launch file (see example in edited answer). cheers