您当前的位置: 首页 >  矩阵

惊鸿一博

暂无认证

  • 1浏览

    0关注

    535博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

矩阵运算_Eigen使用_旋转矩阵/角轴/欧拉角/四元数相互转换

惊鸿一博 发布时间:2020-04-29 22:54:40 ,浏览量:1

1 旋转矩阵/角轴/欧拉角/四元数相互转换 1.1 文件结构

1.2 CMakeLists.txt
cmake_minimum_required( VERSION 2.8 )
project( geometry )

# 添加Eigen头文件
include_directories( "/usr/include/eigen3" )

add_executable( eigenGeometry eigenGeometry.cpp )
1.3 eigenGeometry.cpp
#include 
#include 
using namespace std;

#include 
// Eigen 几何模块
#include 

/****************************
* 本程序演示了 Eigen 几何模块的使用方法
****************************/

int main ( int argc, char** argv )
{
    // Eigen/Geometry 模块提供了各种旋转和平移的表示
    // 3D 旋转矩阵直接使用 Matrix3d 或 Matrix3f
    Eigen::Matrix3d rotation_matrix = Eigen::Matrix3d::Identity();
    // 旋转向量使用 AngleAxis, 它底层不直接是Matrix,但运算可以当作矩阵(因为重载了运算符)
    Eigen::AngleAxisd rotation_ve
关注
打赏
1663399408
查看更多评论
立即登录/注册

微信扫码登录

0.0409s