Interfacing Joysticks and Gamepads
PX4 supports joysticks and gamepads in three different setups:
- Via the MANUAL_CONTROL MAVLink packet, which is internally mapped to RC input. In this mode the manual override capability is disabled.
- Via the RC_CHANNELS_OVERRIDE MAVLink packet, which is internally mapped to RC input. Manual override is also not possible here
- Via the MANUAL_CONTROL MAVLink packet, but *not* mapped to RC input. This is the architectural best option, but is still work in progress.
MANUAL_CONTROL MAVLink Packet and QGroundControl to simulate RC Input
This mode allows the system to simulate a RC controller from a MAVLink stream. The main purpose
1) Calibrate your Joystick and Map the Axes
QGroundControl main menu → Preferences → Controllers:
- Tick the “Enable controllers” checkbox
- Select your controller
- Select “manual” as mode. The other modes are to command off board control set points
- Do not map any buttons
- Click on calibrate range and move all axes
2) Configure the System to convert Manual Control packets to RAW RC Input
QGroundControl main menu → Setup
- Open the parameter editor
- Set COM_RC_IN_MODE to 2, which tells the system to emulate a RC control from the MAVLink stream
- Check that RC icon in the top toolbar turns green
RC_CHANNELS_OVERRIDE MAVLink Packet to simulate RC Input
Because this mode makes only limited sense on the architectural level because of the nonsense mapping from digital → PWM → digital this option is not supported in QGroundControl. QGroundControl users are advised to use the option above. Some third-party equipment is using this however to provide an RC-like interface.
No settings / setup has to be performed, simply stream the packets to one of the telemetry ports.