Commit f7271a3f authored by François Keith's avatar François Keith
Browse files

Merge pull request #6 from francois-keith/master

Add gripper frames and correct the initialization of the hand frames
parents 5d031641 88edc12f
...@@ -296,21 +296,18 @@ class AbstractHumanoidRobot (object): ...@@ -296,21 +296,18 @@ class AbstractHumanoidRobot (object):
# --- additional frames --- # --- additional frames ---
self.frames = dict() self.frames = dict()
frameName = 'rightHand' frameName = 'rightHand'
hp = self.dynamic.getHandParameter (True)
transformation = list (map (list, I4))
for i in range (3): transformation [i][3] = hp [i][3]
transformation = tuple (map (tuple, transformation))
self.frames [frameName] = self.createFrame ( self.frames [frameName] = self.createFrame (
"{0}_{1}".format (self.name, frameName), "{0}_{1}".format (self.name, frameName),
transformation, "right-wrist") self.dynamic.getHandParameter (True), "right-wrist")
# rightGripper is an alias for the rightHand:
self.frames ['rightGripper'] = self.frames [frameName]
frameName = 'leftHand' frameName = 'leftHand'
hp = self.dynamic.getHandParameter (False)
transformation = list (map (list, I4))
for i in range (3): transformation [i][3] = hp [i][3]
transformation = tuple (map (tuple, transformation))
self.frames [frameName] = self.createFrame ( self.frames [frameName] = self.createFrame (
"{0}_{1}".format (self.name, frameName), "{0}_{1}".format (self.name, frameName),
self.dynamic.getHandParameter (False), "left-wrist") self.dynamic.getHandParameter (False), "left-wrist")
# leftGripper is an alias for the leftHand:
self.frames ["leftGripper"] = self.frames [frameName]
for (frameName, transformation, signalName) in self.AdditionalFrames: for (frameName, transformation, signalName) in self.AdditionalFrames:
self.frames[frameName] = self.createFrame( self.frames[frameName] = self.createFrame(
......
...@@ -436,7 +436,7 @@ Dynamic( const std::string & name, bool build ) ...@@ -436,7 +436,7 @@ Dynamic( const std::string & name, bool build )
" Get geometric parameters of hand.\n" " Get geometric parameters of hand.\n"
" \n" " \n"
" Input\n" " Input\n"
" - a boolean: whether right foot or not,\n" " - a boolean: whether right hand or not,\n"
" Return\n" " Return\n"
" - a matrix 4 by 4 the columns of which respectively represent\n" " - a matrix 4 by 4 the columns of which respectively represent\n"
" - the thumb axis,\n" " - the thumb axis,\n"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment