I'm having some trouble conceptualizing how to go about implementing PID into my drone. There are a few ways I'm thinking about implementing the pipeline:
- Having one PID Object for each of the six motors.
- Having one PID Object for each axis.
How I would implement PIDs on a per-motor basis?
How I would implement PIDs on a per-axis basis?
I'm guessing that the second one will be the best course of action, as it can all be put into its own loop, where the PID data will be available on-demand, as opposed to calculating it on the spot. It is object-oriented, and runs in the background.
The first one has its appeals, too. It eliminates some of the calculations needed in order to find the actual value. It is procedural, and very straightforward and performs on the spot.
What do you guys think?

