|
| 1 | +Backend methods |
| 2 | + |
| 3 | +- launch, creates the axes |
| 4 | +- close, close the axes |
| 5 | +- add, a robot, ellipse/oid, shape |
| 6 | +- remove, a robot, ellipse/oid, shape |
| 7 | +- step, update all shapes |
| 8 | + |
| 9 | + |
| 10 | +## add |
| 11 | + |
| 12 | +``` |
| 13 | +add(shape, [shape specific options]) |
| 14 | +
|
| 15 | + if robot: |
| 16 | + # create a mirror object that has a reference to the user's object |
| 17 | + # call .draw() on it |
| 18 | + if ellipse: |
| 19 | + # add it to list |
| 20 | + # call .draw() on it |
| 21 | +``` |
| 22 | + |
| 23 | +robot object options: |
| 24 | + |
| 25 | +- readonly, |
| 26 | +- display, |
| 27 | +- jointaxes, show joint axes |
| 28 | +- jointlabels, show joint labels |
| 29 | +- eeframe, show ee frame |
| 30 | +- shadow, show shadow |
| 31 | +- name, show name |
| 32 | +- options, detailed appearance options for robot, shadow, labels, eeframe |
| 33 | + |
| 34 | +`.draw()` |
| 35 | +- onetime, init the line segments |
| 36 | +- compute fkine_all |
| 37 | +- update line segments, shadows, ee frame |
| 38 | + |
| 39 | + |
| 40 | +ellipse object options: |
| 41 | + |
| 42 | +- robot, robot it is attached to |
| 43 | +- q |
| 44 | +- etype, ellipse type: v or f |
| 45 | +- opt |
| 46 | +- centre |
| 47 | +- scale |
| 48 | + |
| 49 | +Attributes: |
| 50 | +- ell, the MPL handle |
| 51 | + |
| 52 | +`.draw()` |
| 53 | +- remove old ellipse |
| 54 | +- compute Jacobian to get ellipse matrix |
| 55 | +- compute fkine to get ellipse centre |
| 56 | +- draw new ellipse |
| 57 | + |
| 58 | +## step |
| 59 | + |
| 60 | +``` |
| 61 | +step(dt) |
| 62 | +
|
| 63 | + # update state by control mode p/v/a |
| 64 | + # call .draw() on all robots in list |
| 65 | + # call .draw() on all ellipses in list |
| 66 | +``` |
| 67 | + |
0 commit comments