MissionPlanner icon indicating copy to clipboard operation
MissionPlanner copied to clipboard

Added the camera joystick

Open pristinesource opened this issue 7 years ago • 3 comments

Added a CameraJoystick class to enable a second joystick to be added to exclusively control camera operations (MPO).

This MPO joystick controls have safety features that are configurable to only allow it to override the main joystick (AVO) if it hits a certain threshold from center of stick. If that threshold is set to 0, then the MPO has 100% control and the AVO has 0% over that channel. It it is greater, then the stick must move beyond that distance before its control is enabled thus overriding the AVO. A good example is on a quad that has a 2 axis gimbal and the yaw of the aircraft is how the camera pans. By setting a threshold of say 100, the MPO would have to move the stick at least that far before it would turn the aircraft. This is good so not to accidentally override the AVO operations.

Another safety feature in place are new button actions that can allow the AVO or MPO to turn on/off the MPO control with a button or switch. This can be assigned to a button/switch in the joystick setup for either the main joystick and/or the camera joystick. The toggle camera joystick action on the master joystick will override the action on the MPO joystick if both are set, meaning the AVO can disable the MPO joystick and the MPO cannot re-enable it directly. This is for safety so the AVO can assert control when needed.

The camera joystick also has an option for "Rate Conv" this converts the stick movements to rates instead of absolute values. For example, when using a joystick that auto centers its stick, you would normally have to hold the stick in position to maintain the tilt (or zoom) of the camera. Now with rate conversion it converts stick movements to rates and maintains the current absolute position in the software.

Original Pull Requests: https://github.com/ArduPilot/MissionPlanner/pull/1209 and https://github.com/ArduPilot/MissionPlanner/pull/1204

pristinesource avatar Jun 06 '17 19:06 pristinesource

This is all wizardry to me, please excuse my ignorance. I can see that the comment that there are conflicts. What happens now? Does somebody need to resolve the conflicts before I can download and test a version of Mission Planner with the camera joystick feature?

samworthington avatar Aug 25 '17 09:08 samworthington

@samworthington, It looks like the code has diverged too much for me to easily resolve the conflicts. This is my third attempt to get this feature merged into this project. I really like that that are constantly updating the main application, but unfortunately that makes getting third party contributions like this very hard to time correctly. I cannot blame the maintainers of MissionPlanner because with constant development like what they are doing makes it very hard to squeeze something new like this in. I may try again in a few weeks and see if they are ready then (fingers crossed). In the meantime if you are capable of compiling from source, you can fetch this branch from my repo at: https://github.com/pristinesource/MissionPlanner/tree/feature/cameraJS But, take note that my branch is behind the main MissionPlanner branch and will not have the latest updates.

pristinesource avatar Aug 25 '17 16:08 pristinesource

Anthony, Thanks for the update. I'm afraid I don't know how to compile and would struggle for time to figure it all out at the moment.

If I get any time and you haven't managed to get it merged in a few weeks time, I will have a go at compiling from your source code.

Cheers,

Sam

samworthington avatar Aug 29 '17 08:08 samworthington