This page has moved to https://docs.px4.io/master/en/dev_setup/fast-rtps-installation.html.
Click here if you are not redirected.
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:
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 -DSECURITY=ON .. $ make $ sudo make install
This will install Fast RTPS to
/usr/local, with secure communications support.
You can use
-DCMAKE_INSTALL_PREFIX=<path> to install to a custom location.
If you are on Windows, choose your version of Visual Studio:
> cmake -G "Visual Studio 14 2015 Win64" -DTHIRDPARTY=ON -DSECURITY=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.
Fast-RTPS-Gen is the Fast RTPS IDL code generator tool. It should be installed after Fast RTPS and made sure the
fastrtpsgen application is in your
You can check with
Then install Fast-RTPS-Gen 1.0.4 (Gradle is required for this):
git clone --recursive https://github.com/eProsima/Fast-RTPS-Gen.git -b v1.0.4 ~/Fast-RTPS-Gen \ && cd ~/Fast-RTPS-Gen \ && ./gradlew assemble \ && sudo ./gradlew install
Although the binaries are available, we recommend to build and install the code from source, given that the binaries may not come with required components and dependencies in place.
You can always download the latest binary release of eProsima Fast RTPS from the company website.
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.
FASTRTPSGEN_DIR: Root folder where eProsima FastRTPSGen 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
FASTRTPSGEN_DIR: Root folder where eProsima FastRTPSGen is installed, usually set to
/usr/local, which is the default installation directory. If the user sets a different install directory in the
gradle installstep, it must set it here as well.