zoukankan      html  css  js  c++  java
  • 【ros depthimage_to_laser kinect2】

    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 0 0 0 0 0 0 1 map camera_depth_frame 10

    根据https://answers.ros.org/question/195962/rviz-fixed-frame-world-does-not-exist/

    说rviz不知道把scan放哪,按照报错说的,要给他个tf

    显示如下:

    写了个小launch

    <launch>
    <node pkg="kinect2_bridge" type="kinect2_bridge" name="kinect2_bridge" output="screen"/>
    <node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laser" output="screen" >
        <remap from="image" to="kinect2/qhd/image_depth_rect"/>
        <remap from="camera_info" to="kinect2/qhd/camera_info"/>
    </node>
    <node pkg="rviz" type="rviz" name="rviz" />
    <node pkg="tf" type="static_transform_publisher" name="tf_static" args="0 0 0 0 0 0 1 map camera_depth_frame 10"/>
    </launch>
  • 相关阅读:
    Java日志第8天 2020.7.13
    Java日志第7天 2020.7.12
    Java日志第6天 2020.7.11
    Java日志第5天 2020.7.10
    Java日志第4天 2020.7.9
    Java日志第3天 2020.7.8
    设计模式_23种设计模式_目录
    ICacheEntry中SlidingExpiration与AbsoluteExpirationRelativeToNow的区别
    MySql中的replace into
    结巴分词
  • 原文地址:https://www.cnblogs.com/xy123001/p/8241412.html
Copyright © 2011-2022 走看看