Complex system custom control in ArduPilot

Hello everyone!

I have a few questions regaring ArduPilot possibilities.
I have a complex system (a quadrotor + a dual arm manipulator) that I want to control with a given torque. I also have my custom control that takes into account the whole dynamic model and evaluate the torque that each joint needs in order to move into a desired position.

Now, I know ArduPilot has its own PID controller to move the drone, but I was wondering whether I could just change it in order to turn it into a torque controller. Maybe I can just change the output when it evaluates the torque?

Do you think I could control the arms too, by doing it? Or I’d better use a different program for the manipulators?

I know I could just use the PID to control the quadrotor, but I want to take into account the dynamic model of the whole system, which is not possible with ArduPilot as it is.
What do you think?

You are overcomplicating things. The flight controller PIDs will be able to compansate for arm movement as long as they are correclly tuned, and the ARM controllers can and should be independent of the copter control.

Do not overcomplicate it if it is not necessary.

Dear @amilcarlucas, thanks for your reply.

If you think that controlling the arms in ardupilot means overcomplicating things, I’ll get your advise and keep them independent from the copter.

However, the torque controller is still necessary. It’s not that I don’t like the PID, it’s just that my system and my task are more complex than what I described and I need a different controller for that (I’m working on a researching project).
I was just curious if anyone had ever tried to implement a torque controller in Ardupilot before.

You need a different software controller? Or you need a new hardware (computer) controller?

Are you planning to implement software controller in lua inside ardupilot?

I’m not planning to do it, since I have no idea how.

I was just wondering if it was possible to substitute the PID with something else. If the answer is no, I’ll stick with the position controller.