http://wiki.ros.org/kinetic/Installation/Ubuntu
通过网页快速了解Linux(Ubuntu)和ROS机器人操作系统,请参考实验楼在线系统如下:
纯净定制版镜像已经发布,供ROS爱好者交流学习,在如下链接:http://blog.csdn.net/zhangrelay/article/details/54632130Ubuntu 16.04 + ROS Kinetic 机器人操作系统学习镜像分享与使用安装说明
ubuntu16.04已经发布半年多了,ROS的Kinetic版本功能包也越来越丰富了,需要了解ROS发行版及支持维护的时间等,
可以参考如下网页:http://wiki.ros.org/Distributions
+
参考的网址:http://wiki.ros.org/kinetic
:http://wiki.ros.org/kinetic/Installation/Ubuntu
爲了保證安裝速度,請選擇國內鏡像如下:ustc鏡像
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'
~$ 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
~$ 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
~$ 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
~$ echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
~$ source ~/.bashrc
注意当安装多个ROS发行版,使用kinetic需要用到下面命令:
~$ source /opt/ros/kinetic/setup.bash
~$ sudo apt-get install python-rosinstall
~$ roscore
官网的讲解还是比较清晰的大脚可以参考:http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment
(该部分转载自:http://blog.csdn.net/ZhangRelay/article/details/51364622)
笔者在实现的过程中遇到了一下问题,记录一下报错以及解决方法
usb_cam安装过程:
安装包下载地址:https://github.com/ros-drivers/usb_cam
编译过程:http://blog.csdn.net/xiaocainiaoshangxiao/article/details/13293637
在官网上本节的题目是Creating a workspace for catkin,其中的catkin不知道是什么意思,在网上找到的结果是:(1)卡婷是一个广告公司,(2)葇荑花。这两种翻译显然都不太合适,不过不知道也没关系,影响不大。我们知道catkin是一个ROS中的工具就行了。本节的主要目的是创建一个catkin工作空间,在这个工作空间中,catkin的包可以被编译。
如果您还没有安装catkin的话,请首先安装catkin。不过如果按照前面的步骤的话,catkin已经安装了。
首先需要修改环境变量,按ctrl+alt+t打开一个终端,在里面输入:
创建一个工作空间:
报错如下:-- ~~ - visualization_marker_tutorials
-- ~~ - xacro
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CMake Error at catkin/cmake/catkin_workspace.cmake:95 (message):
This workspace contains non-catkin packages in it, and catkin cannot build
a non-homogeneous workspace without isolation. Try the
'catkin_make_isolated' command instead.
Call Stack (most recent call first):
CMakeLists.txt:63 (catkin_workspace)
-- Configuring incomplete, errors occurred!
See also "/home/sun/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/sun/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" faile
解决方法:-- catkin_make 工作空间不能与 非catkin文件建立联系改用catkin_make_isolated,安心等待一会编译 完成后即可
在sun@sun:~/catkin_ws/build$ 编译即可。
当你使用rosmake进行编译的时候,如果提示没有找到这个包,那么很有可能是你没有用source ~/catkin_ws/devel/setup.bash 就是让编译器能够找到这个包