Пример #1
0
 def _update_ghost(self, physics: 'mjcf.Physics'):
   if self._ghost_offset is not None:
     target = tree.map_structure(lambda x: x[self._time_step],
                                 self._clip_reference_features)
     utils.set_walker_from_features(physics, self._ghost, target,
                                    self._ghost_offset)
     mjlib.mj_kinematics(physics.model.ptr, physics.data.ptr)
Пример #2
0
 def _set_walker(self, physics: 'mjcf.Physics'):
     timestep_features = tree.map_structure(lambda x: x[self._time_step],
                                            self._clip_reference_features)
     utils.set_walker_from_features(physics, self._walker,
                                    timestep_features)
     if self._props:
         utils.set_props_from_features(physics, self._props,
                                       timestep_features)
     mjlib.mj_kinematics(physics.model.ptr, physics.data.ptr)