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

GCS_MAVLink: Fix for the Gopro/Solo Gimbal issue #23861

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

mtbsteve
Copy link
Contributor

@rmackay9 @davidbuzz @proficnc This PR replaces the PR #22692 which I accidentally closed last week.
It should work for CubeSolo, CubeGreen and fmuv3 boards when HAL_SOLO_GIMBAL_ENABLED is met and when a Gopro heartbeat is broadcasted. I tested it successfully with AC 4.4beta on a Solo with a CubeSolo board and a non-Solo copter with CubeBlack installed.

#if HAL_SOLO_GIMBAL_ENABLED
// check if a Gopro is connected. If yes, we allow the routing
// of mavlink messages to a private channel (Solo Gimbal case)
if ((gopro_status_check == false) && (msg.msgid == MAVLINK_MSG_ID_GOPRO_HEARTBEAT)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: we could change, "gopro_status_check == false" to "!gopro_status_check"

@tridge
Copy link
Contributor

tridge commented Jun 19, 2023

@mtbsteve we'd like a description of what the issue is so we can test the fix. We will test a solo here if you can describe what to look for

@rmackay9
Copy link
Contributor

rmackay9 commented Jun 19, 2023

@peterbarker and @tridge decided to have a look at it over the weekend.

More generally we think it would be good to have a "one way private" option in SERIALx_OPTIONS. In this case we think the camera/gimbal needs to send its traffic to the GCS but all the other mavlink traffic cannot be sent to the camera/gimbal without it becoming unhappy. This would be scope creep and is not a blocker on this PR.

The blocking issue with this PR is the global variable.

@mtbsteve
Copy link
Contributor Author

@mtbsteve we'd like a description of what the issue is so we can test the fix. We will test a solo here if you can describe what to look for

The issue is that all GOPRO mavlink messages (GOPRO_HEARTBEAT, GOPRO_GET_RESPONSE, GOPRP_SET_RESPONSE,..) are no longer transmitted between GCS, Solo Gimbal, and Controller since Arducopter 4.1.5.

@mtbsteve
Copy link
Contributor Author

@peterbarker and @tridge decided to have a look at it over the weekend.

More generally we think it would be good to have a "one way private" option in SERIALx_OPTIONS. In this case we think the camera/gimbal needs to send its traffic to the GCS but all the other mavlink traffic cannot be sent to the camera/gimbal without it becoming unhappy. This would be scope creep and is not a blocker on this PR.

The blocking issue with this PR is the global variable.

Thanks for having a look at the issue.
I am not sure if a one-way communication would fix it since the communication of the GOPRO mavlink messages is bi-directional - between Solo-Gimbal and GCS as well as between Solo-Gimbal and the Controller, and between the Controller and the GCS.
I tested my fix extensively with AC 4.3, and also with the 4.4 dev version w/o problems so far.

@mtbsteve mtbsteve requested a review from rmackay9 June 28, 2023 16:49
@AndKe
Copy link
Contributor

AndKe commented Sep 22, 2023

@rmackay9 - what's the verdict on this? I've been waiting for months on #23676
the process is too slow, can you please bring this up on a devcall?

@@ -24,6 +24,9 @@

extern const AP_HAL::HAL& hal;

//check for Gopro in Solo gimbal status
bool gopro_status_check = false; // default is none
Copy link
Member

Choose a reason for hiding this comment

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

Should be in the header file.

Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

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

Let's correct the commit name to start with "GCS_MAVLink:"

@mtbsteve mtbsteve changed the title Fix for the Gopro/Solo Gimbal issue GCS_MAVLink: Fix for the Gopro/Solo Gimbal issue Sep 26, 2023
@mtbsteve
Copy link
Contributor Author

@rmackay9

Let's correct the commit name to start with "GCS_MAVLink:"

Done :-) Thanks a lot for merging!

@rmackay9
Copy link
Contributor

Hi @mtbsteve,

We discussed this on the dev call and agreed we'd merge after these small changes are made:

  1. the new variable in the .cpp is moved to the header file
  2. commit message (not this PR description) is prefixed with "GCS_MAVLink"

I think we agreed that Tridge, PeterB or I will take care of making these small changes but you're welcome to as well. In any case, I've re-tagged for next week's dev call so it'll come up again if one of us doesn't get to it.

@mtbsteve
Copy link
Contributor Author

Hi @mtbsteve,

We discussed this on the dev call and agreed we'd merge after these small changes are made:

  1. the new variable in the .cpp is moved to the header file
  2. commit message (not this PR description) is prefixed with "GCS_MAVLink"

I think we agreed that Tridge, PeterB or I will take care of making these small changes but you're welcome to as well. In any case, I've re-tagged for next week's dev call so it'll come up again if one of us doesn't get to it.

Hi @rmackay9
yes I would appreciate if one of you folks could take care of those changes since I am currently away from home.
Thanks for all your work!

@rmackay9
Copy link
Contributor

rmackay9 commented Oct 2, 2023

We haven't gotten to this yet but we're leaving the dev call topic on it so that we don't forget next week!

Check for a opro camera in a Solo gimbal added and re-enable the routing of Gopro Mavlink commands
@peterbarker
Copy link
Contributor

@mtbsteve we discussed at DevCall and made the suggested changes; correcting commit message, variable scope, generally NFC unless we're compiling with the thing built in. Please test?

@tridge tridge merged commit 0b24dc2 into ArduPilot:master Oct 16, 2023
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants