Flight testing a custom VTOL aircraft. I’ve gotten the attitude rate and position controls tuned OK (not perfect yet). I’m trying to fly a simple profile of “Commanded Take-off → hold → land on command”.
The issue i have that hold mode doesn’t seem to pass attitude position commands on to the attitude controller. I assume this has something to do with my understanding of how “hold” works. But see below screenshots - velocity error goes up and up… and the commanded attitude is … zero and constant? What am I missing?
I don’t think the issue here is the “hold” logic, but a different protection logic that comes into play when the drone is in thrust saturation. In case the drone can’t reach/hold the desired altitude, it overrules the roll and pitch setpoints to 0° to focus on altitude keeping.
In your case thrust is always at 1 and the vehicle can’t track the Z velocity setpoint. Either you had some issue with your power train or it’s simply underdimensioned.
I didn’t check if it’s actually possible to set a value > 1, but if it is, it would basically remove the altitude prioritization logic. In your case, the vehicle would then be able to control the XY position but will also go down.