|
| 1 | +#!/usr/bin/env python |
| 2 | + |
| 3 | +import numpy as np |
| 4 | +from roboticstoolbox.robot.ERobot import ERobot |
| 5 | +from math import pi |
| 6 | + |
| 7 | + |
| 8 | +class AL5D(ERobot): |
| 9 | + """ |
| 10 | + Class that imports a Puma 560 URDF model |
| 11 | +
|
| 12 | + ``Puma560()`` is a class which imports a Unimation Puma560 robot definition |
| 13 | + from a URDF file. The model describes its kinematic and graphical |
| 14 | + characteristics. |
| 15 | +
|
| 16 | + .. runblock:: pycon |
| 17 | +
|
| 18 | + >>> import roboticstoolbox as rtb |
| 19 | + >>> robot = rtb.models.URDF.AL5D() |
| 20 | + >>> print(robot) |
| 21 | +
|
| 22 | + Defined joint configurations are: |
| 23 | +
|
| 24 | + - qz, zero joint angle configuration, 'L' shaped configuration |
| 25 | + - qr, vertical 'READY' configuration |
| 26 | + - qs, arm is stretched out in the x-direction |
| 27 | + - qn, arm is at a nominal non-singular configuration |
| 28 | +
|
| 29 | + .. warning:: This file has been modified so that the zero-angle pose is the |
| 30 | + same as the DH model in the toolbox. ``j3`` rotation is changed from |
| 31 | + -𝜋/2 to 𝜋/2. Dimensions are also slightly different. Both models |
| 32 | + include the pedestal height. |
| 33 | +
|
| 34 | + .. note:: The original file is from https://github.com/nimasarli/puma560_description/blob/master/urdf/puma560_robot.urdf.xacro |
| 35 | +
|
| 36 | + .. codeauthor:: Tassos Natsakis |
| 37 | + """ |
| 38 | + |
| 39 | + def __init__(self): |
| 40 | + |
| 41 | + links, name, urdf_string, urdf_filepath = self.URDF_read( |
| 42 | + "al5d_description/urdf/al5d_robot.urdf" |
| 43 | + ) |
| 44 | + |
| 45 | + super().__init__( |
| 46 | + links, |
| 47 | + name=name, |
| 48 | + urdf_string=urdf_string, |
| 49 | + urdf_filepath=urdf_filepath, |
| 50 | + ) |
| 51 | + |
| 52 | + self.manufacturer = "Lynxmotion" |
| 53 | + # self.ee_link = self.ets[9] |
| 54 | + |
| 55 | + # zero angles, upper arm horizontal, lower up straight ahead |
| 56 | + self.addconfiguration("qz", np.array([0, 0, 0, 0])) |
| 57 | + |
| 58 | + # reference pose, arm to the right, elbow up |
| 59 | + self.addconfiguration("ru", np.array([0.0000, 0.0000, 1.5707, 0.0000])) |
| 60 | + |
| 61 | +if __name__ == "__main__": # pragma nocover |
| 62 | + |
| 63 | + robot = AL5D() |
| 64 | + print(robot) |
0 commit comments