Using a transmitter with a SITL session?

Is there a way to connect a transmitter to the arduplane process being run as SITL ?

Found the answer to my own question. You can connect it via MAVLink. Of course !

Using a joystick

It can be useful to use a joystick for input in SITL. The joystick can be a real RC transmitter with a USB dongle for the trainer port, or something like the RealFlight interlink controller or a wide range of other joystick devices.

Before you use the joystick support you need to remove a debug statements from the python-pygame joystick driver on Linux. If you donā€™t then you will see lots of debug output like this:

SDL_JoystickGetAxis value:-32768:

To remove this debug line run this command:

sudo sed -i ā€˜s/SDL_JoystickGetAxis value/\x00DL_JoystickGetAxis value/gā€™ /usr/lib/python2.7/dist-packages/pygame/

note that this needs to be one long command line. Ignore the line wrapping in the wiki.

Then to use the joystick run:

module load joystick

If you want to add support for a new joystick type then you need to edit the mavproxy_joystick module


Thank you, documentation team !

1 Like