-
Notifications
You must be signed in to change notification settings - Fork 45
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
How to adjust Camera Zoom using the SDK APIs? #154
Comments
Zoom is missing, see open PR: mavlink/MAVSDK#2094 What camera are you using? |
We are trying to add support for a drone that advertises its cameras as Greenseer EO and Greenseer IR (it's a commercial product built using MAVLink). We can get the video feed from it using the existing API as stated earlier, as well as take photos and record videos, using the respective APIs - at least with the "EO" visual camera sensor. We also have not yet found a way to successfully switch over to the IR camera. (selectCamera(..) doesn't seem to be working, but maybe I'm just doing it wrong) |
The question is how the IR camera is exposed. We might have to add support for mavlink/mavlink#2079, if the camera supports that (it's very new). |
Hi Julian, Thanks a lot for the information. It looks like (to my own sleuthing) that the IR camera is exposed the same way the visual normal camera is exposed, using the
Thanks again, Ray |
Oh, interesting, so it's actually implemented as a separate "camera". That should indeed work as well. I don't think we have recently tested two separate cameras in MAVSDK, so it might be broken. Do you know if both cameras send mavlink from different component IDs? One thing about @JonasVautherin do you know? |
I believe it does emit the cameras as different component IDs, yes.
Hmm...but the use case is - customers will want to switch cameras at-will, at any point in time |
Right, well this |
Thanks - is there anything we can do in the meantime, to get this functionality in our Android app? What would be your recommendation? (for both ability to zoom and switch cameras on the fly) |
I think it is a bit hard with the language wrappers, because with gRPC (if I remember correctly) it does not seem possible to treat a service like an object and instantiate it multiple times. So Using gRPC, my idea a few years ago was to have one gRPC server per component, and have them listed through the Then my preference went to actually remove gRPC and use FFI, so that the language bindings would be closer to the C++ version. But unfortunately I never got resources to work on either of those. The gRPC solution could potentially be less work, but still it's not completely trivial 😕. |
@JonasVautherin one not so crazy change would be to add an argument @rayw-dronesense if you want to move this issue up on my (long) todo list, you can consider github sponsoring. |
@JonasVautherin @julianoes Thanks for getting back to me. Perhaps we wouldn't need to instantiate twice - if the one instance can switch over to completely operating on the newly selected camera. I was able to use the But, both the 'current' and 'possible' camera settings do not reflect the IR camera parameters - only of the visual camera with ID of 0 after the |
I have to check whether we properly assign this data. |
I can arm the aircraft, take off, and get the video feed using the camera.videoStreamInfo API. However, I am having some trouble finding an API for Zooming in/out of the camera - could you please help with this? Thanks!
The Android API appears to be based on https://github.com/mavlink/MAVSDK-Proto/tree/main/protos
The text was updated successfully, but these errors were encountered: