ubuntu 16.04(ROS kinetic)安装 turtlebot

安装的这么辛苦,当然要记录啦。。。

 

环境配置:

Ubuntu16.04 + kinetic +turtlebot

 

安装依赖和更新:

$ sudo apt-get install python-rosdep python-wstool  
$ sudo rosdep init
$ rosdep update

!!!之前已经执行过的不要再执行了,再次执行会报错,可以直接跳过!!!

----------------------敲黑板---------------------------------------开始干活--------------------------------

分别建立三个工作空间rocon,kobuki,turtlebot,下载和编译源码 

1、建立rocon目录,下载和编译,rocon都有对应的kinetic版本

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

如果 rosdep install --from-paths src -i -y 这一步报错,就跑一下下面的

$ rosdep install --from-paths ~/rocon/src --ignore-src -r

 有时wstool init不OK,sudo apt-get update一下

2、建立kobuki目录,下载和编译. 
kobuki使用kinetic的版本下载会失败,先用indigo版本生成下载的rosinstall文件,再修改对应包为kinetic版本

$ mkdir ~/kobuki
$ cd ~/kobuki
$ wget https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/kobuki.rosinstall 
$ gedit kobuki.rosinstall #参照下面kobuki.rosinstall文件内容,修改后再进行下一步。
$ wstool init src -j5 kobuki.rosinstall 
$ source ~/rocon/devel/setup.bash
$ rosdep install --from-paths src -i -y
$ catkin_make

kobuki.rosinstall 文件修改如下:

- git:
    local-name: kobuki
    uri: https://github.com/yujinrobot/kobuki.git
    version: kinetic
- git:
    local-name: kobuki_core
    uri: https://github.com/yujinrobot/kobuki_core.git
    version: kinetic
- git:
    local-name: kobuki_desktop
    uri: https://github.com/yujinrobot/kobuki_desktop.git
    version: kinetic
- git:
    local-name: kobuki_msgs
    uri: https://github.com/yujinrobot/kobuki_msgs.git
    version: kinetic
- git:
    local-name: yocs_msgs
    uri: https://github.com/yujinrobot/yocs_msgs.git
    version: release/0.6-kinetic
- git:
    local-name: yujin_ocs
    uri: https://github.com/yujinrobot/yujin_ocs.git
    version: kinetic

3、建立turtlebot目录,下载和编译. 
turtlebot使用kinetic的版本下载会失败,先用indigo版本生成下载的rosinstall文件,再修改对应包为kinetic版本,没有kinetic版本的保持为indigo版本

$ mkdir ~/turtlebot
$ cd ~/turtlebot
$ wget https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/turtlebot.rosinstall
$ vim turtlebot.rosinstall #参照以下turtlebot.rosinstall文件内容,修改后再进行。
$ wstool init src -j5 turtlebot.rosinstall
$ source ~/kobuki/devel/setup.bash
$ rosdep install --from-paths src -i -y
$ catkin_make

turtlebot.rosinstall文件修改如下:

- git:
    local-name: turtlebot
    uri: https://github.com/turtlebot/turtlebot.git
    version: kinetic
- git:
    local-name: turtlebot_apps
    uri: https://github.com/turtlebot/turtlebot_apps.git
    version: indigo
- git:
    local-name: turtlebot_create
    uri: https://github.com/turtlebot/turtlebot_create.git
    version: indigo
- git:
    local-name: turtlebot_create_desktop
    uri: https://github.com/turtlebot/turtlebot_create_desktop.git
    version: kinetic
- git:
    local-name: turtlebot_interactions
    uri: https://github.com/turtlebot/turtlebot_interactions.git
    version: indigo
- git:
    local-name: turtlebot_msgs
    uri: https://github.com/turtlebot/turtlebot_msgs.git
    version: indigo
- git:
    local-name: turtlebot_simulator
    uri: https://github.com/turtlebot/turtlebot_simulator.git
    version: indigo

至此,还差一丢丢。。。

$ . ~/turtlebot/devel/setup.bash 
$ rosrun kobuki_ftdi create_udev_rules
$ echo "source ~/turtlebot/devel/setup.bash" >> ~/.bashrc

做完后会多出kuboki,rocon,turtlebot三个文件夹,每个文件夹下有是src,devel,build三个文件夹

-----------------------------------测试是否成功---------------------------------------------------

$ roscore
$ cd turtlebot
$ roslaunch turtlebot_bringup minimal.launch
$ roslaunch turtlebot_develop keyboard.launch

能跑就ok啦。。。

发布了18 篇原创文章 · 获赞 18 · 访问量 1万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 技术黑板 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览