首页 > 编程知识 正文

eigen欧拉角转四元数,eigen旋转矩阵转欧拉角

时间:2023-05-05 10:47:47 阅读:248451 作者:2987

 本程序演示如何进行欧拉变换过程中,T矩阵的构建。

#include <iostream>#include <Eigen/Core>#include <Eigen/Geometry>using namespace std;int main(){ Eigen::AngleAxisd rotation_vector(M_PI/4, Eigen::Vector3d(2,1,0)); cout << rotation_vector.matrix() << endl << endl; Eigen::Isometry3d T(rotation_vector); // 此处也可以用rotaition_matrix 以及 四元数q Eigen::Vector3d t1(1,2,0); // 平移 T.pretranslate(t1);// Eigen::Matrix3d rotation1 = T;// cout << rotation1 << endl << endl ; cout << T.matrix() << endl << endl; return 0;}

 

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。