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

Full gimbal angle control #328

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Changes from 2 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
18 changes: 18 additions & 0 deletions protos/gimbal/gimbal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ option java_outer_classname = "GimbalProto";

// Provide control over a gimbal.
service GimbalService {
/*
*
* Set gimbal pitch, yaw and roll angles.
*
* This sets the desired pitch, yaw and roll angles of a gimbal.
* Will return when the command is accepted, however, it might
* take the gimbal longer to actually be set to the new angles.
*/
rpc SetAngles(SetAnglesRequest) returns(SetAnglesResponse) {}
/*
*
* Set gimbal pitch and yaw angles.
Expand Down Expand Up @@ -71,6 +80,15 @@ service GimbalService {
rpc SubscribeControl(SubscribeControlRequest) returns(stream ControlResponse) {}
}

message SetAnglesRequest {
float pitch_deg = 1; // Pitch angle in degrees (negative points down)
float yaw_deg = 2; // Yaw angle in degrees (positive is clock-wise, range: -180 to 180 or 0 to 360)
float roll_deg = 3; // Roll angle in degrees
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please change the order of the fields to match the usual MAVLink order: roll, pitch, yaw.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Shall I do it, or do you do it? As I said, this is my first time. Happy to help where I can.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you change it. Thanks!

}
message SetAnglesResponse {
GimbalResult gimbal_result = 1;
}

message SetPitchAndYawRequest {
float pitch_deg = 1; // Pitch angle in degrees (negative points down)
float yaw_deg = 2; // Yaw angle in degrees (positive is clock-wise, range: -180 to 180 or 0 to 360)
Expand Down