MCPcopy Create free account
hub / github.com/TeleHuman/PBHC / _reset

Method _reset

humanoidverse/deploy/mujoco.py:317–328  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

315
316
317 def _reset(self):
318 self.data.qpos[:3] = np.array(self.cfg.robot.init_state.pos)
319 self.data.qpos[3:7] = np.array(self.cfg.robot.init_state.rot)[[3,0,1,2]] # XYZW to WXYZ
320 # self.data.qpos[3:7] = np.array([0,0,0.7184,-0.6956])[[3,0,1,2]] #DEBUG: init quat of JingjiTaiji
321 # self.data.qpos[3:7] = np.array([0,0,0.7455,-0.6665])[[3,0,1,2]] #DEBUG: init quat of NewTaiji
322 # self.data.qpos[3:7] = np.array([0,0,0.6894,0.7244])[[3,0,1,2]] #DEBUG: init quat of Shaolinquan
323 self.data.qpos[7:] = self.dof_init_pose
324 self.data.qvel[:] = 0
325 self.cmd = np.array(self.cfg.deploy.defcmd)
326
327 if self.RAND_IMU:
328 self.noise_imu.reset()
329
330
331 @staticmethod

Callers

nothing calls this directly

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected