[ROS] [笔记(0)] 在 Ubuntu 14.04 系统上安装 ROS indigo

ROS 的发行版很多,最新的版本是 jade。但是通常情况下我们更多地使用其稳定版本 indigo。这篇文章就讲下 indigo 版本在 Ubuntu 下的安装。

0、安装环境:
Ubuntu 14.04.3 LTS

1、配置源:

使用 ROS 官方源:

使用国内镜像源:

设置Key:

更新安装包:

升级安装包(通常情况下不需要这一步):

2、安装 ROS:
推荐新手安装 Desktop-Full 版本,其他版本都有一些东西不全。安装命令如下:

或者直接点击:
点击这里

其他版本安装方式参见 [1]

3、初始化 rosdep:
使用以下命令初始化 rosdep:

4、环境配置:
为了方便每次系统重启时可以自动配置好 ros 相关环境,在 ~/.bashrc 文件末尾增加如下代码:

或者直接运行以下命令:

运行如下命令使配置生效:

这样以后每次重启都可以自动配置好环境了。

5、安装 rosinstall:
很多常见包都使用 rosinstall 工具,使用如下命令安装:

到此安装结束,开始你的ROS之旅吧!

常见问题:
1、64位系统下:Some packages could not be installed. 错误
在很多64位机器上如果安装 ros-indigo-desktop-full 会出现如下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
ros-indigo-desktop-full : Depends: ros-indigo-desktop but it is not going to be installed
Depends: ros-indigo-simulators but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

解决这一问题的方法一个是只安装核心库 ros-indigo-desktop 或者可以尝试先卸载下面的组件:

2、错误:default sources list file already exists
在运行 sudo rosdep init 时可能出现如下错误:
ERROR: default sources list file already exists:
/etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize

通常这是因为你之前曾经安装过 ROS 系统的某个版本,只需按照提示删除已经存在的初始化文件即可:

然后再重新运行 sudo rosdep init 就没有问题了。

参考文献:
[1] http://wiki.ros.org/indigo/Installation/Ubuntu

Add a Comment

您的电子邮箱地址不会被公开。 必填项已用*标注