Reset simulator state


is it possible to reset individual environments (created by a cloner) to previous states? I could not find a dedicated function, so we tried to set object poses, velocities and joint positions, velocities by hand but that is not sufficient to get reliable resets.
We are working on a in-hand manipulation task and don’t necessarily need fully reproducible/deterministic resets, but at least the qualitative behavior should be consistent. Right now, the object is sometimes properly grasped and sometimes drops immediately.

Are there any deeper API calls that could help us to get more consistent resets?

1 Like

Hi there, resets for individual environments will need to be performed by setting individual attributes to their corresponding values using the APIs you’ve mentioned. Generally, setting the object transform and velocity, and articulation root transform, velocity, and joint positions and velocities should be enough. If you are applying target or effort control, it’s also important to reset those to their default states so that impulses don’t carry over across the sim step.

Thanks, for the reply.
I am not sure what you mean by reset the target/effort control to its “default states”.
We are working with position control, and use the ArticulationView API.
For a reset we call set_joint_positions(), set_joint_velocities(), and (as in every other step) set_joint_position_targets().
(Joint efforts and controller gains do not change.)
Is there anything else we can reset to a “default state”?
Do you think the sporadic object dropping could be fixed by more solver iterations?