1 ros_rslidar 安装
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/RoboSense-LiDAR/ros_rslidar
cd ..
catkin_make
错误:ros:velodyne_driver/input.h:37:10: fatal error: pcap.h: No such file or directory
解决:
sudo apt-get install libpcap0.8-dev
注:可以利用 ros_rslidar 来将保存的离线 pcap 文件解析成点云数据进行显示。修改 rs_lidar_16.launch 文件为如下(主要修改带**号的那一行):
<launch>
<node name="rslidar_node" pkg="rslidar_driver" type="rslidar_node" output="screen" >
<param name="model" value="RS16"/>
**<param name="pcap" value="指向.pcap 的绝对路径"/>**
<!--param name="device_ip" value="192.168.1.200"/-->
<!-- Set the Lidar data port on the PC side, default is 6699 -->
<param name="port" value="6699"/>
</node>
<node name="cloud_node" pkg="rslidar_pointcloud" type="cloud_node" output="screen" >
<param name="model" value="RS16"/>
<param name="curves_path" value="$(find rslidar_pointcloud)/data/rs_lidar_16/curves.csv" />
<param name="angle_path" value="$(find rslidar_pointcloud)/data/rs_lidar_16/angle.csv" />
<param name="channel_path" value="$(find rslidar_pointcloud)/data/rs_lidar_16/ChannelNum.csv" />
</node>
</launch>