Keyboard Joystick for SITL

Hi!

I find having to connect external joystick for SITL tests quite cumbersome, so i wrote a python script to generate virtual joystick events from keyboard keys. You can find it at python-uinput. The package only requires pygame to be installed to function. Simply run the script and calibrate joystick in QGC (set COM_RC_IN_MODE to virtual Joystick/No RC) to fly.

(Image to show status of joystick inputs while flying. Graphic taken from APM MissionPlanner.)

Just making sure you know that QGC has a virtual joystick you can turn on. Settings/General page.

I think it only has a mouse/touch interface. It’s nice but for SITL development tests on laptop a keyboard based interface is more user friendly.

1 Like