Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions protobuf_definitions/control.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ syntax = "proto3";
package blueye.protocol;
import "aquatroll.proto";
import "message_formats.proto";
import "mission_planning.proto";
option csharp_namespace = "Blueye.Protocol.Protobuf";

// Issue a command to move the drone in the surge, sway, heave, or yaw direction.
Expand Down Expand Up @@ -128,6 +129,22 @@ message PauseMissionCtrl {
message ClearMissionCtrl {
}

// Run a single instruction right away, outside any mission.
//
// Instructions that do not move the drone (camera, tilt, lights, multibeam) run in any mission
// state, alongside a running mission. Instructions that move the drone run only while no mission
// is running, and are rejected otherwise. The outcome is reported in InstructionResultTel with
// the same request_id.
message RunInstructionCtrl {
Instruction instruction = 1; // Instruction to execute.
uint32 request_id = 2; // Client-chosen id, echoed in InstructionResultTel.
}

// Cancel an instruction started with RunInstructionCtrl.
message CancelInstructionCtrl {
uint32 request_id = 1; // The request_id given to RunInstructionCtrl.
}

// Issue a command to reset the position estimate.
message ResetPositionCtrl {
ResetPositionSettings settings = 1; // Reset settings.
Expand Down
18 changes: 18 additions & 0 deletions protobuf_definitions/mission_planning.proto
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,21 @@ message MissionStatus {
uint32 total_number_of_path_segments = 8; // Total number of path segments in the mission.
uint32 id = 9; // Mission id of the active mission.
}

// Outcome of an instruction started with RunInstructionCtrl.
enum InstructionResultState {
INSTRUCTION_RESULT_STATE_UNSPECIFIED = 0; // Unspecified.
INSTRUCTION_RESULT_STATE_ACCEPTED = 1; // The instruction was accepted and has started.
INSTRUCTION_RESULT_STATE_REJECTED = 2; // The instruction was not started, see reason.
INSTRUCTION_RESULT_STATE_COMPLETED = 3; // The instruction completed.
INSTRUCTION_RESULT_STATE_FAILED = 4; // The instruction stopped before completing, see reason.
INSTRUCTION_RESULT_STATE_CANCELLED = 5; // The instruction was cancelled by a client or by the drone.
}

// Result of an instruction started with RunInstructionCtrl.
message InstructionResult {
uint32 request_id = 1; // The request_id given to RunInstructionCtrl.
uint32 instruction_id = 2; // Id of the instruction, as given by the client.
InstructionResultState state = 3; // Outcome so far.
string reason = 4; // Why the instruction was rejected, failed or was cancelled (optional).
}
8 changes: 8 additions & 0 deletions protobuf_definitions/telemetry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ message NotificationTel {
Notification notification = 1; // Notification from the control system.
}

// Result of an instruction started with RunInstructionCtrl.
//
// Published when the instruction is accepted or rejected, and again when it completes, fails or
// is cancelled.
message InstructionResultTel {
InstructionResult result = 1; // Result of the instruction.
}

// Control force in all directions.
message ControlForceTel {
ControlForce control_force = 1; // Control force in all directions.
Expand Down
Loading