当前位置:网站首页>Ros2 - ros2 vs. ros1 (II)
Ros2 - ros2 vs. ros1 (II)
2022-07-05 06:50:00 【Me and nano】
ROS2 Robot operating system
List of articles
Preface
One 、ROS1 The limitations of
ROS The earliest design goal is to develop such a PR2 Home service robot , This robot works independently most of the time , In order to make him have sufficient ability :
It is equipped with a workstation level computing platform and various advanced communication equipment , Don't worry about not being able to calculate , It has enough strength to support various complex real-time operations and processing ;
Because it is a single soldier operation , The vast majority of communications are done internally , Then you can use a wired connection , Ensure a good network connection , There is no risk of losing data or hacking ;
The robot was eventually produced in small quantities , But because of the high cost and price , It can only be used for academic research .
With ROS The popularity of , application ROS The robot type of has been compared with PR2 Robots have earth shaking problems , Also does not have PR2 Such conditions , That was originally aimed at PR2 Designed software framework , There will be some problems , such as :
To run in an embedded system with limited resources ;
Ensure the reliability of communication in places with interference ;
We should make products and go to the market , Even used in autonomous vehicle and space robots .
Similar problems continue to emerge , This makes it more suitable for a new generation of robot applications ROS The birth of , That is to say ——ROS2.
Two 、 all-new ROS2
ROS2 With the historical mission of transforming the era of intelligent robots , At the beginning of the design , Considering the need to meet a variety of robot applications .
Multi robot system : Robots in the future must not be independent individuals , Robots and robots also need communication and cooperation ,ROS2 It provides a standard method and communication mechanism for the application of multi robot systems .
Cross platform : Robot application scenarios are different , The control platforms used will also vary greatly , For example, the computational performance of autonomous vehicle is definitely better than AMR Robots are much better , In order for all robots to work ROS2,ROS2 It can run across platforms Linux、Windows、MacOS、RTOS, Even a microcontroller without any system (MCU) On , So we don't have to worry about whether our controller can be used ROS 了 .
The real time : Robot motion control and many behavior strategies require that robots have real-time performance , For example, robots should be reliable in 100ms Find pedestrians in front , Or stable in 1ms Complete the kinematics in the cycle 、 Solution of dynamics ,ROS2 It provides basic guarantee for such real-time requirements .
network connections : No matter what kind of network environment ,ROS2 Can try to ensure the integrity and security of a large number of robot data , For example wifi When the signal is bad, try your best to send the data , When there is a risk of hacker intrusion, the data should be encrypted and decrypted .
Commercialization :, A large number of robots have come into our life , There will be more and more in the future ,ROS2 It can not only be used in the robot development stage , It can also be directly carried in the product , Go to the consumer market , This is right ROS2 The stability of 、 Strength also poses great challenges .
project management : Robot development is a complex system engineering , Design 、 Development 、 debugging 、 test 、 Deploy the whole process of project management tools and mechanisms , Will also be in ROS2 In the embodiment , It is more convenient for us to develop a robot .
To meet these needs ,ROS2 The design and development of is not simple , Compared with such standardized products as mobile phones ,Android The system can also be standardized as much as possible , But robot classes vary greatly , How to fit as many robots as possible , This may be far more complicated than developing a mobile phone system or a computer system .
ROS Developers face two choices , The first is in ROS1 On the framework of , Make changes and optimizations , Like a built house , We make it into a blank room , Redecorate and renovate , But it will certainly be subject to the pattern of the original building , In the long run, it is not the best choice , They finally chose the second option , That is to push down and start over .
therefore ROS2 Is a new robot operating system , Learning from ROS1 Based on successful experience , The system architecture and software code are redesigned and implemented . And ROS1 comparison , In the following points :
3、 ... and 、ROS2 vs ROS1
In this picture , On the left is ROS1, The right side is ROS2, Pay attention to the most obvious changes between the two , That's it Master.
stay ROS1 in , In the application layer Master The role of this node manager is critical , All nodes have to listen to it , Similar to a company CEO, There is one and only one , If this CEO Suddenly disappeared , The company will definitely be in a mess .ROS2 Please leave this most unstable role , Nodes can pass another set discovery—— Self discovery mechanism , Find each other , So as to establish a stable communication connection .
The middle layer is ROS Encapsulated standard communication interface , When we write programs , I will deal with these communication interfaces frequently , For example, publish the data of an image , Receive a radar message , The client library will call the underlying complex driver and communication protocol , Let our development become more simple and clear .
stay ROS1 in ,ROS Communication depends on the underlying TCP and UDP agreement , And in the ROS2 in , The communication protocol has been replaced by a more complex but more perfect DDS System .
If you need to communicate a lot of data in the process ,ROS1 and ROS2 Both provide communication methods based on shared memory , It's just that the name is different .
At the bottom is the system layer , So you can put ROS Which operating systems are installed ,ROS1 Mainly installed in Linux On ,ROS2 There are many options ,Linux、windows、MacOS、RTOS Fine .
ROS2 comparison ROS1 The biggest change , Except for omitting Master outside , It should be the change of communication system .ROS1 Based on TCP/UDP Our communication system , Frequently criticized for delays 、 Losing data 、 Unable to encrypt and other problems ,ROS2 Medium DDS The functions at the communication level are much richer .
DDS In fact, it is a communication protocol widely used in the Internet of things , Similar to what we often hear 5G Communication is the same ,DDS It's an international standard , The software system that can implement this standard is not the only one , So we can choose from many manufacturers DDS System , Like here OpenSplice、FastRTPS, There are more manufacturers , The performance of each company is different , The applicable scenarios are also different .
Four 、 Mode of operation
Overall speaking ,ROS2 More object-oriented implementation methods and language features will be used , From the perspective of programming language , It will be more difficult , But when we cross this barrier , We will find that the program we write will be more readable and portable , It will also be closer to the process of robot software development in real enterprises .
ROS1 The command lines in are relatively scattered , Each function is an independent command , such as rosrun Start a node ,rostopic Control topic related functions .
ROS2 The command line is greatly integrated , All commands are integrated in one ros2 In the main command of , such as ros2 run, It means starting a node ,ros2 topic Indicates the function related to the topic .
summary
The node has been killed Master
The communication has been replaced by DDS
The core concept has not changed
The difficulty of programming has increased
边栏推荐
- [tf] Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initial
- Instruction execution time
- UTC, GPS time and Tai
- About vscode, "code unreachable" will be displayed when calling sendline series functions with pwntools“
- Vscode creates its own code template
- 'mongoexport 'is not an internal or external command, nor is it a runnable program or batch file.
- vsCode创建自己的代码模板
- Use the Paping tool to detect TCP port connectivity
- Vscode configures the typera editor for MD
- The differences and connections among cookies, sessions, JWT, and tokens
猜你喜欢
SOC_SD_DATA_FSM
[Gaode map POI stepping pit] amap Placesearch cannot be used
SD_CMD_SEND_SHIFT_REGISTER
What is linting
ROS2——Service服务(九)
Use ffmpeg to rotate, flip up and down, and flip horizontally
Mutual transformation between two-dimensional array and sparse array (sparse matrix)
2. Addition and management of Oracle data files
SD_CMD_RECEIVE_SHIFT_REGISTER
Adg5412fbruz-rl7 applies dual power analog switch and multiplexer IC
随机推荐
Technology blog learning website
Error: “MountVolume.SetUp failed for volume pvc 故障处理
Get class files and attributes by reflection
Volcano 资源预留特性
Qt项目中的日志库log4qt使用
Time is fast, please do more meaningful things
Using handler in a new thread
The route of wechat applet jumps again without triggering onload
new和malloc的区别
Database mysql all
Design specification for mobile folding screen
Unity 之 ExecuteAlways正在取代ExecuteInEditMode
'mongoexport 'is not an internal or external command, nor is it a runnable program or batch file.
Sum of two numbers, the numbers in the array are converted to decimal, added, and output inversely
The differences and connections among cookies, sessions, JWT, and tokens
Configuration method and configuration file of SolidWorks GB profile library
ROS2——功能包(六)
2022 winter vacation training game 5
VLAN experiment
Orin two brushing methods