|
1 | 1 | { |
2 | 2 | "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": {}, |
| 6 | + "source": [ |
| 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;\">A branched robot</div>\n", |
| 17 | + "<p></p>\n", |
| 18 | + "\n", |
| 19 | + "(c) Peter Corke 2026\n", |
| 20 | + "\n", |
| 21 | + "A robot with more than one end-effector: its forward kinematics and Jacobian for each branch, extracting the ETS of a branch, and drawing the robot as a graph. Drawing the graphs needs [Graphviz](https://graphviz.org) (the `dot` command) installed.\n", |
| 22 | + "\n", |
| 23 | + "> **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." |
| 24 | + ] |
| 25 | + }, |
3 | 26 | { |
4 | 27 | "cell_type": "code", |
5 | 28 | "execution_count": null, |
|
61 | 84 | "outputs": [], |
62 | 85 | "source": [ |
63 | 86 | "import roboticstoolbox as rtb\n", |
64 | | - "from IPython.core.display import SVG" |
| 87 | + "from IPython.display import SVG" |
65 | 88 | ] |
66 | 89 | }, |
67 | 90 | { |
68 | 91 | "cell_type": "markdown", |
69 | 92 | "metadata": {}, |
70 | 93 | "source": [ |
71 | | - "We will load a model for a simple Y-shaped planar robot. Check out the source code to see how the model was constructed using `ELink` and `ERobot` classes." |
| 94 | + "We will load a model for a simple Y-shaped planar robot. Check out the source code to see how the model was constructed using `Link` and `Robot` classes." |
72 | 95 | ] |
73 | 96 | }, |
74 | 97 | { |
|
140 | 163 | "metadata": {}, |
141 | 164 | "outputs": [], |
142 | 165 | "source": [ |
143 | | - "robot.fkine(robot.qz, endlink=\"eea\")" |
| 166 | + "robot.fkine(robot.qz, end=\"eea\")" |
144 | 167 | ] |
145 | 168 | }, |
146 | 169 | { |
|
156 | 179 | "metadata": {}, |
157 | 180 | "outputs": [], |
158 | 181 | "source": [ |
159 | | - "robot.fkine(robot.qz, endlink=\"eeb\")" |
| 182 | + "robot.fkine(robot.qz, end=\"eeb\")" |
160 | 183 | ] |
161 | 184 | }, |
162 | 185 | { |
|
172 | 195 | "metadata": {}, |
173 | 196 | "outputs": [], |
174 | 197 | "source": [ |
175 | | - "robot.jacob0(robot.qz, endlink=\"eea\")" |
| 198 | + "robot.jacob0(robot.qz, end=\"eea\")" |
176 | 199 | ] |
177 | 200 | }, |
178 | 201 | { |
|
196 | 219 | "cell_type": "markdown", |
197 | 220 | "metadata": {}, |
198 | 221 | "source": [ |
199 | | - "and we could easily turn this into an unbranched robot represented by an `ERobot` instance" |
| 222 | + "and we could easily turn this into an unbranched robot represented by an `Robot` instance" |
200 | 223 | ] |
201 | 224 | }, |
202 | 225 | { |
|
205 | 228 | "metadata": {}, |
206 | 229 | "outputs": [], |
207 | 230 | "source": [ |
208 | | - "r = rtb.ERobot(p, checkjindex=False)\n", |
| 231 | + "r = rtb.Robot(p, check_jindex=False)\n", |
209 | 232 | "print(r)" |
210 | 233 | ] |
211 | 234 | }, |
212 | 235 | { |
213 | 236 | "cell_type": "markdown", |
214 | 237 | "metadata": {}, |
215 | 238 | "source": [ |
216 | | - "This robot has 5 links but only 4 joint angles which are inherited from the original branched robot: `q0`, `q1`, `q4` and `q5`. If invoking its `fkine` method you must pass in a vector with at least 6 elements, but only 4 elements will be used.\n", |
| 239 | + "This robot has 5 links but only 4 joint angles which are inherited from the original branched robot: `q0`, `q1`, `q4` and `q5`. Its `fkine` method accepts either a vector of the four joint angles, in order, or a vector of six elements indexed by the original joint numbers, in which case `q2` and `q3` are ignored.\n", |
217 | 240 | "\n", |
218 | 241 | "We can also find the transformation between any two links in the robot. In this case, from one end effector to the other, from link eea to link eeb" |
219 | 242 | ] |
|
359 | 382 | "_Feature" |
360 | 383 | ], |
361 | 384 | "window_display": false |
| 385 | + }, |
| 386 | + "rtb_header": { |
| 387 | + "title": "A branched robot", |
| 388 | + "paragraphs": [ |
| 389 | + "A robot with more than one end-effector: its forward kinematics and Jacobian for each branch, extracting the ETS of a branch, and drawing the robot as a graph. Drawing the graphs needs [Graphviz](https://graphviz.org) (the `dot` command) installed." |
| 390 | + ], |
| 391 | + "modernised": "2026-10-19" |
362 | 392 | } |
363 | 393 | }, |
364 | 394 | "nbformat": 4, |
|
0 commit comments