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>
  • 相关阅读:
    关于Lucas定理、多项式Exp的一些思考
    Binet-Cauchy定理的证明
    CSP2019 树上的数 题解
    Graphviz学习
    Luogu P2221 [HAOI2012]高速公路题解
    CSP2019 树的重心 题解
    CSP2019 Emiya 家今天的饭 题解
    UVA10559 方块消除 Blocks 题解
    关于二次项系数为1的二元一次不定方程解法的探究
    关于对STL容器重载运算符的问题
  • 原文地址:https://www.cnblogs.com/xy123001/p/8241412.html
Copyright © 2011-2022 走看看