当前位置:网站首页>[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
边栏推荐
- Flet教程之 09 NavigationRail 基础入门(教程含源码)
- Deep learning plus
- "21 days proficient in typescript-3" - install and build a typescript development environment md
- Solve cmakelist find_ Package cannot find Qt5, ECM cannot be found
- Jarvis OJ Webshell分析
- Solution of vant tabbar blocking content
- What is ROM
- composer安装报错:No composer.lock file present.
- [brush title] goose factory shirt problem
- 文件操作--I/O
猜你喜欢

Win11如何给应用换图标?Win11给应用换图标的方法

Seaborn draws 11 histograms

清晰还原31年前现场,火山引擎超清修复Beyond经典演唱会

Domestic API management artifact used by the company
![[team PK competition] the task of this week has been opened | question answering challenge to consolidate the knowledge of commodity details](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[team PK competition] the task of this week has been opened | question answering challenge to consolidate the knowledge of commodity details

机器学习编译第2讲:张量程序抽象

Jarvis OJ shell流量分析

【刷题篇】鹅厂文化衫问题

Data access - entityframework integration

Benji Banas membership pass holders' second quarter reward activities update list
随机推荐
【刷题篇】鹅厂文化衫问题
C# TCP如何限制单个客户端的访问流量
Basic introduction to the control of the row component displaying its children in the horizontal array (tutorial includes source code)
Detailed explanation of use scenarios and functions of polar coordinate sector diagram
飞桨EasyDL实操范例:工业零件划痕自动识别
File operation --i/o
Google Earth Engine(GEE)——Kernel核函数简单介绍以及灰度共生矩阵
调查显示传统数据安全工具面对勒索软件攻击的失败率高达 60%
Cs231n notes (bottom) - applicable to 0 Foundation
Is it safe to open a securities account by mobile phone? Detailed steps of how to buy stocks
Twig数组合并的写法
[es6] add if judgment or ternary operator judgment in the template string
Dare not buy thinking
【刷題篇】鹅廠文化衫問題
【 brosser le titre 】 chemise culturelle de l'usine d'oies
Seaborn draws 11 histograms
How was the middle table destroyed?
Spring Festival Limited "forget trouble in the year of the ox" gift bag waiting for you to pick it up~
浏览器渲染原理以及重排与重绘
Jarvis OJ 简单网管协议