8000 update axes · Zyszu200/robotics-toolbox-python@ac9ebc7 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit ac9ebc7

Browse files
committed
update axes
1 parent 6097727 commit ac9ebc7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

roboticstoolbox/examples/branched_robot.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
env = swift.Swift()
1313
env.launch(realtime=True)
1414

15+
env.set_camera_pose([1.4, 0, 0.7], [0, 0.0, 0.5])
16+
1517
r = rtb.models.YuMi()
1618
env.add(r)
1719

@@ -44,8 +46,12 @@
4446
env.add(r_target_frame)
4547

4648

47-
l_frame = sg.Axes(0.1)
48-
r_frame = sg.Axes(0.1)
49+
l_frame = sg.Axes(0.1, pose=r.grippers[0].tool)
50+
r_frame = sg.Axes(0.1, pose=r.grippers[1].tool)
51+
52+
l_frame.attach_to(r.grippers[0].links[0])
53+
r_frame.attach_to(r.grippers[1].links[0])
54+
4955
env.add(l_frame)
5056
env.add(r_frame)
5157

@@ -69,9 +75,6 @@
6975
r.qd[la.jindices] = np.linalg.pinv(la.jacobe(r.q)) @ vl
7076
r.qd[ra.jindices] = np.linalg.pinv(ra.jacobe(r.q)) @ vr
7177

72-
l_frame.T = la.fkine(r.q)
73-
r_frame.T = ra.fkine(r.q)
74-
7578
env.step(dt)
7679

7780
env.hold()

0 commit comments

Comments
 (0)
0