Skip to content

Commit 0a70ab7

Browse files
committed
Adding definition for Lynxmotion AL5D robot
1 parent 51aa8bb commit 0a70ab7

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

roboticstoolbox/models/DH/AL5D.py

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import numpy as np
2+
from roboticstoolbox import DHRobot, RevoluteMDH
3+
from spatialmath import SE3
4+
5+
6+
class AL5D(DHRobot):
7+
"""
8+
Class that models a Lynxmotion AL5D manipulator
9+
10+
:param symbolic: use symbolic constants
11+
:type symbolic: bool
12+
13+
``AL5D()`` is an object which models a Lynxmotion AL5D robot and
14+
describes its kinematic and dynamic characteristics using modified DH
15+
conventions.
16+
17+
.. runblock:: pycon
18+
19+
>>> import roboticstoolbox as rtb
20+
>>> robot = rtb.models.DH.AL5D()
21+
>>> print(robot)
22+
23+
Defined joint configurations are:
24+
25+
- qz, zero joint angle configuration
26+
27+
.. note::
28+
- SI units are used.
29+
30+
:References:
31+
32+
- 'Reference of the robot <http://www.lynxmotion.com/c-130-al5d.aspx>'_
33+
34+
35+
.. codeauthor:: Tassos Natsakis
36+
""" # noqa
37+
38+
def __init__(self, symbolic=False):
39+
40+
if symbolic:
41+
import spatialmath.base.symbolic as sym
42+
zero = sym.zero()
43+
pi = sym.pi()
44+
else:
45+
from math import pi
46+
zero = 0.0
47+
48+
# robot length values (metres)
49+
a = [0, 0.002, 0.14679, 0.17751]
50+
d = [-0.06858, 0, 0, 0]
51+
52+
alpha = [pi, pi/2, pi, pi]
53+
offset = [pi/2, pi, -0.0427, -0.0427-pi/2]
54+
55+
# mass data not yet available
56+
links = []
57+
58+
for j in range(4):
59+
link = RevoluteMDH(
60+
d=d[j],
61+
a=a[j],
62+
alpha=alpha[j],
63+
offset=offset[j],
64+
G=1
65+
)
66+
links.append(link)
67+
68+
tool=SE3(0.07719,0,0)
69+
70+
super().__init__(
71+
links,
72+
name="AL5D",
73+
manufacturer="Lynxmotion",
74+
keywords=('dynamics', 'symbolic'),
75+
symbolic=symbolic,
76+
tool=tool
77+
)
78+
79+
# zero angles
80+
self.addconfiguration("home", np.array([pi/2, pi/2, pi/2, pi/2]))
81+
82+
if __name__ == '__main__': # pragma nocover
83+
84+
al5d = AL5D(symbolic=False)
85+
print(al5d)
86+
print(al5d.dyntable())

roboticstoolbox/models/DH/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from roboticstoolbox.models.DH.TwoLink import TwoLink
2222
from roboticstoolbox.models.DH.Hyper3d import Hyper3d
2323
from roboticstoolbox.models.DH.P8 import P8
24+
from roboticstoolbox.models.DH.AL5D import AL5D
2425

2526

2627
__all__ = [
@@ -47,4 +48,5 @@
4748
'Baxter',
4849
'TwoLink',
4950
'P8',
51+
'AL5D',
5052
]

0 commit comments

Comments
 (0)