@jawji/orchestrator 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +181 -0
  3. package/dist/adapters/mavsdk-adapter.d.ts +4 -0
  4. package/dist/adapters/mavsdk-adapter.d.ts.map +1 -0
  5. package/dist/adapters/mavsdk-adapter.js +51 -0
  6. package/dist/adapters/mavsdk-adapter.js.map +1 -0
  7. package/dist/adapters/vlm-client.d.ts +3 -0
  8. package/dist/adapters/vlm-client.d.ts.map +1 -0
  9. package/dist/adapters/vlm-client.js +19 -0
  10. package/dist/adapters/vlm-client.js.map +1 -0
  11. package/dist/grpc/mavsdk-client.d.ts +8 -0
  12. package/dist/grpc/mavsdk-client.d.ts.map +1 -0
  13. package/dist/grpc/mavsdk-client.js +34 -0
  14. package/dist/grpc/mavsdk-client.js.map +1 -0
  15. package/dist/index.d.ts +14 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +8 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/modes/landing-zone-check.d.ts +3 -0
  20. package/dist/modes/landing-zone-check.d.ts.map +1 -0
  21. package/dist/modes/landing-zone-check.js +52 -0
  22. package/dist/modes/landing-zone-check.js.map +1 -0
  23. package/dist/modes/vision-assist-mode.d.ts +8 -0
  24. package/dist/modes/vision-assist-mode.d.ts.map +1 -0
  25. package/dist/modes/vision-assist-mode.js +2 -0
  26. package/dist/modes/vision-assist-mode.js.map +1 -0
  27. package/dist/orchestrator.d.ts +13 -0
  28. package/dist/orchestrator.d.ts.map +1 -0
  29. package/dist/orchestrator.js +106 -0
  30. package/dist/orchestrator.js.map +1 -0
  31. package/dist/server/status-server.d.ts +23 -0
  32. package/dist/server/status-server.d.ts.map +1 -0
  33. package/dist/server/status-server.js +35 -0
  34. package/dist/server/status-server.js.map +1 -0
  35. package/dist/types.d.ts +55 -0
  36. package/dist/types.d.ts.map +1 -0
  37. package/dist/types.js +2 -0
  38. package/dist/types.js.map +1 -0
  39. package/dist/vlm/miril-client.d.ts +12 -0
  40. package/dist/vlm/miril-client.d.ts.map +1 -0
  41. package/dist/vlm/miril-client.js +45 -0
  42. package/dist/vlm/miril-client.js.map +1 -0
  43. package/package.json +47 -0
  44. package/proto/action/action.proto +368 -0
  45. package/proto/mavsdk_options.proto +23 -0
  46. package/proto/mission/mission.proto +285 -0
  47. package/proto/telemetry/telemetry.proto +897 -0
@@ -0,0 +1,285 @@
1
+ syntax = "proto3";
2
+
3
+ package mavsdk.rpc.mission;
4
+
5
+ import "mavsdk_options.proto";
6
+
7
+ option java_package = "io.mavsdk.mission";
8
+ option java_outer_classname = "MissionProto";
9
+
10
+ // Enable waypoint missions.
11
+ service MissionService {
12
+ /*
13
+ * Upload a list of mission items to the system.
14
+ *
15
+ * The mission items are uploaded to a drone. Once uploaded the mission can be started and
16
+ * executed even if the connection is lost.
17
+ */
18
+ rpc UploadMission(UploadMissionRequest) returns(UploadMissionResponse) {}
19
+ /*
20
+ * Upload a list of mission items to the system and report upload progress.
21
+ *
22
+ * The mission items are uploaded to a drone. Once uploaded the mission can be started and
23
+ * executed even if the connection is lost.
24
+ */
25
+ rpc SubscribeUploadMissionWithProgress(SubscribeUploadMissionWithProgressRequest) returns(stream UploadMissionWithProgressResponse) {
26
+ option (mavsdk.options.async_type) = ASYNC;
27
+ option (mavsdk.options.is_finite) = true;
28
+ }
29
+ /*
30
+ * Cancel an ongoing mission upload.
31
+ */
32
+ rpc CancelMissionUpload(CancelMissionUploadRequest) returns(CancelMissionUploadResponse) { option (mavsdk.options.async_type) = SYNC; }
33
+ /*
34
+ * Download a list of mission items from the system (asynchronous).
35
+ *
36
+ * Will fail if any of the downloaded mission items are not supported
37
+ * by the MAVSDK API.
38
+ */
39
+ rpc DownloadMission(DownloadMissionRequest) returns(DownloadMissionResponse) {}
40
+ /*
41
+ * Download a list of mission items from the system (asynchronous) and report progress.
42
+ *
43
+ * Will fail if any of the downloaded mission items are not supported
44
+ * by the MAVSDK API.
45
+ */
46
+ rpc SubscribeDownloadMissionWithProgress(SubscribeDownloadMissionWithProgressRequest) returns(stream DownloadMissionWithProgressResponse) {
47
+ option (mavsdk.options.async_type) = ASYNC;
48
+ option (mavsdk.options.is_finite) = true;
49
+ }
50
+ /*
51
+ * Cancel an ongoing mission download.
52
+ */
53
+ rpc CancelMissionDownload(CancelMissionDownloadRequest) returns(CancelMissionDownloadResponse) { option (mavsdk.options.async_type) = SYNC; }
54
+ /*
55
+ * Start the mission.
56
+ *
57
+ * A mission must be uploaded to the vehicle before this can be called.
58
+ */
59
+ rpc StartMission(StartMissionRequest) returns(StartMissionResponse) {}
60
+ /*
61
+ * Pause the mission.
62
+ *
63
+ * Pausing the mission puts the vehicle into
64
+ * [HOLD mode](https://docs.px4.io/en/flight_modes/hold.html).
65
+ * A multicopter should just hover at the spot while a fixedwing vehicle should loiter
66
+ * around the location where it paused.
67
+ */
68
+ rpc PauseMission(PauseMissionRequest) returns(PauseMissionResponse) {}
69
+ /*
70
+ * Clear the mission saved on the vehicle.
71
+ */
72
+ rpc ClearMission(ClearMissionRequest) returns(ClearMissionResponse) {}
73
+ /*
74
+ * Sets the mission item index to go to.
75
+ *
76
+ * By setting the current index to 0, the mission is restarted from the beginning. If it is set
77
+ * to a specific index of a mission item, the mission will be set to this item.
78
+ *
79
+ * Note that this is not necessarily true for general missions using MAVLink if loop counters
80
+ * are used.
81
+ */
82
+ rpc SetCurrentMissionItem(SetCurrentMissionItemRequest) returns(SetCurrentMissionItemResponse) {}
83
+ /*
84
+ * Check if the mission has been finished.
85
+ */
86
+ rpc IsMissionFinished(IsMissionFinishedRequest) returns(IsMissionFinishedResponse) { option (mavsdk.options.async_type) = SYNC; }
87
+ /*
88
+ * Subscribe to mission progress updates.
89
+ */
90
+ rpc SubscribeMissionProgress(SubscribeMissionProgressRequest) returns(stream MissionProgressResponse) {}
91
+ /*
92
+ * Get whether to trigger Return-to-Launch (RTL) after mission is complete.
93
+ *
94
+ * Before getting this option, it needs to be set, or a mission
95
+ * needs to be downloaded.
96
+ */
97
+ rpc GetReturnToLaunchAfterMission(GetReturnToLaunchAfterMissionRequest) returns(GetReturnToLaunchAfterMissionResponse) { option (mavsdk.options.async_type) = SYNC; }
98
+ /*
99
+ * Set whether to trigger Return-to-Launch (RTL) after the mission is complete.
100
+ *
101
+ * This will only take effect for the next mission upload, meaning that
102
+ * the mission may have to be uploaded again.
103
+ */
104
+ rpc SetReturnToLaunchAfterMission(SetReturnToLaunchAfterMissionRequest) returns(SetReturnToLaunchAfterMissionResponse) { option (mavsdk.options.async_type) = SYNC; }
105
+ }
106
+
107
+ message UploadMissionRequest {
108
+ MissionPlan mission_plan = 1; // The mission plan
109
+ }
110
+ message UploadMissionResponse {
111
+ MissionResult mission_result = 1;
112
+ }
113
+
114
+ message SubscribeUploadMissionWithProgressRequest {
115
+ MissionPlan mission_plan = 1; // The mission plan
116
+ }
117
+ message UploadMissionWithProgressResponse {
118
+ MissionResult mission_result = 1;
119
+ ProgressData progress_data = 2; // The progress data
120
+ }
121
+
122
+ message CancelMissionUploadRequest {}
123
+ message CancelMissionUploadResponse {
124
+ MissionResult mission_result = 1;
125
+ }
126
+
127
+ message DownloadMissionRequest {}
128
+ message DownloadMissionResponse {
129
+ MissionResult mission_result = 1;
130
+ MissionPlan mission_plan = 2; // The mission plan
131
+ }
132
+
133
+ message SubscribeDownloadMissionWithProgressRequest {}
134
+ message DownloadMissionWithProgressResponse {
135
+ MissionResult mission_result = 1;
136
+ ProgressDataOrMission progress_data = 2; // The progress data, or the mission plan (when the download is finished)
137
+ }
138
+
139
+ message CancelMissionDownloadRequest {}
140
+ message CancelMissionDownloadResponse {
141
+ MissionResult mission_result = 1;
142
+ }
143
+
144
+ message StartMissionRequest {}
145
+ message StartMissionResponse {
146
+ MissionResult mission_result = 1;
147
+ }
148
+
149
+ message PauseMissionRequest {}
150
+ message PauseMissionResponse {
151
+ MissionResult mission_result = 1;
152
+ }
153
+
154
+ message ClearMissionRequest {}
155
+ message ClearMissionResponse {
156
+ MissionResult mission_result = 1;
157
+ }
158
+
159
+ message SetCurrentMissionItemRequest {
160
+ int32 index = 1; // Index of the mission item to be set as the next one (0-based)
161
+ }
162
+ message SetCurrentMissionItemResponse {
163
+ MissionResult mission_result = 1;
164
+ }
165
+
166
+ message IsMissionFinishedRequest {}
167
+ message IsMissionFinishedResponse {
168
+ MissionResult mission_result = 1;
169
+ bool is_finished = 2; // True if the mission is finished and the last mission item has been reached
170
+ }
171
+
172
+ message SubscribeMissionProgressRequest {}
173
+ message MissionProgressResponse {
174
+ MissionProgress mission_progress = 1; // Mission progress
175
+ }
176
+
177
+ message GetReturnToLaunchAfterMissionRequest {}
178
+ message GetReturnToLaunchAfterMissionResponse {
179
+ MissionResult mission_result = 1;
180
+ bool enable = 2; // If true, trigger an RTL at the end of the mission
181
+ }
182
+
183
+ message SetReturnToLaunchAfterMissionRequest {
184
+ bool enable = 1; // If true, trigger an RTL at the end of the mission
185
+ }
186
+ message SetReturnToLaunchAfterMissionResponse {
187
+ MissionResult mission_result = 1;
188
+ }
189
+
190
+ /*
191
+ * Type representing a mission item.
192
+ *
193
+ * A MissionItem can contain a position and/or actions.
194
+ * Mission items are building blocks to assemble a mission,
195
+ * which can be sent to (or received from) a system.
196
+ * They cannot be used independently.
197
+ */
198
+ message MissionItem {
199
+ double latitude_deg = 1 [(mavsdk.options.default_value)="NaN", (mavsdk.options.epsilon)=0.0000001]; // Latitude in degrees (range: -90 to +90)
200
+ double longitude_deg = 2 [(mavsdk.options.default_value)="NaN", (mavsdk.options.epsilon)=0.0000001]; // Longitude in degrees (range: -180 to +180)
201
+ float relative_altitude_m = 3 [(mavsdk.options.default_value)="NaN"]; // Altitude relative to takeoff altitude in metres
202
+ float speed_m_s = 4 [(mavsdk.options.default_value)="NaN"]; // Speed to use after this mission item (in metres/second)
203
+ bool is_fly_through = 5 [(mavsdk.options.default_value)="false"]; // True will make the drone fly through without stopping, while false will make the drone stop on the waypoint
204
+ float gimbal_pitch_deg = 6 [(mavsdk.options.default_value)="NaN", (mavsdk.options.epsilon)=0.0001]; // Gimbal pitch (in degrees)
205
+ float gimbal_yaw_deg = 7 [(mavsdk.options.default_value)="NaN", (mavsdk.options.epsilon)=0.0001]; // Gimbal yaw (in degrees)
206
+ CameraAction camera_action = 8; // Camera action to trigger at this mission item
207
+ float loiter_time_s = 9 [(mavsdk.options.default_value)="NaN"]; // Loiter time (in seconds)
208
+ double camera_photo_interval_s = 10 [(mavsdk.options.default_value)="1.0"]; // Camera photo interval to use after this mission item (in seconds)
209
+ float acceptance_radius_m = 11 [(mavsdk.options.default_value)="NaN"]; // Radius for completing a mission item (in metres)
210
+ float yaw_deg = 12 [(mavsdk.options.default_value)="NaN"]; // Absolute yaw angle (in degrees)
211
+ float camera_photo_distance_m = 13 [(mavsdk.options.default_value)="NAN"]; // Camera photo distance to use after this mission item (in meters)
212
+ VehicleAction vehicle_action = 14; // Vehicle action to trigger at this mission item.
213
+
214
+ // Possible camera actions at a mission item.
215
+ enum CameraAction {
216
+ CAMERA_ACTION_NONE = 0; // No action
217
+ CAMERA_ACTION_TAKE_PHOTO = 1; // Take a single photo
218
+ CAMERA_ACTION_START_PHOTO_INTERVAL = 2; // Start capturing photos at regular intervals
219
+ CAMERA_ACTION_STOP_PHOTO_INTERVAL = 3; // Stop capturing photos at regular intervals
220
+ CAMERA_ACTION_START_VIDEO = 4; // Start capturing video
221
+ CAMERA_ACTION_STOP_VIDEO = 5; // Stop capturing video
222
+ CAMERA_ACTION_START_PHOTO_DISTANCE = 6; // Start capturing photos at regular distance
223
+ CAMERA_ACTION_STOP_PHOTO_DISTANCE = 7; // Stop capturing photos at regular distance
224
+ }
225
+
226
+ // Possible vehicle actions at a mission item
227
+ enum VehicleAction {
228
+ VEHICLE_ACTION_NONE = 0; // No action
229
+ VEHICLE_ACTION_TAKEOFF = 1; // Vehicle will takeoff and go to defined waypoint
230
+ VEHICLE_ACTION_LAND = 2; // When a waypoint is reached vehicle will land at current position
231
+ VEHICLE_ACTION_TRANSITION_TO_FW = 3; // When a waypoint is reached vehicle will transition to fixed-wing mode
232
+ VEHICLE_ACTION_TRANSITION_TO_MC = 4; // When a waypoint is reached vehicle will transition to multi-copter mode
233
+ }
234
+ }
235
+
236
+ // Mission plan type
237
+ message MissionPlan {
238
+ repeated MissionItem mission_items = 1; // The mission items
239
+ }
240
+
241
+ // Mission progress type.
242
+ message MissionProgress {
243
+ int32 current = 1; // Current mission item index (0-based), if equal to total, the mission is finished
244
+ int32 total = 2; // Total number of mission items
245
+ }
246
+
247
+ // Result type.
248
+ message MissionResult {
249
+ // Possible results returned for action requests.
250
+ enum Result {
251
+ RESULT_UNKNOWN = 0; // Unknown result
252
+ RESULT_SUCCESS = 1; // Request succeeded
253
+ RESULT_ERROR = 2; // Error
254
+ RESULT_TOO_MANY_MISSION_ITEMS = 3; // Too many mission items in the mission
255
+ RESULT_BUSY = 4; // Vehicle is busy
256
+ RESULT_TIMEOUT = 5; // Request timed out
257
+ RESULT_INVALID_ARGUMENT = 6; // Invalid argument
258
+ RESULT_UNSUPPORTED = 7; // Mission downloaded from the system is not supported
259
+ RESULT_NO_MISSION_AVAILABLE = 8; // No mission available on the system
260
+ RESULT_UNSUPPORTED_MISSION_CMD = 11; // Unsupported mission command
261
+ RESULT_TRANSFER_CANCELLED = 12; // Mission transfer (upload or download) has been cancelled
262
+ RESULT_NO_SYSTEM = 13; // No system connected
263
+ RESULT_NEXT = 14; // Intermediate message showing progress
264
+ RESULT_DENIED = 15; // Request denied
265
+ RESULT_PROTOCOL_ERROR = 16; // There was a protocol error
266
+ RESULT_INT_MESSAGES_NOT_SUPPORTED = 17; // The system does not support the MISSION_INT protocol
267
+ }
268
+
269
+ Result result = 1; // Result enum value
270
+ string result_str = 2; // Human-readable English string describing the result
271
+ }
272
+
273
+ // Progress data coming from mission upload.
274
+ message ProgressData {
275
+ float progress = 1 [(mavsdk.options.default_value)="NaN"]; // Progress (0..1.0)
276
+ }
277
+
278
+ // Progress data coming from mission download, or the mission itself (if the transfer succeeds).
279
+ message ProgressDataOrMission {
280
+ bool has_progress = 1 [(mavsdk.options.default_value)="false"]; // Whether this ProgressData contains a 'progress' status or not
281
+ float progress = 2 [(mavsdk.options.default_value)="NaN"]; // Progress (0..1.0)
282
+
283
+ bool has_mission = 3; // Whether this ProgressData contains a 'mission_plan' or not
284
+ MissionPlan mission_plan = 4; // Mission plan
285
+ }