You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppress exceptions due to physics warnings when initializing observation updaters
In order to initialize the buffers used by the observation updater we need the shape and dtype of the array returned by each observation callable. We usually get this by calling the observation callable and inspecting the array it returns. For `MJCFFeature` observations, this may involve calling `physics.forward` if the feature depends on a field that requires recalculation due to other changes to the physics state. However, at the point when this happens there is no guarantee that the physics state will be valid, since it has not yet been fully initialized by `initialize_episode`. Because of this, the call to `physics.forward` might raise a `PhysicsError`.
In practice it does not matter whether or not the physics state is valid, since we only care about the shape and dtype of the observation array, not its contents. We therefore suppress `PhysicsError`s originating from this initial call to the observation callable.
PiperOrigin-RevId: 283497708
Change-Id: I0c7b1bf1e968dadfe8101fbcbe072b1687f5a4de
0 commit comments