ros kinetic +hokuyo 源码安装

来源:互联网 发布:u盘数据恢复上海 编辑:程序博客网 时间:2024/06/05 04:58

  双目视觉/激光是机器人导航的关键部位,手头激光是hokuyou据说上万大洋,不过查看urg_node好像没有kinetic的版本。根据前人大神经验,实践记录如下。-2017.06.15 乐

安装urg_node

参考网址
参考网址
参考网址
1、安装driver_base

cd ~/catkin_ws/src/mkdir hokuyocd hokuyogit clone https://github.com/ros-drivers/driver_common.gitcd ~/catkin_ws/src/hokuyo/driver_common/driver_base/mkdir buildcd buildcmake ..makesudo make installcd ~/catkin_ws/src/hokuyo/driver_common/driver_common/mkdir buildcd buildcmake ..makesudo make installcd ~/catkin_ws/src/hokuyo/driver_common/timestamp_tools/mkdir buildcd buildcmake ..makesudo make install

2、安装urg_node

cd ~/catkin_ws/src/hokuyogit clone https://github.com/ros-perception/laser_proc.gitgit clone https://github.com/ros-drivers/urg_c.git//git clone https://github.com/ros-drivers/hokuyo_node.git//cd ~/catkin_ws/src/hokuyo/laser_proc//mkdir build//cd build//cmake ..//make//sudo make installcatkin_make  -DCATKIN_WHITELIST_PACKAGES= "urg_node"cd ~/catkin_ws/src/hokuyogit clone https://github.com/ros-drivers/urg_nodecd urg_nodemkdir buildcd buildrosdep install --from-paths ~/catkin_ws/src --ignore-srccatkin_make  -DCATKIN_WHITELIST_PACKAGES= "urg_node"cd ~/catkin_wscatkin_make install

  安装完成,以太网接口UST-10LX安装urg_node;USB接口的UST-30LX的安装hokuyo_node。手头激光是网线形式的,所以只安装了urg_node另一个现在不在安装了。

测试激光

1、添加路径
source ~/catkin_ws/src/urg_node/build/devel/setup.bash
source ~/catkin_ws/devel/setup.bash
export ROS_PACKAGE_PATH=~/catkin_ws/src:$ROS_PACKAGE_PATH

2、启动roscore
roscore
3、启动激光(激光IP192.168.0.10)
rosrun urg_node urg_node _ip_address:=192.168.0.10
4、查看距离
` rostopic list
rostopic echo /scan
5、rviz查看
rosrun rviz rviz
add添加laser topic ,如果提示fix frame无坐标错误,将启动的坐标位置fixed frame 的map手动改为laser。
打完收工!

hokuyou激光

原创粉丝点击