1. Linux installation from sources¶
The eProsima Fast DDS QoS Profiles Manager tool suite is composed by several packages as described in the Introduction. It is organized as follows:
The tool suite can either be built using colcon or CMake. With CMake, the tool suite build and environment source processes must be done manually and following the tool package dependencies, whereas colcon automatizes these two actions with a single command. For that reason, the use of colcon is highly recommended.
1.1. Prerequisites¶
The installation of the tool suite in a Linux environment from sources requires some Build and development tools to be installed in the system.
1.1.1. Build and development tools¶
The following packages are required to build the eProsima Fast DDS QoS Profiles Manager tool suite from sources. Install CMake, g++, pip3 and git using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:
sudo apt update
sudo apt install cmake g++ python3-pip git
1.1.2. Recommended build tools (optional)¶
Despite the fact that the eProsima Fast DDS QoS Profiles Manager tool suite packages can be built using CMake, colcon simplifies the task substantially. colcon is a command line tool based on CMake aimed at building sets of software packages. Install colcon by executing the following command:
pip3 install -U colcon-common-extensions
Note
Mind that under non-root users, pip3
may install python colcon
executable in $HOME/.local/bin
, for instance when running with --user
.
To be able to run this application, make sure that pip3
binary installation directory is in your $PATH
($HOME/.local/bin
is normally introduced while login on an interactive non-root shell).
1.2. Dependencies¶
This section deals with the required dependencies for each package included in the tool suite.
Important
The Library package is required for building the remaining tool packages.
1.2.1. Library tool¶
The eProsima Fast DDS QoS Profiles Manager Library requires Xerces. The package test suite depends on GTest.
1.2.1.1. Xerces¶
Xerces C++ is an Apache project that provides XML parsers and related components solutions for development. In Ubuntu, it can be installed running:
sudo apt install libxerces-c-dev
1.2.1.2. GTest (optional)¶
GTest is a unit testing library for C++. By default, eProsima Fast DDS QoS Profiles Manager does not compile tests. It is possible to activate them with the opportune CMake configuration options when calling colcon or CMake.
GTest installation can be performed either following the GTest installation instructions, or including the Gtest repository in the workspace directory, running:
git clone https://github.com/google/googletest ~/fastdds_qosprofman_ws/src/googletest-distribution
Note
If the colcon deployment is followed, and GTest has been installed in the workspace directory, the GTest dependency needs to be included in the Library colcon.pkg
file.
Please check the colcon build procedure for further information.
1.2.2. CLI tool¶
The eProsima Fast DDS QoS Profiles Manager CLI depends on the Library tool and also on the following package.
1.2.3. GUI tool¶
Warning
This tool is still in development process.
1.2.4. Documentation tool¶
The eProsima Fast DDS QoS Profiles Manager Documentation depends on the Library tool and also on the following packages.
1.2.4.1. Doxygen¶
Doxygen is a C++ documentation generator. It is required to build the Library API reference. In Ubuntu, the dependency can be installed running:
sudo apt install doxygen
1.2.4.2. Python3 virtual environment (recommended)¶
It is recommended to install the Documentation tool dependencies in a python3 virtual environment. That would avoid polluting the user’s installation setup.
Deploy the project in a python3 virtual environment by running:
# Python3 virtual environment installation
sudo apt install python3.10-venv
# Virtual environment deployment
cd <path_to_virtual_environment_directory>
python3 -m venv fastdds_qosprofman_venv
source fastdds_qosprofman_venv/bin/activate
Note
As colcon performs a recursive search to build packages inside the workspace directory, it is recommended to deploy the virtual environment outside of the workspace directory in order to avoid conflicts.
1.2.4.3. Python3 package dependencies¶
The Documentation tool has several python3 dependencies described in the requirements.txt
project file.
breathe==4.35.0
doc8==0.10.1
docutils==0.16.0
setuptools==67.6.0
sphinx_rtd_theme==0.5.2
sphinx-tabs==3.2.0
sphinx==4.3.1
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-imagehelper==1.1.1
sphinxcontrib-mermaid==0.8.1
sphinxcontrib-plantuml==0.22
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sphinxcontrib.spelling==7.2.1
Important
Once the repository is downloaded, the requirements.txt
dependencies file can be installed by running:
pip3 install -r ~/fastdds_qosprofman_ws/src/Fast-DDS-QoS-Profiles-Manager/docs/requirements.txt
1.3. Tool suite build process¶
Create a workspace directory and download the project:
mkdir -p ~/fastdds_qosprofman_ws/src
cd ~/fastdds_qosprofman_ws/src
git clone https://github.com/eProsima/Fast-DDS-QoS-Profiles-Manager.git
eProsima Fast DDS QoS Profiles Manager complete tool suite is build using colcon by running:
cd ~/fastdds_qosprofman_ws
colcon build
Note
Being based on CMake it is possible to pass CMake configuration options to the colcon build
command.
These options can be also passed through a colcon.meta file.
For instance, the Library and Documentation test suites building is enabled by building with the CMake option EPROSIMA_BUILD_TESTS.
If GTest repository has been included in the workspace directory, add the GTest dependency ("googletest-distribution"
) in the Library colcon.pkg file.
Also, colcon provides certain arguments to perform package selection, excluding undesired packages or including specific packages in the build process.
Thus, the following command would build the Library and Documentation tools with its test suite.
colcon build --packages-up-to fastdds_qos_profiles_manager_docs --cmake-args -DEPROSIMA_BUILD_TESTS=ON
eProsima Fast DDS QoS Profiles Manager tool suite is build using CMake following these steps:
Library
mkdir -p ~/fastdds_qosprofman_ws/build/lib
cd ~/fastdds_qosprofman_ws/build/lib
cmake ../../src/Fast-DDS-QoS-Profiles-Manager/lib -DCMAKE_INSTALL_PREFIX=../../install/lib
cmake --build . --target install
Note
If the Library test suite compilation is needed, the enable test build flag EPROSIMA_BUILD_TESTS should be included while configuring the building of the Library package:
cmake ../../src/Fast-DDS-QoS-Profiles-Manager/lib -DCMAKE_INSTALL_PREFIX=../../install/lib -DEPROSIMA_BUILD_TESTS=ON
CLI
mkdir -p ~/fastdds_qosprofman_ws/build/cli
cd ~/fastdds_qosprofman_ws/build/cli
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:~/fastdds_qosprofman_ws/install/lib
cmake ../../src/Fast-DDS-QoS-Profiles-Manager/cli -DCMAKE_INSTALL_PREFIX=../../install/cli
cmake --build . --target install
Note
Note that the already installed Library path has been sourced in the CLI build process with the command:
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:~/fastdds_qosprofman_ws/install/lib
Documentation
Important
If the Library path has been sourced in the previous step, there is no need to include it again in the environment variable CMAKE_PREFIX_PATH
.
If, on the other hand, it has not been sourced previously, as long as it is required also to build the Documentation package, it needs to be sourced.
mkdir -p ~/fastdds_qosprofman_ws/build/docs
cd ~/fastdds_qosprofman_ws/build/docs
cmake ../../src/Fast-DDS-QoS-Profiles-Manager/docs -DCMAKE_INSTALL_PREFIX=../../install/docs
cmake --build . --target install
1.4. Run CLI example¶
The fastddsqosprof
executable file is generated in the installation path.
In order to run the CLI, please, ensure to source the environment:
source ~/fastdds_qosprofman_ws/install/setup.bash
export LD_LIBRARY_PATH=~/fastdds_qosprofman_ws/install/lib/lib
export PATH=$PATH:~/fastdds_qosprofman_ws/install/cli/bin
CLI should display its software version by running:
fastddsqosprof -v
Next steps: please look at the CLI examples.
1.5. Local documentation¶
The Documentation generated can be opened in a web browser locally by running:
xdg-open ~/fastdds_qosprofman_ws/install/fastdds_qos_profiles_manager_docs/docs/fastdds_qos_profiles_manager_docs/sphinx/html/index.html
xdg-open ~/fastdds_qosprofman_ws/install/docs/docs/fastdds_qos_profiles_manager_docs/sphinx/html/index.html