当前位置:网站首页>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 -y
2. 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.repos
3. compile
colcon build
cd src/fastddsgen/ && gradle assemble
The last step : Configure environment variables
xxx Is your directory prefix
echo 'source xxx/fastdds_ws/install/setup.bash' >> ~/.bashrc
echo 'export PATH=$PATH:xxx/fastdds_ws/gradle-6.4/bin/' >> ~/.bashrc
echo '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.git
Compile routine
cd dds_tutorial/examples/01-hellofishros
mkdir build && cd build
cmake ..
make
Execute routine
Open a terminal
./DDSHelloFishRosPublisher
Open another terminal
./DDSHelloFishRosSubscribe
View 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 ~
边栏推荐
- 2018 meisai modeling summary +latex standard meisai template sharing
- Xiaobing · beauty appraisal
- Appscan installation steps
- TCP slicing and PSH understanding
- Usage of case when then else end statement
- Understanding of object
- Canoe: the difference between environment variables and system variables
- Canoe: distinguish VT, VN and vteststudio from their development history
- (2021-08-20) web crawler learning 2
- Introduction to Lichuang EDA
猜你喜欢
Canoe - the second simulation engineering - xvehicle - 2panel design (principle, idea)
Reptile learning 4 winter vacation series (3)
OSI model notes
Post man JSON script version conversion
QQ group collection
20 kinds of hardware engineers must be aware of basic components | the latest update to 8.13
Elevator dispatching (pairing project) ③
(2021-08-20) web crawler learning 2
Practical dry goods: deploy mini version message queue based on redis6.0
Attributes and methods in math library
随机推荐
Terms related to hacker technology
QQ group administrators
JMeter correlation technology
Usage of case when then else end statement
I What is security testing
Summary of automated testing framework
Performance test process
Canoe - description of common database attributes
template<typename MAP, typename LIST, typename First, typename ... Keytypes > recursive call with indefinite parameters - beauty of Pan China
三立期货安全么?期货开户怎么开?目前期货手续费怎么降低?
If function in SQL
Reptile learning 4 winter vacation learning series (1)
Canoe - the third simulation project - bus simulation - 2 function introduction, network topology
Common built-in modules
C language compilation process
Object. Assign () & JS (= >) arrow function & foreach () function
2020 Summary - Magic year, magic me
Test question bank management system - database design [easy to understand]
Introduction to canoe automatic test system
Canoe - the second simulation engineering - xvehicle - 2panel design (principle, idea)