Online optimization with Ardupilot

Hello everyone,

I am working on a project for a mobile robot. As the actuators, I have two servomotors and two motors that generate thrust (speed control). The motors are attached to the servomotors so they can rotate and change the direction of thrust. The system is 3 DOF. i.e., position (x,y) and orientation.
As you see, I have four control variable and 3 states to control. This is an optimization problem and theoretically, the problem can be solved by optimizing a cost function w.r.t control variables.

My question is how can I actually implement this using a Pixhawk and maybe having a computer onboard.

I hope my explanation is clear.

Thank you

You can take a look at the custom controller implementation for inspiration, but I guess you must expand it.

There is no need for a second computer, the flight controller can do what you want

1 Like