yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00534
Re: [Yade-commits] r1455 - in trunk: core extra gui/py gui/qt3 lib/miniWm3 pkg/common/Engine/DeusExMachina pkg/common/Engine/StandAloneEngine
>> 1. DECREASED Mathr::ZERO_TOLERANCE to 1e-20 so that we don't get identity quaternions for small rotation in ToAxisAngle (!!)
>>
> What is that?!
> Rotations are rounded to identity if they "look" small enough? Strange...
> Does this change affect (in the good senses) other rotations computed in
> Yade?
>
I skimmed through the Wm3 code before and it seems that it is only in
ToAxisAngle that this was used: if the quaternion norm was <
ZERO_TOLERANCE, it was taken as identity. That was, for example, that
for a unit axis (0,0,1) the angle must have been greater than 1e-5 (now
we can go as far as 1e-8). I found it because I was assigning a rotation
in python (where Se3 is serialized as
(x,y,z,axis_x,axis_y,axis_z,angle)) but when I printed that rotation, it
was zero.
That check is necessary, since the calculation in ToAxisAngle divides by
the norm, which is (I think) zero for identity quaternion, which must be
therefore handled specially.
Regards, Vaclav
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev
References