-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix joint friction/armature set events #2439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,16 @@ class EventCfg: | |
}, | ||
) | ||
|
||
add_joint_randomization = EventTerm( | ||
func=mdp.randomize_joint_parameters, | ||
mode="startup", | ||
params={ | ||
"asset_cfg": SceneEntityCfg("robot", body_names=".*"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Try to make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, this seems like an issue because I'm specifying I can close this if that is correct There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. randomize_joint_parameters should work with joint_names instead of body_names, since it modifies the joints in the articulations instead of bodies. |
||
"friction_distribution_params": (0.0, 0.0), | ||
"armature_distribution_params": (0.0, 0.0), | ||
}, | ||
) | ||
|
||
|
||
@configclass | ||
class AnymalCFlatEnvCfg(DirectRLEnvCfg): | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix won't work if you have a subset of env ids and joint ids over which the term is operating. There is definitely a bug here if
joint_ids
is a slice.The way to fix it is to check if one of them is a slice. If yes, we keep the broadcasting. Otherwise we index directly.