当前位置:   article > 正文

Point cloud转 Laser sacn_pointcloud to laserscan

pointcloud to laserscan

概要

ROS中将点云(PointCloud)转换为激光扫描(LaserScan)是一个常见的任务,尤其是在某些机器人系统中,激光雷达数据被用于导航和避障,但传感器输出的是点云数据。这种转换可以通过 pointcloud_to_laserscan 包实现,该包提供了一个节点,可以将接收到的PointCloud2消息转换成LaserScan消息。

安装pointcloud_to_laserscan

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone -b lunar-devel https://github.com/ros-perception/pointcloud_to_laserscan.git
cd ..
catkin_make
  • 1
  • 2
  • 3
  • 4
  • 5

修改配置

<?xml version="1.0"?>

<launch>
    <!-- run pointcloud_to_laserscan node -->
    <node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan">

        <remap from="cloud_in" to="/lio_sam/deskew/cloud_deskewed"/>
        <rosparam>
            target_frame: base_link_est # Leave disabled to output scan in pointcloud frame
            transform_tolerance: 0.01
            min_height: -0.5
            max_height: 0.2

            angle_min: -3.1415926 # -M_PI
            angle_max: 3.1415926 # M_PI
            angle_increment: 0.003 # M_PI/360.0
            scan_time: 0.1
            range_min: 0.3
            range_max: 50
            use_inf: true
            inf_epsilon: 1.0

            # Concurrency level, affects number of pointclouds queued for processing and number of threads used
            # 0 : Detect number of cores
            # 1 : Single threaded
            # 2->inf : Parallelism level
            concurrency_level: 1
        </rosparam>

    </node>

</launch>

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33

运行结果

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/981142
推荐阅读
相关标签
  

闽ICP备14008679号