PX4 Write Thrust & Torque Setpoint
R2026bLibraries:
UAV Toolbox Support Package for PX4 Autopilots /
PX4 Utility Blocks
Description
Add-On Required: This feature requires the UAV Toolbox Support Package for PX4 Autopilots add-on.
The block writes motor and servo actuator values by directly publishing thrust and
torque setpoints to the vehicle_thrust_setpoint and
vehicle_torque_setpoint uORB topics. This block accepts two inputs,
thrust and torque, each as a 1-by-3 vector. The thrust setpoint is along, and the torque
setpoint is about, the x-, y-, and
z- body axes. Both inputs are normalized to the range
[-1,1] in the vehicle body FRD frame.
Examples
Ports
Input
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"px4Utilslib/PX4 Write Thrust & Torque Setpoint"
Example: add_block("px4Utilslib/PX4 Write Thrust & Torque Setpoint","myModel/myBlock",MakeNameUnique="on")
Version History
Introduced in R2025a

