isaac-sim/IsaacGymEnvs

Getting environment and setting environment states

Closed this issue · 1 comments

Was wondering if it is possible to get some environment state and then set the environment back to the same exact state later? I tried using envs.gym.set_actor_root_state_tensor_indexed and envs.gym.set_dof_state_tensor_indexed among other functions but was getting several errors that seem to be maybe task specific instead of isaac related. Thanks!

I'm not one of the original developers but I was able to get this behavior in the IndustReal environments using gym.set_actor_root_state_tensor, gym.set_dof_state_tensor, and gym.set_dof_actuation_force_tensor to some saved values. After calling these functions I also called simulate_and_refresh which I think might be specific to the IndustReal/Factory environments, but its functionality should be replicable in other environments as well.