519 lines
12 KiB
Protocol Buffer
519 lines
12 KiB
Protocol Buffer
![]() |
syntax = "proto3";
|
|||
|
|
|||
|
package vda5050;
|
|||
|
|
|||
|
// 服务定义
|
|||
|
service AgvManagement {
|
|||
|
// 双向流通信通道
|
|||
|
rpc CommunicationChannel(stream AgvMessage) returns (stream ControlMessage) {}
|
|||
|
}
|
|||
|
|
|||
|
// 节点位置
|
|||
|
message NodePosition {
|
|||
|
float x = 1;
|
|||
|
float y = 2;
|
|||
|
optional float theta = 3;
|
|||
|
optional float allowedDeviationXy = 4;
|
|||
|
optional float allowedDeviationTheta = 5;
|
|||
|
string mapId = 6;
|
|||
|
optional string mapDescription = 7;
|
|||
|
}
|
|||
|
|
|||
|
// 节点信息
|
|||
|
message Node {
|
|||
|
string nodeId = 1;
|
|||
|
uint32 sequenceId = 2;
|
|||
|
optional string nodeDescription = 3;
|
|||
|
bool released = 4;
|
|||
|
optional NodePosition nodePosition = 5;
|
|||
|
repeated Action actions = 6;
|
|||
|
}
|
|||
|
|
|||
|
// 边信息
|
|||
|
message Edge {
|
|||
|
string edgeId = 1;
|
|||
|
uint32 sequenceId = 2;
|
|||
|
optional string edgeDescription = 3;
|
|||
|
bool released = 4;
|
|||
|
string startNodeId = 5;
|
|||
|
string endNodeId = 6;
|
|||
|
optional float maxSpeed = 7;
|
|||
|
optional float maxHeight = 8;
|
|||
|
optional float minHeight = 9;
|
|||
|
optional float orientation = 10;
|
|||
|
optional string direction = 11;
|
|||
|
optional bool rotationAllowed = 12;
|
|||
|
optional float maxRotationSpeed = 13;
|
|||
|
optional Trajectory trajectory = 14;
|
|||
|
optional float length = 15;
|
|||
|
}
|
|||
|
|
|||
|
// 动作信息
|
|||
|
message Action {
|
|||
|
string actionType = 1;
|
|||
|
string actionId = 2;
|
|||
|
optional string actionDescription = 3;
|
|||
|
string blockingType = 4;
|
|||
|
repeated ActionParameter actionParameters = 5;
|
|||
|
}
|
|||
|
|
|||
|
// 动作参数
|
|||
|
message ActionParameter {
|
|||
|
string key = 1;
|
|||
|
string value = 2;
|
|||
|
}
|
|||
|
|
|||
|
// 即时动作
|
|||
|
message InstantActions {
|
|||
|
uint32 headerId = 1;
|
|||
|
string timestamp = 2;
|
|||
|
string version = 3;
|
|||
|
string manufacturer = 4;
|
|||
|
string serialNumber = 5;
|
|||
|
repeated Action instantActions = 6;
|
|||
|
}
|
|||
|
|
|||
|
// 订单
|
|||
|
message Order {
|
|||
|
uint32 headerId = 1;
|
|||
|
string timestamp = 2;
|
|||
|
string version = 3;
|
|||
|
string manufacturer = 4;
|
|||
|
string serialNumber = 5;
|
|||
|
string orderId = 6;
|
|||
|
uint32 orderUpdateId = 7;
|
|||
|
optional string zoneSetId = 8;
|
|||
|
repeated Node nodes = 9;
|
|||
|
repeated Edge edges = 10;
|
|||
|
}
|
|||
|
|
|||
|
// 连接信息
|
|||
|
message Connection {
|
|||
|
uint32 headerId = 1;
|
|||
|
string timestamp = 2;
|
|||
|
string version = 3;
|
|||
|
string manufacturer = 4;
|
|||
|
string serialNumber = 5;
|
|||
|
string connectionState = 6;
|
|||
|
}
|
|||
|
|
|||
|
// 状态消息
|
|||
|
message State {
|
|||
|
uint32 headerId = 1;
|
|||
|
string timestamp = 2;
|
|||
|
string version = 3;
|
|||
|
string manufacturer = 4;
|
|||
|
string serialNumber = 5;
|
|||
|
string orderId = 6;
|
|||
|
uint32 orderUpdateId = 7;
|
|||
|
string lastNodeId = 8;
|
|||
|
uint32 lastNodeSequenceId = 9;
|
|||
|
bool driving = 10;
|
|||
|
optional bool waitingForInteractionZoneRelease = 11;
|
|||
|
optional bool paused = 12;
|
|||
|
optional ForkState forkState = 13;
|
|||
|
optional bool newBaseRequest = 14;
|
|||
|
optional float distanceSinceLastNode = 15;
|
|||
|
string operatingMode = 16;
|
|||
|
repeated NodeState nodeStates = 17;
|
|||
|
repeated EdgeState edgeStates = 18;
|
|||
|
optional AgvPosition agvPosition = 19;
|
|||
|
optional Velocity velocity = 20;
|
|||
|
repeated Load loads = 21;
|
|||
|
repeated ActionState actionStates = 22;
|
|||
|
BatteryState batteryState = 23;
|
|||
|
repeated Error errors = 24;
|
|||
|
repeated Information information = 25;
|
|||
|
SafetyState safetyState = 26;
|
|||
|
}
|
|||
|
|
|||
|
// AGV位置
|
|||
|
message AgvPosition {
|
|||
|
float x = 1;
|
|||
|
float y = 2;
|
|||
|
float theta = 3;
|
|||
|
string mapId = 4;
|
|||
|
optional string mapDescription = 5;
|
|||
|
bool positionInitialized = 6;
|
|||
|
optional float deviationRange = 7;
|
|||
|
optional float localizationScore = 8;
|
|||
|
}
|
|||
|
|
|||
|
// 速度
|
|||
|
message Velocity {
|
|||
|
optional float vx = 1;
|
|||
|
optional float vy = 2;
|
|||
|
optional float omega = 3;
|
|||
|
}
|
|||
|
|
|||
|
// 错误
|
|||
|
message Error {
|
|||
|
string errorType = 1;
|
|||
|
repeated ErrorReference errorReferences = 2;
|
|||
|
optional string errorDescription = 3;
|
|||
|
string errorLevel = 4;
|
|||
|
}
|
|||
|
|
|||
|
// 错误引用
|
|||
|
message ErrorReference {
|
|||
|
string referenceKey = 1;
|
|||
|
string referenceValue = 2;
|
|||
|
}
|
|||
|
|
|||
|
// 信息
|
|||
|
message Information {
|
|||
|
string infoType = 1;
|
|||
|
repeated InfoReference infoReferences = 2;
|
|||
|
optional string infoDescription = 3;
|
|||
|
string infoLevel = 4;
|
|||
|
}
|
|||
|
|
|||
|
// 信息引用
|
|||
|
message InfoReference {
|
|||
|
string referenceKey = 1;
|
|||
|
string referenceValue = 2;
|
|||
|
}
|
|||
|
|
|||
|
// 动作状态
|
|||
|
message ActionState {
|
|||
|
string actionId = 1;
|
|||
|
optional string actionType = 2;
|
|||
|
optional string actionDescription = 3;
|
|||
|
string actionStatus = 4;
|
|||
|
optional string resultDescription = 5;
|
|||
|
}
|
|||
|
|
|||
|
// 节点状态
|
|||
|
message NodeState {
|
|||
|
string nodeId = 1;
|
|||
|
uint32 sequenceId = 2;
|
|||
|
optional string nodeDescription = 3;
|
|||
|
optional NodePosition nodePosition = 4;
|
|||
|
bool released = 5;
|
|||
|
}
|
|||
|
|
|||
|
// 边状态
|
|||
|
message EdgeState {
|
|||
|
string edgeId = 1;
|
|||
|
uint32 sequenceId = 2;
|
|||
|
optional string edgeDescription = 3;
|
|||
|
bool released = 4;
|
|||
|
optional Trajectory trajectory = 5;
|
|||
|
}
|
|||
|
|
|||
|
// 负载
|
|||
|
message Load {
|
|||
|
optional string loadId = 1;
|
|||
|
optional string loadType = 2;
|
|||
|
optional string loadPosition = 3;
|
|||
|
optional BoundingBoxReference boundingBoxReference = 4;
|
|||
|
optional LoadDimensions loadDimensions = 5;
|
|||
|
optional float weight = 6;
|
|||
|
}
|
|||
|
|
|||
|
// 边界框引用
|
|||
|
message BoundingBoxReference {
|
|||
|
float x = 1;
|
|||
|
float y = 2;
|
|||
|
float z = 3;
|
|||
|
optional float theta = 4;
|
|||
|
}
|
|||
|
|
|||
|
// 负载尺寸
|
|||
|
message LoadDimensions {
|
|||
|
float length = 1;
|
|||
|
float width = 2;
|
|||
|
optional float height = 3;
|
|||
|
}
|
|||
|
|
|||
|
// 控制点
|
|||
|
message ControlPoint {
|
|||
|
float x = 1;
|
|||
|
float y = 2;
|
|||
|
optional float weight = 3;
|
|||
|
optional float orientation = 4;
|
|||
|
}
|
|||
|
|
|||
|
// 轨迹
|
|||
|
message Trajectory {
|
|||
|
int64 degree = 1;
|
|||
|
repeated float knotVector = 2;
|
|||
|
repeated ControlPoint controlPoints = 3;
|
|||
|
}
|
|||
|
|
|||
|
// 货叉状态
|
|||
|
message ForkState {
|
|||
|
float forkHeight = 1;
|
|||
|
}
|
|||
|
|
|||
|
// 安全状态
|
|||
|
message SafetyState {
|
|||
|
string eStop = 1;
|
|||
|
bool fieldViolation = 2;
|
|||
|
}
|
|||
|
|
|||
|
// 电池状态
|
|||
|
message BatteryState {
|
|||
|
float batteryCharge = 1;
|
|||
|
optional float batteryVoltage = 2;
|
|||
|
optional uint32 batteryHealth = 3;
|
|||
|
bool charging = 4;
|
|||
|
optional float reach = 5;
|
|||
|
}
|
|||
|
|
|||
|
// 可视化信息
|
|||
|
message Visualization {
|
|||
|
uint32 headerId = 1;
|
|||
|
string timestamp = 2;
|
|||
|
string version = 3;
|
|||
|
string manufacturer = 4;
|
|||
|
string serialNumber = 5;
|
|||
|
optional AgvPosition agvPosition = 6;
|
|||
|
optional Velocity velocity = 7;
|
|||
|
}
|
|||
|
|
|||
|
// 控制消息(从控制系统到AGV)
|
|||
|
message ControlMessage {
|
|||
|
string targetAgvId = 1;
|
|||
|
oneof message_type {
|
|||
|
Order order = 2;
|
|||
|
InstantActions instantActions = 3;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
// AGV消息(从AGV到控制系统)
|
|||
|
message AgvMessage {
|
|||
|
string agvId = 1;
|
|||
|
oneof message_type {
|
|||
|
State state = 2;
|
|||
|
Connection connection = 3;
|
|||
|
Error error = 4;
|
|||
|
Visualization visualization = 5;
|
|||
|
Factsheet factsheet = 6;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
// AGV 数据服务
|
|||
|
service AgvDataService {
|
|||
|
// 获取单个 AGV 的数据
|
|||
|
rpc GetAgvData (GetAgvDataRequest) returns (AgvDataResponse) {}
|
|||
|
// 获取所有 AGV 的数据
|
|||
|
rpc GetAllAgvData (GetAllAgvDataRequest) returns (GetAllAgvDataResponse) {}
|
|||
|
}
|
|||
|
|
|||
|
// 请求消息
|
|||
|
message GetAgvDataRequest {
|
|||
|
string agvId = 1;
|
|||
|
}
|
|||
|
|
|||
|
message GetAllAgvDataRequest {
|
|||
|
// 可以添加过滤条件
|
|||
|
bool includeRealAgvs = 1;
|
|||
|
bool includeSimulatedAgvs = 2;
|
|||
|
}
|
|||
|
|
|||
|
// 响应消息
|
|||
|
message AgvDataResponse {
|
|||
|
string agvId = 1;
|
|||
|
State state = 2;
|
|||
|
uint32 timestamp = 3;
|
|||
|
bool isReal = 4;
|
|||
|
}
|
|||
|
|
|||
|
message GetAllAgvDataResponse {
|
|||
|
repeated AgvDataResponse agvs = 1;
|
|||
|
}
|
|||
|
|
|||
|
// Factsheet provides AGV factsheet information to master control
|
|||
|
message Factsheet {
|
|||
|
uint32 headerId = 1;
|
|||
|
string timestamp = 2;
|
|||
|
string version = 3;
|
|||
|
string manufacturer = 4;
|
|||
|
string serialNumber = 5;
|
|||
|
TypeSpecification typeSpecification = 6;
|
|||
|
PhysicalParameters physicalParameters = 7;
|
|||
|
ProtocolLimits protocolLimits = 8;
|
|||
|
ProtocolFeatures protocolFeatures = 9;
|
|||
|
AgvGeometry agvGeometry = 10;
|
|||
|
LoadSpecification loadSpecification = 11;
|
|||
|
VehicleConfig vehicleConfig = 12;
|
|||
|
}
|
|||
|
|
|||
|
message TypeSpecification {
|
|||
|
string seriesName = 1;
|
|||
|
optional string seriesDescription = 2;
|
|||
|
string agvKinematic = 3;
|
|||
|
string agvClass = 4;
|
|||
|
double maxLoadMass = 5;
|
|||
|
repeated string localizationTypes = 6;
|
|||
|
repeated string navigationTypes = 7;
|
|||
|
}
|
|||
|
|
|||
|
message PhysicalParameters {
|
|||
|
double speedMin = 1;
|
|||
|
double speedMax = 2;
|
|||
|
optional double angularSpeedMin = 3;
|
|||
|
optional double angularSpeedMax = 4;
|
|||
|
double accelerationMax = 5;
|
|||
|
double decelerationMax = 6;
|
|||
|
double heightMin = 7;
|
|||
|
double heightMax = 8;
|
|||
|
double width = 9;
|
|||
|
double length = 10;
|
|||
|
}
|
|||
|
|
|||
|
message ProtocolLimits {
|
|||
|
MaxStringLens maxStringLens = 1;
|
|||
|
MaxArrayLens maxArrayLens = 2;
|
|||
|
Timing timing = 3;
|
|||
|
}
|
|||
|
|
|||
|
message MaxStringLens {
|
|||
|
optional uint32 msgLen = 1;
|
|||
|
optional uint32 topicSerialLen = 2;
|
|||
|
optional uint32 topicElemLen = 3;
|
|||
|
optional uint32 idLen = 4;
|
|||
|
optional bool idNumericalOnly = 5;
|
|||
|
optional uint32 enumLen = 6;
|
|||
|
optional uint32 loadIdLen = 7;
|
|||
|
}
|
|||
|
|
|||
|
message MaxArrayLens {
|
|||
|
optional uint32 orderNodes = 1;
|
|||
|
optional uint32 orderEdges = 2;
|
|||
|
optional uint32 nodeActions = 3;
|
|||
|
optional uint32 edgeActions = 4;
|
|||
|
optional uint32 actionParameters = 5;
|
|||
|
optional uint32 instantActions = 6;
|
|||
|
optional uint32 trajectoryKnotVector = 7;
|
|||
|
optional uint32 trajectoryControlPoints = 8;
|
|||
|
optional uint32 stateNodeStates = 9;
|
|||
|
optional uint32 stateEdgeStates = 10;
|
|||
|
optional uint32 stateLoads = 11;
|
|||
|
optional uint32 stateActionStates = 12;
|
|||
|
optional uint32 stateErrors = 13;
|
|||
|
optional uint32 stateInformation = 14;
|
|||
|
optional uint32 errorErrorReferences = 15;
|
|||
|
optional uint32 informationInfoReferences = 16;
|
|||
|
}
|
|||
|
|
|||
|
message Timing {
|
|||
|
optional float minOrderInterval = 1;
|
|||
|
optional float minStateInterval = 2;
|
|||
|
optional float defaultStateInterval = 3;
|
|||
|
optional float visualizationInterval = 4;
|
|||
|
}
|
|||
|
|
|||
|
message ProtocolFeatures {
|
|||
|
repeated OptionalParameter optionalParameters = 1;
|
|||
|
repeated AgvAction agvActions = 2;
|
|||
|
}
|
|||
|
|
|||
|
message OptionalParameter {
|
|||
|
string parameter = 1;
|
|||
|
string support = 2;
|
|||
|
optional string description = 3;
|
|||
|
}
|
|||
|
|
|||
|
message AgvAction {
|
|||
|
string actionType = 1;
|
|||
|
optional string actionDescription = 2;
|
|||
|
repeated string actionScopes = 3;
|
|||
|
repeated ActionParameterDefinition actionParameters = 4;
|
|||
|
optional string resultDescription = 5;
|
|||
|
repeated string blockingTypes = 6;
|
|||
|
}
|
|||
|
|
|||
|
message ActionParameterDefinition {
|
|||
|
string key = 1;
|
|||
|
string valueDataType = 2;
|
|||
|
optional string description = 3;
|
|||
|
optional bool isOptional = 4;
|
|||
|
}
|
|||
|
|
|||
|
message AgvGeometry {
|
|||
|
repeated WheelDefinition wheelDefinitions = 1;
|
|||
|
repeated Envelope2d envelopes2d = 2;
|
|||
|
repeated Envelope3d envelopes3d = 3;
|
|||
|
}
|
|||
|
|
|||
|
message WheelDefinition {
|
|||
|
string type = 1;
|
|||
|
bool isActiveDriven = 2;
|
|||
|
bool isActiveSteered = 3;
|
|||
|
Position position = 4;
|
|||
|
double diameter = 5;
|
|||
|
double width = 6;
|
|||
|
optional double centerDisplacement = 7;
|
|||
|
optional string constraints = 8;
|
|||
|
}
|
|||
|
|
|||
|
message Position {
|
|||
|
double x = 1;
|
|||
|
double y = 2;
|
|||
|
optional double theta = 3;
|
|||
|
}
|
|||
|
|
|||
|
message Envelope2d {
|
|||
|
string set = 1;
|
|||
|
repeated PolygonPoint polygonPoints = 2;
|
|||
|
optional string description = 3;
|
|||
|
}
|
|||
|
|
|||
|
message PolygonPoint {
|
|||
|
double x = 1;
|
|||
|
double y = 2;
|
|||
|
}
|
|||
|
|
|||
|
message Envelope3d {
|
|||
|
string set = 1;
|
|||
|
string format = 2;
|
|||
|
string data = 3;
|
|||
|
optional string url = 4;
|
|||
|
optional string description = 5;
|
|||
|
}
|
|||
|
|
|||
|
message LoadSpecification {
|
|||
|
repeated string loadPositions = 1;
|
|||
|
repeated LoadSet loadSets = 2;
|
|||
|
}
|
|||
|
|
|||
|
message LoadSet {
|
|||
|
string setName = 1;
|
|||
|
string loadType = 2;
|
|||
|
repeated string loadPositions = 3;
|
|||
|
BoundingBoxReference boundingBoxReference = 4;
|
|||
|
LoadDimensions loadDimensions = 5;
|
|||
|
optional double maxWeight = 6;
|
|||
|
optional double minLoadhandlingHeight = 7;
|
|||
|
optional double maxLoadhandlingHeight = 8;
|
|||
|
optional double minLoadhandlingDepth = 9;
|
|||
|
optional double maxLoadhandlingDepth = 10;
|
|||
|
optional double minLoadhandlingTilt = 11;
|
|||
|
optional double maxLoadhandlingTilt = 12;
|
|||
|
optional double agvSpeedLimit = 13;
|
|||
|
optional double agvAccelerationLimit = 14;
|
|||
|
optional double agvDecelerationLimit = 15;
|
|||
|
optional double pickTime = 16;
|
|||
|
optional double dropTime = 17;
|
|||
|
optional string description = 18;
|
|||
|
}
|
|||
|
|
|||
|
message VehicleConfig {
|
|||
|
repeated VersionInfo versions = 1;
|
|||
|
optional NetworkInfo network = 2;
|
|||
|
}
|
|||
|
|
|||
|
message VersionInfo {
|
|||
|
string key = 1;
|
|||
|
string value = 2;
|
|||
|
}
|
|||
|
|
|||
|
message NetworkInfo {
|
|||
|
repeated string dnsServers = 1;
|
|||
|
repeated string ntpServers = 2;
|
|||
|
string localIpAddress = 3;
|
|||
|
string netmask = 4;
|
|||
|
string defaultGateway = 5;
|
|||
|
}
|