Apollo星火计划学习笔记|L2 CyberRT学习

系列文章目录

L1 Apollo平台安装
L2 CyberRT学习
L5 Routing简介


从ROS到CyberRT

Apollo的计算平台之前一直采用的是ROS,3.5版本用Cyber替换了这一架构。
替换的缘由主要有两点:

以下几个表格整理了cyer RT 和ROS 对比(表格摘自
链接)

Cyber RTROS备注
Component组件之间通过Cyber channel通信
ChannelTopicchannel用于管理数据通信,用户可以通过publish/subscribe相同的channel来通信。
NodeNode每一个模块包含Node并通过Node来通信。一个模块通过定义read/write和/或service/client使用不同的通信模式
Reader/WriterPublish/Subscribe订阅者模式。往channel读写消息的类。通常作为Node的主要消息传输接口
Service/ClientService/Client请求/相应模式,支持节点之间双向通信。
MessageMessageCyber RT中用于模块间通信的数据单元,其实现基于protobuf。
ParameterParameterParameter服务提供全局参数访问的接口,该服务基于service/client模式。
Record fileBag file用于记录从channel发送或者接收的消息,回放record file可以重现之前的操作行为。
Launch fileLaunch file提供一种启动模块的便利途径。通过在launch file中定义一个或者多个dag文件,可以同时启动多个modules。
Task异步计算任务。
CRoutine协程,优化线程使用与系统资源分配。
Scheduler任务调度器,用户空间。
Dag file定义模块拓扑结构的配置文件。

常用工具对比

Cyber RTROS备注
cyber_launchroslaunch启动节点
cyber_channelrostopic查看某个topic的信息
cyber_moniterrqt?查看诊断消息
cyber_visualizerrviz?激光点云及摄像头可视化工具,需要安装NVIDIA显卡驱动及CUDA

常用命令迁移

Cyber RTROS备注
cyber_recorder play -f example.recordrosbag play example.bag播放一个包
cyber_recorder info example.recordrosbag info example.bag查看一个包的信息
cyber_recorder record -c /apollo/canbus/chassis \ /apollo/canbus/chassis_detailrosbag record /apollo/canbus/chassis \ /apollo/canbus/chassis_detail录制多个topic
cyber_recorder split -f input_file.record -o ouput_file.record -k “/apollo/planning”rosbag filter input.bag output.bag ‘topic != “/apollo/planning”’滤除一个topic
cyber_recorder split -f input_file.record -o ouput_file.record -k “/apollo/planning” -k “/apollo/relative_map”’rosbag filter csc.bag csc_no_plannig_and_relativemap.bag ‘topic != “/apollo/planning” and “/apollo/relative_map”’滤除多个topic
cyber_channel listrostopic list列出所有活动的topic
cyber_channel info /apollo/planningrostopic info /apollo/planning查看 /apollo/planning topic的概要信息
cyber_channel echo /apollo/planningrostopic echo /apollo/planning查看 /apollo/planning topic的内容
cyber_channel hz /apollo/planningrostopic hz /apollo/planning查看 /apollo/planning topic的发送频率
cyber_channel bw /apollo/planningrostopic bw /apollo/planning查看 /apollo/planning topic的带宽
cyber_channel type /apollo/planningrostopic type /apollo/planning查看 /apollo/planning topic的数据类型

参考文献

1 上课讲师王方浩的某乎系列文章,强烈推荐,写的深入浅出。
2 Cyber RT 与 ROS 对比

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值