add delta_pose_diff
This commit is contained in:
@@ -220,6 +220,13 @@ class PoseUtil:
|
||||
@staticmethod
|
||||
def matrix_to_rotation_6d_numpy(matrix):
|
||||
return np.copy(matrix[:2, :]).reshape((6,))
|
||||
|
||||
@staticmethod
|
||||
def rotation_angle_distance(R1, R2):
|
||||
R = torch.matmul(R1, R2.transpose(1, 2))
|
||||
trace = torch.diagonal(R, dim1=1, dim2=2).sum(-1)
|
||||
angle = torch.acos(torch.clamp((trace - 1) / 2, -1.0, 1.0))/torch.pi*180
|
||||
return angle
|
||||
|
||||
|
||||
""" ------------ Debug ------------ """
|
||||
|
Reference in New Issue
Block a user