#include <iostream>
#include <cmath>
#include <Eigen/Core>
#include <Eigen/Geometry>
using namespace std;
int main ( int argc, char** argv )
{
cout << "hello-----" << endl;
cout.precision(3);
//旋转矩阵
Eigen::Matrix3d rotation_matrix = Eigen::Matrix3d::Identity();
cout << "rotation_matrix = \n" << rotation_matrix << endl;
//旋转向量(轴向量)
Eigen::AngleAxisd rotation_vector(M_PI/4, Eigen::Vector3d(0,0,1));
//轴向量 --> 旋转矩阵
cout << "rotation_matrix = \n" << rotation_vector.matrix() << endl;
rotation_matrix = rotation_vector.toRotationMatrix();
cout << "rotation_matrix = \n" << rotation_matrix << endl;
///
Eigen::Vector3d v(1,0,0)
#include <cmath>
#include <Eigen/Core>
#include <Eigen/Geometry>
using namespace std;
int main ( int argc, char** argv )
{
cout << "hello-----" << endl;
cout.precision(3);
//旋转矩阵
Eigen::Matrix3d rotation_matrix = Eigen::Matrix3d::Identity();
cout << "rotation_matrix = \n" << rotation_matrix << endl;
//旋转向量(轴向量)
Eigen::AngleAxisd rotation_vector(M_PI/4, Eigen::Vector3d(0,0,1));
//轴向量 --> 旋转矩阵
cout << "rotation_matrix = \n" << rotation_vector.matrix() << endl;
rotation_matrix = rotation_vector.toRotationMatrix();
cout << "rotation_matrix = \n" << rotation_matrix << endl;
///
Eigen::Vector3d v(1,0,0)