Alternative DDS sources
The demos will attempt to build against any detected DDS vendor.
The only bundled vendor is eProsima's Fast RTPS, which is included in the default set of sources for ROS 2.0.
If you would like to switch out the vendor below are the instructions.
When you run the build make sure that your chosen DDS vendor(s) are exposed in your environment.
When multiple vendors are present, you can choose the used RMW implementation by setting the environment variableRMW_IMPLEMENTATIONto the package providing the RMW implementation.If the environment variable is not set the "default" vendor will be used (for now this isrmw_fastrtps_cppif available, otherwise the first in alphabetical order).For example, thetalkerbinary will use the "default" vendor, but it can be invoked with different vendors, e.g.RMW_IMPLEMENTATION=rmw_connext_cpp talker.
In beta 1 and earlier
In the beta 1 and earlier releases theRMW_IMPLEMENTATIONenvironment variable was not yet supported.Instead multiple binaries were being provided.For example, thetalkerbinary will use the "default" vendor, but for each vendor there will also be a vendor specific binary fortalker, e.g.talker__rmw_connext_cpp.That way you can ensure you're using the right vendor for each binary by including the suffix when you run the program.
PrismTech OpenSplice (version 6.7.170912 or higher)
Choose one of the following options for PrismTech OpenSplice.
Debian packages built by OSRF (used in the default instruction sequence above)
sudo apt-get update
sudo apt-get install libopensplice67 # from repo.ros2.org
Add this to your~/.bashrc
export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
Official binary packages from PrismTech
Install the packages provided byOpenSplice(we require at least version 6.7.170912).Remember to replace@@INSTALLDIR@@with the path where you unpacked the OpenSplice distribution.Then, source the ROSsetup.bashfile, and finally, source therelease.comfile in the root of the OpenSplice distribution to set theOSPL_HOMEenvironment variable appropriately.After that, your shell is ready to run ROS2 binaries with the official OpenSplice distribution.
You may also need to add the following line to your.bashrcfile:
export PTECH_LICENSE_FILE=path/to/prismtech.lic
Building OpenSplice from source
If you build OpenSplice from source, be sure to remember to following
the INSTALL.txt instructions and manually replace the @@INSTALLDIR@@
placeholder in the OpenSplice install/HDE/x86_64.linux/release.com
RTI Connext (version 5.3)
To use RTI Connext you will need to have obtained a license from RTI.Add the following line to your.bashrcfile pointing to your copy of the license.
export RTI_LICENSE_FILE=path/to/rti_license.dat
You also need a Java runtime installed to run the RTI code generator:
sudo apt-get install openjdk-7-jre
Finally, you can install the Connext 5.3 package for Linux provided by RTI from theirdownloads page.
After downloading, usechmod +xon the.runexecutable and then execute it.Note that if you're installing to a system directory usesudoas well.
The default location is~/rti_connext_dds-5.3.0
Source the setup file to set theNDDSHOMEenvironment variable.
source ~/rti_connext_dds-5.3.0/resource/scripts/rtisetenv_x64Linux3gcc4.8.2.bash
Now you can build as normal and support for RTI will be built as well.
Alternate compilers
Using a different compiler besides gcc to compile ROS 2 is easy. If you set the environment variablesCCandCXXto executables for a working C and C++ compiler, respectively, and retrigger CMake configuration (by using--force-cmake-configor by deleting the packages you want to be affected), CMake will reconfigure and use the different compiler.
Clang
To configure CMake to detect and use Clang:
sudo apt-get install clang
export CC=clang
export CXX=clang++
ament build --force-cmake-config
TODO: using ThreadSanitizer, MemorySanitizer