Skip to content

[Explicit Compliance and Safety][3/3] Introduce compliant task variants with Tasks and TVM backend support#502

Open
mathieu-celerier wants to merge 9 commits intojrl-umi3218:masterfrom
mathieu-celerier:topic/explicit-compliance-and-safety
Open

[Explicit Compliance and Safety][3/3] Introduce compliant task variants with Tasks and TVM backend support#502
mathieu-celerier wants to merge 9 commits intojrl-umi3218:masterfrom
mathieu-celerier:topic/explicit-compliance-and-safety

Conversation

@mathieu-celerier
Copy link
Copy Markdown
Contributor

This PR introduces compliant variants of several commonly used tasks in the Tasks and TVM backend.

New compliant task alternatives include:

  • CompliantPostureTask
  • CompliantPositionTask
  • CompliantOrientationTask
  • CompliantEndEffectorTask

Together with the previous PRs on torque propagation and feedforward disturbance compensation, these additions provide the final building block for explicit compliance control within the mc_rtc task framework.

This PR include the content/commits of both #500 and #501 and extend it.

mathieu-celerier and others added 3 commits February 5, 2026 16:19
…heir equivalent joint accelerations to `Robot`

Add the new members `externalTorques_`, `compensationTorques_`,
`exteralTorquesAcc_` and `compensationTorquesAcc_` to `mc_rbdyn::Robot`.
Allong with their setters and getters `setExternalTorques`,
`setCompensationTorques`, `setExternalTorquesAcc`,
`setCompensationTorquesAcc`.
Note that the compensation torques and associated equivalent
accelerations are set as std::optional.
This is intended for later use for external forces compensation and
explicit compliance.
…asks backend and closedLoop feedback type in both TVM and Tasks

Since Tasks backend doesn't benefit from a computation graph, the joint
acceleration equivalent to the external/compensation torques should be
computed once before hand for later use by tasks in the solver.
For both Tasks and TVM, the information of external torques in robot are
updated from realRobot.
…raint` in the Tasks backend

Add an additional boolean argument to `DynamicConstraint` to enable
compensation of external torques disturbance estimation.
The boolean is defaulted to false to prevent breaking change.
The feedforward compensation torques are passed as an `Eigen::VectorXd`
to
Tasks' `MotionConstr` and `MotionSpringConstr`.
The compensation torques are obtained from
`mc_rbdyn::Robot::compensationTorques()` if available or
`mc_rbdyn::Robot::externalTorques()` otherwise.
…raint` in the TVM backend

Add an additional boolean argument to `mc_tvm::DynamicFunction` to
enable
compensation of external torques disturbance estimation.
The boolean is defaulted to false to prevent breaking change.
The feedforward compensation torques are obtained directly in the
`DynamicFunction` using `Robot`.
The compensation torques are obtained from
`mc_tvm::Robot::tauCompensation()` if available or
`mc_rbdyn::Robot::tauExternal()` otherwise.
…setExternalTorques funtion of Tasks MotionConstr
…ckend

New compliant alternative for tasks are:
- CompliantPostureTask
- CompliantPositionTask
- CompliantOrientationTask
- CompliantEndEffectorTask
Impacted tasks:
- CompliantPostureTask
- CompliantPositionTask
- CompliantOrientationTask
- CompliantEndEffectorTask
@mathieu-celerier mathieu-celerier force-pushed the topic/explicit-compliance-and-safety branch from 29e5258 to 8d1b7d5 Compare March 23, 2026 10:12
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