Controllers¶
Choose a control path by where its feedback runs: native PX4 reference, ROS 2 Offboard, or onboard SE3.
Controller families¶
| Family | Controllers | Control path |
|---|---|---|
| PX4 reference | Position, staging | PX4 stabilizes the aircraft; ROS helpers automate the SITL demonstration. |
| ROS 2 Offboard | Position, SE3 | ROS streams setpoints via DDS; PX4 retains the loops below the selected handoff. |
| PX4 onboard | SE3 | PX4 runs the controller and trajectory; its rate loop and allocator remain active. |
Control allocation maps requested vehicle thrust and torque into actuator commands using the configured geometry and limits. Every implementation described here retains PX4 allocation. A normalized torque setpoint is an allocator input, not a physical moment in N·m.
Begin with a reference flight¶
Position mode demonstrates takeoff/hover under PX4 stabilization. Offboard staging prepares an airborne SITL vehicle for handoff.
Offboard Position streams a trajectory's position and feedforward. See Offboard control for preparation and handback.
Select the SE3 implementation¶
SE3 describes position and orientation in three dimensions. The shared mathematical reference develops the plant and geometric law; each implementation chooses its actual software interface.
| ROS 2 Offboard SE3 handoff | External output | PX4 retains |
|---|---|---|
acceleration |
NED acceleration | Acceleration-to-attitude/thrust mapping, attitude/rate feedback, allocation |
attitude |
Attitude and normalized collective thrust | Attitude/rate feedback, allocation |
attitude_rate |
FRD body rates and normalized collective thrust | Rate feedback, allocation |
thrust_and_torque |
Normalized FRD torque/thrust | Allocation and actuator output |
For thrust_and_torque, choose Geometric (Normalized), Geometric (Physical), or PX4 Rate PID. The physical law maps N·m moments to PX4-normalized commands through a vehicle adapter. See vehicle data.
Onboard SE3 runs a nominal 100 Hz position/attitude-to-rate controller in firmware. See Onboard control for parameters, mode selection, trajectory start, and return.
Plan the experiment¶
Both controllers use absolute PX4 local NED trajectories. Offboard loads toolkit YAML and streams references through DDS; onboard uses built-in PX4 trajectories configured with TRJ_* parameters. See Recording, Analysis, and Validation scope.