full adhesion timeconst feature update#3162
Open
mar-yan24 wants to merge 1 commit intogoogle-deepmind:mainfrom
Open
full adhesion timeconst feature update#3162mar-yan24 wants to merge 1 commit intogoogle-deepmind:mainfrom
mar-yan24 wants to merge 1 commit intogoogle-deepmind:mainfrom
Conversation
yuvaltassa
approved these changes
Mar 10, 2026
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.
Summary
This pull request covers a basic implementation of enhancement suggestion #2145, the addition of a
timeconstfor adhesion actuation. This addition should allow for easy control over the control signal for "sticky forces".The basic reason why this feature is helpful is because the introduction of a time constant adds a simple low-pass filter between control signal and actual force, as @yuvaltassa and @vaxenburg alluded to earlier.
Main Changes
I added the
timeconstparameter formjs_setToAdhesion(). If its positive, the actuator gets a filter,dyntype=mjDYN_FILTER, if its 0, behavior is unchanged. This was the main change, all others following this are supporting changes.I changed the XML schema and parser to add
timeconstto the list of allowed attributes so you can write it within the model file. I also added python and wasm bindings to expose the parameter so python users can callactuator.set_to_adhesion(gain=100, timeconst=0.03). This should keep the api in sync with xml.I also described the change in the documentation and added some basic tests.
This change also follows the same existing schema within
<cylinder>and<position>actuators that have thetimeconstattribute, so this was an existing feature, just extended it to one more actuator type.Let me know if anything looks awry and I'll take a look.