当前位置:网站首页>[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
边栏推荐
- 【729. 我的日程安排表 I】
- DenseNet
- [es6] add if judgment or ternary operator judgment in the template string
- Facing new challenges and becoming a better self -- attacking technology er
- PHP strict mode
- [echart] resize lodash to realize chart adaptation when window is zoomed
- Apple 已弃用 NavigationView,使用 NavigationStack 和 NavigationSplitView 实现 SwiftUI 导航
- 麻烦问下,DMS中使用Redis语法是以云数据库Redis社区版的命令为参考的嘛
- Learnopongl notes (I)
- 拷贝方式之DMA
猜你喜欢

Learnopongl notes (II) - Lighting

【729. 我的日程安排錶 I】

Jarvis OJ Webshell分析

怎样在电脑上设置路由器的WiFi密码
![[729. My Schedule i]](/img/e3/32914227d00cf7595ee850e60f2b72.png)
[729. My Schedule i]

【刷題篇】鹅廠文化衫問題

American chips are no longer proud, and Chinese chips have successfully won the first place in emerging fields
![[brush questions] effective Sudoku](/img/5b/3064170bebd1ccbee68d6a85d23830.png)
[brush questions] effective Sudoku

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

Flet教程之 12 Stack 重叠组建图文混合 基础入门(教程含源码)
随机推荐
中间表是如何被消灭的?
麻烦问下,DMS中使用Redis语法是以云数据库Redis社区版的命令为参考的嘛
Data access - entityframework integration
Bs-xx-042 implementation of personnel management system based on SSM
How to uninstall MySQL cleanly
Etcd 构建高可用Etcd集群
Jarvis OJ Flag
树莓派4b安装Pytorch1.11
Explain in detail the functions and underlying implementation logic of the groups sets statement in SQL
Jarvis OJ Flag
二叉树相关OJ题
C# TCP如何限制单个客户端的访问流量
飞桨EasyDL实操范例:工业零件划痕自动识别
Copy mode DMA
外盘期货平台如何辨别正规安全?
C# TCP如何设置心跳数据包,才显得优雅呢?
时间戳strtotime前一天或后一天的日期
Twig数组合并的写法
[deep learning] how does deep learning affect operations research?
It is forbidden to copy content JS code on the website page