This repository contains a set of C++ libraries that provide different RPC communications.
- eProsima Fast RPC provides a fast RPC communication using a modified CDR serialization over TCP.
- eProsima RPC over DDS provides an RPC communication over an OMG DDS implementation. Currently it supports eProsima Fast DDS and RTI DDS implementations.
- eProsima RPC over REST provides an RPC communication over RESTful paradigma.
This section provides the instructions for installing eProsima RPC from sources. The following packages will be installed:
boost_threadpool
is a cross-platform C++ thread pool library.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.
First of all, the software requirements and software dependencies detailed below need to be met. Afterwards, the user can choose whether to follow either the colcon installation or the CMake installation instructions.
The installation of eProsima RPC in a Windows environment from sources requires the following tools to be installed in the system:
Visual Studio is required to have a C++ compiler in the system.
For this purpose, make sure to check the Desktop development with C++
option during the Visual Studio installation
process.
If Visual Studio is already installed but the Visual C++ Redistributable packages are not, open Visual Studio and go to
Tools
-> Get Tools and Features
and in the Workloads
tab enable Desktop development with C++
.
Finally, click Modify
at the bottom right.
Chocolatey is a Windows package manager. It is needed to install some of eProsima RPC's dependencies. Download and install it directly from the website.
These packages provide the tools required to install eProsima RPC and its dependencies from command line.
Download and install CMake, pip3, wget and git by following the instructions detailed in the respective
websites.
Once installed, add the path to the executables to the PATH
from the Edit the system environment variables control panel.
eProsima RPC has the following dependencies, when installed from sources in a Windows environment:
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.
Windows
On Windows, they can be downloaded directly from the links below:
After downloading these packages, open an administrative shell with PowerShell and execute the following command:
choco install -y -s <PATH_TO_DOWNLOADS> asio tinyxml2
where <PATH_TO_DOWNLOADS>
is the folder into which the packages have been downloaded.
colcon is a command line tool based on CMake aimed at building sets of software packages. This section explains how to use it to compile eProsima RPC and its dependencies.
Note:
Run colcon within a Visual Studio prompt. To do so, launch a "Developer Command Prompt" from the
search engine.
-
Install the ROS 2 development tools (colcon and vcstool) by executing the following command:
pip3 install -U colcon-common-extensions vcstool
and add the path to the
vcs
executable to thePATH
from the Edit the system environment variables control panel.Note:
If this fails due to an Environment Error, add the :code:`--user` flag to the :code:`pip3` installation command.
-
Create a
RPC
directory and download the repos file that will be used to install eProsima RPC and its dependencies:mkdir ~\RPC cd ~\RPC wget https://raw.githubusercontent.com/eProsima/RPC/master/rpc.repos -output rpc.repos mkdir src vcs import src --input rpc.repos
Finally, use colcon to compile all software:
- Building eProsima RPC over DDS use next command:
colcon build --cmake-args -DNO_TLS=ON -DRPCPROTO=rpcdds
- Building eProsima RPC over DDS use next command:
When running an instance of an application using eProsima RPC, the colcon overlay built in the
dedicated RPC
directory must be sourced.
There are two possibilities:
-
Every time a new shell is opened, prepare the environment locally by typing the command:
setup.bat
-
Add the sourcing of the colcon overlay permanently, by opening the Edit the system environment variables control panel, and adding
~/RPC/install/setup.bat
to thePATH
.
This section explains how to compile eProsima RPC with CMake, either [locally][#local-installation] or globally.
-
Open a command prompt, and create a
RPC
directory where to download and build eProsima RPC and its dependencies:mkdir ~\RPC
-
Clone the following dependencies and compile them using [CMake][¢make].
-
cd ~\RPC git clone https://github.com/eProsima/boost_threadpool.git cd boost_threadpool mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=~/RPC/install .. cmake --build . --target install
-
RPC depends on Foonathan memory. To ease the dependency management, eProsima provides a vendor package Foonathan memory vendor, which downloads and builds a specific revision of Foonathan memory if the library is not found in the system.
cd ~\RPC git clone https://github.com/eProsima/foonathan_memory_vendor.git cd foonathan_memory_vendor mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=~/RPC/install .. cmake --build . --target install
-
cd ~\RPC git clone https://github.com/eProsima/Fast-CDR.git cd Fast-CDR mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=~/RPC/install .. cmake --build . --target install
-
cd ~\RPC git clone https://github.com/eProsima/Fast-DDS.git cd Fast-DDS mkdir build && cd build cmake -DNO_TLS=ON -DCMAKE_INSTALL_PREFIX=~/RPC/install .. cmake --build . --target install
-
-
Once all dependencies are installed, install eProsima RPC:
-
Building eProsima RPC over DDS use next commands:
cd ~\RPC [git](git) clone https://github.com/eProsima/RPC.git cd RPC mkdir build && cd build cmake -DRPCPROTO=rpcdds -DCMAKE_INSTALL_PREFIX=~/RPC/install .. cmake --build . --target install
-
To install eProsima RPC system-wide instead of locally, remove the CMAKE_INSTALL_PREFIX
flags that
appear in the configuration steps.
When running an instance of an application using eProsima RPC, it must be linked with the library where the
packages have been installed.
This can be done by opening the Edit system environment variables control panel and adding to the PATH
the RPC, Fast DDS
and Fast CDR installation directories:
- RPC: C:\Program Files\rpc
- Fast DDS: C:\Program Files\fastrtps
- Fast CDR: C:\Program Files\fastcdr