princeton-vl / lietorch

BSD 3-Clause "New" or "Revised" License
679 stars 50 forks source link

Question about the Euclidean embeddings #11

Closed xwjabc closed 2 years ago

xwjabc commented 2 years ago

Hi, thank you for your great work! Since I am new to the Lie groups and Lie algebra, I met some difficulties when reading the code:

  1. For SE(3) representation, the Euclidean embeddings (that is, the 7-dim vector from ToVec() function) has two parts: 3-dim translation and 4-dim quaternion (for rotation) (related code). When I tried to create a pose from the axis-angle representation (i.e. SE3.exp(axis_angle_rep)), this code multiplies left Jacobian with tau, which should correspond to the translation from axis-angle representation:

    Vector3 t = SO3<Scalar>::left_jacobian(phi) * tau;

    My question is, why should we multiply tau with left Jacobian of phi? Could you explain a little bit more on the connection between the Euclidean embeddings and axis-angle (or transformation matrix)? I found some webpage shows the connections among various representations but I think it still a bit unclear. Thanks!

xwjabc commented 2 years ago

Ah I found out the reason. The exponential function will apply to both tau and phi when converting to rotation matrix. The tau is not translation in the world coordinates.

zachteed commented 2 years ago

Hi, that's correct, the tau is in exponential coordinates, not world coordinates. If you take a look at this reference, https://ethaneade.com/lie_groups.pdf, what is being computing when calling SE3.exp is equal to the formula in section 9.4 (with the exception that I am using unit quaternions to represent rotation instead of matrices).

xwjabc commented 2 years ago

Hi Zach, thank you for your reply! This looks like a nice reference and I will carefully read it!