-
Notifications
You must be signed in to change notification settings - Fork 162
Add Empty Translation Checks #911
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
Conversation
|
This needs to be added to Java and C++ as well. There is also an identical location that needs this check in the reverse accel pass method. Also, can you check for a 0,0 translation by checking if the norm is <= 1E-6 instead of equality? This will match the implementation of this check for other locations in the library. |
|
I have added checks to Java and C++ with the recommended implementation. It has also been added to the reverse accel pass as well. |
|
Looks like build is failing just for some unit stuff. You just need to add an extra To fix formatting, you can do |
|
Also, can you replace usages of |
|
@mjansen4857 added your requested changes. Hopefully that was the only syntax error for C++, I'm having issues with VS Code finding the header files. 😅 |
On robot initialization, the console output would have the following warning occasionally:
Error at `anonymous-namespace'::WPILibMathShared::ReportErrorV: Error: x and y components of Rotation2d are zeroAfter some print debugging, I found this was caused by forceVec being an empty Translation2d. This simply adds a check for the forceVec Translation2d to avoid sending warnings to the console.
This only updates PPLib Python, I'm unaware if this issue is present in other languages.