This website works better with JavaScript.
Home
Explore
Help
Sign In
cccccccc
/
stretch_tutorials
mirror of
https://github.com/hello-robot/stretch_tutorials.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
Fixed typos.
pull/14/head
Alan G. Sanchez
2 years ago
parent
e24a020059
commit
794d7ecd85
2 changed files
with
6 additions
and
6 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-4
example_5.md
+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(joint
s[i]
)
for
jo
i
nt
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(joint
s[i]
)
for
jo
i
nt
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):
Write
Preview
Loading…
Cancel
Save