Torques in mc_rate_control/RateControl/RateControl.cpp

Hello, new developer here.
I’m attempting to modify the PX4 autopilot attitude controller, after some reading I found some posts saying that is not possible to set the desired axis torques. Nevertheless in the code mentioned in the title the PID controller calculates torques for each axis. One could just bypass the rate controller and write a new control law that yields torques? Then feed this to actuators.control

Thank you.