yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02134
Re: How se3 and ori is stored
> Thanks, Vaclav. So, orientation is stored as [q0,q1,q2,q3] but
> printed for the user as [ [axisX,axisY,axisZ],angle]. Now I
> understand.
>
> There is one more confusion. The following was from the archive. The
> one in bold confuses me. Is se3 stored as [[X,Y,Z],[q0,q1,q2,q3]]?
Ah, ok. That is historical. XML serialization stores se3 as 7 floats (3
for position, 3 for axis, 1 for angle) and till about last spring,
python was (ab)using serialization to access attributes.
You could still see this notation inside the xml files. With the advent
of State, it is not State::se3 that is serialized (although it is what
really holds the data), but rather pos and ori separately (which are
merely references to se3::{position,orientation}); we wanted to get rid
of se3, but it is more difficult than I thought, since quite often it is
used to pass both position and orientation around; therefore it was kept
in this way. I don't know of any se3 attribute that is serialized from
the top of my head.
In Python, se3 type doesn't exist at all, it is transparently converted
from/to (Vector3,Quaternion) tuple.
Cheers, Vaclav
(PS as you might noted, I did some long-perpared renames a few moments
back, hoping that Sunday night is the right moment; hope it doesn't
conflict with what you do now.)
Follow ups
References