I am looking to implement my own controller in the PX4 firmware by replacing position control module in the PX4. I have the controller coded in C++ and it produces the same results as my Matlab simulator which is good. Now, I would like to modify the PX4 firmware and test it in SITL with the Gazebo simulator for my multicopter. I understand the Gazebo is powered by the PX4 but I am wondering what influence do the position, rate, and attitude control modules (mc_pos_control, mc_rate_control, and mc_att_control) have on the gazebo simulator? I recently commented out each control module and sent offboard commands to the multicopter in gazebo. Nothing changed from before so it seems these control modules are doing nothing?
How is the gazebo multicopter being controlled? And is it possible then to even test my controller in gazebo before on hardware?