1. Linux installation from sources¶
The instructions for installing the eProsima Fast DDS Monitor application from sources and the required Qt installation are provided in this page. It is organized as follows:
1.1. Dependencies installation¶
Fast DDS Monitor depends on eProsima Fast DDS library, eProsima Fast DDS Statistics Backend library, Qt and certain Debian packages. This section describes the instructions for installing eProsima Fast DDS dependencies and requirements in a Linux environment from sources. The following packages will be installed:
foonathan_memory_vendor
, an STL compatible C++ memory allocator library.fastcdr
, a C++ library that serializes according to the standard CDR serialization mechanism.fastdds
, the core library of eProsima Fast DDS library.fastdds_statistics_backend
, a C++ library that provides a simple and easy-to-use API for interacting with data from Fast DDS statistics module
First of all, the Requirements and Dependencies detailed below need to be met. Afterwards, the user can choose whether to follow either the colcon or the CMake installation instructions.
1.1.1. Requirements¶
The installation of eProsima Fast DDS in a Linux environment from binaries requires the following tools to be installed in the system:
1.1.1.1. CMake, g++, pip, wget and git¶
These packages provide the tools required to install eProsima Fast DDS 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.1.1.2. Colcon¶
colcon is a command line tool based on CMake aimed at building sets of software packages. 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 pip3
installation command.
1.1.1.3. Gtest¶
Gtest is a unit testing library for C++. By default, eProsima Fast DDS Monitor does not compile tests. It is possible to activate them with the opportune CMake options when calling colcon or CMake. For more details, please refer to the CMake options section. For a detailed description of the Gtest installation process, please refer to the Gtest Installation Guide.
1.1.2. Dependencies¶
eProsima Fast DDS has the following dependencies, when installed from sources in a Linux environment:
1.1.2.1. 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.1.2.2. 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.1.2.3. eProsima dependencies¶
If it already exists in the system an installation of Fast DDS library with version greater than 2.3.0 and an installation of Fast DDS Statistics Backend, just source these libraries when building the Fast DDS Monitor by using the command:
source <fastdds-installation-path>/install/setup.bash
In other case, just download Fast DDS project from sources and build it together with Fast DDS Monitor using colcon as it is explained in section Colcon installation.
1.1.2.4. Qt 5.15¶
Qt 5.15 is needed in order to build Fast DDS Monitor. To install this Qt version, refer to Qt Downloads website.
Note
When going through the installation steps, make sure the box of component Qt Charts is checked.
1.2. Colcon installation¶
Create a
Fast-DDS-Monitor
directory and download the.repos
file that will be used to install eProsima Fast DDS Monitor and its dependencies:mkdir -p ~/Fast-DDS-Monitor/src cd ~/Fast-DDS-Monitor wget https://raw.githubusercontent.com/eProsima/Fast-DDS-monitor/main/fastdds_monitor.repos vcs import src < fastdds_monitor.repos
Note
In case there is an already Fast DDS installation in the system it is not required to download and build every dependency in the
.repos
file. It is just needed to download and build the Fast DDS Monitor project having sourced its dependencies. Refer to section eProsima dependencies in order to check how to source Fast DDS and Fast DDS Statistics Backend libraries.In order to build the project, it must be specified the path to the Qt 5.15
gcc_64
installation path. Using the standard Qt installation, this path should be similar to/home/<user>/Qt/5.15.2/gcc_64
.Build the packages:
colcon build --cmake-args -DQT_PATH=<qt-installation-path>
Note
Being based on CMake, it is possible to pass the CMake configuration options to the colcon build
command. For more information on the specific syntax, please refer to the
CMake specific arguments
page of the colcon manual.
1.3. CMake installation¶
This section explains how to compile eProsima Fast DDS Monitor with CMake, either locally or globally.
1.3.1. Local installation¶
Create a
Fast-DDS
directory where to download and build eProsima Fast DDS Monitor and its dependencies:mkdir ~/Fast-DDS-Monitor
Clone the following dependencies and compile them using CMake.
-
cd ~/Fast-DDS-Monitor git clone https://github.com/eProsima/foonathan_memory_vendor.git mkdir foonathan_memory_vendor/build cd foonathan_memory_vendor/build cmake .. -DCMAKE_INSTALL_PREFIX=~/Fast-DDS-Monitor/install -DBUILD_SHARED_LIBS=ON cmake --build . --target install
-
cd ~/Fast-DDS-Monitor git clone https://github.com/eProsima/Fast-CDR.git mkdir Fast-CDR/build cd Fast-CDR/build cmake .. -DCMAKE_INSTALL_PREFIX=~/Fast-DDS-Monitor/install cmake --build . --target install
-
cd ~/Fast-DDS-Monitor git clone https://github.com/eProsima/Fast-DDS.git mkdir Fast-DDS/build cd Fast-DDS/build cmake .. -DCMAKE_INSTALL_PREFIX=~/Fast-DDS-Monitor/install -DCMAKE_PREFIX_PATH=~/Fast-DDS-Monitor/install cmake --build . --target install
-
cd ~/Fast-DDS-Monitor git clone https://github.com/eProsima/Fast-DDS-statistics-backend.git mkdir Fast-DDS-statistics-backend/build cd Fast-DDS-statistics-backend/build cmake .. -DCMAKE_INSTALL_PREFIX=~/Fast-DDS-Monitor/install -DCMAKE_PREFIX_PATH=~/Fast-DDS-Monitor/install cmake --build . --target install
-
Once all dependencies are installed, install eProsima Fast DDS Monitor:
cd ~/Fast-DDS-Monitor git clone https://github.com/eProsima/Fast-DDS-monitor.git mkdir Fast-DDS-monitor/build cd Fast-DDS-monitor/build cmake .. \ -DCMAKE_INSTALL_PREFIX=~/Fast-DDS-Monitor/install \ -DCMAKE_PREFIX_PATH=~/Fast-DDS-Monitor/install \ -DQT_PATH=<qt-installation-path> cmake --build . --target install
Note
By default, eProsima Fast DDS Monitor does not compile tests.
However, they can be activated by downloading and installing Gtest
and building with CMake option -DBUILD_TESTS=ON
.
1.3.2. Global installation¶
To install eProsima Fast DDS system-wide instead of locally, remove all the flags that
appear in the configuration steps of Fast-CDR
, Fast-DDS
, Fast-DDS-Statistics-Backend
, and
Fast-DDS-Monitor
, and change the first in the configuration step of foonathan_memory_vendor
to the
following:
-DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_SHARED_LIBS=ON
1.4. Run an application¶
To run the eProsima Fast DDS Monitor application, source the Fast DDS and Fast DDS Statistics Backend libraries
and execute the executable file that has been installed in <install-path>/fastdds_monitor/bin/fastdds_monitor
:
# If built has been done using colcon, all projects could be sourced as follows
source install/setup.bash
./<install-path>/fastdds_monitor/bin/fastdds_monitor
Be sure that this executable has execute permissions.