Ask Your Question

parameter tuning for dwa_local_planner: unable to turn properly

asked 2015-06-09 07:55:40 -0500

Naman gravatar image

updated 2015-06-10 19:50:34 -0500

Hi all,

I have a mobile robot which is navigating around a room. It has hokuyo laser and Kinect for navigation and obstacle avoidance. I am using wheel_encoders for odometry, amcl for localization, move_base for planning with default global planner and Trajectory Planner as the local planner and everything seems to be working fine. After that, I started using dwa_local_planner as a local planner and I am having issues when the robot is turning. The robot is able to go forward without any issues, the problem occurs only when its turning and the planner has to give some angular velocity. I feel the local planner is not able to give enough velocity for the robot to turn and I have to turn the robot manually:
image description
I have specified:

max_rot_vel: 1.0
min_rot_vel: 0.8

but sometimes, it does not seem to be following it (sometimes it does, angular.z = -0.8 or 0.8 and it turns correctly). In short, the problem is when the robot is trying to turn, the dwa_local_planner sends angular velocity (angular.z = -0.3199) which is not enough for the robot to turn. Does any one have any idea why is the robot not able to turn properly and what parameters should I tune for it?


  acc_lim_x: 2.0
  acc_lim_y: 0
  acc_lim_th: 3.0
  max_trans_vel: 0.5
  min_trans_vel: 0.0
  max_vel_x: 0.5
  min_vel_x: 0.0
  max_vel_y: 0
  min_vel_y: 0
  max_rot_vel: 1.0
  min_rot_vel: 0.8

  yaw_goal_tolerance: 0.17
  xy_goal_tolerance: 0.15
  latch_xy_goal_tolerance: false

  sim_time: 1.5
  sim_granularity: 0.025
  vx_samples: 10
  vy_samples: 0
  vtheta_samples: 20
  controller_frequency: 10
  penalize_negative_x: true

  path_distance_bias: 1.0
  goal_distance_bias: 0.8
  occdist_scale: 0.01
  forward_point_distance: 0.325
  stop_time_buffer: 0.2
  scaling_speed: 0.25
  max_scaling_factor: 0.2

  oscillation_reset_dist: 0.05

  prune_plan: false  

  sim_period: 0.1
  rot_stopped_vel: 0.01
  trans_stopped_vel: 0.01

The video is here. The 1st goal is in the direction of east, 2nd goal towards west and 3rd goal towards north. All the three times, I have to rotate the robot manually because the local planner is not able to give enough angular velocity and the robot does not turn properly.

Please let me know if you need more information from me. Any help will be appreciated.

Thanks in advance.
Naman Kumar

edit retag flag offensive close merge delete


@Naman did you manage to fix it? I still getting this problem, where DWA sends very tiny velocities

stevemartin gravatar image stevemartin  ( 2019-02-04 04:56:57 -0500 )edit

Did anyone find a solution to this issue? Please help you have found.

shivammalviya71 gravatar image shivammalviya71  ( 2020-11-19 04:20:44 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-06-09 11:43:41 -0500

dimkirt gravatar image

updated 2015-06-09 14:34:19 -0500

Without being so sure if that is the problem, i noticed that you have very large min_rot_vel and max_rot_vel (remember that they are in radians so 1.0 rad is 57,3 degrees and 0.8 is around 45 degrees) maybe try to reduce them, to something like max_rot_vel: 0.15, min_rot_vel: 0.04

EDIT: These are the defaults, overwrite them through your yaml file, you can also run rqt_reconfigure while you are running you robot to play with the params when the robot is stuck. link text link text

Note: Since you are using dwa_planner add the param "cheat_factor: 2" in your yaml file

EDIT_2 About cheat factor: link text

edit flag offensive delete link more


The reason I increased them because my robot needs a high rotational velocity to rotate, I feel the robot wont be able to turn at the velocities you have specified.

Naman gravatar image Naman  ( 2015-06-09 12:09:53 -0500 )edit

When the robot fails to turn, what does the move_base node output? Any errors or warnings?

dimkirt gravatar image dimkirt  ( 2015-06-09 13:11:21 -0500 )edit

There are no errors or warnings. The problem is when the robot is trying to turn, the dwa_local_planner sends angular velocity (angular.z = -0.3199) which is not enough for the robot to turn. Is there any parameter to specify minimum rotational velocity or maybe in place rotational velocity? TIA

Naman gravatar image Naman  ( 2015-06-09 13:19:00 -0500 )edit

Have you tried to raise the path_distance_bias and goal_distance_bias, change them to path_distance_bias: 62.0 goal_distance_bias: 24.0 which are the defaults, though I would personally set the path_distance bias to something like 100.0

dimkirt gravatar image dimkirt  ( 2015-06-09 13:32:02 -0500 )edit

I tried it but it didn't have any effect. I am still wondering why is the planner giving angular velocities less than 0.8 when I have set min_rot_vel: 0.8. Is there any other parameter to take care of in place rotation (similar to min_in_place_rotational_vel for TrajectoryPlannerROS) ? TIA

Naman gravatar image Naman  ( 2015-06-09 14:02:52 -0500 )edit

what is cheat_factor?

Naman gravatar image Naman  ( 2015-06-09 14:21:26 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2015-06-09 07:55:40 -0500

Seen: 1,664 times

Last updated: Jun 10 '15