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

Camera/Gimbal control screen #2906

Open
rmackay9 opened this issue Jul 15, 2022 · 0 comments
Open

Camera/Gimbal control screen #2906

rmackay9 opened this issue Jul 15, 2022 · 0 comments
Assignees

Comments

@rmackay9
Copy link
Contributor

rmackay9 commented Jul 15, 2022

mp-enhancement-issue-pic-updated
4.4 and 4.5 have many new camera and gimbal controls available via mavlink but the controls displayed to users are still very clumsy (user camera controls, user gimbal controls).

We need a new screen in MP that displays the current live video stream and makes these basic controls easily available to the user via buttons, mouse button clicks, shortkeys, etc. The basic controls we need to expose are:

  • take picture (on-screen button? right-mouse-button-menu item? both?)
  • start/stop recording video
  • zoom in/out/stop. (maybe use + and - keys? right-mouse-button-click and drag up/down? mouse scroll wheel?)
  • auto focus (optional)
  • center gimbal (e.g. set yaw and pitch to zero in body-frame)
  • rotate gimbal yaw using rate control (e.g. yaw right at 30deg/sec)
  • rotate gimbal pitch using rate control (e.g. pitch up at 30deg/sec)
  • lock/follow mode button which controls whether yaw targets provided by user are in body-frame or earth-frame. E.g. with no input, when vehicle rotates, does the gimbal rotate (aka follow) with the vehicle or stay locked onto the earth-frame yaw.
  • click on a point on the screen, have gimbal rotate to point at the point. This requires knowing the video stream's horizontal and vertical field of view. This can be retrieved from the CAMERA_FOV_STATUS or VIDEO_STREAM_INFORMATION messages.
  • double click (?) and/or draw a square to start object tracking (only supported by ViewPro at the moment)
  • triple click (??) to lock onto a lat,lon,alt. This may require getting the lat,lon,alt from the latest CAMERA_FOV_STATUS message and sending back to the gimbal as a DO_SET_ROI_LOCATION command.

mp-gimbal-control-idea

AP 4.3 has improved control of gimbals. In particular it has support for earth-frame/body-frame control of yaw (aka "lock" and "follow"). This means the target yaw angle can either move with the vehicle (aka "follow") or be locked onto an earth-frame target (aka "locked").

I think it would be a useful enhancement to add a gimbal control screen to MP including the latest live video (currently the live-video appears by default over the HUD but this is quite difficult to view). Above is a mock-up of what the screen could look like. This can all be accomplished using the DO_GIMBAL_MANAGER_PITCHYAW command (within a COMMAND_LONG or COMMAND_INT).

Another possible idea is to remove the +10, +30 angle control and let the user click on the live video screen to change the target angle. This could work if the user can also specify the horizontal and vertical FOV. In either case I think MP will probably also need to consume the gimbal's current attitude which is sent in the GIMBAL_DEVICE_ATTITUDE_STATUS (note that currently only the Gremsy driver sends this message but in an upcoming PR all backends send this).

References:

This is a more detailed version of this very old enhancement request #278

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

No branches or pull requests

2 participants