当前位置:网站首页>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 ~
边栏推荐
- 本地Mysql忘记密码的修改方法(windows)[通俗易懂]
- Usage of case when then else end statement
- template<typename MAP, typename LIST, typename First, typename ... Keytypes > recursive call with indefinite parameters - beauty of Pan China
- Canoe: distinguish VT, VN and vteststudio from their development history
- C language memory layout
- array_ The contains() function uses
- Detailed explanation of classic process synchronization problems
- Simple understanding of seesion, cookies, tokens
- Shift EC20 mode and switch
- Some summaries of the 21st postgraduate entrance examination 823 of network security major of Shanghai Jiaotong University and ideas on how to prepare for the 22nd postgraduate entrance examination pr
猜你喜欢

Foreach (system.out:: println) usage

Canoe - the third simulation project - bus simulation - 3-2 project implementation

Open the neural network "black box"! Unveil the mystery of machine learning system with natural language

Force buckle 142 Circular linked list II

Performance test method

Introduction of network security research direction of Shanghai Jiaotong University

Installation of ES plug-in in Google browser

Canoe - the second simulation engineering - xvehicle - 2panel design (principle, idea)

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

Ternsort model integration summary
随机推荐
os. Path built-in module
JMeter common configuration components and parameterization
Solaris 10网络服务
C language compilation process
unit testing
How to deal with the relationship between colleagues
Shift EC20 mode and switch
VPS installation virtualmin panel
JMeter correlation technology
How do std:: function and function pointer assign values to each other
Canoe: the difference between environment variables and system variables
Is Sanli futures safe? How to open a futures account? How to reduce the handling charge of futures at present?
Xiaobing · beauty appraisal
Summary of automated testing framework
Simple understanding of seesion, cookies, tokens
SQL greatest() function instance detailed example
Elevator dispatching (pairing project) ④
Performance test method
re. Sub() usage
Take advantage of the world's sleeping gap to improve and surpass yourself -- get up early