def computeHumanTouchFrame(self, touchValve=True, reachAngle=-45):
        # 0 is top, 90 is left, -90 is right
        # positive turn is CCW
        if touchValve:
            faceDepth = 0.0
        else:
            faceDepth = self.reachDepth

        tDepth = transformUtils.frameFromPositionAndRPY([0, faceDepth, 0], [0, 0, 0])

        scribeRadius = om.findObjectByName('valve').params['radius']

        position = [0, scribeRadius * math.sin(math.radians(reachAngle)), scribeRadius * math.cos(math.radians(reachAngle))]
        # roll angle governs how much the palm points along towards the rotation axis
        # yaw ensures thumb faces the axis
        if (self.graspingObject is 'valve'):
            # valve, left and right
            rpy = [(-self.palmInAngle - 90), reachAngle, (90)]
        else:
            if (self.graspingHand is 'left'):  # lever left
                rpy = [-90, (180 + reachAngle), 90]
            else:
                rpy = [-90, reachAngle, 90]

        t = om.findObjectByName('valve').getChildFrame().transform

        t2 = transformUtils.frameFromPositionAndRPY(position, rpy)
        t3 = transformUtils.copyFrame(t)
        t3.PreMultiply()
        t3.Concatenate(t2)
        t3.Concatenate(tDepth)

        faceFrameDesired = vis.showFrame(t3, 'face frame desired', parent=om.findObjectByName('valve'), visible=False, scale=0.2)

        return faceFrameDesired
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/valvedemo.py/ValvePlannerDemo.computeHumanTouchFrame/original