Пример #1
0
 def get_se2(self, num_rotations, pivot):
     """Get SE2 rotations discretized into num_rotations angles counter-clockwise."""
     rvecs = []
     for i in range(num_rotations):
         theta = i * 2 * np.pi / num_rotations
         rmat = utils.get_image_transform(theta, (0, 0), pivot)
         rvec = rmat.reshape(-1)[:-1]
         rvecs.append(rvec)
     return np.array(rvecs, dtype=np.float32)
Пример #2
0
 def get_se2(self, num_rotations, pivot, reverse=False):
     '''
     Get SE2 rotations discretized into num_rotations angles counter-clockwise.
     Returns list (np.array) where each item is a flattened SE2 rotation matrix.
     '''
     rvecs = []
     for i in range(num_rotations):
         theta = i * 2 * np.pi / num_rotations
         theta = -theta if reverse else theta
         rmat = utils.get_image_transform(theta, (0, 0), pivot)
         rvec = rmat.reshape(-1)[:-1]
         rvecs.append(rvec)
     return np.array(rvecs, dtype=np.float32)