How to control real rotor thrust on PX4?

Hello everyone :wave:,

I’m a graduate student researching quadcopter control. Currently, I’m encountering an issue with using the simulation environment provided by px4 for experimentation. I aim to control the thrust and torque of the quadcopter using the topic “actuator_control” to implement an NMPC controller. However, the control performance isn’t satisfactory. I suspect this might be due to Px4 not defining the correspondence between the values of the topic and the actual applied thrust and torque. For example, if I send a topic value of 0.5, I don’t know the actual thrust applied to the rotors. Similarly, the thrust setpoint for setpoint_raw/attitude is in this situation, too. Is it feasible to directly control thrust and torque on PX4?

It seems like the RotorS simulator(It seems a bit old, I’m not sure if it can still be used.) can control thrust and torque, but my actual hardware is the PX4 autopilot. When validating my algorithm on real hardware, I still need PX4 control.

Perhaps switching to a different hardware controller could be an option, but I’m not very knowledgeable about this. Could you please provide specific solutions or recommendations?