From 794d7ecd85a023d204ef95fb2eb6e6eabf082d12 Mon Sep 17 00:00:00 2001 From: "Alan G. Sanchez" Date: Fri, 1 Jul 2022 17:08:33 -0700 Subject: [PATCH] Fixed typos. --- example_5.md | 8 ++++---- follow_joint_trajectory.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example_5.md b/example_5.md index 5c3fb66..5c28b71 100644 --- a/example_5.md +++ b/example_5.md @@ -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) ``` diff --git a/follow_joint_trajectory.md b/follow_joint_trajectory.md index bd5d25f..1af9ce5 100644 --- a/follow_joint_trajectory.md +++ b/follow_joint_trajectory.md @@ -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):