(self)
Context manager for resetting the simulation state.

    Sets the internal simulation to a default state when entering the block.

    ```python
    with physics.reset_context():
      # Set joint and object positions.

    physics.step()
    ```

    Yields:
      The `Physics` instance.
Context manager for resetting the simulation state.
Context manager for resetting the simulation state .
def reset_context(self):
    """Context manager for resetting the simulation state.

    Sets the internal simulation to a default state when entering the block.

    ```python
    with physics.reset_context():
      # Set joint and object positions.

    physics.step()
    ```

    Yields:
      The `Physics` instance.
    """
    try:
      self.reset()
    except PhysicsError:
      pass
    yield self
    self.after_reset()
def reset_context ( self ) : try : self . reset ( ) except PhysicsError : pass yield self self . after_reset ( )