1. 程式人生 > >ROS_Kinetic_01 在 Ubuntu 16.04 安裝ROS Kinetic 全教程附資料和映象 2018.10.20更新

ROS_Kinetic_01 在 Ubuntu 16.04 安裝ROS Kinetic 全教程附資料和映象 2018.10.20更新

ROS_Kinetic系列學習(一)

在ubuntu 16.04安裝ROS Kinetic

通過網頁快速瞭解Linux(Ubuntu)和ROS機器人作業系統,請參考實驗樓線上系統如下:

如果需要巨集觀全面瞭解以下機器人相關理論和知識點推薦:

ubuntu16.04已經發布半年多了,ROS的Kinetic版本功能包也越來越豐富了,需要了解ROS發行版及支援維護的時間等,

+

ubuntu 16.04對中文支援很好,直接支援中文輸入,使用體驗不錯。

1. ubuntu 16.04安裝與使用

下載後,使用U盤啟動安裝,安裝後設置更新源等,並配置常用的應用。

映象選擇:

2. ROS kinetic安裝與使用

2.1 設定安裝源

ROS Kinetic只支援Wily(15.10)Xenial(16.04)對應核心分別為4.2和4.4,其他版本需要編譯安裝不支援直接deb軟體源安裝,

使用下面命令:

~$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

2.2 設定keys

~$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116

Executing: /tmp/tmp.vZcRo5lOC8/gpg.1.sh --keyserver
hkp://ha.pool.sks-keyservers.net:80
--recv-key
0xB01FA116

2.3 安裝

~$ sudo apt-get update

~$ sudo apt-get install ros-kinetic-desktop-full

安裝功能包:

~$ sudo apt-get install ros-kinetic-PACKAGE

例如:

~$ sudo apt-get install ros-kinetic-slam-gmapping

查詢在kinetic中可以使用的功能包:

~$ apt-cache search ros-kinetic

2.4 初始化

~$ sudo rosdep init

Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run

    rosdep update

~$ rosdep update

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index.yaml
Add distro "groovy"
Add distro "hydro"
Add distro "indigo"
Add distro "jade"
Add distro "kinetic"
updated cache in /home/relaybot/.ros/rosdep/sources.cache
 

2.5 環境配置

~$ echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc

~$ source ~/.bashrc

注意當安裝多個ROS發行版,使用kinetic需要用到下面命令:

~$ source /opt/ros/kinetic/setup.bash

2.6 安裝rosinstall

~$ sudo apt-get install python-rosinstall

2.7 測試roscore

~$ roscore

有興趣也可以測試一下小海歸的例子。

-End-