rplidar测试

以下在虚拟机中完成的(ubuntu12.04-amd64-ros-exbot-h2-140520)。

进入catkin_ws,下载代码:

cd ~/catkin_ws/src/
git clone https://github.com/robopeak/rplidar_ros.git

编译

cd ~/catkin_ws/
catkin_make --pkg rplidar_ros

插入USB接口的rplidar,测试端口:

exbot@ubuntu:~$ ls /dev/ttyUSB*
/dev/ttyUSB0

rplidar_ros/launch/rplidar.launch文件进行了端口号的配置,信息如下

(/home/exbot/catkin_ws/src/rplidar_ros)

<launch>
  <node name="rplidarNode"          pkg="rplidar_ros"  type="rplidarNode" output="screen">
  <param name="serial_port"         type="string" value="/dev/ttyUSB0"/>  
  <param name="serial_baudrate"     type="int"    value="115200"/>
  <param name="frame_id"            type="string" value="laser"/>
  <param name="inverted"            type="bool"   value="false"/>
  <param name="angle_compensate"    type="bool"   value="true"/>
  </node>
</launch>

  

测试扫描数据点

roslaunch rplidar_ros view_rplidar.launch

数据显示结果

下一篇:2. rplidar & hector_slam without odometry

posted @ 2016-08-12 15:48  太一吾鱼水  阅读(1166)  评论(0编辑  收藏  举报