IsaacGymEnvs icon indicating copy to clipboard operation
IsaacGymEnvs copied to clipboard

Bug Fix in AMP Hybrid Init

Open Charrrrrlie opened this issue 1 year ago • 1 comments

In HumanoidAMP, when using Hybrid as stateInit type (this line), there is an error in the humanoid start pose.

⚠️It is caused by calling self.gym.set_actor_root_state_tensor_indexed and self.gym.set_dof_state_tensor_indexed functions both in _reset_default and _reset_ref_state_init. (It is weird when we call the two functions once after default and ref state init. e.g. in the implementation of this PR, also in the source implementation in ASE)

The difference is shown below (the first picture shows the wrong initialization and the second is the correct one, using this PR). It seems the default state will somehow "overwrite" the reference state.

error correction

Charrrrrlie avatar Jan 02 '24 12:01 Charrrrrlie

Further, I think that using the current implementation in this PR is also helpful in code reuse and reducing redundancy :).

Charrrrrlie avatar Jan 02 '24 12:01 Charrrrrlie