[ExternalForcesAwareQP] Give the possibility to make the QP aware of external forces #452
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.
This PR allows the QP to be aware of the external forces and compensate for them to ensure all constraints and objectives. Compliance of a task, if necessary, is achieved by uncompensating the external forces by adding to the task's reference acceleration the accelerations produced by these external forces.
Detailed description of the additions
Robot
with two new methodstauExternal()
andalphaDExternal()
. Add the update of external torque and acceleration as both output and update of TVM in Robot to prevent recomputation for multiple tasks with theupdateEF()
method.DynamicFunction
to include the compensation of external forces inb_
and a boolean in the constructor to activate or not this feature.DynamicsConstraint
,initialize
, andinitialize_tvm
constructors to include a boolean that allows activation of the compensation feature by forwarding it to theDynamicFunction
.CompliantPostureTask
andCompliantEndEffectorTask
to be used with this QP as it will naturally compensate external forces. Each task is a derivation of their non-compliant versions and adds getter and setter as well as datastore entries to control if a task should be compliant or not. Compliance for the tasks is achieved by adding the acceleration due to the external forces to the reference acceleration of the task.