JohnTGZ/regulated_pure_pursuit_controller

Oscillations observed when reaching goal

Opened this issue · 6 comments

I currently have regulated pure pursuit running in simulation with a turtlebot3 in melodic. When I set a 2D nav goal the robot moves to the goal, but when it reaches the goal it begins to oscillate. If use_rotate_to_heading is set to true, the robot will oscillate rotating in place from left to right. If use_rotate_to_heading is set to false and allow_reversing is set to true, the robot will oscillate back and forth. Have you seen this behavior before?

Hi @gglaspell , thanks for submitting an issue! I will be testing this particular scenario to replicate the bug. Would be good if you could provide a short video of this too so I can observe said behaviour and fix it :)

purePursuit.zip
@JohnTGZ Please find included the videos showing to the two different oscillatory behaviors.

The oscillations appear to be consistent with the min_approach_linear_velocity. Also, I increased the goal_dist_tol all the way up to 1.0 and it still oscillates near the goal.

This is my yaml file:

RegulatedPurePursuitController:

  min_global_plan_complete_size: 20
  global_plan_prune_distance: 1.0

  lookahead_time: 1.5
  lookahead_dist: 0.6
  use_velocity_scaled_lookahead_dist: true
  min_lookahead_dist: 0.3
  max_lookahead_dist: 0.9

  use_rotate_to_heading: false
  rotate_to_heading_min_angle: 0.785
  rotate_to_heading_angular_vel: 1.8
  max_angular_accel: 1.5

  allow_reversing: true

  desired_linear_vel: 0.5
  max_angular_vel: 1.5
  min_approach_linear_velocity: 0.05

  use_regulated_linear_velocity_scaling: true
  regulated_linear_scaling_min_radius: 0.9
  regulated_linear_scaling_min_speed: 0.25

  use_cost_regulated_linear_velocity_scaling: true
  inflation_cost_scaling_factor: 3.0
  cost_scaling_dist: 0.6
  cost_scaling_gain: 1.0

  max_allowed_time_to_collision_up_to_carrot: 1.0

  goal_dist_tol: 1.0

  control_frequency: 10

  transform_tolerance: 0.5

Hi @gglaspell , sorry for the delay! Let me test it out, implement a fix and get back to you by the end of this week!

@JohnTGZ Did you solve this bug. Even I'm facing the same issue robot after reaching the goal it oscillates with angular vel about z of 0.16 rad/s as observed in /cmd_vel. Kindly let me know if this is fixed.

Hi @vaibhav02kadam and @gglaspell Sorry for the late response, I'm no longer working on making any active changes to this repository. I recommend that you migrate to ROS2 so that you can make use of the Nav2 stack where there will be lesser bugs and continual improvements. Regardless, thanks for using and testing out this package!