11from cached_property import cached_property
2+ import numpy as np
23
4+ from ..coordinates import CascadedCoords
35from ..data import panda_urdfpath
46from ..model import RobotModel
57from .urdf import RobotModelFromURDF
@@ -14,6 +16,15 @@ class Panda(RobotModelFromURDF):
1416
1517 def __init__ (self , * args , ** kwargs ):
1618 super (Panda , self ).__init__ (* args , ** kwargs )
19+
20+ # End effector coordinate frame
21+ # Based on franka_ros configuration:
22+ # https://github.com/frankaemika/franka_ros/blob/0.10.1/franka_description/robots/common/franka_robot.xacro#L8
23+ self .rarm_end_coords = CascadedCoords (
24+ pos = [0 , 0 , 0.1034 ],
25+ parent = self .panda_hand ,
26+ name = 'rarm_end_coords' )
27+ self .rarm_end_coords .rotate (np .deg2rad (- 90 ), 'y' )
1728 self .reset_pose ()
1829
1930 @cached_property
@@ -44,5 +55,5 @@ def rarm(self):
4455 links = [getattr (self , n ) for n in link_names ]
4556 joints = [l .joint for l in links ]
4657 model = RobotModel (link_list = links , joint_list = joints )
47- model .end_coords = self .panda_hand
58+ model .end_coords = self .rarm_end_coords
4859 return model
0 commit comments