-
Notifications
You must be signed in to change notification settings - Fork 187
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
Incorrect conversion of Rodrigues from OpenCV #933
Comments
I wonder if it would be better to have OpenCV convert it to a 3x3 rotation matrix, and then use that to create the Rotation3d. Rotation matrices are very tightly defined, and I think WPILib has a constructor from one. |
I think the bug is that you are dividing by the norm() to normalize the vector. Looks to me like you could just use the existing constructor: |
Yes, it should be updated to use that |
Working this now |
I tested and it seemed to be good. Fixed my particular problem. |
In OpenCVHelp, the routine rvecToRotation() does not work if the input rvec is all 0.
If rvec = (0,0,0), this is a valid value which means "no rotation". The equivalent rotation matrix is the 3x3 identity. I checked this in Python with OpenCV directly. The current version produces a Rotation3d which is all "NaN".
I am seeing this in the simulation where the MultiTag results exactly produce a EstimatedPose with no rotation.
Build is latest from master branch. Running on Linux with the simulation.
The text was updated successfully, but these errors were encountered: