why do we have 35 joints?
This commit is contained in:
parent
9ace3b0668
commit
a81f4fc4a4
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue