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

interp crashes #5

Closed
bzinberg opened this issue Nov 12, 2021 · 0 comments · Fixed by #6
Closed

interp crashes #5

bzinberg opened this issue Nov 12, 2021 · 0 comments · Fixed by #6

Comments

@bzinberg
Copy link
Contributor

bzinberg commented Nov 12, 2021

Update: This was actually caused by JuliaGeometry/Rotations.jl#198, and is fixed by #8.

Example:

import PoseComposition as PC
import Rotations
​
orn1 = Rotations.RotMatrix{3}([   0.9999999999999996  -6.842277657836019e-49   3.138284443744863e-81;
                               6.842277657836019e-49      0.9999999999999996  -9.173215705886437e-33;
                               3.138284443744863e-81   9.173215705886437e-33      0.9999999999999996])
orn2 = Rotations.RotMatrix{3}([0.9999999999999993                 0.0                 0.0;
                                              0.0  0.9999999999999993                 0.0;
                                              0.0                 0.0  0.9999999999999993])
PC.interp(PC.Pose([0, 0, 0], orn1), PC.Pose([0, 0, 0], orn2), 1/6)

On my laptop, this gives

Pose⟨pos=[0.0, 0.0, 0.0], orientation=(w=1.0, x=3.822173210786016e-33, y=-2.3408381773461e-97, z=2.8509490240983425e-49)⟩

On the EC2 instance here, it gives

ERROR: DimensionMismatch("No precise constructor for Rotations.Rotation{3, T} where T found. Length of input was 9.")

I should check in more detail that this error is really coming from NaNs. Assuming yes, then the fix is probably to replace this exact-equality check

# TODO: Once https://github.com/JuliaGeometry/Rotations.jl/issues/126 is
# fixed, this special case won't be necessary
if t == 0 || q == one(UnitQuaternion) || q == -one(UnitQuaternion)
return one(UnitQuaternion)
end

with an approximate-equality check.

bzinberg added a commit that referenced this issue Nov 12, 2021
@bzinberg bzinberg changed the title System-dependent numerics issue: interp gives NaNs, despite existing workaround interp crashes Nov 13, 2021
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

Successfully merging a pull request may close this issue.

1 participant