【eProsima Fast DDS(1)】安装eProsima Fast DDS

下载

1、Foonathan memory
2、Fast CDRFast CDR
3、eProsima Fast DDS

foonathan_memory_vendor,一个 STL 兼容的 C++ 内存分配器 库。
fastcdr,一个根据 CDR 标准进行数据序列化的 C++ 库。
fastrtps,eProsima Fast DDS库的核心库。
fastddsgen,一个使用 IDL 文件中定义的数据类型生成源代码的 Java 应用程序。

按照官方的配置来看,最好是这软件版本相互配合。
如果是DDS 2.1.0,虽然我是在2023年,但是还是用的这个版本,因为不同操作系统的兼容性导致的。

版本:
foonathan_memory_vendor:v1.0.0
cdr:v1.0.15
fastrtps :2.1.0

前置命令

如果你打开 官网的 bin 安装方式,有要求安装基础库的:

apt-get update && apt-get install --yes --no-install-recommends \
    git \
    build-essential \
    cmake \
    libssl-dev \
    libasio-dev \
    libtinyxml2-dev \
    openjdk-8-jre-headless

安装命令如下:

cd foonathan_memory_vendor/build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_SHARED_LIBS=ON
sudo cmake --build . --target install

CMAKE_INSTALL_PREFIX是cmake内置变量,用于指定cmake 执行install目标时,安装的路径前缀。本文直接安装到系统文件夹/usr/local/下,操作系统文件时,如果需要用户权限,使用sudo命令执行。

cd Fast-CDR/build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/
sudo cmake --build . --target install
cd Fast-DDS/build
cmake ..  -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_SHARED_LIBS=ON
sudo cmake --build . --target install

fastddsgen安装

    fastrtpsgen:
        type: git
        url: https://github.com/eProsima/Fast-RTPS-Gen.git
        version: v1.0.4
    fastrtpsgen/thirdparty/idl-parser:
        type: git
        url: https://github.com/eProsima/IDL-Parser.git
        version: v1.0.2

资料汇总

https://gitee.com/hiyanyx/dds2.1.0-study

参考

https://zhuanlan.zhihu.com/p/616137062
https://www.jianshu.com/p/b9eb5dd9559f#%E4%B8%80fastdds%E5%92%8Cfast-rtps%E5%8C%BA%E5%88%AB

你可能感兴趣的:(中间件)