uas-ugv/main/messages.proto

74 lines
1.2 KiB
Protocol Buffer
Raw Normal View History

2019-01-03 14:16:54 -07:00
syntax = "proto3";
2019-05-15 21:21:17 -07:00
package ugv.messages;
import public "config.proto";
2019-01-03 15:52:52 -07:00
option optimize_for = LITE_RUNTIME;
2019-01-03 14:16:54 -07:00
enum UGV_State {
STATE_IDLE = 0;
STATE_AQUIRING = 1;
STATE_DRIVING = 2;
STATE_FINISHED = 3;
STATE_TEST = 4;
STATE_FLIPPING = 5;
STATE_TURNING = 6;
STATE_DRIVE_HEADING = 7;
2019-01-03 14:16:54 -07:00
}
2019-05-15 21:21:17 -07:00
message TargetLocation {
float latitude = 1;
float longitude = 2;
}
2019-01-03 14:16:54 -07:00
message Location {
uint32 fix_quality = 1;
float latitude = 2;
float longitude = 3;
float altitude = 4;
}
message UGV_Status {
UGV_State state = 1;
Location location = 2;
2019-04-25 20:51:29 -07:00
float yaw_angle = 3;
2019-01-03 14:16:54 -07:00
}
message UGV_Message {
oneof ugv_message {
UGV_Status status = 1;
uint32 command_ack = 2;
}
}
enum GroundCommandType {
CMD_DISABLE = 0;
CMD_DRIVE_TO_TARGET = 1;
CMD_TEST = 2;
CMD_DRIVE_HEADING = 3;
2019-05-15 21:21:17 -07:00
CMD_SET_TARGET = 4;
CMD_SET_CONFIG = 5;
}
message DriveHeadingData {
float heading = 1;
float power = 2;
2019-01-03 14:16:54 -07:00
}
message GroundCommand {
uint32 id = 1;
GroundCommandType type = 2;
oneof data {
DriveHeadingData drive_heading = 3;
2019-05-15 21:21:17 -07:00
TargetLocation target_location = 4;
config.Config config = 5;
}
2019-01-03 14:16:54 -07:00
}
message GroundMessage {
oneof ground_message {
GroundCommand command = 1;
}
}