MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / forward

Method forward

dm_control/mujoco/engine.py:335–343  ·  view source on GitHub ↗

Recomputes the forward dynamics without advancing the simulation.

(self)

Source from the content-addressed store, hash-verified

333 self.forward()
334
335 def forward(self):
336 """Recomputes the forward dynamics without advancing the simulation."""
337 # Note: `mj_forward` differs from `mj_step1` in that it also recomputes
338 # quantities that depend on acceleration (and therefore on the state of the
339 # controls). For example `mj_forward` updates accelerometer and gyro
340 # readings, whereas `mj_step1` does not.
341 # http://www.mujoco.org/book/programming.html#siForward
342 with self.check_invalid_state():
343 mujoco.mj_forward(self.model.ptr, self.data.ptr)
344
345 @contextlib.contextmanager
346 def check_invalid_state(self):

Callers 5

resetMethod · 0.95
after_resetMethod · 0.95
assert_physics_errorMethod · 0.45
assert_warningMethod · 0.45

Calls 1

check_invalid_stateMethod · 0.95

Tested by 3

assert_physics_errorMethod · 0.36
assert_warningMethod · 0.36