-
Notifications
You must be signed in to change notification settings - Fork 499
/
Copy pathUR3.py
48 lines (33 loc) · 1.22 KB
/
UR3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python
import numpy as np
from roboticstoolbox.robot.ERobot import ERobot
class UR3(ERobot):
"""
Class that imports a UR3 URDF model
``UR3()`` is a class which imports a Universal Robotics UR3 robot
definition from a URDF file. The model describes its kinematic and
graphical characteristics.
.. runblock:: pycon
>>> import roboticstoolbox as rtb
>>> robot = rtb.models.URDF.UR3()
>>> print(robot)
Defined joint configurations are:
- qz, zero joint angle configuration, 'L' shaped configuration
- qr, vertical 'READY' configuration
.. codeauthor:: Jesse Haviland
.. sectionauthor:: Peter Corke
"""
def __init__(self):
elinks, name = self.urdf_to_ets_args(
"ur_description/urdf/ur3_joint_limited_robot.urdf.xacro")
super().__init__(
elinks,
name=name,
manufacturer='Universal Robotics',
gripper_links=elinks[7]
)
self.addconfiguration("qz", np.array([0, 0, 0, 0, 0, 0]))
self.addconfiguration("qr", np.array([np.pi, 0, 0, 0, np.pi/2, 0]))
if __name__ == '__main__': # pragma nocover
robot = UR3()
print(robot)