From a81f4fc4a424316ffae18861a3b68f0c37d30c1e Mon Sep 17 00:00:00 2001 From: yjinzero Date: Thu, 13 Feb 2025 21:58:23 +0900 Subject: [PATCH] why do we have 35 joints? --- deploy/deploy_real/state_pub.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deploy/deploy_real/state_pub.py b/deploy/deploy_real/state_pub.py index 9ac4563..602c49f 100644 --- a/deploy/deploy_real/state_pub.py +++ b/deploy/deploy_real/state_pub.py @@ -42,9 +42,10 @@ class StatePublisher(Node): joint_state.name = self.joint_names joint_state.position = [0.0 for _ in self.joint_names] - print('a', len(self.joint_names)) - print('b', len(self.low_state.motor_state)) - for i in range(len(self.low_state.motor_state)): + # print('a', len(self.joint_names)) # 29 + # print('b', len(self.low_state.motor_state)) # 35?? + n:int = min(len(self.joint_names), len(self.low_state.motor_state)) + for i in range(n): joint_state.position[i] = self.low_state.motor_state[i].q self.joint_pub.publish(joint_state)