camera_server: Add CAMERA_FOV_STATUS request support#2898
Draft
jnomikos wants to merge 3 commits into
Draft
Conversation
1. Added ability to set both camera position and attitude 2. Added support for sending CAMERA_FOV_STATUS when requested
b592ae3 to
2771e76
Compare
1. set_zoom_factor added to set camera zoom factor for fov calculation 2. set_field_of_fiew added as a fallback for cameras which do not expose zoom factor. 3. send_fov_status modified to calculate fov based on zoom factor if provided, or use field of view provided from set_field_of_view. Falls back to generic calculation if neither are provided.
Collaborator
|
Let me know when it's tested and I should review and merge. |
Contributor
Author
Will do |
Collaborator
|
@jnomikos what's the status here? Still working on it? |
Contributor
Author
Haven't had a chance to test it. The client who I was working on this for shifted priorities and I haven't had free time to fully test it out. I know the request process works but did not get a chance to test the other parts. I'm out on a client site all week, so realistically might be a week or two until I can get back to this PR. If you want to test in the meantime, feel free. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds CAMERA_FOV_STATUS support to MAVSDK camera_server plugin:
send_fov_statusfunctionality which gets called when a request forCAMERA_FOV_STATUSis received.set_positionwhich allows user to set camera position so thatCAMERA_FOV_STATUScan provide it.set_attitude_quaternionwhich allows user to set camera attitude quaternion so thatCAMERA_FOV_STATUScan provide it.set_zoom_factorwhich allows user to set the camera zoom factor, which is used in horizontal and vertical fov calculation insend_fov_status.set_field_of_viewas a fallback for users who cannot get zoom factor from their camera, or wish to provide their own calculated field of view. Lets user set horizontal and vertical fov directly.send_fov_statusfalls back to computing FOV from the camera information provided viaset_information(equivalent to 1x zoom) if neitherset_zoom_factornorset_field_of_viewhave been called.Design rationale:
Both the camera position and attitude are intentionally left to the caller to maintain separation between the camera_server and telemetry plugins.
Zoom factor and field of view are also intentionally written in such a way for users to manually set them because each camera can differ in implementation. This keeps the API flexible across different camera hardware implementations.
MAVSDK-Proto PR: mavlink/MAVSDK-Proto#414
Overall purpose:
CAMERA_FOV_STATUSsupport was added to QGroundControl so that the functionality which allows tapping on the video stream to move the gimbal is more robust and accounts for field of view. I have a MAVSDK camera server implementation on a payload and wish to provideCAMERA_FOV_STATUSto the ground control station. mavlink/qgroundcontrol#13612