-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy pathmission_raw_server.proto
102 lines (86 loc) · 4.15 KB
/
mission_raw_server.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
syntax = "proto3";
package mavsdk.rpc.mission_raw_server;
import "mavsdk_options.proto";
option java_package = "io.mavsdk.mission_raw_server";
option java_outer_classname = "MissionRawServerProto";
// Acts as a vehicle and receives incoming missions from GCS (in raw MAVLINK format).
// Provides current mission item state, so the server can progress through missions.
service MissionRawServerService {
/*
* Subscribe to when a new mission is uploaded (asynchronous).
*/
rpc SubscribeIncomingMission(SubscribeIncomingMissionRequest) returns(stream IncomingMissionResponse) { option (mavsdk.options.async_type) = ASYNC; }
/*
* Subscribe to when a new current item is set
*/
rpc SubscribeCurrentItemChanged(SubscribeCurrentItemChangedRequest) returns(stream CurrentItemChangedResponse) { option (mavsdk.options.async_type) = ASYNC; }
/*
* Set Current item as completed
*/
rpc SetCurrentItemComplete(SetCurrentItemCompleteRequest) returns(SetCurrentItemCompleteResponse) { option (mavsdk.options.async_type) = SYNC; }
/*
* Subscribe when a MISSION_CLEAR_ALL is received
*/
rpc SubscribeClearAll(SubscribeClearAllRequest) returns(stream ClearAllResponse) { option (mavsdk.options.async_type) = ASYNC; }
}
message SubscribeIncomingMissionRequest {}
message IncomingMissionResponse {
MissionRawServerResult mission_raw_server_result = 1;
MissionPlan mission_plan = 2; // The mission plan
}
message SubscribeCurrentItemChangedRequest {}
message CurrentItemChangedResponse {
MissionItem mission_item = 1;
}
message SubscribeClearAllRequest {}
message ClearAllResponse {
uint32 clear_type = 1;
}
message SetCurrentItemCompleteRequest {}
message SetCurrentItemCompleteResponse {}
// Mission item exactly identical to MAVLink MISSION_ITEM_INT.
message MissionItem {
uint32 seq = 1; // Sequence (uint16_t)
uint32 frame = 2; // The coordinate system of the waypoint (actually uint8_t)
uint32 command = 3; // The scheduled action for the waypoint (actually uint16_t)
uint32 current = 4; // false:0, true:1 (actually uint8_t)
uint32 autocontinue = 5; // Autocontinue to next waypoint (actually uint8_t)
float param1 = 6; // PARAM1, see MAV_CMD enum
float param2 = 7; // PARAM2, see MAV_CMD enum
float param3 = 8; // PARAM3, see MAV_CMD enum
float param4 = 9; // PARAM4, see MAV_CMD enum
int32 x = 10; // PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
int32 y = 11; // PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
float z = 12; // PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)
uint32 mission_type = 13; // Mission type (actually uint8_t)
}
// Mission plan type
message MissionPlan {
repeated MissionItem mission_items = 1; // The mission items
}
// Mission progress type.
message MissionProgress {
int32 current = 1; // Current mission item index (0-based), if equal to total, the mission is finished
int32 total = 2; // Total number of mission items
}
// Result type.
message MissionRawServerResult {
// Possible results returned for action requests.
enum Result {
RESULT_UNKNOWN = 0; // Unknown result
RESULT_SUCCESS = 1; // Request succeeded
RESULT_ERROR = 2; // Error
RESULT_TOO_MANY_MISSION_ITEMS = 3; // Too many mission items in the mission
RESULT_BUSY = 4; // Vehicle is busy
RESULT_TIMEOUT = 5; // Request timed out
RESULT_INVALID_ARGUMENT = 6; // Invalid argument
RESULT_UNSUPPORTED = 7; // Mission downloaded from the system is not supported
RESULT_NO_MISSION_AVAILABLE = 8; // No mission available on the system
RESULT_UNSUPPORTED_MISSION_CMD = 11; // Unsupported mission command
RESULT_TRANSFER_CANCELLED = 12; // Mission transfer (upload or download) has been cancelled
RESULT_NO_SYSTEM = 13; // No system connected
RESULT_NEXT = 14; // Intermediate message showing progress or instructions on the next steps
}
Result result = 1; // Result enum value
string result_str = 2; // Human-readable English string describing the result
}