Rafael
If you exponentiate a mix of a translation and a rotation, the
easiest way to understand it is using the following formula for exp:
exp(x) = limit as n goes to infinity of (1+x/n) ^ n
or imagine taking a tiny step of 1/100 of your translation and
1/100 of your rotation and then repeat this 100 times (or whatever
big number you prefer). In other words the translation and
rotation get mixed up in each other.
Imagine exponentiating the vector (1,0,0,0,0,1) = 1 unit of
translation in the x direction and 1 unit of rotation around the z
axis. What you do is travel along a curved path that starts in the
x direction and is 1 unit long and curves through 1 radian in the x
- y plane. This is equivalent to a rotation of 1 radian about an
axis parallel to z through the point x=0, y=1.
Hope that helps your understanding
Tom
On Tue, Jun 23, 2009 at 4:10 PM, Rafael Spring
<address@hidden> wrote:
Hello gentlemen,
I am using TooN for a while now and I really appreciate it. Scope,
usability and speed are really great and I couldn't imagine working
without it.
However, today, I've had some weird behavior and I'm unsure if TooN
is supoosed to behave like that (Btw. I am using TooN beta3) or if
my understanding of SE3s is insufficient. The question boils down
to what happens to an input translation after exponentiating.
Consider the following sourcecode:
----
Vector<3> rotation = makeVector(0.4, 0.6, 0.15); //arbitrary
numbers..
Vector<3> translation = makeVector(-1, 0, 0.5); //arbitrary numbers..
Vector<6> mu;
mu.slice(0,3) = translation;
mu.slice(3,3) = rotation;
SE3<> se = SE3<>::exp(mu);
Vector<3> t = se.get_translation();
----
Now, I was expecting:
t == (-1, 0, 0.5)
following the assumption that a euclidean transformation by an SE3
equals to an orthogonal transformation (exp'ing the rotation part
of mu) + a translation.
The true value, however, is:
t == (-0.789750 , -0.19886, 0.734775)
So I reversed my assumption: It could be a translation by t
followed by an orthogonal transform (this would correspond to the
translation-part of mu being the inverse camera translation as seen
from camera 1 and get_translation() being the inverse translation
as seen from camera 2). This assumption, however, was neither
confirmed:
----
// make a rotation-only SE3
Vector<6> mu_ = mu;
mu_.slice(0,3) = makeVector(0,0,0);
SE3<> se_ = SE3<>::exp(mu_);
// make a translation-only SE3
Vector<6> mu__ = mu;
mu__.slice(3,3) = makeVector(0,0,0);
SE3<> se__ = SE3<>::exp(mu__);
// 1st translate then rotate
Vector3 t_ = (se_ * se__).get_translation();
// t_ == (-0.5293 , -0.412372 , 0.89431)
----
Now to the part beyond my understanding: The second assumption
holds (roughly) if I halve the rotation amount in mu:
----
Vector<6> mu_;
mu_.slice(0,3) = makeVector(0,0,0);
mu_.slice(3,3) = rotation / 2.0;
SE3<> se_ = SE3<>::exp(mu_); //se_ is half the rotation
Vector<6> mu__ = mu;
mu__.slice(3,3) = makeVector(0,0,0);
SE3<> se__ = SE3<>::exp(mu__); //se__ is only translation
Vector3 t__ = (se_ * se__).get_translation(); // 1st translate
then rotate
// t__ == (-0.8024 , -0.19517 , 0.75371)
// t__ is roughly == t
----
Is this within the general logic of SE3 members (am I missing
something?) or might there be something wrong with the SE3 class?
Thanks!
Rafael
_______________________________________________
Toon-members mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/toon-members
--
Dr T Drummond http://mi.eng.cam.ac.uk/
~twd20
Machine Intelligence Laboratory
Department of Engineering
University of Cambridge