下载:sudo apt-get install ros-indigo-hokuyo-node
更改串口读写权限: sudo chmod a+rw /dev/ttyACM0;
运行:rosrun hokuyo_node hokuyo_node ;这时灯会由闪到不闪,屏幕会有如下输出:
[ INFO] [1510553175.915139679]: Connected to device with ID: H1629950
[ INFO] [1510553176.015026342]: Starting calibration. This will take up a few seconds.
[ INFO] [1510553179.136055658]: Calibration finished. Latency is: -0.0823
[ INFO] [1510553179.462069326]: Streaming data.
想要在rviz中实时显示激光数据:rosrun rviz rviz,并将fixed frame改为“/laser”,然后添加bytopic
因为我是想通过这个激光雷达做扫描匹配,所以想看源码,本来直接从网上下载了indigo版本的hokuyo_node,放在工作空间里面编译会报错,说缺少urg_c,所以先通过上面的方法先装好,然后用 sudo apt-get remove ros-indigo-hokuyo-node 卸载掉装在/opt下的包,然后自己建空间把hokuyo_node包放进去catkin_make,就不会报错了,也可以运行。
原文链接:https://www.f2er.com/ubuntu/350596.html