本篇文章介绍FastDDs的安装。实测有效。
1、依赖安装
sudo apt install cmake g++ python3-pip wget git
sudo apt install libasio-dev libtinyxml2-dev
sudo apt install libssl-dev
sudo apt install libp11-dev
sudo apt install softhsm2
sudo apt install libengine-pkcs11-openssl
pip3 install -U colcon-common-extensions vcstool
sudo apt install swig
sudo apt install libpython3-dev
2、clocon构建
mkdir ~/Fast-DDS cd ~/Fast-DDS wget https://raw.githubusercontent.com/eProsima/Fast-DDS/master/fastdds.repos mkdir src vcs import src < fastdds.reposcolcon build --packages-up-to fastddssource ~/Fast-DDS/install/setup.bashecho 'source ~/Fast-DDS/install/setup.bash' >> ~/.bashrc
3、FastDDs-Gen的安装
sudo apt install openjdk-11-jdk
mkdir -p ~/Fast-DDS/src
cd ~/Fast-DDS/src
git clone --recursive https://github.com/eProsima/Fast-DDS-Gen.git fastddsgen
cd fastddsgen
./gradlew assemble
如果存在网络问题,运行以下内容:
nano gradle/wrapper/gradle-wrapper.properties
#修改对应的distributionUrl
distributionUrl=https\://mirrors.huaweicloud.com/gradle/gradle-7.6-bin.zip
mkdir -p ~/.gradle
nano ~/.gradle/init.gradle
#写入如下内容
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
maven { url 'https://mirrors.tuna.tsinghua.edu.cn/nexus/content/groups/public/' }
}
}
ok,安装完成。笔者尝试了多种安装方法,这一套主要的问题点在于FastDDs-Gen安装时的网络问题,按照上述进行配置后,FastDDs就安装完成了。
更简单的请看之前的关于FastDDs的容器安装的文章。
附上FastDDs的官网地址:
https://fast-dds.docs.eprosima.com/en/latest/installation/sources/sources_linux.html
354

被折叠的 条评论
为什么被折叠?



