ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Regarding the dwa local planning algorithm, there is a large angular deviation or left-to-right deflection after reaching the target point?

asked 2021-12-06 01:45:43 -0600

mingyue gravatar image

updated 2021-12-06 19:57:21 -0600

Regarding the dwa local planning algorithm, there is a large angular deviation or left-to-right deflection after reaching the target point: image description

According to the figure above, the robot is from A to C, but in the simulation, the robot can stop accurately, but in reality, the robot will have a large directional deviation angle when it reaches point C, or it will move along at point C swing left and right.

Below are my DWA parameters:

dwa:
 max_vel_x: 0.8 
 min_vel_x: 0.0  
 max_vel_y: 0.0   
 min_vel_y: 0.0  
 max_vel_trans:  1.0
 min_vel_trans: 0.01 
 trans_stopped_vel: 0.02 
 max_vel_theta:  0.8 
 min_vel_theta: 0.1 
 theta_stopped_vel : 0.05   
 acc_lim_x: 1.0 
 acc_lim_theta: 1.0 
 acc_lim_y: 0.0    
 acc_lim_trans:  0.2
 meter_scoring: true        
 yaw_goal_tolerance: 0.1
 xy_goal_tolerance: 0.15
 latch_xy_goal_tolerance: false 
 sim_time: 1.2 
 sim_granularity: 0.025
 vx_samples: 10    
 vy_samples: 0.0      
 vth_samples: 20
 path_distance_bias: 32
 goal_distance_bias: 20
 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  # 0.05  
 publish_traj_pc : true 
 publish_cost_grid_pc: true   
 holonomic_robot: false
global_frame_id: odom
 map_frame: map
 controller_frequency: 5  
 controller_max_retries: 0
edit retag flag offensive close merge delete

Comments

  1. Which version of ros are you using?
  2. In your dwa config, what do you have yaw_goal_tolerance set to?
Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-12-06 07:21:35 -0600 )edit

I am using the melodic version of ros1. The value of my yaw_goal_tolerance is 0.15, and I increased it to 2, but occasionally the above problems may occur.

mingyue gravatar image mingyue  ( 2021-12-06 08:00:42 -0600 )edit

The dwa config file would be interessting. What mechanics does your base have, diff drive? Also, is only the real robot off or does rviz also show the deviation? There is a "latch_xy_goal_tolereance" paramter. Its defined as "If goal tolerance is latched, if the robot ever reaches the goal xy location it will simply rotate in place, even if it ends up outside the goal tolerance while it is doing so. " link Sounds close to what you seem to be describing.

Dragonslayer gravatar image Dragonslayer  ( 2021-12-06 08:32:14 -0600 )edit

Yes, mine is in differential drive mode, but when I adjust to 0.2, the problem still exists. Observing in rviz and actual conditions will find that the position of the robot is offset, or the robot cannot stop immediately at the target point.

mingyue gravatar image mingyue  ( 2021-12-06 19:47:29 -0600 )edit

"the robot cannot stop immediately at the target point" Are you just overshooting? Could it be that inertia is moving the robot off target then? I would suggest trying low max_vel_x (0.1 or so).

Dragonslayer gravatar image Dragonslayer  ( 2021-12-07 02:29:59 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-12-06 12:15:25 -0600

Mike Scheutzow gravatar image

updated 2021-12-06 12:24:56 -0600

It's not a good idea to set yaw_goal_tolerance so high. The DWA Planner is doing exactly what you asked for: the robot has reached the target when yaw is within ~120 degrees of the specified yaw goal.

edit flag offensive delete link more

Comments

Yes, mine is in differential drive mode, but when I adjust yaw_goal_tolerance to 0.2, the problem still exists. I have updated the DWA parameters to be in the above text

mingyue gravatar image mingyue  ( 2021-12-06 19:58:23 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2021-12-06 01:45:43 -0600

Seen: 139 times

Last updated: Dec 06 '21