工程问题--ubuntu16.04源码编译安装turtlebot

ubuntu16.04源码编译安装turtlebot

在安装完ros之后,就想跟着《ROS by example》里一样,跑跑turtlebot的demo

但是发现书里讲的都是14.04的安装过程。所以就想记录自己在16.04上源码编译的过程。

源码编译过程使用wstool下载源码的速度取决于网络

 


 一. 安装前的必要准备

1 sudo apt-get install python-wstool

 


 二. 源码编译rocon

1 mkdir ~/rocon
2 cd ~/rocon
3 wstool init -j5 src https://raw.github.com/robotics-in-concert/rocon/release/kinetic/rocon.rosinstall
4 source /opt/ros/kinetic/setup.bash
5 rosdep install --from-paths src -i -y
6 catkin_make

在执行完编译的时候,可能会报错:找不到pyrcc5。使用以下命令行解决:

1 sudo apt-get install pyqt5-dev-tools

然后再重新编译。

 


 三. 源码编译kobuki

1 mkdir ~/kobuki
2 cd ~/kobuki
3 wstool init src -j5 https://raw.github.com/yujinrobot/yujin_tools/kinetic-devel/rosinstalls/kinetic/kobuki.rosinstall
4 source ~/rocon/devel/setup.bash
5 rosdep install --from-paths src -i -y
6 catkin_make

在最后一步编译的时候,会有两个warning。对于后来的使用没有影响,便没有管它了。

 


 四. 源码编译turtlebot

1 mkdir ~/turtlebot
2 cd ~/turtlebot
3 wstool init src -j5 https://raw.github.com/yujinrobot/yujin_tools/kinetic-devel/rosinstalls/kinetic/turtlebot.rosinstall
4 source ~/kobuki/devel/setup.bash
5 rosdep install --from-paths src -i -y
6 catkin_make

同样,会有几个warning。


 五. 添加环境变量

1 echo "source ~/turtlebot/devel/setup.bash" >> ~/.bashrc
2 source ~/.bashrc

 


 六. 设置Udev规则

1 rosrun kobuki_ftdi create_udev_rules

 


 七. 测试

将USB线连上电脑

1. 输入检测指令,会显示有对应的设备/dev/kobuki

1 ls /dev/kobuki

 

2. 启动roscore

1 roscore

 

3. 启动turtlebot

1 roslaunch turtlebot_bringup minimal.launch

 

4. 启动遥控控制

1 roslaunch turtlebot_teleop keyboard_teleop.launch

点击键盘“i”前进

 


 参考文章飞机票:

https://blog.csdn.net/yinxingtianxia/article/details/80267536

https://blog.csdn.net/He3he3he/article/details/80969044

http://wiki.ros.org/turtlebot/Tutorials/indigo/Turtlebot%20Installation

https://github.com/robotics-in-concert/rocon/tree/release/kinetic

https://github.com/yujinrobot/yujin_tools/tree/kinetic-devel

https://blog.csdn.net/holiday_chan/article/details/72803678

posted @ 2018-07-16 19:09  Gianmeng  阅读(1601)  评论(0编辑  收藏  举报