zoukankan      html  css  js  c++  java
  • ROS 三维激光数据转化为RangeImage

    为了进一步便于分析或者分割点云数据,时常需要将稀疏点云激光数据,例如velodyne-16,转化为RangeImge,此处为一个例程,方便查看转化是如何完成的

    mkdir -p ~/dev/pointcloud_to_rangeimage_ws/src
    cd ~/dev/pointcloud_to_rangeimage_ws/src
    git clone https://github.com/artivis/pointcloud_to_rangeimage
    cd ..
    catkin_make 
    

    此例子生成两个结点,pointcloud_to_rangeimage_node和rangeimage_to_pointcloud_node,此博客只使用pointcloud_to_rangeimage_node节点如何利用16线激光数据生成RangeImage的测试。首先,我的激光数据的Topic与源文件内声明的Topic不一致,做如下修改,将 pointcloud_to_rangeimage_node.cpp

     sub_ = nh.subscribe<PointCloud>("point_cloud_in", 1, &RangeImageConverter::callback, this);

    修改为自己的数据topic

     sub_ = nh.subscribe<PointCloud>("/velodyne_points", 1, &RangeImageConverter::callback, this);

    1. 启动roscore 和 rviz 

    #terminal 1
    roscore
    #termenal 2
    rosrun rviz rviz

    2. rosbag回放velodyne数据

    rosbag play out.bag

    out.bag记录的是topics: /velodyne_points的点云数据

    3. rviz中配置Fixed Frame 和 添加对 LaserScan和Image的观测

    结果如下

  • 相关阅读:
    能用HTML/CSS解决的问题,就不要用JS
    跨域
    从输入url到页面展示到底发生了什么
    hosts 文件
    了解Web及网络基础
    hybrid
    组件化和 React
    MVVM 和 VUE
    虚拟 DOM
    ES6模块化与常用功能
  • 原文地址:https://www.cnblogs.com/flyinggod/p/12760879.html
Copyright © 2011-2022 走看看