@Pigmon
2018-01-08T01:31:52.000000Z
字数 1173
阅读 1286
实习
| 整体架构 |
|---|
| 云端服务 (高精度地图,) |
| 软件层 |
| 硬件层 (各种传感器等) |
| 车辆层 |
| Apollo 软件层 |
|---|
| Apollo Modules(定位,规划,感知,决策,控制,HMI...) |
| Apollo Platform (修改的 ROS Indigo 见后面) |
| Apollo Kernel (Linux Kernel + realtime patch) |
ROS Master节点作为名字服务器,一旦失败系统会失灵
Socket 连接本身消耗较大(多次读写)
建立通信的每 2 个结点都会建立 Socket 连接(一对多,多对多),造成数据冗余。
ROS会对消息进行MD5校验
在已经定义好的消息结构中增加字段,即无法兼容。无法使用历史数据。
RTPS 服务发现协议
整个网络拓扑不再以 master 为中心构建,而是通过域的概念进行划分。当一个新的节点加入网络时,会通过 RTPS 协议向域内的所有其他节点发送广播信息,各个节点也会将自己的服务信息发送给新的节点,以代替 Master 的信息交换功能。
共享内存,一次写入,多次读取,只有一份拷贝。
消息延迟更低
吞吐速度更大
硬件占用更低
Google Protobuf
增加条目时,使用Protobuf的optional字段即可以兼容
最简单的 .proto
package lm;message helloworld{required int32 id = 1; // IDrequired string str = 2; // stroptional int32 opt = 3; //optional field}
稍微复杂的.proto
message Person {required string name = 1;required int32 id = 2; // Unique ID number for this person.optional string email = 3;enum PhoneType {MOBILE = 0;HOME = 1;WORK = 2;}message PhoneNumber {required string number = 1;optional PhoneType type = 2 [default = HOME];}repeated PhoneNumber phone = 4;}
有 import 的 .proto
import common.header;message youMsg{required common.info_header header = 1;required string youPrivateData = 2;}
.proto 可以通过 protoc 命令编译出对应的 C++ 操作接口,进行序列号,反序列化等操作
二进制格式存储
