1.安装deb包
sudo apt-get install ros-indigo-lms1xx
2.安装源码并编译
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ git clone https://github.com/ncnynl/LMS1xx.git
#编译
$ cd ~/catkin_ws
$ catkin_make
手动创建以太网:
点击网络->编辑连接->增加以太网
在ipv4设置里面地址设置为192.168.0.10,子网掩码设为255.255.255.0保存(因为激光雷达的默认地址为:192.168.0.1)。
连上激光雷达,在终端执行:
roscore
rosrun lms1xx LMS1xx_node _host:=192.168.0.1
然后就可以从rostopic echo /scan中看到激光信息了
也可以通过rviz可视化显示:打开rviz,点击add按钮并选择LaserScan,topic改为/scan
FixedFrame后面改为laser。