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

Issue in calcMaxAccel? #218

Open
scarmain opened this issue Aug 7, 2024 · 2 comments
Open

Issue in calcMaxAccel? #218

scarmain opened this issue Aug 7, 2024 · 2 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@scarmain
Copy link

scarmain commented Aug 7, 2024

I was looking over the calculations in SwerveMath.calcMaxAccel(), and I think there might be a problem in the logic. When you check the reference wheel based on the angle, not all the wheels are selected, the front left is used twice, and back right is never used. Is this the intended functionality? (The math is a little over my head what the proper fix could be)

https://github.com/BroncBotz3481/YAGSL/blob/89e41639515e64865a23ff8c33107c1e00807e45/swervelib/math/SwerveMath.java#L214

(note, moved from BroncBotz3481/YAGSL#67 , although I find it weird this is not an example issue and instead a "core" problem)

@scarmain
Copy link
Author

scarmain commented Aug 7, 2024

From @thenetworkgrinch

This is indeed intended functionality. However it is not the right functionality. I implemented this with square and rectangular robots in mind. If anyone uses a triangular robot this may suddenly become a problem (but might not if front left is the center module).

On the flipside if anyone who wants to use YAGSL with a triangular chassis, I will probably fix this the same day.

@scarmain
Copy link
Author

scarmain commented Aug 7, 2024

I just want to add, I know of several "unique" robots that would break this theory, 2481's 5 wheel swerve in 2022, and 9312's TurdSwerve that uses 2 powered swerve wheels to drive. (that robot you could probably put in a second configuration with 2 fake wheels to simulate the chassis easily)

EDIT: Just remembered 5 powered wheeled robots are probably a thing of the past with the 4 propulsion motor limit.

@thenetworkgrinch thenetworkgrinch added bug Something isn't working wontfix This will not be worked on labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants