Browse Source

Updated for loop in print_states() function.

pull/14/head
Alan G. Sanchez 2 years ago
parent
commit
3da3f27699
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/joint_state_printer.py

+ 2
- 2
src/joint_state_printer.py View File

@ -44,8 +44,8 @@ class JointStatePublisher():
# Use of forloop to parse the names of the requested joints list. # Use of forloop to parse the names of the requested joints list.
# The index() function returns the index at the first occurrence of # The index() function returns the index at the first occurrence of
# the name of the requested joint in the self.joint_states.name list. # the name of the requested joint in the self.joint_states.name list.
for i in range(len(joints)):
index = self.joint_states.name.index(joints[i])
for joint in joints:
index = self.joint_states.name.index(joint)
joint_positions.append(self.joint_states.position[index]) joint_positions.append(self.joint_states.position[index])
# Print the joint position values to the terminal # Print the joint position values to the terminal

Loading…
Cancel
Save