距离值在ROS中被称为scan,并且姿态(位置+方向)信息会根据相对坐标关系而改变,因此被称为tf(transform)
一.建图实际操作
- 下载源码测试源码,depthimage_to_laserscan,参考https://blog.youkuaiyun.com/u010925447/article/details/56494680
- 解压到你的ros工作空间路径中。
- 使用catkin_make编译功能包。
- 分析launch文件,修改使其在自己的平台上可用:参考https://www.jianshu.com/p/429e59d48322
- 运行launch文件 启动转换节点:roslaunch depthimage_to_laserscan sample_node.launch(包含主节点和深度相机启动节点)
二.利用深度相机仿激光数据创建地图
- 下载hector_slam_example:下载地址 https://github.com/chenxingzhe/hector_slam_example,编译(cmake)(无需里程计即可建图,核心节点hector_mapping订阅/scan话题)
- sudo apt-get install ros-indigo-hector-slam
- Install the dependency packages:rosdep install hector_slam_example
- 在启动之前如果你用的是kinect,那就修改一下launch文件
- 然后就是roslaunch hector_slam_example hec