Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add curvature limit to planner #7

Open
gerth2 opened this issue Oct 1, 2024 · 3 comments
Open

Add curvature limit to planner #7

gerth2 opened this issue Oct 1, 2024 · 3 comments
Milestone

Comments

@gerth2
Copy link
Contributor

gerth2 commented Oct 1, 2024

Currently, while navigating down local minima "troughs", the path planner will zig-zag across the gradient line.

It would be better if we smoothed these out. I propose to do that by imposing a maximum curvature - basically, given a certain direction of travel (from the current command), there is a maximum change in the angle of that direction of travel - the next-step logic needs to enforce this by not picking a next goal location which is at too great of an angle.

@gerth2
Copy link
Contributor Author

gerth2 commented Oct 1, 2024

Note: If this doesn't pan out... there is another more computationally-intensive option - basically, detect the rapid change in angle, and then take smaller steps until the oscillation subsides.

Detecting this is hard (maybe need to look for a zero crossing in the derivative of the force 😬 ?). Taking the smaller steps to find the real minima is potentially unbounded... and fraught, depending on how small our local minima end up being.

@gerth2 gerth2 added this to the Auto Drive milestone Oct 1, 2024
@gerth2
Copy link
Contributor Author

gerth2 commented Oct 2, 2024

From a coding perspective, and from an algorithm perspective (might be a good @schmile question), I think the smaller steps is probably the way to go.

Basically:

  1. At each step, use a for loop (with max iter) to take a fraction of a step
  2. Check if the result of taking that step has moved us at least one full step size away from the starting point
  3. repeat with another fraction of a step
  4. Report "stuck" if after max iterations we're done.

The big thing is that this will get kinda computationally intensive with lots of obstacles on the field

@schmile
Copy link

schmile commented Oct 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants