Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New documentation, installation and setup scripts (work in progress) #13

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
106abb8
Added initial version of installation script and manual (work in prog…
meyerj May 23, 2016
ce5a097
Fully working version of the installation script, added env-hooks and…
meyerj Jul 14, 2016
d14caea
Allow to source the env.sh script to stay backwards-compatible
meyerj Aug 10, 2016
e4365a3
install.sh: Fixed --url command line option and build in current work…
meyerj Nov 10, 2016
f383b22
setup.sh: also update and export the CMAKE_PREFIX_PATH
meyerj Nov 11, 2016
ebe2f7f
orocos_toolchain: find OROCOS-RTT before configuring the setup scripts
meyerj Nov 11, 2016
c1aee2f
Add travis script to test installation script
Dec 22, 2016
d19e293
Silly update to trigger travis
Dec 22, 2016
7dbe9cf
Remove comments
Dec 22, 2016
19cb9d6
Fix travis file extension
Dec 22, 2016
247da51
Fix apt dependency
Dec 22, 2016
fea9f3d
Change prefix to a writable place and enable all features
Dec 22, 2016
31bed06
Remove compiler matrix as it doesn't work properly
Dec 22, 2016
ff25a1e
Merge branch 'toolchain-2.9' into smits-patch-1
meyerj Dec 22, 2016
94115f8
Only use containerized builds
Dec 22, 2016
d744711
Fix readlink -f on MacOS X
meyerj Dec 22, 2016
be9afaf
install.sh: do not call lsb_release on non-Linux platforms
meyerj Dec 23, 2016
6a586aa
Merge pull request #16 from orocos-toolchain/smits-patch-1
Dec 23, 2016
f4f622f
Add missing dependency if reinstall if required
Dec 23, 2016
4f1d45c
Make travis build verbose
Dec 23, 2016
86b1a35
replace . with /Users/rubensmits/orocos-toolchain for OSX
Dec 23, 2016
11caeca
Update RTT
Dec 23, 2016
8c9f0b7
install.sh: fixed type and verbose display of features
meyerj Dec 23, 2016
0449b24
Link gnu-getopt
Dec 27, 2016
fdc6786
Force linking of gnu-getopt
Dec 27, 2016
64533be
Add apt addons to matrix entry
Dec 28, 2016
be98b08
rtt: updated submodule to include Boost 1.62 patches
meyerj Dec 28, 2016
a06457a
rtt: updated submodule
meyerj Dec 28, 2016
cb6bc1f
Remove broken xenial build matrix entry
Dec 29, 2016
eaddc00
Update rtt
Dec 29, 2016
64637b5
rtt: updated submodule
meyerj Dec 29, 2016
933d56e
Merge branch 'toolchain-2.9' into installation-script
meyerj Dec 29, 2016
9f8e573
Look for env-hooks in etc/orocos/profile.d, without the OROCOS_TARGET…
meyerj Dec 29, 2016
7ab4d8c
Merge branch 'installation-script' into travis-for-install-script
meyerj Dec 29, 2016
71293b5
update submodule rtt
meyerj Jan 5, 2017
f08e9c6
updated submodules rtt and ocl
meyerj Jan 16, 2017
2e62eb7
travis: add readline dependency for OCL
Feb 14, 2017
71d9b01
travis: disable building of tests
meyerj Feb 14, 2017
cb86950
Merge pull request #15 from orocos-toolchain/travis-for-install-script
meyerj Dec 12, 2017
045c023
Merge branch 'toolchain-2.9' into installation-script
meyerj Dec 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
install/
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
language: c++
sudo: false

addons:
apt:
packages:
- build-essential
- git
- cmake
- libboost-all-dev
- libxml-xpath-perl
- omniorb
- omniidl
- omniorb-idl
- omniorb-nameserver
- libomniorb4-dev

matrix:
include:
- os: linux
dist: trusty
- os: osx
osx_image: xcode7.3
- os: osx
osx_image: xcode8.2

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew reinstall boost cmake readline omniorb gnu-getopt ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew link --force gnu-getopt ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew link --force readline ; fi

script:
- ./install.sh --verbose --prefix $HOME/install --enable-corba --enable-mqueue
166 changes: 166 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# The OROCOS Toolchain Installation Guide

This document explains how the [Orocos](http://www.orocos.org/) toolchain can be installed and configured.

## Table of Contents
<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->

- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Supported platforms (targets)](#supported-platforms-targets)
- [The versioning scheme](#the-versioning-scheme)
- [Dependencies on other libraries](#dependencies-on-other-libraries)
- [Binary packages](#binary-packages)
- [Ubuntu and Debian](#ubuntu-and-debian)
- [Install from source](#install-from-source)
- [Build tools and dependencies](#build-tools-and-dependencies)
- [Debian/Ubuntu](#debianubuntu)
- [Other Linux distributions](#other-linux-distributions)
- [MacOS X](#macos-x)
- [Windows](#windows)
- [Quick start](#quick-start)
- [Download the sources](#download-the-sources)
- [Download source archive](#download-source-archive)
- [Clone from GitHub](#clone-from-github)
- [3. Build and Install](#3-build-and-install)
- [Getting Started](#getting-started)
- [Cross Compiling Orocos](#cross-compiling-orocos)

<!-- /TOC -->

## Introduction

This sections explains the supported Orocos targets and the Orocos versioning scheme.

### Supported platforms (targets)

Orocos was designed with portability in mind. Currently, we support RTAI/LXRT (http://www.rtai.org), GNU/Linux userspace, Xenomai (http://www.xenomai.org), Mac OS X (http://www.apple.com) and native Windows using Microsoft Visual Studio. So, you can first write your software as a normal Linux/Mac OS X program, using the framework for testing and debugging purposes in plain userspace (Linux/Mac OS X) and recompile later to a real-time target or MS Windows.

### The versioning scheme

A particular version is represented by three numbers separated by dots. For example:

2.8.1 : Release 2, Feature update 8, bug-fix revision 1.

### Dependencies on other libraries

Before you install Orocos, verify that you have the following software installed on your platform:

| Program / Library | Minimum Version | Description |
|---------------------------------|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CMake | 2.8.3 (all platforms) | See resources on cmake.org for pre-compiled packages in case your distribution does not support this version |
| Boost C++ Library | 1.33.0 (1.40.0 recommended!) | Boost.org from version 1.33.0 on has a very efficient (time/space) lock-free smart pointer implementation which is used by Orocos. 1.36.0 has boost::intrusive which we require on Windows with MSVS. 1.40.0 has a shared_ptr implementation we require when building Service objects. |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update minimum Boost version to 1.40, check orocos-toolchain/rtt#199.

| Boost C++ Test Library | 1.33.0 (During build only) | Boost.org test library ('unit_test_framework') is required if you build the RTT from source and ENABLE_TESTS=ON (default). The RTT libraries don't depend on this library, it is only used for building our unit tests. |
| Boost C++ Thread Library | 1.33.0 (Mac OS-X only) | Boost.org thread library is required on Mac OS-X. |
| Boost C++ Serialization Library | 1.37.0 | Boost.org serialization library is required for the type system and the MQueue transport. |
| GNU gcc / g++ Compilers | 3.4.0 (Linux/Cygwin/Mac OS X) | gcc.gnu.org Orocos builds with the GCC 4.x series as well. |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be verified...

| MSVS Compilers | 2005 | One can download the MS VisualStudio 2008 Express edition for free. |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be verified...

| Xerces C++ Parser | 2.1 (Optional) | Xerces website Versions 2.1 until 3.1 are known to work. If not found, an internal XML parser is used. |
| ACE & TAO | TAO 1.3 (Optional) | ACE & TAO website When you start your components in a networked environment, TAO can be used to set up communication between components. CORBA is used as a 'background' transport and is hidden for normal users. |
| Omniorb | 4 (Optional) | Omniorb website Omniorb is more robust and faster than TAO, but has less features. CORBA is used as a 'background' transport and is hidden for normal users. |

All these packages are provided by most Linux distributions. In Mac OS X, you can install them easily using fink or macports. Take also a look on the Orocos.org RTT download page for the latest information.

## Binary packages

### Ubuntu and Debian

The [Robot Operating System (ROS)](http://www.ros.org/) project provides binary packages for Ubuntu and Debian Jessie. See [REP 3 - Target Platforms](http://www.ros.org/reps/rep-0003.html) for a list of supported platforms. The dependencies of the Orocos core packages to other ROS packages are minimal. This is the recommended way to get started with the toolchain for Ubuntu and Debian users.

Check out the [ROS Installation instructions](http://wiki.ros.org/ROS/Installation) for detailed instructions on how to install a ROS base system. Afterwards, the Orocos Toolchain can be installed with the command

```
sudo apt-get install ros-<distro>-orocos-toolchain
```

## Install from source

### Build tools and dependencies

#### Debian/Ubuntu

Most dependencies mentioned above can be installed using the APT package management system:

```
sudo apt-get install build-essential git cmake libboost-all-dev libxml-xpath-perl
```

*Optional:* In case you want to build RTT with CORBA support, you also need to install the OmniORB (recommended) or TAO development packages:

```
sudo apt-get install omniorb omniidl omniorb-idl omniorb-nameserver libomniorb4-dev
```

#### Other Linux distributions
*TODO*

#### MacOS X
*TODO*

#### Windows
*TODO*

### Quick start

The [orocos_toolchain](https://github.com/orocos-toolchain/orocos_toolchain) repository contains a shell script which implements all of the following steps and is the recommended way to install the Orocos toolchain from source:

For Linux:
```
mkdir -p ~/orocos-toolchain
cd ~/orocos-toolchain
wget https://raw.githubusercontent.com/orocos-toolchain/orocos_toolchain/master/install.sh
./install.sh --help
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The downloaded script is not executable by default, so either we prepend this with sh or we add a chmod +x ./install.sh step.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either that or prefix the script with bash:

bash install.sh --help

Or shortcut that downloads and runs the script in a single command is:

wget -qO - https://raw.githubusercontent.com/orocos-toolchain/orocos_toolchain/master/install.sh | bash -s -- [options]

(motivated by https://get.docker.com/, we could create a similar alias as http://get.orocos.org/)

```

If you want to download or clone the sources manually and have full control over the build process, feel free to go o

### Download the sources

#### Download source archive

The latest released version of the toolchain can be downloaded from here:
http://www.orocos.org/orocos/toolchain

Extract the archive into a source directory, e.g. `~/orocos-toolchain`:
```
mkdir -p ~/orocos-toolchain && cd ~/orocos-toolchain
wget http://www.orocos.org/stable/toolchain/v2.x.x/orocos-toolchain-2.x.x-src.tar.bz2
tar xvjf orocos-toolchain-2.x.x-src.tar.bz2
cd orocos-toolchain-*
```

Note that the archive files provided by GitHub at https://github.com/orocos-toolchain/orocos_toolchain/releases will not work as the repository contains submodules, which are unfortunately not included in the files.

#### Clone from GitHub

If you want to use the latest development version or actively contribute to Orocos, it is recommended to clone the toolchain directly from GitHub:

```
mkdir -p ~/orocos-toolchain && cd ~/orocos-toolchain
git clone --recursive https://github.com/orocos-toolchain/orocos_toolchain.git
cd orocos-toolchain
```

In order to select a specific major and minor version of the toolchain, you can specify the branch to be cloned explicitly with the `-b` option, e.g.:

```
mkdir -p ~/orocos-toolchain && cd ~/orocos-toolchain
git clone --recursive https://github.com/orocos-toolchain/orocos_toolchain.git -b toolchain-2.9
cd orocos-toolchain
```

The `--recursive` argument is required because the toolchain GIT repository uses submodules to manage the links to the individual source repositories.

### 3. Build and Install

All toolchain packages rely on cmake as the underlying build tool, but every package has to be configured, build and installed in isolation.
Advanced users can invoke cmake and make directly or use [catkin](http://wiki.ros.org/catkin) or [catkin_tools](https://catkin-tools.readthedocs.io/en/latest/) as a build tool.
Otherwise it is recommended to use the `install.sh` script provided in the toolchain repository, which iterates over all toolchain packages in the right order and invokes cmake, make and make install within the `build/<package>` directory for each of them.

## Getting Started

*to be copied from http://www.orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-installation.html*

## Cross Compiling Orocos

*to be copied from http://www.orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-installation.html*
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# The OROCOS Toolchain

The Open RObot COntrol Software ([Orocos](http://www.orocos.org/)) Toolchain is a bundle of multiple packages, which need to be build and installed separately.

- [Orocos Real-Time Toolkit (rtt)](https://github.com/orocos-toolchain/rtt) - a component framework that allows us to write real-time components in C++
- [Orocos Log4cpp (log4cpp)](https://github.com/orocos-toolchain/log4cpp) -
a patched version of the [Log4cpp](http://log4cpp.sourceforge.net/) library for flexible logging to files, syslog, IDSA and other destinations
- [Orocos Component Library (ocl)](https://github.com/orocos-toolchain/ocl) - the necessary components to start an application and interact with it at run-time

Until version 2.8 [orogen](http://www.rock-robotics.org/stable/documentation/orogen/) and [typegen](http://www.rock-robotics.org/stable/documentation/orogen/), tools to generate ready-to-compile-and-run code from existing headers or component description files based on the Ruby language, have been an integral part of the Orocos Toolchain. For later versions we refer to the installation instructions of the [Rock - the Robot Construction Kit](http://www.rock-robotics.org/stable/index.html) project.

You might also want to have a look at the following sister projects, which are out of the scope of this manual:
- [Orocos Kinematics Dynamics Library (KDL)](http://www.orocos.org/kdl) - an application independent framework for modeling and computation of kinematic chains
- [Orocos Bayesian Filtering Library (BFL)](http://www.orocos.org/bfl) - an application independent framework for inference in Dynamic Bayesian Networks, i.e., recursive information processing and estimation algorithms based on Bayes' rule
- [Reduced Finite State Machine (rFSM)](https://orocos.github.io/rFSM/README.html) - a small and powerful statechart implementation in Lua

## Get Started?
Check out [INSTALL.md](INSTALL.md).
66 changes: 37 additions & 29 deletions env.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
#!/bin/sh
#
# The purpose of this script is to setup the environment for the Orocos Toolchain
# (like setup.sh) and execute a command.
#
# Usage: env.sh COMMANDS
#
# This file will be installed to CMAKE_INSTALL_PREFIX by cmake with the
# @-references replaced by the value of the respective cmake variable.
#

RUBY_VERSION=`ruby --version | awk '{ print $2; }' | sed -e "s/\(.*\..*\)\..*/\1/"`
RUBY_ARCH=`ruby --version | sed -e 's/.*\[\(.*\)\]/\1/'`
export RUBYOPT=-rubygems
export TYPELIB_USE_GCCXML=1


if [ x$ROS_ROOT != x ]; then
### ROS
export RUBYLIB=`rospack find utilrb`/lib:`rospack find orogen`/lib:`rosstack find orocos_toolchain`/install/lib/ruby/${RUBY_VERSION}/${RUBY_ARCH}:`rosstack find orocos_toolchain`/install/lib/ruby/${RUBY_VERSION}
export GEM_HOME=`rosstack find orocos_toolchain`/.gems
export PATH=`rosstack find orocos_toolchain`/install/bin:`rospack find orogen`/bin:`rosstack find orocos_toolchain`/.gems/bin:$PATH
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:`rosstack find orocos_toolchain`/install/lib/pkgconfig
if [ $# -eq 0 ] ; then
if [ -z "$BASH_SOURCE" -a -z "$_" ]; then
/bin/echo "Usage: env.sh COMMANDS" >&2
exit 1
fi
fi

elif [ x${BASH} != x ]; then
### Bash non-ROS
cd `dirname ${BASH_SOURCE[0]}`
envpath=$PWD
cd - > /dev/null
export RUBYLIB=$envpath/utilrb/lib:$envpath/orogen/lib:$envpath/install/lib/ruby/${RUBY_VERSION}/${RUBY_ARCH}:$envpath/install/lib/ruby/${RUBY_VERSION}
export GEM_HOME=$envpath/.gems
export PATH=$envpath/install/bin:$envpath/orogen/bin:$envpath/.gems/bin:$PATH
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:$envpath/install/lib/pkgconfig
# find OROCOS installation folder from CMAKE_INSTALL_PREFIX or $0
case "@CMAKE_INSTALL_PREFIX@" in
@*) ;;
*) OROCOS_INSTALL_PREFIX="@CMAKE_INSTALL_PREFIX@" ;;
esac
if [ -z "$OROCOS_INSTALL_PREFIX" ]; then
OROCOS_INSTALL_PREFIX=`dirname $0`
OROCOS_INSTALL_PREFIX=`cd ${OROCOS_INSTALL_PREFIX}; pwd`
fi

elif [ `basename $PWD` = orocos_toolchain ]; then
### non-Bash, non-ROS
export RUBYLIB=$PWD/utilrb/lib:$PWD/orogen/lib:$PWD/install/lib/ruby/${RUBY_VERSION}/${RUBY_ARCH}:$PWD/install/lib/ruby/${RUBY_VERSION}
export GEM_HOME=$PWD/.gems
export PATH=$PWD/install/bin:$PWD/orogen/bin:$PWD/.gems/bin:$PATH
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:$PWD/install/lib/pkgconfig
# source setup.sh
if [ -f ${OROCOS_INSTALL_PREFIX}/setup.sh ]; then
. ${OROCOS_INSTALL_PREFIX}/setup.sh
elif [ -f ${OROCOS_INSTALL_PREFIX}/etc/orocos/setup.sh ]; then
. ${OROCOS_INSTALL_PREFIX}/etc/orocos/setup.sh
elif [ -f /etc/orocos/setup.sh ]; then
. /etc/orocos/setup.sh
else
echo "Error: This script must be sourced from the 'orocos_toolchain' directory when not running in a ROS_ROOT nor bash environment."
echo
echo "env.sh: could not find Orocos setup.sh script" >&2
[ $# -eq 0 ] || exit 1
fi

# execute command
[ $# -eq 0 ] || exec "$@"
Loading