正在加载图片...
的终端里运行以下命令。 S roslaunch openni_launch openni.launch Step2.观察Kinect.发出的数据 首先利用rostopic list命令显示所有topic,结果有很多,注意观察以下几个 /camera/rgb/image_color /camera/rgb/image mono /camera/rgb/image_raw /camera/rgb/image_rect /camera/rgb/image_rect_color 利用iage_view包查看图像数据 S rosrun image_view image_view image:=/rgb/image_raw 注意这里将图像的topic.重映射到了/camera/rgb/image_colori这样可以直接显示该topic的 图像。系统应该会有以下输出。 另一个重要的topic是那个直接发送点云数据的。这种数据是对深度图的一个3D的表示。 该数据在/camera/depth/points,/camera/depth registered/points这类的topic中。 利用rostipic type命令查看该topicl的类型。 S rostopic type/camera/depth/points rosmsg show 可以到官网查看相应的类型说明 http://ros.org/doc/api/sensor msgs/html/msg/PointCloud2.html. 利用rviz可以显示该数据,在一个新终端中运行rviz添加一个新的PointCloud:2数据的 显示项,即可以看到点云数据。 -6-- 6 - 的终端里运行以下命令。 $ roslaunch openni_launch openni.launch Step2.观察Kinect发出的数据 首先利用rostopic list命令显示所有topic,结果有很多,注意观察以下几个 ... /camera/rgb/image_color /camera/rgb/image_mono /camera/rgb/image_raw /camera/rgb/image_rect /camera/rgb/image_rect_color ... 利用iage_view包查看图像数据 $ rosrun image_view image_view image:=/rgb/image_raw 注意这里将图像的topic重映射到了/camera/rgb/image_color这样可以直接显示该topic的 图像。系统应该会有以下输出。 另一个重要的topic是那个直接发送点云数据的。这种数据是对深度图的一个3D的表示。 该数据在/camera/depth/points, /camera/depth_registered/points 这类的topic中。 利用rostipic type 命令查看该topic的类型。 $ rostopic type /camera/depth/points | rosmsg show 可以到官网查看相应的类型说明 http://ros.org/doc/api/sensor_msgs/html/msg/PointCloud2.html. 利用rviz 可以显示该数据,在一个新终端中运行rviz添加一个新的PointCloud2数据的 显示项,即可以看到点云数据
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有