Repository navigation
Smooth joint friction: tanh model with first and second derivatives - #16
Merged
Merged
Conversation
…rier activations, gravity torque
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
RBDReference(robot, use_joint_dynamics=True, friction_model="tanh", friction_width=w)replaces the Coulomb termfriction*sign(qd)by the smoothfriction*tanh(qd/w). The defaultfriction_model="sign"is unchanged.The inverse-dynamics gradient carries the slope
(friction/w) sech^2(qd/w)on the velocity diagonal, soforward_dynamics_gradientfollows by composition. Both second-order inverse-dynamics references add-(2 friction/w^2) tanh(qd/w) sech^2(qd/w)to the qd-qd triple diagonal of the reduced output after the mimic fold, sofdsva_sofollows as well. The width is one scalar or one value per velocity slot, 0.03 rad/s by default.inverse_dynamics_gradient_bpass_dqdtakesqdas a keyword argument because the tanh slope depends on it; the only caller passes it.Tests (
tests/test_joint_dynamics_friction_model.py) check the closed forms of the bias and both derivatives against the per-body fold, the gradient against central differences of inverse and forward dynamics, and the second order against central differences of the gradients, at rest, inside the width, at the width and outside it, on fr3 (friction and a mimic joint) and floating iiwa14 (root skipped). The sign model's bias, slope and zero curvature are pinned.This is item 1 of the GRiD 0.5.4 batch (GATO issue A2R-Lab/GATO#20).
🤖 Generated with Claude Code