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

AP_Camera/AP_Mount: camera info msg gets device id to improve multi camera support #24354

Conversation

Davidsastresas
Copy link
Contributor

@Davidsastresas Davidsastresas commented Jul 19, 2023

This PR matches the following mavlink PR ArduPilot/mavlink#323. It won't build until that PR is in.

Gimbal protocol v2 messages are not WIP anymore, and this commit adds support for the latest extra fields.

The first commits are straightforward, they basically add the gimbal_device_id field for all the backends involved.

  • For AP_Mount_Backend: it enables GCS to understand to which gimbal corresponds gimbal_device_attitude_status message. Right now it is impossible to understand where this message is coming from if AP has more than 1 gimbal.

  • For the rest of aditions it enables GCS to understand if a particular gimbal is linked to a particular camera. This is useful for a feature that is being developed in QGC to move gimbal clicking over video feed. QGC needs to know the fov/zoom of the camera to scale clicks appropiately.

The latest 2 commits are marked as WIP:

  • For the GCS_Common one I am not 100% sure what should be sent there. My understanding is that z angular speed is what should be sent, as we are sending angular z target for feed_forward_angular_velocity_z field, but I would love to get some feedback to confirm this. Once confirmed I will fix it and squash.

  • For the AP_Camera_Backend one it is marked as WIP in case we want to include a parameter to select the gimbal_device_id the camera belongs to. As it is now it is fine and it will work for mavlink cameras and gimbal cameras ( Siyi, viewpro, xacti, etc ) so I am happy as well leaving it as it is ( default to 0 ).

Please @rmackay9 if you could give me your opinion on this one as well. Thanks!

@Davidsastresas Davidsastresas marked this pull request as draft July 19, 2023 14:05
@rmackay9 rmackay9 changed the title Master pr/update latest gimbal manager v2 AP_Camera/AP_Mount: camera info msg gets device id to improve multi camera support Jul 19, 2023
@Davidsastresas Davidsastresas force-pushed the master-PR/Update_latest_gimbal_manager_v2 branch from 45a2757 to ea9fb5d Compare July 19, 2023 23:48
@Davidsastresas
Copy link
Contributor Author

Thanks for the review @rmackay9. I removed the "WIP" from the 2 latest commits, and I fixed the GCS_common one as per your comment.

@Davidsastresas Davidsastresas force-pushed the master-PR/Update_latest_gimbal_manager_v2 branch from ea9fb5d to a843c6d Compare July 19, 2023 23:58
…send, as 0:

By default it sends this field as 0 ( no gimbal attached to this camera ),
and then the backends can reimplement it, like mavlinkcamv2 or Siyi, sending
the correspondent gimbal_device_id.

In the future this might be controled by a parameter, to allow standalone
cameras to be associated with a gimbal
@Davidsastresas Davidsastresas force-pushed the master-PR/Update_latest_gimbal_manager_v2 branch from a843c6d to 6e3a5b7 Compare July 20, 2023 00:02
@rmackay9
Copy link
Contributor

Thanks, this looks good to me.

@Davidsastresas
Copy link
Contributor Author

Hello, do we have any news on this one? Is something needed to be fixed before merging? Thanks!

@rmackay9
Copy link
Contributor

rmackay9 commented Aug 9, 2023

Closing in favour of #24551

Sorry, for some reason I was unable to directly push to this PR so I created a new one. The credit on the commits was kept though.

@rmackay9 rmackay9 closed this Aug 9, 2023
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.

2 participants