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 #2210

Merged
merged 14 commits into from
Jan 23, 2024
Merged

Full gimbal angle control #2210

merged 14 commits into from
Jan 23, 2024

Conversation

Daybreakerflint
Copy link
Contributor

Implementation of the full gimbal angle control

This feature is a request as I have to use the gimbal I have in a certain way and the roll and pitch axis are switched.
As the pitch of the payload of the gimbal is vitally important, this feature is needed.

I have tested the new implementation and it fully works.

Proto PR:
mavlink/MAVSDK-Proto#328

Quick note from my side: This is the first time I have done something like this and thus I am completely new to the process or anything. If I have done something wrong, let me know. I like to improve.

Copy link
Collaborator

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

See comments in the proto PR regarding ordering, and then the one comment here.

And why did gtest change?

src/mavsdk/core/CMakeLists.txt Show resolved Hide resolved
void GimbalProtocolV2::set_pitch_and_yaw_async(
float pitch_deg, float yaw_deg, Gimbal::ResultCallback callback)
{
// Sending the message should be quick and we can just do that straighaway.
Gimbal::Result result = set_pitch_and_yaw(pitch_deg, yaw_deg);
Gimbal::Result result = set_angles(pitch_deg, yaw_deg, 0.0f);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Onto why the gtest changed, I did not pay attention when it happened. It could be that I messed up.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you do an interactive rebase you should be able to edit and amend that commit. Or you can just undo it again in a commit.

@Daybreakerflint
Copy link
Contributor Author

The gtest should now be back to the version used in the original MAVSDK repository.
As well as the order of the angles should be changed everywhere.

julianoes
julianoes previously approved these changes Jan 23, 2024
.gitmodules Outdated
@@ -3,4 +3,4 @@
url = https://github.com/google/googletest
[submodule "mavsdk-proto"]
path = proto
url = https://github.com/mavlink/MAVSDK-Proto.git
url = https://github.com/Daybreakerflint/MAVSDK-Proto
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let me merge the MAVSDK-Proto PR, then you can update that and we can merge it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

JonasVautherin
JonasVautherin previously approved these changes Jan 23, 2024
Signed-off-by: Julian Oes <julian@oes.ch>
Worth mentioning what the example is about.

Signed-off-by: Julian Oes <julian@oes.ch>
@julianoes
Copy link
Collaborator

julianoes commented Jan 23, 2024

I've fixed this up, pointing to the right proto hash (after the merge) and running the style fix again.

Thanks @Daybreakerflint!

@julianoes julianoes merged commit 3131cc9 into mavlink:main Jan 23, 2024
27 checks passed
@Daybreakerflint
Copy link
Contributor Author

No problem. Our project really needs it. Also thank you for guiding me through my first PR!
I was wondering when the next release is planned for MAVSDK? And when it would be in the python library? (estimations are OK)

@julianoes
Copy link
Collaborator

Let me trigger a new release. No reason not to :). And then Python sometime next week.

@julianoes
Copy link
Collaborator

Released: https://github.com/mavlink/MAVSDK-Python/releases/tag/2.0.0
Needs testing though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants