This PR adds the ability to use a connected joystick to control pan, tilt and zoom of cameras.
The joystick device should be specified with the -j or --joystick command-line option to avcontrol.py.
Default mappings from axis values to VISCA speeds are linear and can be overridden by providing map_pan, map_tilt and/or map_zoom functions to the CameraJoystickAdapter constructor. These functions should always return legal VISCA speed values (e.g 1 <= retval <= VISCA_MAX) even when zero pan or tilt is required. It's likely that we'll want to change the defaults to something nonlinear as the default functions make the joystick somewhat sensitive.
Closes #4. Relates to (and possibly obsoletes?) #20.
Coverage increased (+0.3%) to 87.464% when pulling fe61c2a8fb6fe8e4c232161b16eb725430b8ff4e on feature/joystick-control into f05d30ebc593faa815a56506ef036f91cf340baa on develop.
This PR adds the ability to use a connected joystick to control pan, tilt and zoom of cameras.
The joystick device should be specified with the
-j
or--joystick
command-line option toavcontrol.py
.Default mappings from axis values to VISCA speeds are linear and can be overridden by providing
map_pan
,map_tilt
and/ormap_zoom
functions to theCameraJoystickAdapter
constructor. These functions should always return legal VISCA speed values (e.g1 <= retval <= VISCA_MAX
) even when zero pan or tilt is required. It's likely that we'll want to change the defaults to something nonlinear as the default functions make the joystick somewhat sensitive.Closes #4. Relates to (and possibly obsoletes?) #20.