|
1 | 1 | from roboticstoolbox import ETS as ET
|
2 | 2 | from roboticstoolbox import ERobot
|
3 |
| -l1 = 0.672 |
4 |
| -l2 = 0.2337 |
5 |
| -l3 = 0.4318 |
6 |
| -l4 = -0.0837 |
7 |
| -l5 = 0.4318 |
8 |
| -l6 = 0.0203 |
9 |
| - |
10 |
| -e = ET.tz(l1) * ET.rz() * ET.ty(l2) * ET.ry() * ET.tz(l3) * ET.tx(l6) * \ |
11 |
| - ET.ty(l4) * ET.ry() * ET.tz(l5) * ET.rz() * ET.ry() * ET.rz() * ET.tx(0.2) |
12 |
| - |
13 |
| -robot = ERobot(e, name="my first ERobot") |
14 |
| -print(robot) |
| 3 | +from math import pi |
| 4 | + |
| 5 | +class Puma560(ERobot): |
| 6 | + """ |
| 7 | + Create model of Franka-Emika Panda manipulator |
| 8 | +
|
| 9 | + ``puma = Puma560()`` creates a robot object representing the classic |
| 10 | + Unimation Puma560 robot arm. This robot is represented using the elementary |
| 11 | + transform sequence (ETS). |
| 12 | +
|
| 13 | + .. note:: |
| 14 | +
|
| 15 | + - The model has different joint offset conventions compared to |
| 16 | + ``DH.Puma560()``. For this robot: |
| 17 | + - Zero joint angles ``qz`` is the vertical configuration, corresponding to |
| 18 | + ``qr`` with ``DH.Puma560()`` |
| 19 | + - ``qbent`` is the bent configuration, corresponding to |
| 20 | + ``qz`` with ``DH.Puma560()`` |
| 21 | +
|
| 22 | + :references: |
| 23 | + - "A Simple and Systematic Approach to Assigning Denavit–Hartenberg |
| 24 | + Parameters,", P. I. Corke, in IEEE Transactions on Robotics, vol. 23, |
| 25 | + no. 3, pp. 590-594, June 2007, doi: 10.1109/TRO.2007.896765. |
| 26 | + - https://petercorke.com/robotics/a-simple-and-systematic-approach-to-assigning-denavit-hartenberg-parameters |
| 27 | +
|
| 28 | + """ |
| 29 | + |
| 30 | + def __init__(self): |
| 31 | + # Puma dimensions (m) |
| 32 | + l1 = 0.672 |
| 33 | + l2 = 0.2337 |
| 34 | + l3 = 0.4318 |
| 35 | + l4 = -0.0837 |
| 36 | + l5 = 0.4318 |
| 37 | + l6 = 0.0203 |
| 38 | + |
| 39 | + e = ET.tz(l1) * ET.rz() * ET.ty(l2) * ET.ry() * ET.tz(l3) * ET.tx(l6) * \ |
| 40 | + ET.ty(l4) * ET.ry() * ET.tz(l5) * ET.rz() * ET.ry() * ET.rz() * ET.tx(0.2) |
| 41 | + |
| 42 | + super().__init__( |
| 43 | + e, |
| 44 | + name='Puma560', |
| 45 | + manufacturer='Unimation', |
| 46 | + comment='ETS-based model') |
| 47 | + |
| 48 | + self.addconfiguration( |
| 49 | + "qz", [0, 0, 0, 0, 0, 0]) |
| 50 | + self.addconfiguration( |
| 51 | + "qbent", [0, -90, 90, 0, 0, 0], 'deg') |
| 52 | + |
| 53 | +if __name__ == '__main__': # pragma nocover |
| 54 | + |
| 55 | + robot = Puma560() |
| 56 | + print(robot) |
| 57 | + |
0 commit comments