# parameter tuning for dwa_local_planner: unable to turn properly

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:

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?

dwa_local_planner_params.yaml

DWAPlannerROS:
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.

Naman Kumar

edit retag close merge delete

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

( 2019-02-04 04:56:57 -0500 )edit

Sort by » oldest newest most voted

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

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.

( 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?

( 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

( 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

( 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

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

what is cheat_factor?

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