kinect2的深度图可以转换成激光来用,使用depthimage_to_laser
这个tf是用来给rviz显示的
1)开启kinect2
rosrun kinect2_bridge kinect2_bridge
2)开启 depthimage_to_laser
rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/kinect2/qhd/image_depth_rect camera_info:=/kinect2/qhd/camera_info
3)开启rviz
rosrun rviz rviz
按topic找到laserScan rviz没有显示啥 有报错
Transform For frame [camera_depth_frame]: No transform to fixed frame [map]. TF error: [Lookup would require extrapolation into the future. Requested time
4)发布static_tf
rosrun tf static_transform_publisher map camera_depth_frame
根据https://answers.ros.org/question/195962/rviz-fixed-frame-world-does-not-exist/
说rviz不知道把scan放哪,按照报错说的,要给他个tf
显示如下:
写了个小launch
手机扫一扫
移动阅读更方便
你可能感兴趣的文章