Project

General

Profile

Installation from source

This type of installation is recommended if you intend to extend a package, fix some issue, or if you need to use the latest, not yet released, version of a package.

Checkout repositories

telekyb3 software repositories are managed by git. You first need to locate the package you are interested in and its git repository URL. In general, packages are hosted on the Openrobots projects site and you can search for projects here: https://git.openrobots.org/search?projects=1.

The repository access links are displayed on the project overview. By default, you don’t have commit access, so you should use the git protocol to checkout the repository read-only. This does not prevent you from committing your changes locally and submitting pull-requests.

You can then clone the repository. For instance, to clone the rotorcraft-genom3 component:

$ mkdir ~/src
$ cd ~/src
$ git clone git://git.openrobots.org/robots/telekyb3/rotorcraft-genom3

Configuring with autoconf

Most of the telekyb3 software is built using the autoconf system. Check the online autoconf manual if you feel lost.

After cloning the repository, the autoconf system needs to be bootstrapped. This has to be done only once for a given repository and this will produce a configure script in the root of the repository.

$ cd ~/src/rotorcraft-genom3
$ autoreconf -vif

The build system must then be configured by running the configure script. This is also to be done only once, unless you need to change some configure options.

You need to choose an installation prefix where packages will be installed. This can be any directory for which you have the write permission. The recommended value is $HOME/devel and this documentation assumes this path is used.

Note If you also have a robotpkg installation, the prefix used here must be different from your robotpkg installation prefix.

In order to avoid repeating the same command lines for all packages, autoconf can be configured to use default values. This is done via a shell script file that you place in your home directory. When the present documentation package is installed, this file is available in $HOME/openrobots/share/doc/telekyb3/examples/etc/config.site. Copy it for instance to $HOME/devel/etc/config.site and edit it to your taste.

# autoconf defaults

# default prefix if not specified with ../configure --prefix=...
if test "$prefix" = NONE; then prefix=$HOME/devel; fi

# compiler options
: ${CFLAGS:=-g -O3 -Wall}
: ${CXXFLAGS:=${CFLAGS}}

# genom components options, when configuring such a package
case $ac_user_opts in
*"
with_templates
"*)
  if test "${with_templates:-unset}" = unset; then
    # this compiles for the pocolibs middleware
    with_templates=pocolibs/server,pocolibs/client/c

    # this would also compile for the ros middleware
    # with_templates=$with_templates,ros/server,ros/client/c,ros/client/ros
  fi;;
esac

This file must be referenced by the CONFIG_SITE environment variable. You can export it in your current shell with the following command, or copy this command to your shell configuration file (e.g. ~/.bashrc, or similar) for a permanent effect.

$ export CONFIG_SITE=$HOME/devel/etc/config.site

It is recommended to configure the software from a separate build directory.

$ cd ~/src/rotorcraft-genom3
$ mkdir build
$ cd build
$ export CONFIG_SITE=$HOME/devel/etc/config.site 1
$ ../configure
1 This is to make sure that configure uses the defaults from the config.site file, but this is of course not needed if you have setup your shell startup file correctly.

If you need to change the default options, just pass them to the ../configure command. For instance, if you need to compile only one component for the ROS middleware instead of pocolibs, you can use the following:

$ ../configure --with-templates=ros/server,ros/client/c,ros/client/ros

Building and installing

The software can then be built and installed easily by using the make command:

$ cd ~/src/rotorcraft-genom3
$ cd build
$ make install

If you modify the source and need to recompile and reinstall, just issue those commands again.