当前位置:网站首页>Here, the DDS tutorial you want | first experience of fastdds - source code compilation & Installation & Testing
Here, the DDS tutorial you want | first experience of fastdds - source code compilation & Installation & Testing
2022-07-04 11:25:00 【Fish flavored ROS】
Hello everyone , I'm little fish , I was urged by my friends in the group yesterday DDS In related articles , Say a good source code and experience DDS Here it is , Little fish can't coo anymore , So let's share today ,FastDDS Installation and experience .
1. On FastDDS Three ways to open
FastDDS And the general ROS The bag is the same , There are binary installations 、 Source code compilation 、Docker Three installation methods .
Because the official binary and Docker Put it on the official website .. And you have to fill in your personal information to download .. And the download speed is super slow .. And it's inconvenient to observe the source code .. So Xiaoyu takes you to install from the source code .
Originally wanted to make a one click installation , Everyone in the province typed the script !!
Love a person must not be used to him , So is fish meal , In order to make everyone think more when copying and pasting ( In fact, it's to count the words of the article ), Xiaoyu will take you step by step to install and compile the source code
However, the source code installation is also very simple , Don't be afraid ..
because DDS and ROS2 relevant , We can also use colcon To compile the , You don't have to cmake 了 ( Yes cmake Go to the official website by yourself )
2. Source code compilation and installation FastDDS
Download and compile DDS There are three steps , Step 1 if you have installed ROS2 You can skip ..
1. Installation tools
sudo apt install python3-colcon-common-extensions python3-vcstool zip openjdk-8-jdk -y2. Create directory , Download warehouse
mkdir -p fastdds_ws/src
cd fastdds_ws && wget https://downloads.gradle-dn.com/distributions/gradle-6.4-bin.zip && unzip gradle-6.4-bin.zip
wget http://fishros.com/tools/files/fastrtps.repos && vcs import src < fastrtps.repos3. compile
colcon buildcd src/fastddsgen/ && gradle assemble
The last step : Configure environment variables
xxx Is your directory prefix
echo 'source xxx/fastdds_ws/install/setup.bash' >> ~/.bashrcecho 'export PATH=$PATH:xxx/fastdds_ws/gradle-6.4/bin/' >> ~/.bashrcecho 'export DDSGEN=xxx/fastdds_ws/src/fastddsgen/scripts' >> ~/.bashrc
3.HelloFish routine
DDS The use of RTPS, Namely Real-Time Publish Subscribe agreement , Actually sum ROS And ROS2 The feeling of publishing and subscribing in is the same , So we run a routine to send and receive messages , The message content is called HelloFish
The program written by Xiaoyu is ready , Put it in github On , You can download it directly and compile the test ~
Download code
git clone https://github.com/fishros/dds_tutorial.gitCompile routine
cd dds_tutorial/examples/01-hellofishrosmkdir build && cd buildcmake ..make
Execute routine
Open a terminal
./DDSHelloFishRosPublisherOpen another terminal
./DDSHelloFishRosSubscribeView results
The correct result looks like this , Has proved everything OK 了 ~

DDS Publish and subscribe test
4. summary
Isn't it amazing to see familiar publish and subscribe ,FASTDDS The bottom layer uses a variety of protocols for data transmission , Including unreliable but really fast UDP, Reliable but not very fast TCP, There is also a memory exchange that does not feel transferred (SHM).
In order to show you what is called low yield ( lazy ), Xiaoyu decided to explain the code to you tomorrow ~
The above content is written by Xiao Yu who stayed up late and stepped on the pit , If you look carefully, it's equivalent to staying up late for free ~
边栏推荐
- VPS installation virtualmin panel
- Login operation (for user name and password)
- Failed to configure a DataSource: ‘url‘ attribute is not specified... Bug solution
- Canoe the second simulation engineering xvehicle 3 CAPL programming (operation)
- Fundamentals of software testing
- Configure SSH certificate login
- Canoe - the second simulation project -xvihicle1 bus database design (operation)
- VPS安装Virtualmin面板
- Elevator dispatching (pairing project) ②
- Customized version of cacti host template
猜你喜欢

OSI model notes

Day01 preliminary packet capture

Usage of case when then else end statement

Properties and methods of OS Library

Canoe test: two ways to create CAPL test module

Practical dry goods: deploy mini version message queue based on redis6.0

JMeter Foundation

TCP slicing and PSH understanding

How to create a new virtual machine

CSDN documentation specification
随机推荐
Daemon xinted and logging syslogd
Post man JSON script version conversion
Swagger and OpenAPI
Installation of ES plug-in in Google browser
QQ get group member operation time
How to create a new virtual machine
Appscan installation error: unable to install from Net runtime security policy logout appscan solution
Iptables cause heartbeat brain fissure
Cacti主机模板之定制版
Failed to configure a DataSource: ‘url‘ attribute is not specified... Bug solution
Canoe - the third simulation project - bus simulation - 3-2 project implementation
Heartbeat error attempted replay attack
QQ get group link, QR code
Heartbeat启动后无反应
Getting started with window functions
Jemeter script recording
LVS+Keepalived实现四层负载及高可用
SSH原理和公钥认证
Summary of collection: (to be updated)
Usage of with as