rst-tu-dortmund / teb_local_planner

An optimal trajectory planner considering distinctive topologies for mobile robots based on Timed-Elastic-Bands (ROS Package)
http://wiki.ros.org/teb_local_planner
BSD 3-Clause "New" or "Revised" License
1.06k stars 550 forks source link

Add prevent_look_ahead_poses_near_goal to fix oscillation #332

Closed corot closed 2 years ago

corot commented 3 years ago

Never look ahead to the last few poses of the plan in order to prevent oscillating forward and backward over the goal when the xy_goal_tolerance is small. Specified by new parameter prevent_look_ahead_poses_near_goal whose default is zero.

Cherry-picked from #180 for melodic and without the additional reconfigurable parameters, to avoid cluttering the RQT tool. We can add one-by-one whatever parameters we find useful to, as we did with control_look_ahead_poses.

Thanks to @howardcochran for the contribution

bxc237 commented 2 years ago

@corot Hi, could you explain more about this value? Let's say control_look_ahead_poses was set to 3, what is the reasonable value for prevent_look_ahead_poses_near_goal?

corot commented 2 years ago

@corot Hi, could you explain more about this value? Let's say control_look_ahead_poses was set to 3, what is the reasonable value for prevent_look_ahead_poses_near_goal?

I cherry-picked from PR #180, where the problem is explained in more detail in your case, if u set prevent_look_ahead_poses_near_goal to 3, that means that lookahead pose will be the 3rd one except near the pose, that it will the 2nd, then 1st