Deploying custom controllers in PX4

Hello everyone,
Sry for my bad english.
I used -v2 in pixhawk 2.4.8,and I deployed my custom att controller (a Simple slide moulding) in module “mc_att_control”,and the parameters have been adjusted perfectly. In manual mode, I have completed the outdoor flight experiment and it is good which means the att control loop is good too. But when I want to use position mode (use original PID position controller to calculate att_sp for my customed att controller),in Gazebo,I found the the plane wouldn’t take off as if it was fixed to the ground. And the PWM outputs was jumped from 1000 to 2000 quickly.
Why does a good attitude loop not work when a position loop is added to it?