-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix reset functions #1416
base: main
Are you sure you want to change the base?
Fix reset functions #1416
Changes from all commits
ffd9cd1
9484b0b
e308e2d
43625bc
d4856d6
70ef8b3
b19d96b
f0d8bfe
ce7e42b
3c39a02
562e2b1
8c1d278
e890cb1
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 |
---|---|---|
|
@@ -87,6 +87,12 @@ class EventCfg: | |
"""Configuration for events.""" | ||
|
||
# reset | ||
reset_to_default = EventTerm( | ||
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. would this change affect other environments that use reset_joints_by_offset? such as ant, humanoid, cabinet 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. This environment file isn't a place to have this feature as a unit test IMO. We're changing the way the environment operates. |
||
func=mdp.reset_joints_to_default, | ||
mode="reset", | ||
params={"asset_cfg": SceneEntityCfg("robot", joint_names=["slider_to_cart"])}, | ||
) | ||
|
||
reset_cart_position = EventTerm( | ||
func=mdp.reset_joints_by_offset, | ||
mode="reset", | ||
|
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.
Isn't this a slower operation since you are copying over the data twice (first here by setting into
joint_pos_all
and then it is again done inside the method). Why not keep it cleaner and just operate over theasset_cfg.joint_indices
in the whole thing?Something like: