(self, phys_model, pose, vel)
return
Set the state of a character to the given pose and velocity.

    Args:
      phys_model: handle of the character
      pose: pose to be applied to the character
      vel: velocity to be applied to the character
Set the state of a character to the given pose and velocity.
Set the state of a character to the given pose and velocity .
def _set_state(self, phys_model, pose, vel):
    """Set the state of a character to the given pose and velocity.

    Args:
      phys_model: handle of the character
      pose: pose to be applied to the character
      vel: velocity to be applied to the character
    """
    motion = self.get_active_motion()
    pyb = self._get_pybullet_client()

    root_pos = motion.get_frame_root_pos(pose)
    root_rot = motion.get_frame_root_rot(pose)
    root_vel = motion.get_frame_root_vel(vel)
    root_ang_vel = motion.get_frame_root_ang_vel(vel)

    pyb.resetBasePositionAndOrientation(phys_model, root_pos, root_rot)
    pyb.resetBaseVelocity(phys_model, root_vel, root_ang_vel)

    num_joints = self._get_num_joints()
    for j in range(num_joints):
      q_idx = self._get_joint_pose_idx(j)
      q_size = self._get_joint_pose_size(j)

      dq_idx = self._get_joint_vel_idx(j)
      dq_size = self._get_joint_vel_size(j)

      if (q_size > 0):
        assert (dq_size > 0)

        j_pose = pose[q_idx:(q_idx + q_size)]
        j_vel = vel[dq_idx:(dq_idx + dq_size)]
        pyb.resetJointStateMultiDof(phys_model, j, j_pose, j_vel)

    return
def _set_state ( self , phys_model , pose , vel ) : motion = self . get_active_motion ( ) pyb = self . _get_pybullet_client ( ) root_pos = motion . get_frame_root_pos ( pose ) root_rot = motion . get_frame_root_rot ( pose ) root_vel = motion . get_frame_root_vel ( vel ) root_ang_vel = motion . get_frame_root_ang_vel ( vel ) pyb . resetBasePositionAndOrientation ( phys_model , root_pos , root_rot ) pyb . resetBaseVelocity ( phys_model , root_vel , root_ang_vel ) num_joints = self . _get_num_joints ( ) for j in range ( num_joints ) : q_idx = self . _get_joint_pose_idx ( j ) q_size = self . _get_joint_pose_size ( j ) dq_idx = self . _get_joint_vel_idx ( j ) dq_size = self . _get_joint_vel_size ( j ) if ( q_size > 0 ) : assert ( dq_size > 0 ) j_pose = pose [ q_idx : ( q_idx + q_size ) ] j_vel = vel [ dq_idx : ( dq_idx + dq_size ) ] pyb . resetJointStateMultiDof ( phys_model , j , j_pose , j_vel ) return