Skip to content

Commit e51db9c

Browse files
committed
Created a URDF Frankie robot
1 parent c762d90 commit e51db9c

File tree

6 files changed

+423
-3
lines changed

6 files changed

+423
-3
lines changed

examples/test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414
env.launch()
1515

1616
# Create a Panda robot object
17-
puma = rtb.models.Puma560()
17+
r = rtb.models.Frankie()
1818

1919
# Set joint angles to ready configuration
20-
puma.q = puma.qr
20+
r.q = r.qr
2121

2222
# Add the puma to the simulator
23-
env.add(puma)
23+
env.add(r)
24+
25+
env.hold()
2426

2527
# Tep = puma.fkine() * sm.SE3.Tz(0.1)
2628

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env python
2+
3+
import numpy as np
4+
from roboticstoolbox.robot.ERobot import ERobot
5+
6+
7+
class Frankie(ERobot):
8+
"""
9+
Class that imports a Frankie URDF model
10+
11+
``Frankie()`` is a class which imports a Frankie robot definition
12+
from a URDF file. The model describes its kinematic and graphical
13+
characteristics.
14+
15+
.. runblock:: pycon
16+
17+
>>> import roboticstoolbox as rtb
18+
>>> robot = rtb.models.URDF.Frankie()
19+
>>> print(robot)
20+
21+
Defined joint configurations are:
22+
23+
- qz, zero joint angle configuration, 'L' shaped configuration
24+
- qr, vertical 'READY' configuration
25+
- qs, arm is stretched out in the x-direction
26+
- qn, arm is at a nominal non-singular configuration
27+
28+
.. codeauthor:: Jesse Haviland
29+
.. sectionauthor:: Peter Corke
30+
"""
31+
def __init__(self):
32+
33+
elinks, name = super().urdf_to_ets_args(
34+
"franka_description/robots/frankie_arm_hand.urdf.xacro")
35+
36+
super().__init__(
37+
elinks,
38+
name=name,
39+
manufacturer='Franka Emika',
40+
gripper_links=elinks[11]
41+
)
42+
43+
print(self)
44+
45+
self.qdlim = np.array([
46+
4.0, 4.0,
47+
2.1750, 2.1750, 2.1750, 2.1750, 2.6100, 2.6100, 2.6100,
48+
3.0, 3.0])
49+
50+
self.addconfiguration("qz", np.array(
51+
[0, 0, 0, 0, 0, 0, 0, 0, 0]))
52+
53+
self.addconfiguration("qr", np.array(
54+
[0, 0, 0, -0.3, 0, -2.2, 0, 2.0, np.pi/4]))
55+
56+
57+
if __name__ == '__main__': # pragma nocover
58+
59+
robot = Frankie()
60+
print(robot)

roboticstoolbox/models/URDF/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from roboticstoolbox.models.URDF.Panda import Panda
2+
from roboticstoolbox.models.URDF.Frankie import Frankie
23
from roboticstoolbox.models.URDF.UR3 import UR3
34
from roboticstoolbox.models.URDF.UR5 import UR5
45
from roboticstoolbox.models.URDF.UR10 import UR10
@@ -17,6 +18,7 @@
1718

1819
__all__ = [
1920
'Panda',
21+
'Frankie',
2022
'UR3',
2123
'UR5',
2224
'UR10',
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="frankie">
3+
<xacro:include filename="$(find franka_description)/robots/frankie_arm.xacro" />
4+
<xacro:panda_arm safety_distance="0.00"/>
5+
</robot>

0 commit comments

Comments
 (0)