eProsima Fast RTPS is a C++ implementation of the RTPS (Real Time Publish Subscribe) protocol, which provides publisher-subscriber communications over unreliable transports such as UDP, as defined and maintained by the Object Management Group (OMG) consortium. RTPS is also the wire interoperability protocol defined for the Data Distribution Service (DDS) standard, again by the OMG.
Fast RTPS is used by PX4 to enable an RTPS interface allowing PX4 uORB topics to be shared with offboard components, including robotics and simulator tools. RTPS is the underlying protocol of DDS, a standard from the OMG (Object Management Group) providing a real-time publish/subscribe middleware that is widely used in aerospace, defense and IoT applications. It has also been adopted as the middleware for the ROS2 robotics toolkit. For more information see: RTPS/ROS2 Interface: PX4-FastRTPS Bridge.
For Ubuntu, at time of writing, you will need to install Fast-RTPS 1.8.2 from source.
This topic is derived from the official eProsima Fast RTPS documentation. For more information see:
Fast RTPS is installed as part of the PX4 developer environment on some platforms:
- Development Environment on Mac (FastRTPS included in common tools)
- Development Environment on Windows > Bash on Windows (FastRTPS included in install script)
The instruction below are useful for adding FastRTPS support in other environments.
eProsima Fast RTPS requires the following packages to work.
Java is required to use our built-in code generation tool - fastrtpsgen. Java JDK 8 is recommended.
eProsima Fast RTPS requires the Visual C++ Redistributable packages for the Visual Studio version you chose during the installation or compilation. The installer gives you the option of downloading and installing them.
Clone the project from Github:
$ git clone --recursive https://github.com/eProsima/Fast-RTPS.git -b 1.8.x ~/FastRTPS-1.8.2 $ cd ~/FastRTPS-1.8.2 $ mkdir build && cd build
You may need to install Gradle to build the source (e.g. this is true on vanilla Fedora Linux). A build warning will be displayed if this is the case.
If you are on Linux, execute:
$ cmake -DTHIRDPARTY=ON -DBUILD_JAVA=ON .. $ make $ sudo make install
This will install Fast RTPS to
You can use
-DCMAKE_INSTALL_PREFIX=<path> to install to a custom location.
Afterwards make sure the
fastrtpsgen application is in your
You can check with
Then install Fast-RTPS-Gen (Gradle is required for this):
git clone --recursive https://github.com/eProsima/Fast-RTPS-Gen.git -b v1.0.2 ~/Fast-RTPS-Gen \ && cd ~/Fast-RTPS-Gen \ && gradle assemble \ && sudo cp share/fastrtps/fastrtpsgen.jar /usr/local/share/fastrtps/ \ && sudo cp scripts/fastrtpsgen /usr/local/bin/
If you are on Windows, choose your version of Visual Studio:
> cmake -G "Visual Studio 14 2015 Win64" -DTHIRDPARTY=ON -DBUILD_JAVA=ON .. > cmake --build . --target install
If you want to compile the examples, you will need to add the argument
-DCOMPILE_EXAMPLES=ON when calling CMake.
If you want to compile the performance tests, you will need to add the argument
-DPERFORMANCE_TESTS=ON when calling CMake.
You can always download the latest binary release of eProsima Fast RTPS from the company website.
Documentation on how to do this can be found here: Installation from Binaries (eProsima Fast RTPS official documentation)
Execute the installer and follow the instructions, choosing your preferred Visual Studio version and architecture when prompted.
eProsima Fast RTPS requires the following environmental variable setup in order to function properly
FASTRTPSHOME: Root folder where eProsima Fast RTPS is installed.
- Additions to the
PATH: the /bin folder and the subfolder for your Visual Studio version of choice should be appended to the PATH.
These variables are set automatically by checking the corresponding box during the installation process.
Extract the contents of the package. It will contain both eProsima Fast RTPS and its required package eProsima Fast CDR. You will have follow the same procedure for both packages, starting with Fast CDR.
Configure the compilation:
$ ./configure --libdir=/usr/lib
If you want to compile with debug symbols (which also enables verbose mode):
$ ./configure CXXFLAGS="-g -D__DEBUG" --libdir=/usr/lib
After configuring the project compile and install the library:
$ sudo make install