Project

General

Profile

Installation with robotpkg

This section describes the telekyb3 installation procedure via robotpkg. For a general guide on how to bootstrap and use a robotpkg installation, check http://robotpkg.openrobots.org/install.html.

Bootstrap robotpkg

Before using robotpkg, it needs to be bootstrapped, that is installed and configured. This has to be done only once on a given computer and for a given user.

The steps for the bootstrap procedure are as follow:

  1. Check that you have a working C compiler and the make tool. If not, check your unix distribution for how to install these.

  2. Clone the robotpkg repository in a desired path, for instance in ${HOME}/src.

    $ mkdir ~/src
    $ cd ~/src
    $ git clone git://git.openrobots.org/robots/robotpkg
  3. 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/openrobots and this documentation assumes this path is used.

    Note If not specified, the default value is /opt/openrobots and is meant for a shared usage between different users on the same computer.
  4. Run the robotpkg bootstrap command with your desired installation prefix in order to setup your installation.

    $ ~/src/robotpkg/bootstrap/bootstrap --prefix $HOME/openrobots
  5. Once the command is completed, it will print a short reminder about basic configuration details. In particular, you need to configure your shell PATH variable so that robotpkg tools and configuration file are found automatically:

    $ export PATH=$PATH:$HOME/openrobots/bin:$HOME/openrobots/sbin

    In order to make this change permanent, you must edit your shell startup file and add the above command in that file. For instance, if you use the bash shell, the file to be edited would be .bashrc. See your shell documentation for details.

  6. Check your installation with robotpkg_info, that should print this output:

    $ robotpkg_info
    pkg_install-0       Package management and administration tools for robotpkg

Configuration

robotpkg can be used right away after bootstrapping, but you can fine tune a few settings to improve your workflow. Configuration is done via a single text file, robotpkg.conf installed in $HOME/openrobots/etc/robotpkg.conf. The default file contains comments that serve as a documentation. Here is a simplified sample file tuned for telekyb3. When the present documentation package is installed, this file is available in $HOME/openrobots/share/doc/telekyb3/examples/etc/ and it can be copied to $HOME/openrobots/etc/robotpkg.conf in place of the default file.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Sample robotpkg configuration file for telekyb3

# robotpkg installation prefix. Don't change or re-run bootstrap.
LOCALBASE=	${HOME}/openrobots

# Parallel compilation jobs. Tune according to your computer.
MAKE_JOBS=      4


# --- Telekyb3 packages ----------------------------------------------------

# Sample package sets. Edit to your taste.

PKGSET.telekyb3=\
  hardware/joystick-genom3      \
  localization/pom-genom3       \
  localization/optitrack-genom3 \
  motion/nhfc-genom3            \
  motion/uavatt-genom3          \
  motion/uavpos-genom3          \
  path/maneuver-genom3          \
  hardware/tk3-paparazzi        \
  robots/rotorcraft-genom3      \
  sysutils/tk3-flash

PKGSET.simulation=\
  simulation/mrsim-gazebo       \
  simulation/mrsim-genom3       \
  simulation/optitrack-gazebo

PKGSET.genom3=\
  architecture/genom3           \
  architecture/genom3-pocolibs  \
  architecture/genom3-ros       \
  net/genomix                   \
  shell/eltclsh                 \
  supervision/matlab-genomix    \
  supervision/py-python-genomix \
  supervision/tcl-genomix


# --- options --------------------------------------------------------------

# For using pocolibs-genom3 for genom3 components, enable this:
PKG_DEFAULT_OPTIONS+= pocolibs-server pocolibs-client-c

# For using ros-genom3, enable this:
# PKG_DEFAULT_OPTIONS+= ros-server ros-client-ros ros-client-c

# You can also tune options for a group of packages by using
# PKG_OPTIONS.<pattern>. E.g.: PKG_OPTIONS.%-genom3 += <option>

# Check the output of `make show-options` in a package directory for
# available options.


# --- system packages ------------------------------------------------------

# Matlab installation prefix may have to be tuned by uncommenting the following
# line.
# PREFIX.matlab= /usr/local/matlab
# It should be set so that ${PREFIX.matlab}/bin/matlab is the path to your local
# matlab startup script.

This sample file defines three package sets: telekyb3, simulation and genom3 via the PKGSET special variable. These optional sets are a group of packages (and their dependencies) that are often installed or updated together. They reduce the number of commands involved in updating the packages. For more information, check robotpkg documentation: defining collections of packages.

A default list of packages options is also defined via the PKG_DEFAULT_OPTIONS variable. Here, the default middleware for genom components is set to pocolibs. You can also enable the installation of ROS components by uncommenting the corresponding line.

Installation

To install the telekyb3 components, the PKGSET variables showed in the sample configuration file become handy: each package set defines its own update-<set> target where <set> is the name of the set to update. These targets can be invoked anywhere inside robotpkg. So, to install the telekyb3 set:

$ cd ~/src/robotpkg
$ make update-telekyb3

In case of missing system dependencies, i.e. dependencies not managed by robotpkg, the update command will stop and prompt you for missing packages. For instance, on a Ubuntu distribution:

$ cd ~/src/robotpkg
$ make update-telekyb3
...
ERROR: ======================================================================
ERROR: Missing system packages required for pkg_install-20110805.12:
ERROR:
ERROR:  bzip2   (Ubuntu package bzip2 libbz2-dev)
ERROR:
ERROR: Please use the system package management tool to install these
ERROR: dependencies. If a robotpkg version of a dependency is available,
ERROR: you can configure robotpkg.conf to use this version instead.
ERROR:
ERROR: See ~/robotpkg/pkgtools/pkg_install/work/sysdep.log for details.
ERROR: ======================================================================

You have to install these packages on your system, using the regular package manager of your distribution (e.g. apt, dnf, …​). Usually, along with each missing package name, a hint about the specific name for your system is provided for your convenience. Once the missing packages are installed, simply issue the make update (or make update-<set>) command again: it will resume the update where it stopped previously. For instance:

$ sudo apt install bzip2 libbz2-dev
...
$ cd ~/src/robotpkg
$ make update-telekyb3
Note

To install only a specific package, you can also invoke the make update command from inside the robotpkg directory of the corresponding package.

For instance, to install the rotorcraft-genom3 component and all its dependencies:

$ cd ~/src/robotpkg/robots/rotorcraft-genom3
$ make update

Updates

Packages are updated on a regular basis. To keep up-to-date, you need to regularly update your copy of the robotpkg repository, using git pull or similar, so that the package descriptions are updated. Then, run make update or make update-<set> command for the packages you are interested in. For instance:

$ cd ~/src/robotpkg
$ git pull
$ make update-telekyb3

This will update all outdated packages, and the packages that depend on them.