rs2_pose_identity函数使用例子
时间: 2023-10-10 18:07:56 浏览: 68
rs2_pose_identity函数是Intel RealSense SDK中的一个函数,用于获取一个空的姿态对象。以下是一个使用例子:
```
#include <librealsense2/rs.hpp>
#include <iostream>
int main()
{
rs2_pose identity_pose = rs2_pose_identity();
std::cout << "Translation: (" << identity_pose.translation.x << ", "
<< identity_pose.translation.y << ", " << identity_pose.translation.z << ")" << std::endl;
std::cout << "Rotation: (" << identity_pose.rotation.x << ", "
<< identity_pose.rotation.y << ", " << identity_pose.rotation.z << ", "
<< identity_pose.rotation.w << ")" << std::endl;
return 0;
}
```
这个例子中,我们创建了一个空的姿态对象identity_pose,并输出了它的平移和旋转值。由于rs2_pose_identity函数返回的是空的姿态对象,因此输出结果中平移值为(0, 0, 0),旋转值为(0, 0, 0, 1)。
阅读全文
相关推荐
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)