Allow armature and damping on actuator elements - #544
Closed
adityasingh2400 wants to merge 1 commit into
Closed
Conversation
MuJoCo accepts armature and damping on general, motor, position, velocity, intvelocity, damper, cylinder and muscle actuators, and the <default> section of the PyMJCF schema already listed both for exactly those eight elements. The <actuator> elements themselves did not, so the attributes could only be set through a default class and writing them directly on an actuator raised AttributeError. Verified against MuJoCo 3.11.0 that all eight accept both attributes, that adhesion correctly rejects them, and that the parsed values reach actuator_armature and actuator_damping in the compiled model.
Author
|
Closing this as superseded by 985d094, which replaced the hand-maintained I verified the specific gap this PR filled: the |
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.
MuJoCo accepts
armatureanddampingon thegeneral,motor,position,velocity,intvelocity,damper,cylinderandmuscleactuators, and the<default>section ofschema.xmlalready listed both for exactly those eight elements. The<actuator>elements themselves did not, so the attributes could only be reached through a default class and setting either one directly on an actuator raisedAttributeError: 'armature' is not a valid attribute for <position>.I found this by probing every attribute name in
schema.xmlagainst every element with MuJoCo 3.11.0 and keeping the ones MuJoCo parses but PyMJCF rejects.armatureanddampingon those eight actuators were the only remaining gap. I also confirmed thatadhesioncorrectly rejects both, so it is left alone, and that the parsed values reachactuator_armatureandactuator_dampingin the compiled model. The declarations mirror the ones already used in the<default>block.The new tests cover all eight actuator types and a round trip through
MjModelthat asserts the values survive. All nine fail before this change and pass after it.