# how to remove forward bias in move_base

I have a robot that senses and moves in reverse just as well as in forward. However, move_base trajectories are highly biased toward turning the robot around and moving forward. I tried setting prefer_forward_cost_function to 0.0 and also tied turning on and off DWA, but these have no apparent effect.

Is there some way to remove the forward bias in move_base?

Revised:

I tried the excellent suggestion of making min_vel_x negative and initially thought it worked, but in fact, it does not.

The output from move_base still does not generate negative x velocities. When given a goal to the rear, with a blank map, it turns 180 degrees and goes there. If I set max_vel_x = 0.0, then it just turns in place. Here is base_local_planner_params.yaml

Second revise: I swapped from TrajectoryPlanner to DWAPlanner (param file and move_base output shown below) but it does not seem to make any difference.

Third revise: I was entering DWAPlanner parameters, but did not select DWAPlanner as the local planner, so it was defaulting to TrajectoryPlanner. Adding this line to the parameter list fixed that and the bot now goes backwards.

base_local_planner: "DWAPlannerROS"

Many thanks to David Lu for his help with this.

```
controller_frequency: 4.0
recovery_behavior_enabled: true
clearing_rotation_allowed: false
DWAPlannerROS:
max_vel_x: 0.3
min_vel_x: -0.5
max_rotational_vel: 0.5
min_vel_theta: -0.5
min_in_place_vel_theta: 0.2
escape_vel: -0.1
acc_lim_x: 2.3
acc_lim_y: 2.3
acc_lim_theta: 1.5
holonomic_robot: false
yaw_goal_tolerance: 0.1 # about 6 degrees
xy_goal_tolerance: 0.2 # 20 cm
latch_xy_goal_tolerance: false
pdist_scale: 0.8
gdist_scale: 0.6
meter_scoring: true
prefer_forward_cost_function: 0.0
heading_lookahead: 1.0
heading_scoring: false
heading_scoring_timestep: 0.8
occdist_scale: 0.1
oscillation_reset_dist: 0.05
publish_cost_grid_pc: false
prune_plan: true
sim_time: 1.5
sim_granularity: 0.025
angular_sim_granularity: 0.025
vx_samples: 8
vtheta_samples: 20
dwa: true
simple_attractor: false
```

Just in case it is useful, here is the output from move_base startup. Note that it is using rangefinders as sources and I thought maybe the rear sensors were creating an obstacle, but the behavior is unchanged with the hokuyo sensors removed.

```
SUMMARY
========
PARAMETERS
* /map_server/frame_id: map
* /move_base/DWAPlannerROS/acc_lim_theta: 1.5
* /move_base/DWAPlannerROS/acc_lim_x: 2.3
* /move_base/DWAPlannerROS/acc_lim_y: 2.3
* /move_base/DWAPlannerROS/angular_sim_granularity: 0.025
* /move_base/DWAPlannerROS/dwa: True
* /move_base/DWAPlannerROS/escape_vel: -0.1
* /move_base/DWAPlannerROS/gdist_scale: 0.6
* /move_base/DWAPlannerROS/heading_lookahead: 1.0
* /move_base/DWAPlannerROS/heading_scoring: False
* /move_base/DWAPlannerROS/heading_scoring_timestep: 0.8
* /move_base/DWAPlannerROS/holonomic_robot: False
* /move_base/DWAPlannerROS/latch_xy_goal_tolerance: False
* /move_base/DWAPlannerROS/max_rotational_vel: 0.5
* /move_base/DWAPlannerROS/max_vel_x: 0.3
* /move_base/DWAPlannerROS/meter_scoring: True
* /move_base/DWAPlannerROS/min_in_place_vel_theta: 0.2
* /move_base/DWAPlannerROS/min_vel_theta: -0.5
* /move_base/DWAPlannerROS/min_vel_x: -0.5
* /move_base/DWAPlannerROS/occdist_scale: 0.1
* /move_base/DWAPlannerROS/oscillation_reset_dist: 0.05
* /move_base/DWAPlannerROS/pdist_scale: 0.8
* /move_base/DWAPlannerROS/prefer_forward_cost_function: 0.0
* /move_base/DWAPlannerROS/prune_plan: True
* /move_base/DWAPlannerROS/publish_cost_grid_pc: False
* /move_base/DWAPlannerROS/sim_granularity: 0.025
* /move_base/DWAPlannerROS/sim_time: 1.5
* /move_base/DWAPlannerROS/simple_attractor: False
* /move_base/DWAPlannerROS/vtheta_samples: 20
* /move_base/DWAPlannerROS/vx_samples: 8
* /move_base/DWAPlannerROS/xy_goal_tolerance: 0.2
* /move_base/DWAPlannerROS/yaw_goal_tolerance: 0.1
* /move_base/clearing_rotation_allowed: False
* /move_base/controller_frequency: 4.0
* /move_base/global_costmap/footprint: [[0 ...
```