1. Linux installation from sources

1.1. Sub-packages

The AML-IP is constituted of several sub-packages. Depending on the use of those packages, some or all of them must be built. These are the packages of AML-IP and the dependencies between them:

Sub-package

Description

Depends on

amlip_cpp

Main C++ library with the implementation and API to create AML-IP Nodes.

amlip_swig

Project to auto-generate a Python library from amlip_cpp.

amlip_cpp

amlip_py

Main Python library with API to create AML-IP Nodes.

amlip_swig

amlip_docs

Sphinx documentation project.

1.2. Dependencies

These are the dependencies required in the system before building AML-IP from sources.

1.2.1. CMake, g++, pip, wget and git

These packages provide the tools required to install AML-IP and its dependencies from command line. Install CMake, g++, pip, wget and git using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:

sudo apt install cmake g++ pip wget git

1.2.2. Asio and TinyXML2 libraries

Asio is a cross-platform C++ library for network and low-level I/O programming, which provides a consistent asynchronous model. TinyXML2 is a simple, small and efficient C++ XML parser. Install these libraries using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:

sudo apt install libasio-dev libtinyxml2-dev

1.2.3. OpenSSL

OpenSSL is a robust toolkit for the TLS and SSL protocols and a general-purpose cryptography library. Install OpenSSL using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:

sudo apt install libssl-dev

1.2.4. yaml-cpp

yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec, and is used by DDS Router application to parse the provided configuration files. Install yaml-cpp using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:

sudo apt install libyaml-cpp-dev

1.2.5. SWIG

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. In this project, it is used to wrap amlip_cpp C++ API to generate a Python library. Install SWIG using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:

sudo apt install swig

1.2.6. Colcon

Install the ROS 2 development tools (colcon and vcstool) by executing the following command:

pip3 install -U colcon-common-extensions vcstool

Note

If this fails due to an Environment Error, add the --user flag to the pip installation command.

1.2.7. Gtest

Gtest is a unit testing library for C++. For a detailed description of the Gtest installation process, please refer to the Gtest Installation Guide.

If using colcon, it is also possible to clone the Gtest Github repository into the DDS Router workspace and compile it as a dependency package. Add this new package to .repos file before importing the sources:

googletest-distribution:
    type: git
    url: https://github.com/google/googletest.git
    version: release-1.12.1

1.2.8. eProsima dependencies

These are the eProsima libraries required for building AML-IP:

  • foonathan_memory_vendor, an STL compatible C++ memory allocation library.

  • fastcdr, a C++ library that serializes according to the standard CDR serialization mechanism.

  • fastrtps, the core library of eProsima Fast DDS library.

  • cmake_utils, an eProsima utilities library for CMake.

  • cpp_utils, an eProsima utilities library for C++.

  • ddsrouter_core, the eProsima DDS Router library C++.

If they are already available in the system there is no need to build them again, just source them when building the AML-IP. If using CMake, add the already libraries installation paths to LD_LIBRARY_PATH. If using colcon, use the following command to source them:

source <eprosima-dependencies-installation-path>/install/setup.bash

1.3. Installation methods

There are two main possibilities to build AML-IP from sources in Linux. One of them uses CMake and the other colcon, an auto-build framework.

Note

Colcon version is advised for non advanced users as it is easier and neater.