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

Robot does not rotate in the desired/efficient direction

asked 2022-01-31 04:49:41 -0500

aravindsaiUR gravatar image

updated 2022-02-01 03:13:34 -0500

I am using DWA_plannar and move_base in my robot. There are 2 ToF sensors and couple laser scanners attached to the robot. The robot reaches the goal and moves without any issuse but sometimes or rather often it rotates randomly and it rotates in an inefficient direction.

TrajectoryPlannerROS:
  acc_lim_x: 2
  acc_lim_y: 0.0
 acc_lim_theta:  2.0

 max_vel_x: 0.3
 min_vel_x: 0.05
 max_rotational_vel: 0.75

 max_vel_theta: 0.4
 min_vel_theta: -0.4
 min_in_place_vel_theta: 0.32

 holonomic_robot: false
 escape_vel: -0.1

 # Goal Tolerance Parameters
 yaw_goal_tolerance: 0.09
 xy_goal_tolerance: 0.1
 latch_xy_goal_tolerance: false

 # Forward Simulation Parameters
 sim_time: 4.0
 sim_granularity: 0.35
 angular_sim_granularity: 0.07
 vx_samples: 12
 vtheta_samples: 50
 controller_frequency: 20.0

 # Trajectory scoring parameters
 meter_scoring: true
 occdist_scale:  0.02 
 pdist_scale: 1.6  
 gdist_scale: 0.8 

 heading_lookahead: 2.0 
 heading_scoring: true
 heading_scoring_timestep: 2.0 
 dwa: true
 simple_attractor: false
 publish_cost_grid_pc: true

 #Oscillation Prevention Parameters
 oscillation_reset_dist: 0.1 
 escape_reset_dist: 0.2
 escape_reset_theta: 0.1

DWAPlannerROS:
 publish_traj_pc: true           
 global_frame_id: map               
 max_vel_y: 0
 min_vel_y: 0
 acc_lim_y: 0
 vy_samples: 0

 max_vel_trans: 0.4
 min_vel_trans: 0.0
 max_vel_x: 0.4
 min_vel_x: 0.0
 max_vel_theta: 0.6
 min_vel_theta: 0.1
 acc_lim_x: 0.8
 acc_lim_theta: 2.66

The question is similar to this. Generally the planning and direction of movement to the goal is fine but sometimes the robot starts rotating and the rotation is not so efficient. For example, rotate 270 degrees to the right instead of just 90 to the left. Eventually it reaches the goal but not so efficiently. I am considering changing/tuning Goal tolerance or Forward Simulation or Trajectory Scoring params but I don't know the right way to tune them since one params influence the other.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2022-01-31 06:42:43 -0500

ljaniec gravatar image

updated 2022-01-31 18:06:37 -0500

This ROS Navigation Tuning Guide could help you with tuning.

Especially the part in 1.3 Setting minimum values

"Setting minimum velocity is not as formulaic as above. For minimum translational velocity, we want to set it to a large negative value because this enables the robot to back off when it needs to unstuck itself, but it should prefer moving forward in most cases. For minimum rotational velocity, we also want to set it to negative (if the parameter allows) so that the robot can rotate in either directions. Notice that DWA Local Planner takes the absolute value of robot’s minimum rotational velocity."

I think that the rotations you have observed are a part of 6 Recovery behaviors:

6 Recovery Behaviors

An annoying thing about robot navigation is that the robot may get stuck. Fortunately, the navigation stack has recovery behaviors built-in. Even so, sometimes the robot will exhaust all available recovery behaviors and stay still. Therefore, we may need to figure out a more robust solution.

Types of recovery behaviors ROS navigation has two recovery behaviors. They are clear costmap recovery and rotate recovery. Clear costmap recovery is basically reverting the local costmap to have the same state as the global costmap. Rotate recovery is to recover by rotating 360 degrees in place.

image description

edit flag offensive delete link more

Comments

Thanks for the feeback but it seems that I don't have recovery behavior enabled. The robot just stop moving if it got stuck. So I guess the recovery behavior does not influence this rotation.

aravindsaiUR gravatar image aravindsaiUR  ( 2022-02-01 04:17:41 -0500 )edit

Maybe it is effect of the oscillation suppresion? You can try to play with oscillation_reset_dist and check if it helps

ljaniec gravatar image ljaniec  ( 2022-02-01 04:48:45 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-01-31 04:49:41 -0500

Seen: 534 times

Last updated: Feb 01 '22