hyye / lio-mapping

Implementation of Tightly Coupled 3D Lidar Inertial Odometry and Mapping (LIO-mapping)
https://sites.google.com/view/lio-mapping
GNU General Public License v3.0
926 stars 322 forks source link

q_L and q_R typo in math_utils.h ? #69

Closed narutojxl closed 4 years ago

narutojxl commented 4 years ago

Hi @hyye thanks for your excellent work :)

Thanks for your help!

hyye commented 4 years ago

Hi @narutojxl, Thanks for your question. The conversion is all in Hamilton as Eigen's.

narutojxl commented 4 years ago

In joan's paper, his rotation is also Hamilton. 2020-06-19 17-53-44屏幕截图 In math_utils.h

template inline Eigen::Matrix<typename Derived::Scalar, 4, 4> LeftQuatMatrix(const Eigen::QuaternionBase &q) { Eigen::Matrix<typename Derived::Scalar, 4, 4> m; Eigen::Matrix<typename Derived::Scalar, 3, 1> vq = q.vec(); typename Derived::Scalar q4 = q.w(); m.block(0, 0, 3, 3) << q4 * I3x3 + SkewSymmetric(vq); m.block(3, 0, 1, 3) << -vq.transpose(); m.block(0, 3, 3, 1) << vq; m(3, 3) = q4; return m; } The code doesn't consistent with above definition?

hyye commented 4 years ago

I think it is exactly the same, except the order of the quaternion, right?

narutojxl commented 4 years ago

q_L in code is: 1

joan q_L is: 2

I don't understand why they are the same, right? :)

hyye commented 4 years ago

Since the orders of the coefficients are different. If you swap q_v and q_w, these two matrices are the same, right???

narutojxl commented 4 years ago

Hi @hyye, thanks for your patience with me :), thanks a lot !