PositionControl: deconflict velocity control gains from thrust #14749
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe problem solved by this pull request
Before #14212 the velocity control gains used in the multicopter position controller were defined as a scale between velocity error in one axis (or it's integral and derivative respectively) and the unit thrust vector. The problem with this is that the normalization of the unit thrust vector changes per vehicle or even vehicle configuration as 0 and 100% thrust get a different physical response. That's why the gains are now defined as scale between velocity error (integral/derivative) and the output acceleration in m/s². E.g. with the default P horizontal velocity gain of 4 m/s² per m/s you would counteract a velocity error of 1m/s with 4m/s² actuation in order to accelerate to the desired velocity. This leads to less dependence of the velocity control tuning to the vehicles maximum thrust, output configuration and hover thrust.
In #14212 a backward compatibility factor was introduced to make the existing parameters backward compatible. This pull request aims at:
Make the parameters reflect that reproducible gain scale while still staying backwards compatible.Describe your solution
even though its unit is acceleration and not unit thrust anymore
Replace the existing parameters with new ones that directly reflect the correctly scaled valuesIn horizontal direction it doesn't make sense to scale them with the hover thrust and in vertical direction the adjustments are already done in the acceleration to collective thrust conversion.
Test data / coverage
SITL tested and real world tested, see #14749 (comment)