Skip to content

Commit af4de2c

Browse files
petercorkeclaude
andauthored
docs(notebooks): modernise iros2020.ipynb (renamed from iros2020-workshop) for the current API (#855)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 1460de7 commit af4de2c

1 file changed

Lines changed: 35 additions & 87 deletions

File tree

Lines changed: 35 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,21 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# IROS 2020 workshop: REVIEW ON SCREW THEORY & GEOMETRIC ROBOT DYNAMICS"
7+
"<!-- RTB_HEADER -- generated from the notebook metadata (rtb_header) by sync_bootstrap.py, do not hand-edit -->\n",
8+
"<table>\n",
9+
" <tr>\n",
10+
" <td><div align=\"left\"><font size=\"30\">Robotics Toolbox for Python</font></div></td>\n",
11+
" <td><img src=\"figs/RobToolBox_RoundLogoB.png\" width=\"300\"></td>\n",
12+
" </tr>\n",
13+
"</table>\n",
14+
"\n",
15+
"<p></p>\n",
16+
"<div align=\"center\" style=\"font-size: 1.5em;\">IROS 2020 workshop: review on screw theory and geometric robot dynamics</div>\n",
17+
"<p></p>\n",
18+
"\n",
19+
"(c) Peter Corke 2020, updated 2026\n",
20+
"\n",
21+
"> **Modernised 2026-10-19** to address API drift: this notebook was written for an earlier release of the Toolbox, and has been updated so that it runs with the current one."
822
]
923
},
1024
{
@@ -189,15 +203,15 @@
189203
"metadata": {},
190204
"outputs": [],
191205
"source": [
192-
"q, *_ = puma.ikine(T)\n",
206+
"q = puma.ikine_LM(T).q\n",
193207
"q"
194208
]
195209
},
196210
{
197211
"cell_type": "markdown",
198212
"metadata": {},
199213
"source": [
200-
"_Note: that `ikine` returns additional status information which we are ignoring here_\n",
214+
"_Note: that `ikine_LM` returns an `IKSolution` object, with the joint coordinates in its `q` attribute and the status of the solution in other attributes, which we are ignoring here_\n",
201215
"\n",
202216
"The manipulability at this particular configuration is"
203217
]
@@ -208,7 +222,7 @@
208222
"metadata": {},
209223
"outputs": [],
210224
"source": [
211-
"puma.maniplty(q)"
225+
"puma.manipulability(q)"
212226
]
213227
},
214228
{
@@ -287,7 +301,7 @@
287301
"metadata": {},
288302
"outputs": [],
289303
"source": [
290-
"import roboticstoolbox.robot.ET as ET\n",
304+
"from roboticstoolbox import ET\n",
291305
"\n",
292306
"l1 = 0.672\n",
293307
"l2 = 0.2337\n",
@@ -315,17 +329,17 @@
315329
"source": [
316330
"e = (\n",
317331
" ET.tz(l1)\n",
318-
" * ET.rz()\n",
332+
" * ET.Rz()\n",
319333
" * ET.ty(l2)\n",
320-
" * ET.ry()\n",
334+
" * ET.Ry()\n",
321335
" * ET.tz(l3)\n",
322336
" * ET.tx(l6)\n",
323337
" * ET.ty(l4)\n",
324-
" * ET.ry()\n",
338+
" * ET.Ry()\n",
325339
" * ET.tz(l5)\n",
326-
" * ET.rz()\n",
327-
" * ET.ry()\n",
328-
" * ET.rz()\n",
340+
" * ET.Rz()\n",
341+
" * ET.Ry()\n",
342+
" * ET.Rz()\n",
329343
")"
330344
]
331345
},
@@ -614,7 +628,7 @@
614628
"metadata": {},
615629
"outputs": [],
616630
"source": [
617-
"Twist3.R([1, 0, 0], [0, 0, 0])"
631+
"Twist3.UnitRevolute([1, 0, 0], [0, 0, 0])"
618632
]
619633
},
620634
{
@@ -630,7 +644,7 @@
630644
"metadata": {},
631645
"outputs": [],
632646
"source": [
633-
"Twist3.P([0, 1, 0])"
647+
"Twist3.UnitPrismatic([0, 1, 0])"
634648
]
635649
},
636650
{
@@ -696,7 +710,7 @@
696710
"metadata": {},
697711
"outputs": [],
698712
"source": [
699-
"tw.pitch()"
713+
"tw.pitch"
700714
]
701715
},
702716
{
@@ -712,7 +726,7 @@
712726
"metadata": {},
713727
"outputs": [],
714728
"source": [
715-
"tw.pole()"
729+
"tw.pole"
716730
]
717731
},
718732
{
@@ -992,78 +1006,6 @@
9921006
"fig = puma.plot(puma.qz)\n",
9931007
"lines.plot(\"k--\", linewidth=1.5, bounds=np.r_[-1, 1, -1, 1, -1, 1.5])"
9941008
]
995-
},
996-
{
997-
"cell_type": "code",
998-
"execution_count": null,
999-
"metadata": {},
1000-
"outputs": [],
1001-
"source": [
1002-
"from spatialmath import SO3, SE2\n",
1003-
"\n",
1004-
"SO3.Ry(90, unit=\"deg\")"
1005-
]
1006-
},
1007-
{
1008-
"cell_type": "code",
1009-
"execution_count": null,
1010-
"metadata": {},
1011-
"outputs": [],
1012-
"source": [
1013-
"SE2() * SO3()"
1014-
]
1015-
},
1016-
{
1017-
"cell_type": "code",
1018-
"execution_count": null,
1019-
"metadata": {},
1020-
"outputs": [],
1021-
"source": [
1022-
"tw.exp(0)"
1023-
]
1024-
},
1025-
{
1026-
"cell_type": "code",
1027-
"execution_count": null,
1028-
"metadata": {},
1029-
"outputs": [],
1030-
"source": [
1031-
"tw.exp(1)"
1032-
]
1033-
},
1034-
{
1035-
"cell_type": "code",
1036-
"execution_count": null,
1037-
"metadata": {},
1038-
"outputs": [],
1039-
"source": [
1040-
"tw.exp([0, 1])"
1041-
]
1042-
},
1043-
{
1044-
"cell_type": "code",
1045-
"execution_count": null,
1046-
"metadata": {},
1047-
"outputs": [],
1048-
"source": [
1049-
"Twist3.P([1, 0, 0])"
1050-
]
1051-
},
1052-
{
1053-
"cell_type": "code",
1054-
"execution_count": null,
1055-
"metadata": {},
1056-
"outputs": [],
1057-
"source": [
1058-
"Twist3.Rx(0)"
1059-
]
1060-
},
1061-
{
1062-
"cell_type": "code",
1063-
"execution_count": null,
1064-
"metadata": {},
1065-
"outputs": [],
1066-
"source": []
10671009
}
10681010
],
10691011
"metadata": {
@@ -1120,6 +1062,12 @@
11201062
"_Feature"
11211063
],
11221064
"window_display": false
1065+
},
1066+
"rtb_header": {
1067+
"title": "IROS 2020 workshop: review on screw theory and geometric robot dynamics",
1068+
"paragraphs": [],
1069+
"copyright": "Peter Corke 2020, updated 2026",
1070+
"modernised": "2026-10-19"
11231071
}
11241072
},
11251073
"nbformat": 4,

0 commit comments

Comments
 (0)