Ros-jade version on the UbuntuKylin15.04 of the source installation

Source: Internet
Author: User

Ros-installing from Source

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

Directory

    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 is 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 had trouble installing the packages in the command above and make sure you had added the packages.ros.org Debian rep Ository 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 isn't installable, make sure so you have the Ubuntu universe Repositor IES 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 is not currently available in the Fedora RPM repositories. Most of the other packages is available in RPM Fusion. See RPM Fusion Command line Setup.

      Any packages isn't available in RPM Fusion was staged in the Sdsm&t ROS RPM staging Repository, which was available from Csc.mcs.sdsmt.edu.

Generic (PIP):

    • If you were using a Non-debian system need to make sure, then you had all build tools (compiler, CMake, etc.) installed . You can install the all ROS Python tools via PIP:

      $ sudo pip install-u rosdep rosinstall_generator wstool rosinstall

      If There is errors with this or the ROSDEP step below, your system's version of PIP May is out-of-date. Use your system's package management to update the IT, or use the IT to update itself:

      $ sudo pip install--upgrade setuptools

      Note that on many platforms such as OSX-want to install the above-packages and use of ROS inside a virtualenv so as T o Make sure the 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 has been converted and the Both 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'll need a Catkin workspace. Create one now:

    • $ mkdir ~/ros_catkin_ws$ CD ~/ros_catkin_ws

Next we'll want to fetch the core packages so we can build them. We'll use the wstool for this. Select the Wstool command for the particular variant of your 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-j 8 src Jade-ros_comm-wet.rosinstall

This would add all of the Catkin or wet packages in the given variant and then fetch the sources into the ~/ROS_CATKIN_WS/S RC directory. The command would 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 is defined in REP 131 such as robot, perception, etc. Just Change the package path to the one 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 so you had all the required dependencies. We Use the ROSDEP tool for this:

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

This would look at all of the packages in the SRC directory and find all of the dependencies they has. Then it'll recursively install the dependencies.

The--from-paths option indicates we want to install the dependencies for a entire directory of packages, in this case SR C. The--IGNORE-SRC option indicates to ROSDEP, it shouldn ' t try to install any ROS packages in the src folder from th E Package Manager, we don't need it to since we is building them ourselves. The--rosdistro option is required because we don has a ROS environment setup yet, so we have to indicate to ROSDEP WHA T version of ROS we is building for. Finally, the-y option indicates to ROSDEP so we don ' t want to being bothered by too many prompts from the package manager.

After a while (and maybe some prompts for your password) ROSDEP would finish installing system dependencies and you can con Tinue.

Building the Catkin Workspace

Once It has completed downloading the packages and resolving the dependencies is ready to build the Catkin packages. We'll use the catkin_make_isolated command because there is both catkin and plain cmake packages in the base install, W Hen developing on your Catkin only workspaces your 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 is ~/ros_catkin_ws/install_isolated if you would like to install some wher E 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's recommended to install compiled code Into/opt/ros/jade just as the Ubuntu pack Ages would do. Don ' t does this in Ubuntu, as the packages would collide with apt-get packages. It's also possible to install elsewhere (e.g./usr), but it's not recommended unless you really know what's the doing.

Please see REP 122:filesystem Hierarchy Layout For more detailed documentation on how the installed files is placed.

Note: In the above command we is running the catkin_make_isolated command from the Catkin source folder because it have not been Installed yet, once installed it can be called directly.

Now the packages should has been installed to ~/ros_catkin_ws/install_isolated or to wherever your specified with the--in Stall-space argument. If you look in this directory you'll see that a Setup.bash file has been generated. To utilize the things installed there simply source that file. Lets do, 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'll have a to periodically update our Rosinstall file, download the L Atest sources, and rebuild our workspace.

Update the workspace

To update your workspace, first move your existing Rosinstall file so the it doesn ' t get overwritten, and generate an upd Ated version. For simplicity, we'll 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 would 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, the workspace are 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 R Workspace

Once your workspace have been rebuilt, you should source the Setup files again:

$ source ~/ros_catkin_ws/install_isolated/setup.bash


Ros-jade version on the UbuntuKylin15.04 of the source installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.