|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package ugv.messages;
|
|
|
|
|
|
|
|
import public "config.proto";
|
|
|
|
|
|
|
|
option optimize_for = LITE_RUNTIME;
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TargetLocation {
|
|
|
|
float latitude = 1;
|
|
|
|
float longitude = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
float yaw_angle = 3;
|
|
|
|
float pitch_angle = 4;
|
|
|
|
float roll_angle = 5;
|
|
|
|
bool is_still = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
CMD_SET_TARGET = 4;
|
|
|
|
CMD_SET_CONFIG = 5;
|
|
|
|
CMD_GET_STATUS = 6;
|
|
|
|
CMD_PING = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DriveHeadingData {
|
|
|
|
float heading = 1;
|
|
|
|
float power = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GroundCommand {
|
|
|
|
uint32 id = 1;
|
|
|
|
GroundCommandType type = 2;
|
|
|
|
oneof data {
|
|
|
|
DriveHeadingData drive_heading = 3;
|
|
|
|
TargetLocation target_location = 4;
|
|
|
|
config.Config config = 5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message GroundMessage {
|
|
|
|
oneof ground_message {
|
|
|
|
GroundCommand command = 1;
|
|
|
|
}
|
|
|
|
}
|