(self, phys_model)
return pose
Build  pose vector from simulated model.
Build  pose vector from simulated model.
Build pose vector from simulated model .
def _build_sim_pose(self, phys_model):
    """Build  pose vector from simulated model."""
    pose = np.zeros(self.get_pose_size())
    pyb = self._get_pybullet_client()
    root_pos, root_rot = pyb.getBasePositionAndOrientation(phys_model)
    root_pos = np.array(root_pos)
    root_rot = np.array(root_rot)

    joint_pose = []

    num_joints = self._get_num_joints()
    for j in range(num_joints):
      j_state_sim = pyb.getJointStateMultiDof(phys_model, j)
      j_pose_sim = np.array(j_state_sim[0])

      j_size_sim = len(j_pose_sim)

      if j_size_sim > 0:
        joint_pose.append(j_pose_sim)

    joint_pose = np.concatenate(joint_pose)

    motion = self.get_active_motion()
    motion.set_frame_root_pos(root_pos, pose)
    motion.set_frame_root_rot(root_rot, pose)
    motion.set_frame_joints(joint_pose, pose)

    return pose
def _build_sim_pose ( self , phys_model ) : pose = np . zeros ( self . get_pose_size ( ) ) pyb = self . _get_pybullet_client ( ) root_pos , root_rot = pyb . getBasePositionAndOrientation ( phys_model ) root_pos = np . array ( root_pos ) root_rot = np . array ( root_rot ) joint_pose = [ ] num_joints = self . _get_num_joints ( ) for j in range ( num_joints ) : j_state_sim = pyb . getJointStateMultiDof ( phys_model , j ) j_pose_sim = np . array ( j_state_sim [ 0 ] ) j_size_sim = len ( j_pose_sim ) if j_size_sim > 0 : joint_pose . append ( j_pose_sim ) joint_pose = np . concatenate ( joint_pose ) motion = self . get_active_motion ( ) motion . set_frame_root_pos ( root_pos , pose ) motion . set_frame_root_rot ( root_rot , pose ) motion . set_frame_joints ( joint_pose , pose ) return pose