DWA fails to produce the path in the free space, strange behavior

asked 2020-07-09 04:08:43 -0500

Yehor gravatar image

updated 2022-01-22 16:10:38 -0500

Evgeny gravatar image

Hello,

I faced the problem regarding using dwa planner with move base. The dwa produce strange behavior and always fails the path. However, it fails the path when there are no obstacles and when it is on the global path in good location (you will see it on the screenshots). The strange behavior is because the robot oscillating backward and forward in the free space.

I want to notice that sometimes robot moves ok, with good trajectory and moves with good command velocities.

So this occurs 50/50.

Here is my dwa configuration parameters:

base_local_planner: dwa_local_planner/DWAPlannerROS

DWAPlannerROS:

  # base_local_planner params

  holonomic_robot: false

  max_vel_trans: 0.31
  min_vel_trans: 0.085

  max_vel_x: 0.31
  min_vel_x: -0.31
  max_vel_y: 0.
  min_vel_y: 0.

  max_vel_theta: 0.5
  min_vel_theta: -0.5

  trans_stopped_vel: 0.084
  theta_stopped_vel: 0.13

  acc_lim_x: 2.
  acc_lim_y: 1.
  acc_lim_theta: 3.
  acc_lim_trans: 2.

  # dwa_params

  sim_time: 4.67

  sim_granularity: 0.1
  vx_samples: 10
  vy_samples: 3
  vth_samples: 15

  path_distance_bias: 0.71  # 0.71
  goal_distance_bias: 0.8  # 0.8
  occdist_scale: 0.011

  stop_time_buffer: 1.
  oscillation_reset_dist: 0.6  # 0.3
  oscillation_reset_angle: 0.3  # 0.13

Here is the screen for terminal:

image description

And this is the screenshot from rviz: image description

I someone knows why is it happening, could you help me to find out.

Thank you!

EDIT 1:

I also noticed that sometimes the move base post strange speed command like this:

linear: 
  x: 0.0
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 1.38777878078e-17
edit retag flag offensive close merge delete

Comments

A video would be nice. To be on the safe side, I would first start with setting y_acc and vy_samples to zero. Shouldnt make a difference but strange things could still happen. Next, are the velocity limits and and accelerations messured true values or "fantasynumbers"? Some planners can show "bad PID" like behavior if they dont get the result they commanded. Oscillations might occur. In my dwa planner I have theta_vel and y_vel marked as absolute values (would make sense as there are likely unachievable min values). I would also suggest going over this tuning guide link text

Dragonslayer gravatar image Dragonslayer  ( 2020-07-09 12:06:08 -0500 )edit

@Dragonslayer I will remove y_acc and vy_samples and test again. The parameters for low speed is correct and they are real. For the upper limit I reduce them because I am using Jetson Nano and there is not enough computation power to move with high speed.

I want to ask one important thing max_vel_theta is absolute value or not?

Yehor gravatar image Yehor  ( 2020-07-10 01:18:05 -0500 )edit

For max_vel_theta it doesnt really matter if its aboslute, as its a positive value anyway, but as far as I know the theta vels are not aboslute. However there is an "old" and "new" version of the dwa planner arround and they changed some stuff. Is this a real robot or simulated? If real what kind of sensors?

Dragonslayer gravatar image Dragonslayer  ( 2020-07-10 09:41:24 -0500 )edit

@Dragonslayer Yes, it is real robot simulation. As a sensor, I am using the lidar from Xiaomi vacuum cleaner.

I still can't understand regarding theta vels, because if it is absolute then the things are okay and it is possible to restrict the min and max rotational speed. But in case it is not in absolute then in my configuration, the robot will rotate only in one direction.

It is not clear in the documentation.

Yehor gravatar image Yehor  ( 2020-07-12 02:49:19 -0500 )edit