Browse Source

[fix] fix constants matrixs bug.

main
silencht 2 years ago
parent
commit
fdc8dd44f3
  1. 18
      teleop/Preprocessor.py
  2. 4
      teleop/constants_vuer.py

18
teleop/Preprocessor.py

@ -8,17 +8,17 @@ from motion_utils import mat_update, fast_mat_inv
class VuerPreprocessor:
def __init__(self):
self.vuer_head_mat = np.array([[1, 0, 0, 0],
[0, 1, 0, 1.5],
[0, 0, 1, -0.2],
[0, 0, 0, 1]])
[0, 1, 0, 1.5],
[0, 0, 1, -0.2],
[0, 0, 0, 1]])
self.vuer_right_wrist_mat = np.array([[1, 0, 0, 0.5],
[0, 1, 0, 1],
[0, 0, 1, -0.5],
[0, 0, 0, 1]])
[0, 1, 0, 1],
[0, 0, 1, -0.5],
[0, 0, 0, 1]])
self.vuer_left_wrist_mat = np.array([[1, 0, 0, -0.5],
[0, 1, 0, 1],
[0, 0, 1, -0.5],
[0, 0, 0, 1]])
[0, 1, 0, 1],
[0, 0, 1, -0.5],
[0, 0, 0, 1]])
def process(self, tv):
self.vuer_head_mat = mat_update(self.vuer_head_mat, tv.head_matrix.copy())

4
teleop/constants_vuer.py

@ -4,12 +4,12 @@ tip_indices = [4, 9, 14, 19, 24]
hand2inspire_l_arm = np.array([[1, 0, 0, 0],
[0, 0, -1, 0],
[1, 1, 0, 0],
[0, 1, 0, 0],
[0, 0, 0, 1]])
hand2inspire_r_arm = np.array([[1, 0, 0, 0],
[0, 0, 1, 0],
[1, -1, 0, 0],
[0, -1, 0, 0],
[0, 0, 0, 1]])
hand2inspire_l_finger = np.array([[0, -1, 0, 0],

Loading…
Cancel
Save