Using more of Eigen geometry

Issue #138 new
Frank Dellaert created an issue

I have looked into the geometry part of Eigen a bit and am wondering whether we could perhaps replace Rot3 with a typedef to Eigen's Rotation or Quaterion class (depending on the flag). This was impossible in 3.X, but for 4.0 we should be able to optimize for arbitrary classes, provided we endow them with gtsam::traits.

@lvzhaoyang , once the traits stuff and new Values really works, make you could do an experimental branch to see what we gain (in speed as well as removed duplicated code).

According to roadmap, this will now focus on rotations only.

Comments (6)

  1. Zhaoyang Lv

    No problem. I also want to explore more into this feature.

    One more thing. A lot of Eigen users like to use Eigen::Isometry (in eigen geometry) to describe transforms. Is there a similar feature in Gtsam or something we want to incorporate in the future?

  2. Zhaoyang Lv

    I just put some comments about what I learned about Eigen geometry, as a reminder.

    I think the Transform class has all what we need for our Homogeneous geometry, which has is already generic enough to be affine transform, projective transform, etc.

    • Rot3 class we have is 3*3 Transform

    • Point3 class is a 3*1 Transform

    • One of the major thing I like Eigen is that the homogeneous geometry is so heavily used in multi-view geometry, and Eigen has already built a mathematical concrete implementation over most of them. It has all the transform, except Similarity transform (but we will have similarity factor).

    On the other hand, we need some for common lie group geometry, SO3, SO2, SE3, SE2, Sim3, etc. Then

    • Pose3 is a Transform in eigen, and also SE3

    • Rot3 is a Transform 3*3 in eigen, and also SO3

    We just need to make Rot3, Point3 be a wrapper for lie group geometry and Eigen::Transform, then we can embrace all the features in lie group and eigen.

  3. Frank Dellaert reporter

    Hmmm. This merits more discussion. But thanks for looking into it. It would be nice to have some timing info on transforming points from frame to frame, between us and Eigen...

  4. Log in to comment