Browse Source

Fixed typos.

pull/14/head
Alan G. Sanchez 2 years ago
parent
commit
794d7ecd85
2 changed files with 6 additions and 6 deletions
  1. +4
    -4
      example_5.md
  2. +2
    -2
      follow_joint_trajectory.md

+ 4
- 4
example_5.md View File

@ -63,8 +63,8 @@ class JointStatePublisher():
:param joints: A list of joint names
"""
joint_positions = []
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])
print("name: " + str(joints))
print("position: " + str(joint_positions))
@ -117,8 +117,8 @@ def print_states(self, joints):
This is the *print_states()* function which takes in a list of joints of interest as its argument. the is also an empty list set as *joint_positions* and this is where the positions of the requested joints will be appended.
```python
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])
print(joint_positions)
```

+ 2
- 2
follow_joint_trajectory.md View File

@ -226,7 +226,7 @@ class MultiPointCommand(hm.HelloNode):
trajectory_goal.trajectory.header.frame_id = 'base_link'
self.trajectory_client.send_goal(trajectory_goal)
rospy.loginfo('Sent stow goal = {0}'.format(trajectory_goal))
rospy.loginfo('Sent list of goals = {0}'.format(trajectory_goal))
self.trajectory_client.wait_for_result()
def main(self):
@ -359,7 +359,7 @@ class SingleJointActuator(hm.HelloNode):
trajectory_goal.trajectory.header.stamp = rospy.Time(0.0)
trajectory_goal.trajectory.header.frame_id = 'base_link'
self.trajectory_client.send_goal(trajectory_goal)
rospy.loginfo('Sent stow goal = {0}'.format(trajectory_goal))
rospy.loginfo('Sent goal = {0}'.format(trajectory_goal))
self.trajectory_client.wait_for_result()
def main(self):

Loading…
Cancel
Save