realsense R200转成costmap_2d
来源:互联网 发布:mac mnmp 一键安装包 编辑:程序博客网 时间:2024/05/29 18:02
使用realsense R200可以直接得到/camera/color/image_raw,/camera/depth/image_raw和/camera/depth/points.
分别是原始图像数据,深度数据和点云。要转换成2D的代价地图,使用costmap_2d的package。
其中costmap_2d的package只支持laserScan,pointCloud和pointCloud2格式的数据转换。幸好,Realsense R200的/camera/depth/points是pointCloud2格式的,可以直接用与costmap_2d。但是pointCloud2格式的数据太大,运行可能会卡顿。
这种情况下可以使用名字叫depthimage_to_laserscan-indigo-devel的packge,将/camera/depth/image_raw的sensor_msg/Image格式的深度数据转换成laserScan。进而使用costmap_2d。
两种方法都可以,直接用pointClouds2,或者把深度数据转成laserScan再使用costmap_2d。如果采用别的双目摄像头没有pointCloud格式的输出,那么只能先转成laserScan。
costmap_2d/launch文件夹下新建一个yaml文件,名称随意,比如example.yaml,写入以下代码:其中重点在于标红的两行代码,数据类型写PointCloud2,topic写名称。
global_frame: /camera_linkwidth: 10height: 10footprint: [[-0.325, -0.325], [-0.325, 0.325], [0.325, 0.325], [0.46, 0.0], [0.325, -0.325]]#robot_radius: 0.46footprint_padding: 0.01plugins: - {name: obstacles, type: "costmap_2d::ObstacleLayer"}update_frequency: 6.0publish_frequency: 2.0always_send_full_costmap: trueobstacles: observation_sources: base_scan z_resolution: 0.6 z_voxels: 2 publish_voxel_map: true base_scan: data_type: PointCloud2 topic: /camera/depth/points clearing: true marking: true max_obstacle_height: 2.0 obstacle_range: 6.0 raytrace_range: 8.0
然后,roslaunch realsense_camera r200_default.launch,先运行r200,在roslaunch costmap_2d example.launch。
此时运行起来发现costmap_2d并没有正常运行,打开rviz观看,costmap_2d没有正常转化。
经过观察costmap_2d的launch文件发现,运行r200的时候,costmap_2d的默认的example.launch文件里有个参数/user_sim_time将其设置为true了。但运行realsense和costmap_2d的时候并没有任何node提供/user_sim_time这个值。遂将其置为false。再次运行发现,costmap_2d可以正常转化了。
- realsense R200转成costmap_2d
- realsense r200使用过程记录
- realsense r200模块在ros-indigo版本下的使用
- realsense r200与rtabmap在ros下的使用
- kinecty一代和realsense r200的深度数据对比
- Turtlebot3入门手册之八:Realsense r200安装与测试
- realsense R200在Ubuntu16.04上的安装
- RealSense R200输出深度视频流,鼠标左键点击可输出该点的深度
- RealSense SDK 开发笔记 (三)获取R200的图像(OpenCV Mat)
- ros编写文件动态设置realsense r200自动曝光等参数
- 关于realsense R200在室外outdoor得不得depth的问题解决
- ros-indigo配置realsense R200的开发套件及遇到问题解决事项
- Ubuntu 16.04 LTS 安装RealSense R200 驱动以及SDK配置+QT+OpenCV
- realsense
- R200显示深度图
- 【博客】RealSense
- costmap_2d 代价地图
- costmap_2d简单理解
- ARM-Linux定时器、中断驱动--超声波测距初试
- S1错题集
- String.format()用法
- http参数中特殊字符处理
- java实现web端文件上传与下载
- realsense R200转成costmap_2d
- html中<#include "/headPage.html">的用法
- 按天分割apache日志
- Form表单之复选框checkbox操作
- 单例模式介绍
- 北京天宇联科技有限责任公司—智慧园区
- 欢迎使用CSDN-markdown编辑器
- visual studio C# 上使用'mysql_native_password'无法获取本地mysql使用权
- (NodeJS+unit.js+MochaJS+istanbul)简单操作实例