赞
踩
1.安装:
安装rslidar驱动,参考:https://www.ncnynl.com/archives/201807/2552.html
编译pointcloud_to_laserscan源码
假设工作空间为rslidar_ws
- cd ~/rslidar_ws/src
- git clone https://github.com/ros-perception/pointcloud_to_laserscan
- cd ~/rslidar_ws
- catkin_make
- source ~/.bashrc #假设你已经把工作空间添加到bashrc文件
- cd ~/rslidar_ws/src/pointcloud_to_laserscan/launch
- vim rslidar.launch
- <?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="/rslidar_points"/>
- <remap from="scan" to="/rslidar/scan"/>
- <rosparam>
- # target_frame: rslidar # Leave disabled to output scan in pointcloud frame
- transform_tolerance: 0.01
- min_height: -0.4
- max_height: 1.0
-
- angle_min: -3.1415926 # -M_PI
- angle_max: 3.1415926 # M_PI
- angle_increment: 0.003 # 0.17degree
- scan_time: 0.1
- range_min: 0.2
- range_max: 100
- 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>
- min_height 、max_height #这两个参数用来指定这段z轴高度范围内的输入点云将参与转换,范围外的不参与
- angle_min、angle_max #这两个参数用来指定这段yaw角度范围内的输入点云将参与转换,范围外的不参与
- angle_increment #输出的2d雷达数据的角分辨率,即相邻扫描点的角度增量
- scan_time #扫描时间,即话题的发布周期
- range_min、range_max #这两个参数用来指定输出数据的有效距离,即2d雷达的有效测量范围
2.测试:
roslaunch rslidar_pointcloud rs_lidar_16.launch
打开rviz,显示3D点云图
如图:
新开终端,启动转换
roslaunch pointcloud_to_laserscan rslidar.launch
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。