eigen 编译_头条 | 使用eigen实现四元数、欧拉角、旋转矩阵、旋转向量间的转换...
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                eigen 编译_头条 | 使用eigen实现四元数、欧拉角、旋转矩阵、旋转向量间的转换...
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.                        
                                
                            
                            
                            點擊上方藍字,關(guān)注本公眾號,獲得更多資源上一篇文章介紹了四元數(shù)、歐拉角、旋轉(zhuǎn)矩陣、軸角如何相互轉(zhuǎn)換,本篇文章介紹如何用eigen來實現(xiàn)。
                        
                        
                        旋轉(zhuǎn)向量
1,初始化旋轉(zhuǎn)向量:旋轉(zhuǎn)角為alpha,旋轉(zhuǎn)軸為(x,y,z)Eigen::AngleAxisd rotation_vector(alpha,Vector3d(x,y,z))2,旋轉(zhuǎn)向量轉(zhuǎn)旋轉(zhuǎn)矩陣Eigen::Matrix3d rotation_matrix;rotation_matrix=rotation_vector.matrix();Eigen::Matrix3d rotation_matrix;rotation_matrix=rotation_vector.toRotationMatrix();3,旋轉(zhuǎn)向量轉(zhuǎn)歐拉角(Z-Y-X,即RPY)Eigen::Vector3d eulerAngle=rotation_vector.matrix().eulerAngles(2,1,0);4,旋轉(zhuǎn)向量轉(zhuǎn)四元數(shù)Eigen::Quaterniond?quaternion(rotation_vector);Eigen::Quaterniond quaternion;quaternion=rotation_vector;旋轉(zhuǎn)矩陣
1,初始化旋轉(zhuǎn)矩陣
Eigen::Matrix3d rotation_matrix;rotation_matrix<2,旋轉(zhuǎn)矩陣轉(zhuǎn)旋轉(zhuǎn)向量Eigen::AngleAxisd?rotation_vector(rotation_matrix);Eigen::AngleAxisd rotation_vector;rotation_vector=rotation_matrix;Eigen::AngleAxisd rotation_vector;rotation_vector.fromRotationMatrix(rotation_matrix);3,旋轉(zhuǎn)矩陣轉(zhuǎn)歐拉角(Z-Y-X,即RPY)Eigen::Vector3d eulerAngle=rotation_matrix.eulerAngles(2,1,0);4,旋轉(zhuǎn)矩陣轉(zhuǎn)四元數(shù)Eigen::Quaterniond?quaternion(rotation_matrix);Eigen::Quaterniond quaternion;quaternion=rotation_matrix;歐拉角
1,初始化歐拉角(Z-Y-X,即RPY)Eigen::Vector3d eulerAngle(yaw,pitch,roll);2, 歐拉角轉(zhuǎn)旋轉(zhuǎn)向量Eigen::AngleAxisd rollAngle(AngleAxisd(eulerAngle(2),Vector3d::UnitX()));Eigen::AngleAxisd pitchAngle(AngleAxisd(eulerAngle(1),Vector3d::UnitY()));Eigen::AngleAxisd yawAngle(AngleAxisd(eulerAngle(0),Vector3d::UnitZ())); Eigen::AngleAxisd rotation_vector;rotation_vector=yawAngle*pitchAngle*rollAngle;3,歐拉角轉(zhuǎn)旋轉(zhuǎn)矩陣Eigen::AngleAxisd rollAngle(AngleAxisd(eulerAngle(2),Vector3d::UnitX()));Eigen::AngleAxisd pitchAngle(AngleAxisd(eulerAngle(1),Vector3d::UnitY()));Eigen::AngleAxisd yawAngle(AngleAxisd(eulerAngle(0),Vector3d::UnitZ())); Eigen::Matrix3d?rotation_matrix;rotation_matrix=yawAngle*pitchAngle*rollAngle;4,歐拉角轉(zhuǎn)四元數(shù)Eigen::AngleAxisd rollAngle(AngleAxisd(eulerAngle(2),Vector3d::UnitX()));Eigen::AngleAxisd pitchAngle(AngleAxisd(eulerAngle(1),Vector3d::UnitY()));Eigen::AngleAxisd yawAngle(AngleAxisd(eulerAngle(0),Vector3d::UnitZ())); Eigen::Quaterniond quaternion;quaternion=yawAngle*pitchAngle*rollAngle;四元數(shù)
1,初始化四元數(shù)
Eigen::Quaterniond quaternion(w,x,y,z);2,四元數(shù)轉(zhuǎn)旋轉(zhuǎn)向量Eigen::AngleAxisd?rotation_vector(quaternion);Eigen::AngleAxisd rotation_vector;rotation_vector=quaternion;3,四元數(shù)轉(zhuǎn)旋轉(zhuǎn)矩陣Eigen::Matrix3d?rotation_matrix;rotation_matrix=quaternion.matrix();Eigen::Matrix3d rotation_matrix;rotation_matrix=quaternion.toRotationMatrix();4,四元數(shù)轉(zhuǎn)歐拉角(Z-Y-X,即RPY)Eigen::Vector3d eulerAngle=quaternion.matrix().eulerAngles(2,1,0);-?END?-
關(guān)注本公眾號,獲得更多的“自動駕駛”算法原創(chuàng)干貨,幫你快速入行關(guān)注本公眾號,點擊“入群”,加入深度學習技術(shù)群,熱心大佬幫你答疑解惑自動駕駛歷史文章閱讀
資料下載:2019自動駕駛資料大放送
7天,搞定機器學習基礎知識
人工智能相關(guān)資料
頭條 | 高定位精度的交通標志識別----開源了
頭條?|?COVID-19?CT數(shù)據(jù)庫下載
激光雷達(Lidar)相關(guān):主要涉及l(fā)idar的目標檢測方法分析、融合感知方法分析、如何從點云做end-to-end目標軌跡預測、模型加速與工程化頭條?|?自動駕駛多傳感器融合技術(shù)淺析一文覽盡“基于激光雷達點云(lidar)的目標檢測方法”頭條?|?自動駕駛環(huán)境感知技術(shù)要點淺析頭條?|?深度學習模型inference優(yōu)化之編譯優(yōu)化頭條 | Fast and Furious,速度與激情?圖像相關(guān):涉及了目標檢測與分割、網(wǎng)絡結(jié)構(gòu)設計與模型加速。從基礎的知識點出發(fā),幫你一步一步理解方法,加深印象。輕量(高效)目標檢測網(wǎng)絡結(jié)構(gòu)設計mask rcnn 與 PointRend一文讀懂RPN和ROI AlignCNN中的感受野目標檢測中的Anchor分析行業(yè)信息:梳理行業(yè)大事件,幫你了解行業(yè)的發(fā)展狀況。主要車企和造車新勢力自動駕駛傳感器配置方案福特開源1.8TB自動駕駛數(shù)據(jù),到底開源數(shù)據(jù)哪家強?這個冬天不太冷:小馬5億美元,馭勢獲博士領投,waymo22.5億美元
以上相關(guān)方法,后續(xù)會對照代碼再次回憶,關(guān)注公眾號,敬請留意。總結(jié)
以上是生活随笔為你收集整理的eigen 编译_头条 | 使用eigen实现四元数、欧拉角、旋转矩阵、旋转向量间的转换...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: vb mysql 教程_VB6 数据库
- 下一篇: Running Hero.
