文档章节

ROS-Jade版在UbuntuKylin15.04上的源码安装

openthings
 openthings
发布于 2015/07/20 10:09
字数 1340
阅读 717
收藏 1

ROS-Installing from source

Install from source requires that you download and compile the source code on your own. ROS Jade supports Trusty, Utopic, and Vivid. Other platforms are possible to use but are not expected to work out of the box. Target platforms are defined in REP 3

目录

  1. Installing from source

    1. Update the workspace

    2. Rebuild your workspace

    3. Building the catkin Packages

    4. Installing bootstrap dependencies

    5. Initializing rosdep

    6. Prerequisites

    7. Installation

    8. Maintaining a Source Checkout

Prerequisites

Installing bootstrap dependencies

Install bootstrap dependencies (Ubuntu):

These tools are used to facilitate the download and management of ROS packages and their dependencies, among other things.

Ubuntu:

  • $ sudo apt-get install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential

    If you have trouble installing the packages in the command above, make sure you have added the packages.ros.org debian repository to your apt source lists as described starting here: jade/Installation/Ubuntu#jade.2BAC8-Installation.2BAC8-Sources.Setup_your_sources.list

    If apt complains that the python-support package is not installable, make sure that you have the Ubuntu universe repositories enabled in your /etc/apt/sources.list

Fedora:

  • $ sudo yum install python-rosdep python-rosinstall_generator python-wstool python-rosinstall @buildsys-build

    Some packages used in ROS are not currently available in the Fedora RPM repositories. Most of the other packages are available in RPM Fusion. See RPM Fusion Command Line Setup.

    Any packages not available in RPM Fusion are staged in the SDSM&T ROS RPM staging repository, which is available from csc.mcs.sdsmt.edu.

Generic (pip):

  • If you are using a non-Debian system you need to make sure that you have all build tools (compiler, CMake, etc.) installed. You can install all ROS Python tools via PIP:

    $ sudo pip install -U rosdep rosinstall_generator wstool rosinstall

    If there are errors with this or the rosdep step below, your system's version of pip may be out-of-date. Use your system's package management to update it, or use it to update itself:

    $ sudo pip install --upgrade setuptools

    Note that on many platforms such as OSX you may want to install the above packages and use ROS inside a virtualenv so as to make sure not to collide with system dependencies.

Initializing rosdep

$ sudo rosdep init$ rosdep update

Installation

Start by building the core ROS packages.

Building the catkin Packages

ROS is in the process of converting to a new build system, catkin, but not all of the packages have been converted and the two build systems cannot be used simultaneously. Therefore it is necessary to build the core ROS packages first (catkin packages) and then the rest.

Create a catkin Workspace

In order to build the core packages, you will need a catkin workspace. Create one now:

  • $ mkdir ~/ros_catkin_ws$ cd ~/ros_catkin_ws

Next we will want to fetch the core packages so we can build them. We will use wstool for this. Select the wstool command for the particular variant you want to install:

Desktop-Full Install: ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception

  • $ rosinstall_generator desktop_full --rosdistro jade --deps --wet-only --tar > jade-desktop-full-wet.rosinstall$ wstool init -j8 src jade-desktop-full-wet.rosinstall

Desktop Install (recommended): ROS, rqt, rviz, and robot-generic libraries

  • $ rosinstall_generator desktop --rosdistro jade --deps --wet-only --tar > jade-desktop-wet.rosinstall$ wstool init -j8 src jade-desktop-wet.rosinstall

ROS-Comm: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.

  • $ rosinstall_generator ros_comm --rosdistro jade --deps --wet-only --tar > jade-ros_comm-wet.rosinstall$ wstool init -j8 src jade-ros_comm-wet.rosinstall

This will add all of the catkin or wet packages in the given variant and then fetch the sources into the ~/ros_catkin_ws/src directory. The command will take a few minutes to download all of the core ROS packages into the src folder. The -j8 option downloads 8 packages in parallel.

In addition to the 3 variants above, more are defined in REP 131 such as robot, perception, etc. Just change the package path to the one you want, e.g., for robot do:

$ rosinstall_generator robot --rosdistro jade --deps --wet-only --tar > jade-robot-wet.rosinstall$ wstool init -j8 src jade-robot-wet.rosinstall

If wstool init fails or is interrupted, you can resume the download by running:

wstool update -j 4 -t src

Resolving Dependencies

Before you can build your catkin workspace you need to make sure that you have all the required dependencies. We use the rosdep tool for this:

  • $ rosdep install --from-paths src --ignore-src --rosdistro jade -y

This will look at all of the packages in the src directory and find all of the dependencies they have. Then it will recursively install the dependencies.

The --from-paths option indicates we want to install the dependencies for an entire directory of packages, in this case src. The --ignore-src option indicates to rosdep that it shouldn't try to install any ROS packages in the src folder from the package manager, we don't need it to since we are building them ourselves. The --rosdistro option is required because we don't have a ROS environment setup yet, so we have to indicate to rosdep what version of ROS we are building for. Finally, the -y option indicates to rosdep that we don't want to be bothered by too many prompts from the package manager.

After a while (and maybe some prompts for your password) rosdep will finish installing system dependencies and you can continue.

Building the catkin Workspace

Once it has completed downloading the packages and resolving the dependencies you are ready to build the catkin packages. We will use the catkin_make_isolated command because there are both catkin and plain cmake packages in the base install, when developing on your catkin only workspaces you should use catkin/commands/catkin_make.

Invoke catkin_make_isolated:

  • $ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release

Note: You might want to select a different CMake build type (e.g. RelWithDebInfo or Debug, see http://cmake.org/cmake/help/v2.8.12/cmake.html#variable:CMAKE_BUILD_TYPE).

Note: The default catkin installation location would be ~/ros_catkin_ws/install_isolated, if you would like to install some where else then you can do this by adding the --install-space /opt/ros/jade argument to your catkin_make_isolated call.

For usage on a robot without Ubuntu, it is recommended to install compiled code into /opt/ros/jade just as the Ubuntu packages would do. Don't do this in Ubuntu, as the packages would collide with apt-get packages. It is also possible to install elsewhere (e.g. /usr), but it is not recommended unless you really know what you are doing.

Please see REP 122: Filesystem Hierarchy Layout for more detailed documentation on how the installed files are placed.

Note: In the above command we are running the catkin_make_isolated command from the catkin source folder because it has not been installed yet, once installed it can be called directly.

Now the packages should have been installed to ~/ros_catkin_ws/install_isolated or to wherever you specified with the --install-space argument. If you look in that directory you will see that a setup.bash file have been generated. To utilize the things installed there simply source that file. Lets do that now before building the rest of ROS:

  • $ source ~/ros_catkin_ws/install_isolated/setup.bash

Maintaining a Source Checkout

If we want to keep our source checkout up to date, we will have to periodically update our rosinstall file, download the latest sources, and rebuild our workspace.

Update the workspace

To update your workspace, first move your existing rosinstall file so that it doesn't get overwritten, and generate an updated version. For simplicity, we will cover the *destop-full* variant. For other variants, update the filenames and rosinstall_generator arguments appropriately.

$ mv -i jade-desktop-full-wet.rosinstall jade-desktop-full-wet.rosinstall.old$ rosinstall_generator desktop_full --rosdistro jade --deps --wet-only --tar > jade-desktop-full-wet.rosinstall

Then, compare the new rosinstall file to the old version to see which packages will be updated:

$ diff -u jade-desktop-full-wet.rosinstall jade-desktop-full-wet.rosinstall.old

If you're satified with these changes, incorporate the new rosinstall file into the workspace and update your workspace:

$ wstool merge -t src jade-desktop-full-wet.rosinstall$ wstool update -t src

Rebuild your workspace

Now that the workspace is up to date with the latest sources, rebuild it:

$ ./src/catkin/bin/catkin_make_isolated --install

If you specified the --install-space option when your workspace initially, you should specify it again when rebuilding your workspace

Once your workspace has been rebuilt, you should source the setup files again:

$ source ~/ros_catkin_ws/install_isolated/setup.bash


本文转载自:http://wiki.ros.org/jade/Installation/Source

openthings
粉丝 326
博文 1140
码字总数 689435
作品 1
东城
架构师
私信 提问
ROS-Jade版在UbuntuKylin15.04上的安装

Ubuntu install of ROS Jade We are building Debian packages for several Ubuntu platforms, listed below. These packages are more efficient than source-based builds and are our pre......

openthings
2015/07/20
872
0
ROS-Jade版在UbuntuKylin15.04上的安装和源码编译完整脚本

ROS(http://www.ros.org/about-ros/)是一个机器人操作系统,源于斯坦福,现在由开源机器人基金会(http://www.osrfoundation.org/)进行发展。目前最新的版本是Jade。ROS并不是完整的操作系...

openthings
2015/07/20
1K
1
[译]机器人操作系统简介:终极机器人应用框架(上)

[译]机器人操作系统简介:终极机器人应用框架 /** * 原文出处:https://www.toptal.com/robotics/introduction-to-robot-operating-system * @author dogstar.huang chanzonghuang@gmail.co......

暗夜在火星
2016/03/06
292
0
在pcDuino内安装ROS Groovy

转自: http://yuanboshe.github.io/blog/2013/07/install_ros_groovy_in_pcduino.html 在pcDuino上面安装ROS,也许很多人的第一反应是参考树莓派等其他板子机的经验,或者直接编译源码。其实...

pc朵拉
2013/08/10
1K
0
在UbuntuKylin15.04上安装GIScript2015

GIScript入门教程参见:http://my.oschina.net/u/2306127/blog/484213,这里介绍基于SIP的C++封装为Python的方法和使用过程。 GIScript2015版采用了新的SIP封装,从而可以更好地与C++接口保持...

openthings
2015/06/24
320
0

没有更多内容

加载失败,请刷新页面

加载更多

PCB设计-Allegro软件入门系列-铺铜操作(下)

铺铜是PCB很常见的操作,PCB的敷铜一般都是覆地铜,增大地线面积,有利于地线阻抗降低,使电源和信号传输稳定,在高频的信号线附近敷铜,可大大减少电磁辐射干扰,起屏蔽作用。 本讲讲解啊一...

demyar
12分钟前
1
0
如何通过WASI SDK 在Linux上编译ZXing C++

Mozilla在今年三月份的时候公布了WASI。WASI的目标就是让WebAssembly在任何地方都可以运行,而不仅仅像现在这样只能运行在Node.js和Web浏览器中。WASI目前依然处于初级阶段,这篇文章分享下如...

yushulx
14分钟前
2
0
.Net界面开发神器—DevExpress官方汉化包免费下载!还在等什么?

点击获取DevExpress v19.1.7新版试用下载 DevExpress Localization Service允许您创建一组自定义的附属程序集,要将语言包添加到程序集中,请查看本文中为大家列出的对应版本的汉化包,下载并...

FILA6666
14分钟前
2
0
php生成二维码

        header('Content-Type: image/png');        //清除缓冲区,防止之前面不知道的情况下被加头部信息导致不显示图片内容        ob_clean();        $...

横着走的螃蟹
20分钟前
2
0
伪类和伪元素

伪类和伪元素 伪类和伪元素,对于绝大多数同学来说,都是耳熟能详的名字,但确实又有很多人搞不清楚它们之间的区别,以致于混淆概念。而当概念都混淆的时候,也往往意味着你不会经常使用它,...

不负好时光
22分钟前
2
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部