Add correct tool transform to panda
import numpy as np
from roboticstoolbox.robot.ERobot import ERobot
+from spatialmath import SE3
class Panda(ERobot):
@@ -28,29 +29,31 @@ class Panda(ERobot):
.. codeauthor:: Jesse Haviland
.. sectionauthor:: Peter Corke
"""
+
def __init__(self):
links, name = self.URDF_read(
- "franka_description/robots/panda_arm_hand.urdf.xacro")
+ "franka_description/robots/panda_arm_hand.urdf.xacro"
+ )
super().__init__(
- links,
- name=name,
- manufacturer='Franka Emika',
- gripper_links=links[9]
+ links, name=name, manufacturer="Franka Emika", gripper_links=links[9]
+ )
+
+ self.grippers[0].tool = SE3(0, 0, 0.1034)
+
+ self.qdlim = np.array(
+ [2.1750, 2.1750, 2.1750, 2.1750, 2.6100, 2.6100, 2.6100, 3.0, 3.0]
)
- self.qdlim = np.array([
- 2.1750, 2.1750, 2.1750, 2.1750, 2.6100, 2.6100, 2.6100, 3.0, 3.0])
+ self.addconfiguration("qz", np.array([0, 0, 0, 0, 0, 0, 0]))
- self.addconfiguration("qz", np.array(
- [0, 0, 0, 0, 0, 0, 0]))
+ self.addconfiguration("qr", np.array([0, -0.3, 0, -2.2, 0, 2.0, np.pi / 4]))
- self.addconfiguration("qr", np.array(
- [0, -0.3, 0, -2.2, 0, 2.0, np.pi/4]))
+if __name__ == "__main__": # pragma nocover
-if __name__ == '__main__': # pragma nocover
+ r = Panda()
- robot = Panda()
- print(robot)
+ for link in r.grippers[0].links:
+ print(link)
