Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ExternalForcesAwareQP] Give the possibility to make the QP aware of external forces #452

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mathieu-celerier
Copy link

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

  • [mc_rbdyn] Provide two new "sensors" implemented as devices: ExternalTorqueSensor & VirtualTorqueSensor
  • [mc_tvm] Add information of ExternalTorqueSensor both as joint torque and acceleration in Robot with two new methods tauExternal() and alphaDExternal(). Add the update of external torque and acceleration as both output and update of TVM in Robot to prevent recomputation for multiple tasks with the updateEF() method.
  • [mc_tvm] Modifies the DynamicFunction to include the compensation of external forces in b_ and a boolean in the constructor to activate or not this feature.
  • [mc_solver] Modifies DynamicsConstraint, initialize, and initialize_tvm constructors to include a boolean that allows activation of the compensation feature by forwarding it to the DynamicFunction.
  • [mc_tasks] Add two new compliant tasks CompliantPostureTask and CompliantEndEffectorTask 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.

Mathieu Celerier added 3 commits May 29, 2024 22:44
…DynamicFunction.\nVirtualTorqueSensor is used as a feed forward at torque level in DynamicFunction's b_.\nExternalTorqueSensor is included in mc_tvm/Robot and two new getter tauExternal and alphaDExternal are added along with an updateEF methode.\nupdateEF methode is registered as an update function and an output in tvm to prevent repeted computation of alphaDExternal, it anticipates the addition of compliant tasks that depend on this alphaDExternal.
… DynamicsConstraint including external forces to compensate for them, these tasks add gui entry and methods to uncompensate external forces and make the task compliant again.
@mathieu-celerier
Copy link
Author

Need some fixes for now, will update.

@mmurooka
Copy link
Member

mmurooka commented Jun 9, 2024

@mathieu-celerier Thank you for the Pull Request for the new feature. I have a few questions.

  • If you use Tasks instead of TVM as the solver (which I understand is the default), does nothing change in the behavior of the controller (including the amount of computation)?
  • Even when using TVM, the behavior doesn't change unless you explicitly specify the option and add the compliance version of Posture/EndEffectorTask, right?
  • I see that the compensateExternalForces option of DynamicsConstraint is not supported in Tasks. Shouldn't a warning message be output when this is specified if the solver backend is Tasks?

Mathieu Celerier added 2 commits June 18, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants