Skip to content

Commit 4629255

Browse files
committed
make into proper class
1 parent f26f883 commit 4629255

File tree

2 files changed

+59
-13
lines changed

2 files changed

+59
-13
lines changed

roboticstoolbox/models/ETS/Puma560.py

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,57 @@
11
from roboticstoolbox import ETS as ET
22
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+
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from roboticstoolbox.models.ETS.Panda import Panda
22
from roboticstoolbox.models.ETS.Frankie import Frankie
3+
from roboticstoolbox.models.ETS.Puma560 import Puma560
4+
35

46
__all__ = [
57
'Panda',
6-
'Frankie'
8+
'Frankie',
9+
'Puma560',
710
]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy