Skip to content

Neural Network Control

PX4 supports the following mechanisms for using neural networks for multirotor control:

Generally you will select the former if you wish to experiment with custom neural network architectures and train them using PyTorch or TensorFlow, and the latter if you want to use a pre-trained neural-network controller that works out-of-the-box (without training for your particular platform) or if you train your own policies using RLtools.

Note that both modules are experimental and provided for experimentation. The table below provides more detail on the differences.

Use Casemc_raptormc_nn_control
Pre-trained policy that adapts to any quadrotor without training✓ RAPTOR
Train policy in PyTorch/TF✓ TF Lite
Train policy in RLtools
Use manual control (remote) with NN policy✘ GPS/MoCap✓ Manual attitude commands
Load policy checkpoints from SD card✓ Upload via MAVLink FTP✘ Compiled into firmware
Offboard setpoints✓ MAVLink
Internal Trajectory Generator✓ (Position, Lissajous)