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

🐛[BUG] - Remove excess injected points at the start of a path #152

Open
ssejrog opened this issue Jul 5, 2024 · 0 comments
Open

🐛[BUG] - Remove excess injected points at the start of a path #152

ssejrog opened this issue Jul 5, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ssejrog
Copy link
Member

ssejrog commented Jul 5, 2024

Point injecting should ignore the first few points.

From (0, 0) to (0, 24) in an injected pure pursuit, this would currently happen.

starting at (0, 0)
(0, 0.5)
(0, 1)
(0, 1.5)
(0, 2)
(0, 2.5)
...
(0, 23.5)
(0, 24)

It should instead do this, where 7 is LOOK_AHEAD.

starting at (0, 0) 
(0, 7)
(0, 7.5)
(0, 8)
(0, 8.5)
...
(0, 23.5
(0, 24)

I think this new behavior is better because it avoids excess iterations.

With spacing of 0.5 in the current system, an extra 140ms would pass before 0,7 becomes the target. This is 140ms of "slew" that's introduced. Exit conditions also rely on what the current target is, creating edge cases where additional time is added before the robot will exit.

@ssejrog ssejrog added the bug Something isn't working label Jul 5, 2024
@ssejrog ssejrog self-assigned this Jul 5, 2024
ssejrog added a commit that referenced this issue Jul 5, 2024
ssejrog added a commit that referenced this issue Jul 5, 2024
Fixed bug that I created in #152 where path smoothing would pull points down closer to the starting point.  Now there is an additional anchored point to prevent this.

Fixed segfault that #153 caused
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant