leggedrobotics / se2_navigation

Pure Pursuit Control and SE(2) Planning
BSD 3-Clause "New" or "Revised" License
442 stars 84 forks source link

Fails to compute lookahead point #3

Closed djud closed 3 years ago

djud commented 3 years ago

I noticed that the computation of the lookahead point fails, if the waypoints are too far spread out. Introducing intermediate points mitigates the problem.

Below are two images to illustrate the problem. They contain the illustrations as provided by this package (path waypoints in green, lookahead/anchor point in yellow and the robot state as a yellow arrow).

The error message for the failure case is:

[ INFO] [1600849981.064074339, 10.961000000]: [ExcavationStateMachine::run] Excavation state: driving Going to driving state (received plan) AckermannSteeringController: Failed to compute lookahead point. [ERROR] [1600849981.064469624, 10.961000000]: [PurePursuitController::run] Failed to advance path tracker.

Fail

Success

jelavice commented 3 years ago

@djud Thanks for pointing this out. This PR should address the issue. Could you please verify that it indeed fixes the problem? Thanks, E.

djud commented 3 years ago

@jelavice Yes, this fixes the problem when the waypoints are sparse.