当前位置:网站首页>[first lecture on robot coordinate system]
[first lecture on robot coordinate system]
2022-07-05 16:56:00 【Xiaoqiu slam practical tutorial】
// The solution is the transformation matrix from the world coordinate system to the camera coordinate system
cv::Mat Tcw = mpTracker->GrabImageRGBD(im,depthmap,timestamp);
// The saved track is the transformation matrix from the camera coordinate system to the world coordinate system
// Change the point installation under the camera coordinate system to the world coordinate system
mRcw = mTcw.rowRange(0,3).colRange(0,3);
mRwc = mRcw.t();
mRwc * x3Dc + -mRwc*mTcw.rowRange(0,3).col(3);

If the angle is negative , Right hand rule


Robot coordinate system Right handed coordinate system Red front x Green left y On the blue z
x+ to forward, y+ to left, z+ to up
q.setRPY(0, M_PI/2, -M_PI/2); // -0 90 -90 Go around first z Axial negative 90 degree Rewind y Axial alignment 90 degree Finally around x pivot 0 degree
// Rotation matrix
Eigen::Matrix3d rotation_matrix3d;
// Around the Z Shaft rotation 45 The rotation matrix of degrees sin45 = cos45 = 0.707107
rotation_matrix3d << cos45, -sin45, 0,
sin45, cos45, 0,
0, 0, 1;
rotation_matrix3d << 0.707107, -0.707107, 0,
0.707107, 0.707107, 0,
0, 0, 1;
std::cout << "rotation_matrix =\n" << rotation_matrix << std::endl;
/* * rotation_matrix = * 0.707107 -0.707107 0 * 0.707107 0.707107 0 * 0 0 1 */
// 2. The rotation matrix is converted to Euler angle ,"2" represents the z axis , "0" x axis, "1" y axis
Eigen::Vector3d euler_angle = rotation_matrix3d.eulerAngles(2, 1, 0);// z y x
std::cout << " Around the z The rotation angle of the axis is " << euler_angle.z() * 180 / M_PI << std::endl;
std::cout << " Around the y The rotation angle of the axis is " << euler_angle.y() * 180 / M_PI << std::endl;
std::cout << " Around the x The rotation angle of the axis is " << euler_angle.x() * 180 / M_PI << std::endl;
tf_camera_rotation.getEulerYPR(z,y,x);
std::cout << "zb " << z << " yb " << y << " xb " << x << std::endl; // rotation_matrix3d.x() -1.57062 rotation_matrix3d.y() -0.000116255 rotation_matrix3d.z() -1.57072
边栏推荐
猜你喜欢

PHP人才招聘系统开发 源代码 招聘网站源码二次开发

Etcd 构建高可用Etcd集群

Flet教程之 09 NavigationRail 基础入门(教程含源码)

Clear restore the scene 31 years ago, volcanic engine ultra clear repair beyond classic concert

Basic introduction to the control of the row component displaying its children in the horizontal array (tutorial includes source code)

Jarvis OJ shell traffic analysis

Scratch colorful candied haws Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022

浏览器渲染原理以及重排与重绘

文件操作--I/O
![[brush title] goose factory shirt problem](/img/c8/44496c767a778101cf3982bd911933.png)
[brush title] goose factory shirt problem
随机推荐
Explain in detail the functions and underlying implementation logic of the groups sets statement in SQL
【剑指 Offer】66. 构建乘积数组
What is the difference between EDI license and ICP business license
Jarvis OJ Flag
Flet教程之 11 Row组件在水平数组中显示其子项的控件 基础入门(教程含源码)
PHP人才招聘系统开发 源代码 招聘网站源码二次开发
挖财股票开户安全吗?怎么开股票账户是安全?
Scratch colorful candied haws Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
Accès aux données - intégration du cadre d'entité
【刷题篇】有效的数独
Explain in detail the functions and underlying implementation logic of the groups sets statement in SQL
Learnopongl notes (I)
Fleet tutorial 09 basic introduction to navigationrail (tutorial includes source code)
精准防疫有“利器”| 芯讯通助力数字哨兵护航复市
如何将mysql卸载干净
Bs-xx-042 implementation of personnel management system based on SSM
Keras crash Guide
Apple has abandoned navigationview and used navigationstack and navigationsplitview to implement swiftui navigation
composer安装报错:No composer.lock file present.
Google Earth Engine(GEE)——Kernel核函数简单介绍以及灰度共生矩阵