1. Linux installation from sources

The instructions for installing the eProsima Fast DDS Spy from sources and its required dependencies are provided in this page. It is organized as follows:

1.1. Dependencies installation

Fast DDS Spy depends on eProsima Fast DDS library and certain Debian packages. This section describes the instructions for installing Fast DDS Spy dependencies and requirements in a Linux environment from sources. The following packages will be installed:

  • 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 utils library for CMake.

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

  • ddspipe, an eProsima internal library that enables the communication of DDS interfaces.

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 Spy in a Linux environment from sources 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 Spy 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 Spy 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.

It is also possible to clone the Gtest Github repository into the eProsima Fast DDS Spy workspace and compile it with colcon as a dependency package. Use the following command to download the code:

git clone --branch release-1.11.0 https://github.com/google/googletest src/googletest-distribution

1.1.2. Dependencies

eProsima Fast DDS Spy 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. yaml-cpp

yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec, and is used by Fast DDS Spy 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.1.2.4. eProsima dependencies

If it already exists in the system an installation of Fast DDS and DDS Pipe libraries, just source this libraries when building eProsima Fast DDS Spy by running the following commands. In other case, just skip this step.

source <fastdds-installation-path>/install/setup.bash
source <ddspipe-installation-path>/install/setup.bash

1.2. Colcon installation

  1. Create a fastdds-spy directory and download the .repos file that will be used to install eProsima Fast DDS Spy and its dependencies:

    mkdir -p ~/fastdds-spy/src
    cd ~/fastdds-spy
    wget https://raw.githubusercontent.com/eProsima/Fast-DDS-Spy/main/fastddsspy.repos
    vcs import src < fastddsspy.repos
    

    Note

    In case there is already a 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 eProsima Fast DDS Spy project having sourced its dependencies. Refer to section eProsima dependencies in order to check how to source Fast DDS library.

  2. Build the packages:

    colcon build --packages-up-to-regex fastddsspy
    

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

There exist the possibility to install Fast DDS Spy by CMake, and could be see in following section. However Colcon installation is recommended.

1.4. Run an application

To run the Fast DDS Spy tool, source the installation path and execute the executable file that has been installed in <install-path>/fastddsspy_tool/bin/fastddsspy:

# If built has been done using colcon, all projects could be sourced as follows
source install/setup.bash
fastddsspy

Be sure that this executable has execution permissions.

1.5. Run tests