Pass offboard attitude commands while PX4 runs Altitude mode


I currently control my drone via passing attitude and thrust set points over Mavros using

This requires I run controllers myself for pitch, roll, yaw and thrust.

My thrust controller is very simple, simply reading vertical position from "/mavros/local_position/pose"and applying a PID controller for a desired velocity based on stick input.

My application requires autonomous control of pitch, roll and yaw which I need to handle offboard, however for thrust I am just re-implementing what’s already in PX4 for altitude hold, I’d just want to pass vertical velocity commands to px4 from my stick input if possible.

This seems like a waste, is there any way for me to have full off board control of attitude, but leave PX4 to run the altitude control as if I were flying in altitude mode?

I’ve seen a few posts on this from years ago, but never found a conclusive answer.