Change low level (MC attitude) controller

Hi to all!

I am wandering if a suggested method exists to replace the low-level controller of the multicopter. I need to change it because I need to test other controller for research purpose. I know that is not suggested to change it, but I will fly only indoor in a safety flight area. In particular, I want to directly control the motors of my UAV (avoiding to use the mixer of the PX4).

My problem right now concerns how to choose the “alternative” low level controller (by default seems that the px4 code runs the mc_attitud_contol).

Thank you,

You need to know how to use the uorb topics, and you need to know what’s the topics mixer advertise, then you can control the motor directly!

If you dig into the ROMFS/px4fmu_common/init.d folder you will see the startup scripts for the different aircraft types, with the rc.* names.

Looks at rc.mc_apps to see where the mc_att_control gets started.

Look in rcS to trace where rc.mc_apps gets called. You could change this to call rc.my_mc_apps which would start your custom attitude controller.

1 Like