Running multiple move_base
Hello,
I'm trying to run multiple instances of move_base
for the fetch robot, https://github.com/ZebraDevs/fetch_ro....
I'd like to use the navfn
global planner, as well as carrot planner global sometimes, but I'm not sure how to launch multiple move_base nodes.
Here are the steps I have taken:
Inside fetch_nav.launch
, replaced
<include file="$(arg move_base_include)">
<arg name="name" value="fetch" />
<arg if="$(arg use_keepout)" name="map_topic" value="map_keepout" />
<arg unless="$(arg use_keepout)" name="map_topic" value="$(arg map_topic)" />
<arg name="cmd_vel_topic" value="$(arg cmd_vel_topic)" />
<arg name="odom_topic" value="$(arg odom_topic)" />
</include>
with
<include file="$(arg move_base_include)" ns = "move_base_planner_navfn">
<arg name="name" value="fetch" />
<arg if="$(arg use_keepout)" name="map_topic" value="map_keepout" />
<arg unless="$(arg use_keepout)" name="map_topic" value="$(arg map_topic)" />
<arg name="cmd_vel_topic" value="$(arg cmd_vel_topic)" />
<arg name="odom_topic" value="$(arg odom_topic)" />
</include>
<include file="$(arg move_base_carrot_include)" ns = "move_base_planner_carrot">
<arg name="name" value="fetch" />
<arg if="$(arg use_keepout)" name="map_topic" value="map_keepout" />
<arg unless="$(arg use_keepout)" name="map_topic" value="$(arg map_topic)" />
<arg name="cmd_vel_topic" value="$(arg cmd_vel_topic)" />
<arg name="odom_topic" value="$(arg odom_topic)" />
</include>
I copied the move_base.launch.xml
and created a move_base_carrot.launch.xml
which is the move_base_carrot_include
arg.
And in my move_base_carrot.launch.xml
, I've spawned a move_base
node, similar to the other file, and replaced move_base.yaml
with move_base_carrot.yaml
.
The move_base_carrot.yaml
is here:
# Planner selection
base_global_planner: "carrot_planner/CarrotPlanner"
base_local_planner: "base_local_planner/TrajectoryPlannerROS"
# Recovery behaviors are defined in robot folders
# Oscillation
oscillation_timeout: 10.0
oscillation_distance: 0.5
# Global planner
planner_frequency: 0.0
planner_patience: 50.0
# Local planner
controller_frequency: 3.0
controller_patience: 30.0
TrajectoryPlannerROS:
# base vel/accel profile is in robot folders
# tolerances (defaults)
yaw_goal_tolerance: 1.5
xy_goal_tolerance: 0.15
latch_xy_goal_tolerance: true
# forward simulation
sim_time: 1.0
sim_granularity: 0.025
angular_sim_granularity: 0.025
vx_samples: 3
vtheta_samples: 10
# scoring (defaults)
meter_scoring: true
path_distance_bias: 0.5
goal_distance_bias: 0.75
occdist_scale: 0.00625
heading_lookahead: 0.325
heading_scoring_timestep: 0.8
heading_scoring: true
dwa: false
# other
oscillation_reset_dist: 0.5
# debug
publish_cost_grid_pc: false
The problem is that I cannot run them together. I can run only one planner, i.e. I can run the carrot planner alone (from the fetch_nav.launch
) or the navfn
planner, but not both together in the launch
file. Moreover, I can get the planners working, only if I do not have a namespace specified in fetch_nav.launch
. Once I specify the namespace, neither planner works (not even individually).
I'm guessing there is a namespace issue, but I do not know how to fix it.
Any help would be appreciated.
Thanks