From fdc8dd44f315bd3aeb5ccd5c329a25ffcebaeb01 Mon Sep 17 00:00:00 2001 From: silencht Date: Wed, 4 Sep 2024 17:25:54 +0800 Subject: [PATCH] [fix] fix constants matrixs bug. --- teleop/Preprocessor.py | 18 +++++++++--------- teleop/constants_vuer.py | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/teleop/Preprocessor.py b/teleop/Preprocessor.py index a38be3b..3376d1d 100644 --- a/teleop/Preprocessor.py +++ b/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()) diff --git a/teleop/constants_vuer.py b/teleop/constants_vuer.py index ab45e4a..7f03639 100644 --- a/teleop/constants_vuer.py +++ b/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],