当前位置:网站首页>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的新功能
边栏推荐
- U盘拷贝东西时,报错卷错误,请运行chkdsk
- The 19th Zhejiang Provincial Collegiate Programming Contest 2022浙江省赛 F.EasyFix 主席树
- Network security -beef
- 树后台数据存储(採用webmethod)[通俗易懂]
- FPGA基础篇目录
- Wechat forum exchange applet system graduation design (2) applet function
- CAIP2021 初赛VP
- Statistical method for anomaly detection
- 二叉树(Binary Tree)
- Wechat forum exchange applet system graduation design (5) assignment
猜你喜欢
JMeter-接口自动化测试读取用例,执行并结果回写
ArcGIS:字段赋值_属性表字段计算器(Field Calculator)依据条件为字段赋值
Wechat forum exchange applet system graduation design completion (6) opening defense ppt
十三、系统优化
leetcode-520. 检测大写字母-js
30讲 线性代数 第五讲 特征值与特征向量
PMP project management exam pass Formula-1
【微服务|SCG】gateway整合sentinel
【刷题记录】3. 无重复字符的最长子串
二叉树(Binary Tree)
随机推荐
Network security CSRF
Specific method example of V20 frequency converter manual automatic switching (local remote switching)
七月第一周
Dynamics 365 find field filtering
Network security -beef
Wechat forum exchange applet system graduation design (5) assignment
每日一题——PAT乙级1002题
The 19th Zhejiang Provincial Collegiate Programming Contest 2022浙江省赛 F.EasyFix 主席树
Brush question 6
Wechat forum exchange applet system graduation design completion (6) opening defense ppt
十三、系统优化
Why does the market need low code?
聊聊支付流程的设计与实现逻辑
聊聊 Dart 的空安全 (null safety) 特性
JS triangle
解决:信息中插入avi格式的视频时,提示“unsupported video format”
Adults have only one main job, but they have to pay a price. I was persuaded to step back by personnel, and I cried all night
Develop those things: go plus c.free to free memory, and what are the reasons for compilation errors?
Network security - install CentOS
Digital collections accelerated out of the circle, and marsnft helped diversify the culture and tourism economy!