This has given me the basis to process more sensors in a standard environment in the future and to plan and execute missions for the DiddyBorg.
Software installation on the Raspberry Pi (RPi)
On the RPi, first install pymavlink, the Python version of the MAVLink libraries. The easiest way to do this is with PIP:
pip install pymavlink
After that you have to replace the module mavutil.py, because otherwise there will be no connection between the RPi and QGroundControl due to a pymavlink-issue. To do this, find the installation location of the pymavlink library with:
pip list -v
Then replace the mavutil.py module with the version in the github repository for this blog. The new version is backward compatible.
Finally, create a directory, e.g. diddy2QGC into which you copy the Python modules diddy2QGroundControl.py and ThunderBorg3.py. In this directory you then start the Python script later with:
Software installation on the desktop
Install QGroundControl on your desktop.
Starting the applications
Make sure the RPi and your desktop are on the same network and run QGroundControl (QGC) and the Python script (the order is irrelevant).
The DiddyBorg logs into the QGC and you will then find the option to teach your joystick in the Vehicle settings. Please note that diddy2QGroundControl.py in mode 2 uses the roll channel for right/left control and the inverted value of the pitch channel for motor control.