/dev-utils

Primary LanguageC++Apache License 2.0Apache-2.0

eProsima Developers Utils

License Releases Issues Forks Stars test codecov



Warning

In preparation for Fast DDS v3.0.0, eProsima/dev-utils' master branch is undergoing major changes entailing API breaks. Until Fast DDS v3.0.0 is released, it is strongly advisable to use the latest stable branch, 0.x, which uses Fast DDS 2.14.x.

The packages that conform this repository are:

  • CMake utils: cmake_utils CMake utilities to build packages.
  • C++ utils: cpp_utils C++ classes and functions for common use.
  • Dev utils: dev_utils Tools and applications to help in code development.

Documentation

There is no public documentation for this repository. Please, refer the the README.md files of each subpackage for information regarding the API and functionality.

Installation Guide

The instructions for installing the Dev Utils application from sources and its required dependencies on a Linux environment are provided below. These installation instructions are a summarized version of the complete installation guide available online.

Requirements

eProsima Dev Utils requires the following tools to be installed in the system:

CMake, g++, pip, wget and git

These packages provide the tools required to install Dev Utils 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

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

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

Gtest

Gtest is a unit testing library for C++. By default, Dev Utils does not compile tests. It is possible to activate them with the opportune CMake options when calling colcon or CMake. For a detailed description of the Gtest installation process, please refer to the Gtest Installation Guide.

Dependencies

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

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

eProsima dependencies

If it already exists in the system an installation of Fast DDS library with version greater than 2.4.0, just source this library when building the Dev Utils application 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 Dev Utils using colcon as it is explained in the following section.

Colcon installation

  1. Create a dev-utils directory and download the .repos file that will be used to install Dev Utils and its dependencies:
mkdir -p ~/DDS-Router/src
cd ~/DDS-Router
wget https://raw.githubusercontent.com/eProsima/dev-utils/main/dev_utils.repos
vcs import src < dev_utils.repos
  1. Build the packages:
colcon build

This repository holds several colcon packages. These packages are:

  • cmake_utils
  • cpp_utils

NOTE: Those packages could be installed and use independently (according with each package dependency). In order to compile only a package and its dependencies, use the colcon argument --packages-up-to <package>. In order to explicitly skip some of these packages, use the colcon argument --packages-skip <package1> [<package2> ...].

Testing

By default, Dev Utils does not compile tests. However, they can be activated by downloading and installing Gtest and building with CMake option -DBUILD_TESTS=ON. Once done, tests can be run with the following command:

colcon test --event-handler=console_direct+

Getting Help

If you need support you can reach us by mail at support@eProsima.com or by phone at +34 91 804 34 48.