Skip to content

Commit 7f4f28f

Browse files
Fix Limb interf to ignore extra left/right states
Prior to this commit, the on_joint_states callback would look for any "left" or "right" string and populate its joint states with that joint. This commit now limits the search to only look for joints that are previously know to exist in the Baxter arm.
1 parent 70b9ca3 commit 7f4f28f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/baxter_interface/limb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def __init__(self, limb):
126126

127127
def _on_joint_states(self, msg):
128128
for idx, name in enumerate(msg.name):
129-
if self.name in name:
129+
if name in self._joint_names[self.name]:
130130
self._joint_angle[name] = msg.position[idx]
131131
self._joint_velocity[name] = msg.velocity[idx]
132132
self._joint_effort[name] = msg.effort[idx]

0 commit comments

Comments
 (0)