当前位置:网站首页>[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
边栏推荐
- Jarvis OJ 简单网管协议
- Flet tutorial 12 stack overlapping to build a basic introduction to graphic and text mixing (tutorial includes source code)
- 美国芯片傲不起来了,中国芯片成功在新兴领域夺得第一名
- 调查显示传统数据安全工具面对勒索软件攻击的失败率高达 60%
- Android 隐私沙盒开发者预览版 3: 隐私安全和个性化体验全都要
- 【刷題篇】鹅廠文化衫問題
- 中间表是如何被消灭的?
- [es6] 模板字符串内添加if判断或添加三元运算符判断
- Solve cmakelist find_ Package cannot find Qt5, ECM cannot be found
- Data access - entityframework integration
猜你喜欢

Desci: is decentralized science the new trend of Web3.0?

Domestic API management artifact used by the company

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

Summary of PHP pseudo protocol of cisp-pte

Jarvis OJ shell traffic analysis

BS-XX-042 基于SSM实现人事管理系统

Flet教程之 11 Row组件在水平数组中显示其子项的控件 基础入门(教程含源码)

npm安装

Android privacy sandbox developer preview 3: privacy, security and personalized experience

清晰还原31年前现场,火山引擎超清修复Beyond经典演唱会
随机推荐
tf. sequence_ Mask function explanation case
DenseNet
Enter a command with the keyboard
[deep learning] [original] let yolov6-0.1.0 support the txt reading dataset mode of yolov5
Get ready for the pre-season card game MotoGP ignition champions!
[61dctf]fm
Jarvis OJ shell traffic analysis
tf.sequence_mask函数讲解案例
Jarvis OJ Flag
什么是ROM
Apple 已弃用 NavigationView,使用 NavigationStack 和 NavigationSplitView 实现 SwiftUI 导航
解决CMakeList find_package找不到Qt5,找不到ECM
If you can't afford a real cat, you can use code to suck cats -unity particles to draw cats
How to set the WiFi password of the router on the computer
What is ROM
为季前卡牌游戏 MotoGP Ignition Champions 做好准备!
PHP talent recruitment system development source code recruitment website source code secondary development
Desci: is decentralized science the new trend of Web3.0?
【剑指 Offer】61. 扑克牌中的顺子
如何将mysql卸载干净