8000 Add correct tool transform to panda · A905275/robotics-toolbox-python@0359e77 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0359e77

Browse files
committed
Add correct tool transform to panda
1 parent 8847d89 commit 0359e77

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

roboticstoolbox/models/URDF/Panda.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import numpy as np
44
from roboticstoolbox.robot.ERobot import ERobot
5+
from spatialmath import SE3
56

67

78
class Panda(ERobot):
@@ -28,29 +29,31 @@ class Panda(ERobot):
2829
.. codeauthor:: Jesse Haviland
2930
.. sectionauthor:: Peter Corke
3031
"""
32+
3133
def __init__(self):
3234

3335
links, name = self.URDF_read(
34-
"franka_description/robots/panda_arm_hand.urdf.xacro")
36+
"franka_description/robots/panda_arm_hand.urdf.xacro"
37+
)
3538

3639
super().__init__(
37< F192 /td>-
links,
38-
name=name,
39-
manufacturer='Franka Emika',
40-
gripper_links=links[9]
40+
links, name=name, manufacturer="Franka Emika", gripper_links=links[9]
41+
)
42+
43+
self.grippers[0].tool = SE3(0, 0, 0.1034)
44+
45+
self.qdlim = np.array(
46+
[2.1750, 2.1750, 2.1750, 2.1750, 2.6100, 2.6100, 2.6100, 3.0, 3.0]
4147
)
4248

43-
self.qdlim = np.array([
44-
2.1750, 2.1750, 2.1750, 2.1750, 2.6100, 2.6100, 2.6100, 3.0, 3.0])
49+
self.addconfiguration("qz", np.array([0, 0, 0, 0, 0, 0, 0]))
4550

46-
self.addconfiguration("qz", np.array(
47-
[0, 0, 0, 0, 0, 0, 0]))
51+
self.addconfiguration("qr", np.array([0, -0.3, 0, -2.2, 0, 2.0, np.pi / 4]))
4852

49-
self.addconfiguration("qr", np.array(
50-
[0, -0.3, 0, -2.2, 0, 2.0, np.pi/4]))
5153

54+
if __name__ == "__main__": # pragma nocover
5255

53-
if __name__ == '__main__': # pragma nocover
56+
r = Panda()
5457

55-
robot = Panda()
56-
print(robot)
58+
for link in r.grippers[0].links:
59+
print(link)

0 commit comments

Comments
 (0)
0