116 lines
2.1 KiB
Protocol Buffer
116 lines
2.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
package robocar.events;
|
|
option go_package = "./events";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
message FrameRef {
|
|
string name = 1;
|
|
string id = 2;
|
|
google.protobuf.Timestamp created_at= 3;
|
|
}
|
|
|
|
message FrameMessage {
|
|
FrameRef id = 1;
|
|
bytes frame = 2;
|
|
}
|
|
|
|
message DisparityMessage {
|
|
FrameRef frame_ref= 1;
|
|
bytes disparity = 2;
|
|
double focal_length_in_pixels = 3;
|
|
// the distance between two mono cameras
|
|
double baseline_in_mm = 4;
|
|
}
|
|
|
|
message SteeringMessage {
|
|
float steering = 1;
|
|
float confidence = 2;
|
|
FrameRef frame_ref = 3;
|
|
}
|
|
|
|
message ThrottleMessage {
|
|
float throttle = 1;
|
|
float confidence = 2;
|
|
FrameRef frame_ref = 3;
|
|
}
|
|
|
|
enum SpeedZone {
|
|
UNKNOWN = 0;
|
|
SLOW = 1;
|
|
NORMAL = 2;
|
|
FAST = 3;
|
|
}
|
|
|
|
message SpeedZoneMessage {
|
|
SpeedZone speed_zone = 1;
|
|
float confidence = 2;
|
|
FrameRef frame_ref = 3;
|
|
}
|
|
|
|
message DriveModeMessage {
|
|
DriveMode drive_mode = 1;
|
|
}
|
|
|
|
enum DriveMode {
|
|
INVALID = 0;
|
|
USER = 1;
|
|
PILOT = 2;
|
|
COPILOT = 3;
|
|
}
|
|
|
|
message ObjectsMessage {
|
|
repeated Object objects = 1;
|
|
FrameRef frame_ref = 2;
|
|
}
|
|
|
|
// BoundingBox that contains an object, coordinates as percent
|
|
message Object {
|
|
TypeObject type = 1;
|
|
float left = 2;
|
|
float top = 3;
|
|
float right = 4;
|
|
float bottom = 5;
|
|
float confidence = 6;
|
|
}
|
|
|
|
enum TypeObject {
|
|
ANY = 0;
|
|
CAR = 1;
|
|
BUMP = 2;
|
|
PLOT = 3;
|
|
}
|
|
|
|
message SwitchRecordMessage {
|
|
bool enabled = 1;
|
|
}
|
|
|
|
// Road description
|
|
message RoadMessage {
|
|
repeated Point contour = 1; // list of points that describes road contour
|
|
Ellipse ellipse = 2; // rotated ellipse that fit road contour
|
|
FrameRef frame_ref = 3; // Reference to the frame used for compute
|
|
}
|
|
|
|
message Point {
|
|
int32 x = 1;
|
|
int32 y = 2;
|
|
}
|
|
|
|
message Ellipse {
|
|
Point center = 1;
|
|
int32 width = 2;
|
|
int32 height = 3;
|
|
float angle = 4;
|
|
float confidence = 5;
|
|
}
|
|
|
|
// Record message used to tensorflow learning
|
|
message RecordMessage {
|
|
FrameMessage frame = 1;
|
|
SteeringMessage steering = 2;
|
|
SteeringMessage autopilot_steering = 4;
|
|
DriveModeMessage drive_mode = 5;
|
|
string recordSet = 3; // Record set name
|
|
}
|