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

Method step

dm_control/mujoco/engine.py:164–176  ·  view source on GitHub ↗

Advances the physics state by `nstep`s. Args: nstep: Optional integer, number of steps to take. The actuation can be updated by calling the `set_control` function first.

(self, nstep: int = 1)

Source from the content-addressed store, hash-verified

162 mujoco.mj_step1(self.model.ptr, self.data.ptr)
163
164 def step(self, nstep: int = 1) -> None:
165 """Advances the physics state by `nstep`s.
166
167 Args:
168 nstep: Optional integer, number of steps to take.
169
170 The actuation can be updated by calling the `set_control` function first.
171 """
172 with self.check_invalid_state():
173 if self.legacy_step:
174 self._step_with_up_to_date_position_velocity(nstep)
175 else:
176 mujoco.mj_step(self.model.ptr, self.data.ptr, nstep)
177
178 def render(
179 self,