当前位置:网站首页>[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 webshell analysis
- 调查显示传统数据安全工具面对勒索软件攻击的失败率高达 60%
- Solve cmakelist find_ Package cannot find Qt5, ECM cannot be found
- Jarvis OJ Flag
- PHP strict mode
- Copy mode DMA
- American chips are no longer proud, and Chinese chips have successfully won the first place in emerging fields
- What is the difference between EDI license and ICP business license
- 如何安装mysql
- Deep learning plus
猜你喜欢
随机推荐
Jarvis OJ Webshell分析
【微信小程序】一文读懂小程序的生命周期和路由跳转
BS-XX-042 基于SSM实现人事管理系统
Flet教程之 09 NavigationRail 基础入门(教程含源码)
树莓派4b安装Pytorch1.11
Writing method of twig array merging
[729. My Schedule i]
PHP人才招聘系统开发 源代码 招聘网站源码二次开发
有序链表集合求交集 方法 总结
sqlserver 做cdc 要对数据库性能有什么要求么
Keras crash Guide
[echart] resize lodash 实现窗口缩放时图表自适应
Data verification before and after JSON to map -- custom UDF
极坐标扇图使用场景与功能详解
Jarvis OJ 远程登录协议
文件操作--I/O
SQL injection of cisp-pte (Application of secondary injection)
面对新的挑战,成为更好的自己--进击的技术er
Get ready for the pre-season card game MotoGP ignition champions!
Bs-xx-042 implementation of personnel management system based on SSM