Skip to content

[Explicit Compliance and Safety][1/3] Add external and compensation torques with equivalent joint accelerations to Robot across TVM and Tasks backend#500

Open
mathieu-celerier wants to merge 3 commits into
jrl-umi3218:masterfrom
mathieu-celerier:topic/add-external-compensation-torques-members
Open

[Explicit Compliance and Safety][1/3] Add external and compensation torques with equivalent joint accelerations to Robot across TVM and Tasks backend#500
mathieu-celerier wants to merge 3 commits into
jrl-umi3218:masterfrom
mathieu-celerier:topic/add-external-compensation-torques-members

Conversation

@mathieu-celerier

Copy link
Copy Markdown
Contributor

This PR introduces explicit handling of external and compensation torques in mc_rbdyn::Robot and mc_tvm::Robot, together with their equivalent joint accelerations, and ensures consistent propagation across both the TVM and Tasks QP solvers.

New members are added to mc_rbdyn::Robot:
externalTorques_, compensationTorques_, externalTorquesAcc_, and compensationTorquesAcc_, along with their corresponding setters and getters (setExternalTorques, setCompensationTorques, setExternalTorquesAcc, setCompensationTorquesAcc).
Compensation torques and their associated accelerations are stored as std::optional.

These additions are intended to support future work on external force compensation and explicit compliance.

Since the Tasks backend does not rely on a computation graph, the joint accelerations equivalent to external and compensation torques are computed once at the beginning of run_impl for reuse by tasks.
For both Tasks and TVM backends, torque information is synchronized from realRobot during closed-loop execution.

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.
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