#include
#include
#include
#include
#include
using
namespace std;
#define m_pi 3.14159265358979323846
intmain
(int argc,
char
** ar**)
結果為:
rotation_vector axis =00
1 rotation_vector angle =
0.785398
rotation matrix =
0.707
-0.707
00.707
0.70700
01四元數輸出方法1:quaternion =
00.383
0.924
0四元數輸出方法2:
x =0 y =
0.383
z =0.924
w =0euler: yaw pitch roll =
0.78539800
旋轉向量轉化為旋轉矩陣方法1:rotation matrix =
0.707107
-0.707107
00.707107
0.70710700
01旋轉向量轉化為旋轉矩陣方法2:rotation matrix =
0.707107
-0.707107
00.707107
0.70710700
01旋轉向量轉化為四元數:quaternion =00
0.382683
0.92388
旋轉矩陣轉化為旋轉向量:rotation_vector axis =00
1 rotation_vector angle =
0.785336
旋轉矩陣直接給旋轉向量賦值初始化:rotation_vector axis =00
1 rotation_vector angle =
0.785336
旋轉矩陣轉化為尤拉角:yaw pitch roll =
00.785398
0旋轉矩陣轉化為四元數:quaternion =00
0.382638
0.923851
四元數轉化為旋轉向量:rotation_vector axis =00
1 rotation_vector angle =
0.785336
四元數轉化為旋轉矩陣方法1:rotation matrix =
0.707177
-0.707
00.707
0.70717700
01四元數轉化為旋轉矩陣方法2:rotation matrix =
0.707177
-0.707
00.707
0.70717700
01transform matrix =
0.707151
-0.70706301
0.707063
0.70715102
0013
0001
歐氏變化矩陣提取旋轉矩陣:rotation_matrix =
0.707151
-0.707063
00.707063
0.70715100
01歐氏變化矩陣提取平移向量:translation =12
3
Eigen 四元數 尤拉角 旋轉矩陣 旋轉向量
一 旋轉向量 1.0 初始化旋轉向量 旋轉角為alpha,旋轉軸為 x,y,z eigen angleaxisd rotation vector alpha,vector3d x,y,z 1.1 旋轉向量轉旋轉矩陣 eigen matrix3d rotation matrix rotation ma...
方向向量轉尤拉角 旋轉矩陣 四元數
基於eigen庫實現演算法中的矩陣運算。輸入 方向向量vector3d tmpvec,參考單位向量vector3d zaxis 0,0,1 輸出 旋轉矩陣m eigen matrix3d m eigen vector3d zaxis 0,0,1 eigen vector3d tmpvec vx,vy...
Eigen 旋轉向量與旋轉矩陣(用法)
1 旋轉矩陣 旋轉向量 eigen angleaxisd rotation vector2 rotation vector2.fromrotationmatrix rotation matrix2 或者 eigen angleaxisd rotation vector2 rotation matri...