Skip to content

Commit 9c983bd

Browse files
committed
reflect changes to IK
1 parent f781173 commit 9c983bd

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,20 @@ orientation parallel to y-axis (O=+Y)).
112112
from spatialmath import SE3
113113

114114
T = SE3(0.8, 0.2, 0.1) * SE3.OA([0, 1, 0], [0, 0, -1])
115-
q_pickup, *_ = robot.ikunc(T) # solve IK, ignore additional outputs
116-
print(q_pickup) # display joint angles
115+
sol = robot.ikine_unc(T) # solve IK
116+
print(sol.q) # display joint angles
117117

118-
[ 1.10903519 1.21806211 0.10114796 1.49547496 0.33270093 -0.29437262 -0.8927488 ]
118+
[-0.01044 7.876 1.557 -6.81 1.571 4.686 0.5169]
119119

120-
print(robot.fkine(q_pickup)) # FK shows that desired end-effector pose was achieved
120+
print(robot.fkine(sol.q)) # FK shows that desired end-effector pose was achieved
121121

122-
-1 -1.31387e-11-1.57726e-09 0.0999999
123-
-1.31386e-11 1 -7.46658e-08 0.2
124-
1.57726e-09-7.46658e-08-1 0.5
125-
0 0 0 1
122+
Out[35]:
123+
SE3:┏ ┓
124+
-1 -4e-08 0.000521 0.615
125+
2.79e-08 1 0.00013 0.154
126+
-0.000521 0.00013 -1 0.105
127+
0 0 0 1
128+
┗ ┛
126129
```
127130

128131
Note that because this robot is redundant we don't have any control over the arm configuration apart from end-effector pose, ie. we can't control the elbow height.

0 commit comments

Comments
 (0)