当前位置:网站首页>ROS2专题(03):ROS1和ROS2的区别【02】
ROS2专题(03):ROS1和ROS2的区别【02】
2022-07-07 21:51:00 【无水先生】
7 提要
接上文:ROS2专题(03):ROS1和ROS2的区别【01】_
8 ros1和ros2的通信模式
ros2废除了ros的Ros-master服务器模式,采用DDS协议的分布式通信;下图说明它们的通信模式区别。

9 参数服务和管理
9.1 ros1的参数服务器
ros1的参数全部提交给ROS-master内部,以全局方式存储,所有节点可访问;如下图:

9.2 ros2的参数服务
ros2的参数存储在某个专门节点内部,需要参数的节点,可以通过Topic接收参数信息;这意味着参数信息可以实时改动,比如相机热插拔;相反,在Ros1中更换相机,需要更换参数;因而不得不规定“本系统相机硬件必须是某某型号”

10 服务模式
ros1的服务是同步模式,ros2服务是异步模式;这可以防止通信阻塞。更灵活的是,如果ROS2也想实现同步模式,只要选择一下参数就可以了。

11action通信
Action通信不是将信息发送到哪里,而是需要支配某些动作,如开关、按钮等的开闭。ROS1是双握手机制,而ros2改成3握手机制。如下述:
11.1 ros1的action
在ros1中,action服务通过Topic实现。

11.2 ROS2的action服务

12 自定义消息
ros2的自定义消息需要加上命名空间。

举例对比ROS1和ROS2的自定义消息如下:

可以看出,编译过后,自定义消息的名称稍许不同。
13 workspace编译路径
13.1 编译地方都在workspace下边(src的上边);但编译工具不同:

13.2 ros-tools的不同

13.3 ros2的新功能
边栏推荐
- Oracle-数据库的备份与恢复
- UE4_UE5蓝图command节点的使用(开启关闭屏幕响应-log-发布全屏显示)
- USB (十七)2022-04-15
- 聊聊 Dart 的空安全 (null safety) 特性
- 智慧社區和智慧城市之間有什麼异同
- kubernetes的简单化数据存储StorageClass(建立和删除以及初步使用)
- Handling file exceptions
- JMeter interface automated test read case, execute and write back result
- 微信论坛交流小程序系统毕业设计毕设(6)开题答辩PPT
- Installing vmtools is gray
猜你喜欢

微信论坛交流小程序系统毕业设计毕设(2)小程序功能

聊聊 Dart 的空安全 (null safety) 特性

Inftnews | web5 vs Web3: the future is a process, not a destination

UE4_UE5蓝图command节点的使用(开启关闭屏幕响应-log-发布全屏显示)

PMP项目管理考试过关口诀-1

成年人只有一份主业是要付出代价的,被人事劝退后,我哭了一整晚

U盘拷贝东西时,报错卷错误,请运行chkdsk

十三、系统优化

Digital collections accelerated out of the circle, and marsnft helped diversify the culture and tourism economy!

JMeter interface automated test read case, execute and write back result
随机推荐
力扣解法汇总648-单词替换
定位到最底部[通俗易懂]
十四、数据库的导出和导入的两种方法
Specific method example of V20 frequency converter manual automatic switching (local remote switching)
Grid
Dynamics 365 查找字段过滤
网络安全-永恒之蓝
Kubernetes' simplified data storage storageclass (creation, deletion and initial use)
Wechat forum exchange applet system graduation design completion (8) graduation design thesis template
Wechat forum exchange applet system graduation design (3) background function
每日一题——PAT乙级1002题
JMeter-接口自动化测试读取用例,执行并结果回写
Develop those things: go plus c.free to free memory, and what are the reasons for compilation errors?
2022 words for yourself
Unity3D学习笔记6——GPU实例化(1)
About idea cannot find or load the main class
oc 可变參数传递
Dynamics 365 find field filtering
网络安全-burpsuit
Guessing game (read data from file)