22
33import numpy as np
44from roboticstoolbox .robot .ERobot import ERobot
5+ from spatialmath import SE3
56
67
78class 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- 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