DWA doesn't avoid obstacles and overshoots the trajectory

asked 2021-03-05 09:24:18 -0500

Yehor gravatar image

updated 2021-03-09 01:00:32 -0500

Hi ROS community,

It is more than half a year since I'm struggling with the navigation stack, trying to achieve stable navigation. I have changed the wheels for an expensive one and utilized Intel RealSense D435i camera for local costmap but the behavior of the robot still bad.

The robot reacts to the dynamic obstacles very late, when it is already in the obstacle. Also, the robot rotates very slow like it is trying to rotate to track the global path but it can't and move straight.

This is the video from rviz: dwa navigation try

If someone has any suggestion why the robot moves like that, please help.

Thank you!

EDIT 1

This is my dwa parameters:

controller_frequency: 10. 
controller_patience: 0.5 
planner_patience: 0.5 
recovery_behavior_enabled: true 
recovery_behaviors:   
     - name: 'aggressive_reset_1'     
       type: 'clear_costmap_recovery/ClearCostmapRecovery'       
     - name: 'aggressive_reset_2'     
       type: 'rotate_recovery/RotateRecovery'     
aggressive_reset:   
     reset_distance: 0.0   
     layer_names: ["obstacles"]     

base_local_planner: dwa_local_planner/DWAPlannerROS 
DWAPlannerROS:   
    # base_local_planner params   
    holonomic_robot: false   
    max_vel_trans: 0.3   
    min_vel_trans: 0.05   
    max_vel_x: 0.3   
    min_vel_x: 0.085   
    max_vel_y: 0.   
    min_vel_y: 0.   
    max_vel_theta: 1.0   
    min_vel_theta: -1.0   
    trans_stopped_vel: 0.084   
    theta_stopped_vel: 0.13   
    acc_lim_x: 1.22   
    acc_lim_y: 0.   
    acc_lim_theta: 1.81   
    acc_lim_trans: 1.22   
    yaw_goal_tolerance: 0.05   
    xy_goal_tolerance: 0.1     
    latch_xy_goal_tolerance: true   
    # dwa_params   
    sim_time: 1.71      
    sim_granularity: 0.025   
    vx_samples: 5   
    vy_samples: 0   
    vth_samples: 30   
    path_distance_bias: 0.8   
    goal_distance_bias: 0.4   
    occdist_scale: 0.011   
    forward_point_distance: 0.0  # for diff-drive robots recomended set to 0. 
    stop_time_buffer: 0.2 
    oscillation_reset_dist: 0.5   
    oscillation_reset_angle: 0.75     
    use_dwa: false   
    publish_traj_pc: true
edit retag flag offensive close merge delete

Comments

I think would be helpful if you shared your navigation parameter files.

shlock gravatar image shlock  ( 2021-03-07 08:14:24 -0500 )edit

@shlock I have added my dwa planner parameters, please check)

Yehor gravatar image Yehor  ( 2021-03-08 05:48:50 -0500 )edit

Sorry, I only asked you to share so that when someone more experienced saw the post they would have more info.

Have you checked the ros navigation tuning guide? It uses the DWA Planner and might help you.

shlock gravatar image shlock  ( 2021-03-09 02:45:22 -0500 )edit