본문 바로가기

카테고리 없음

Fast RTPS installation from sources

In this post, we'll install Fast RTPS on the linux(ubuntu machine)


  • Dependencies

you need to install following libraries

    1. Boost 1.61 ( http://www.boost.org/ )
    2. gtest (https://github.com/google/googletest)
    3. java
    4. gradle(to compile fastrtpsgen)! (https://gradle.org/ )
    5. CMake
  • Install ation from sources
    1. set Environment variable
        1. FASTRTPSHOME: Root folder where eProsima Fast RTPS is installed.
        2. Additions to the PATH: the /bin folder and the subfolder for your Visual Studio version of choice should be appended to the PATH.
    2. make directory
      1. [root]# mkdir Fast_RTPS
      2. [root]# mkdir build
    3. git clone
      1. [root]# git clone https://github.com/eProsima/Fast-RTPS
    4. execute cmake
      1. [root]# cd build
      2. [root]# cmake ../ -DEPROSIMA_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install
      3. vim CMakeCache.txt
      4. before 'make' you need to configure your cmake file according to your system.
        1. //Activate the compilation of the Java application
          BUILD_JAVA:BOOL=ON
        2. //Build example
          COMPILE_EXAMPLES:BOOL=ON
        3. //Path to a file.
          GMOCK_INCLUDE_DIR:PATH=/root/gtest/googletest/googlemock/include

          //Path to a library.
          GMOCK_LIBRARY:FILEPATH=/root/gtest/googletest/googlemock/lib/libgmock.a

          //Path to a library.
          GMOCK_LIBRARY_DEBUG:FILEPATH=/root/gtest/googletest/googlemock/lib/libgmock.a

          //Path to a library.
          GMOCK_MAIN_LIBRARY:FILEPATH=/root/gtest/googletest/googlemock/lib/libgmock_main.a

          //Path to a library.
          GMOCK_MAIN_LIBRARY_DEBUG:FILEPATH=GMOCK_MAIN_LIBRARY_DEBUG-NOTFOUND/libgmock_main.a
        4. //Path to a file.
          GTEST_INCLUDE_DIR:PATH=/root/gtest/googletest/googletest/include

          //Activate the execution of GTest tests
          GTEST_INDIVIDUAL:BOOL=ON

          //Path to a library.
          GTEST_LIBRARY:FILEPATH=/root/gtest/googletest/googletest/lib/libgtest.a

          //Path to a library.
          GTEST_LIBRARY_DEBUG:FILEPATH=/root/gtest/googletest/googletest/lib/libgtest.a

          //Path to a library.
          GTEST_MAIN_LIBRARY:FILEPATH=/root/gtest/googletest/googletest/lib/libgtest_main.a

          //Path to a library.
          GTEST_MAIN_LIBRARY_DEBUG:FILEPATH=/root/gtest/googletest/googletest/lib/libgtest_main.a
      5. after modifing your CMakeCache.txt file you save this file and cmake one more time
        1. [root]# cmake ../ -DEPROSIMA_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install
      6. and then make
        [root]# make
        [root]# make install
      7. set library path to library
        1. [root]# cd /etc/ld.so.conf.d
        2. vim fast_rtps.conf
          1. add path to fast-rtps library
          2. for example in my case this path was : /root/DDS/Fast-RTPS/build/install/lib

      8. after finishing 'make' and 'make install' procedure you can enjoy your RTPS Good luck!

ref :https://github.com/eProsima/Fast-CDR