Since each Eigen::Affine3d object indicates a special linear transformation, I want extract the rotation part and translation part separately. And I want to save the rotation part into an Eigne::Quaterniond and the translation part into an Eigen::Vector3d. How to realize that?
CodePudding user response:
Use the rotation() and translation() methods, like this.
Eigen::Affine3d a;
...
Eigen::Quaterniond q(a.rotation());
Eigen::Vector3d t(a.translation());