Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing documentation for winch/gripper plugins #311

Merged
Merged
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
9 changes: 9 additions & 0 deletions protos/gripper/gripper.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ package mavsdk.rpc.gripper;
option java_package = "io.mavsdk.gripper";
option java_outer_classname = "GripperProto";

/*
* Allows users to send gripper actions.
*/
service GripperService {
/*
* Gripper grab cargo.
Expand All @@ -17,6 +20,12 @@ service GripperService {
rpc Release(ReleaseRequest) returns(ReleaseResponse) {}
}

/*
* Gripper Actions.
*
* Available gripper actions are defined in mavlink under
* https://mavlink.io/en/messages/common.html#GRIPPER_ACTIONS
*/
enum GripperAction {
GRIPPER_ACTION_RELEASE = 0; // Open the gripper to release the cargo
GRIPPER_ACTION_GRAB = 1; // Close the gripper and grab onto cargo
Expand Down
15 changes: 15 additions & 0 deletions protos/winch/winch.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import "mavsdk_options.proto";
option java_package = "io.mavsdk.winch";
option java_outer_classname = "WinchProto";

/*
* Allows users to send winch actions, as well as receive status information from winch systems.
*
*/
service WinchService {
// Subscribe to 'winch status' updates.
rpc SubscribeStatus(SubscribeStatusRequest) returns(stream StatusResponse) {}
Expand Down Expand Up @@ -70,6 +74,15 @@ message StatusResponse {
Status status = 1; // The next 'winch status' state
}

/*
* Winch Status Flags.
*
* The status flags are defined in mavlink
* https://mavlink.io/en/messages/common.html#MAV_WINCH_STATUS_FLAG.
*
* Multiple status fields can be set simultaneously. Mavlink does
* not specify which states are mutually exclusive.
*/
message StatusFlags {
bool healthy = 1; // Winch is healthy
bool fully_retracted = 2; // Winch line is fully retracted
Expand All @@ -87,6 +100,7 @@ message StatusFlags {
bool load_payload = 14; // Winch is loading a payload
}

// Status type.
message Status {
uint64 time_usec = 1; // Time in usec
float line_length_m = 2; // Length of the line in meters
Expand All @@ -98,6 +112,7 @@ message Status {
StatusFlags status_flags = 8; // Status flags
}

// Winch Action type.
enum WinchAction {
WINCH_ACTION_RELAXED = 0; // Allow motor to freewheel
WINCH_ACTION_RELATIVE_LENGTH_CONTROL = 1; // Wind or unwind specified length of line, optionally using specified rate
Expand Down