1. Linux installation from sources¶
The instructions for installing the eProsima DDS Record & Replay from sources and its required dependencies are provided in this page. It is organized as follows:
1.1. Dependencies installation¶
DDS Record & Replay depends on eProsima Fast DDS library and certain Debian packages. This section describes the instructions for installing DDS Record & Replay 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.fastdds
, 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 DDS Record & Replay in a Linux environment from sources requires the following tools to be installed in the system:
Colcon [optional]
Fast DDS Python [for remote controller only]
Gtest [for test only]
1.1.1.1. CMake, g++, pip, wget and git¶
These packages provide the tools required to install eProsima DDS Record & Replay 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. Fast DDS Python¶
eProsima Fast DDS Python is a Python binding for the eProsima Fast DDS C++ library. It is only required for the remote controller application.
Clone the Github repository into the eProsima DDS Record & Replay workspace and compile it with colcon as a dependency package. Use the following command to download the code:
git clone https://github.com/eProsima/Fast-DDS-python.git src/Fast-DDS-python
1.1.1.4. Gtest¶
Gtest is a unit testing library for C++. By default, eProsima DDS Record & Replay 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 DDS Record & Replay workspace and compile it with colcon as a dependency package. Use the following command to download the code:
git clone --branch release-1.12.0 https://github.com/google/googletest src/googletest-distribution
1.1.2. Dependencies¶
eProsima DDS Record & Replay 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 DDS Record & Replay 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. SWIG¶
SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. It is leveraged by Fast DDS Python to generate a Python wrapper over Fast DDS library. SWIG is only a requirement for the remote controller application. It can be installed using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:
sudo apt install swig libpython3-dev
1.1.2.5. PyQt6¶
The eProsima DDS Record & Replay remote controller is a graphical user interface application implemented in Python using PyQt6. To install PyQt6 simply run:
pip3 install PyQt6
1.1.2.6. MCAP dependencies¶
MCAP is a modular container format and logging library for pub/sub messages with arbitrary message serialization. It is primarily intended for use in robotics applications, and works well under various workloads, resource constraints, and durability requirements. MCAP C++ library is packed within DDS Record & Replay as a header-only, but its dependencies need to be installed using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:
sudo apt install liblz4-dev libzstd-dev
Note
To work with MCAP files via command line interface, you can use MCAP CLI <https://mcap.dev/guides/cli> _ to manage the data in MCAP files.
1.1.2.7. 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 DDS Record & Replay 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 (recommended)¶
Create a
DDS-Record-Replay
directory and download the.repos
file that will be used to install eProsima DDS Record & Replay and its dependencies:mkdir -p ~/DDS-Record-Replay/src cd ~/DDS-Record-Replay wget https://raw.githubusercontent.com/eProsima/DDS-Record-Replay/v1.1.0/ddsrecordreplay.repos vcs import src < ddsrecordreplay.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 DDS Record & Replay project having sourced its dependencies. Refer to section eProsima dependencies in order to check how to source Fast DDS library.Build the packages:
colcon build
Note
To install DDS Recorder remote controller application, compilation flag -DBUILD_DDSRECORDER_CONTROLLER=ON
is required.
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 DDS Record & Replay with CMake, either locally or globally.
1.3.1. Local installation¶
Create a
DDS-Record-Replay
directory where to download and build DDS Record & Replay and its dependencies:mkdir -p ~/DDS-Record-Replay/src mkdir -p ~/DDS-Record-Replay/build cd ~/DDS-Record-Replay wget https://raw.githubusercontent.com/eProsima/DDS-Record-Replay/v1.1.0/ddsrecordreplay.repos vcs import src < ddsrecordreplay.repos
Compile all dependencies using CMake.
-
cd ~/DDS-Record-Replay mkdir build/foonathan_memory_vendor cd build/foonathan_memory_vendor cmake ~/DDS-Record-Replay/src/foonathan_memory_vendor -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DBUILD_SHARED_LIBS=ON cmake --build . --target install
-
cd ~/DDS-Record-Replay mkdir build/fastcdr cd build/fastcdr cmake ~/DDS-Record-Replay/src/fastcdr -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install cmake --build . --target install
-
cd ~/DDS-Record-Replay mkdir build/fastdds cd build/fastdds cmake ~/DDS-Record-Replay/src/fastdds -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install
-
# CMake Utils cd ~/DDS-Record-Replay mkdir build/cmake_utils cd build/cmake_utils cmake ~/DDS-Record-Replay/src/dev-utils/cmake_utils -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install # C++ Utils cd ~/DDS-Record-Replay mkdir build/cpp_utils cd build/cpp_utils cmake ~/DDS-Record-Replay/src/dev-utils/cpp_utils -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install
-
# ddspipe_core cd ~/DDS-Record-Replay mkdir build/ddspipe_core cd build/ddspipe_core cmake ~/DDS-Record-Replay/src/ddspipe/ddspipe_core -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install # ddspipe_participants cd ~/DDS-Record-Replay mkdir build/ddspipe_participants cd build/ddspipe_participants cmake ~/DDS-Record-Replay/src/ddspipe/ddspipe_participants -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install # ddspipe_yaml cd ~/DDS-Record-Replay mkdir build/ddspipe_yaml cd build/ddspipe_yaml cmake ~/DDS-Record-Replay/src/ddspipe/ddspipe_yaml -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install
-
Once all dependencies are installed, install eProsima DDS Record & Replay:
# ddsrecorder_participants cd ~/DDS-Record-Replay mkdir build/ddsrecorder_participants cd build/ddsrecorder_participants cmake ~/DDS-Record-Replay/src/ddsrecorder/ddsrecorder_participants -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install # ddsrecorder_yaml cd ~/DDS-Record-Replay mkdir build/ddsrecorder_yaml cd build/ddsrecorder_yaml cmake ~/DDS-Record-Replay/src/ddsrecorder/ddsrecorder_yaml -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install # ddsrecorder cd ~/DDS-Record-Replay mkdir build/ddsrecorder_tool cd build/ddsrecorder_tool cmake ~/DDS-Record-Replay/src/ddsrecorder/ddsrecorder -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install # ddsreplayer cd ~/DDS-Record-Replay mkdir build/ddsreplayer_tool cd build/ddsreplayer_tool cmake ~/DDS-Record-Replay/src/ddsrecorder/ddsreplayer -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install
Note
By default, eProsima DDS Record & Replay does not compile tests. However, they can be activated by downloading and installing Gtest and building with CMake option
-DBUILD_TESTS=ON
.Optionally, install the remote controller application along with its dependency Fast DDS Python:
# Fast DDS Python cd ~/DDS-Record-Replay mkdir build/fastdds_python cd build/fastdds_python cmake ~/DDS-Record-Replay/src/Fast-DDS-python/fastdds_python -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install cmake --build . --target install # Remote Controller Application cd ~/DDS-Record-Replay mkdir build/controller_tool cd build/controller_tool cmake ~/DDS-Record-Replay/src/ddsrecorder/controller/controller_tool -DCMAKE_INSTALL_PREFIX=~/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=~/DDS-Record-Replay/install -DBUILD_DDSRECORDER_CONTROLLER=ON cmake --build . --target install
1.3.2. Global installation¶
To install eProsima DDS Record & Replay system-wide instead of locally, remove all the flags that appear in the configuration steps of Fast-CDR
, Fast-DDS
, Dev-Utils
, DDS-Pipe
, and DDS-Record-Replay
, 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 DDS Recorder tool, source the installation path and execute the executable file that has been installed in <install-path>/ddsrecorder_tool/bin/ddsrecorder
:
# If built has been done using colcon, all projects could be sourced as follows
source install/setup.bash
./<install-path>/ddsrecorder_tool/bin/ddsrecorder
Likewise, to run the DDS Replay tool, source the installation path and execute the executable file that has been installed in <install-path>/ddsreplayer_tool/bin/ddsreplayer
:
# If built has been done using colcon, all projects could be sourced as follows
source install/setup.bash
./<install-path>/ddsreplayer_tool/bin/ddsreplayer
Be sure that these executables have execution permissions.