4

3d激光雷达开发(旋转和位移)

 2 years ago
source link: https://blog.csdn.net/feixiaoxing/article/details/123385253
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

3d激光雷达开发(旋转和位移)

费晓行 已于 2022-03-09 19:47:19 修改 32

【 声明:版权所有,欢迎转载,请勿用于商业用途。 联系信箱:feixiaoxing @163.com】

        对于点云数据来说,旋转和位移的计算是十分必要的。比如数据匹配、识别、定位,如果需要查看获得的旋转矩阵对不对,那么就可以将原来的数据和旋转矩阵做一个乘积,这样就可以立刻看到对应的效果了。

1、准备transform.cpp文件

newCodeMoreWhite.png

2、代码说明

        代码里面主要说明了两种构建旋转矩阵的方法。不管是哪一种,本质上都是要把yaw、pitch、roll、x、y、z通过计算映射到矩阵里面。        

3、准备CMakeLists.txt

4、开始生成sln工程,准备编译,

5、执行transform.exe

        执行过程中,注意输入参数,即transform.exe bunny.pcd。

        另外,代码中应该是对点云数据x轴偏移2.5米,z轴旋转theta角度,工作台的打印如下,

        实际效果如下,


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK