Go to the documentation of this file.00001 from actions.Pr2MoveHeadAction import Pr2MoveHeadAction
00002 from actions.Pr2MoveLeftArmAction import Pr2MoveLeftArmAction
00003 from actions.Pr2MoveLeftGripperAction import Pr2MoveLeftGripperAction
00004 from actions.Pr2MoveRightArmAction import Pr2MoveRightArmAction
00005 from actions.Pr2MoveRightGripperAction import Pr2MoveRightGripperAction
00006 from actions.Pr2MoveTorsoAction import Pr2MoveTorsoAction
00007 from ActionSet import ActionSet
00008
00009 class DefaultAction(ActionSet):
00010
00011 def __init__(self):
00012 super(DefaultAction, self).__init__()
00013
00014 head = Pr2MoveHeadAction()
00015 valuesh = head.values()
00016 valuesh[0] = 0
00017 valuesh[1] = -2
00018 head.set_values(valuesh)
00019 self.add_action(head)
00020
00021 torso = Pr2MoveTorsoAction()
00022 valuest = torso.values()
00023 valuest[0] = 0
00024 torso.set_values(valuest)
00025 self.add_action(torso)
00026
00027 lgrip = Pr2MoveLeftGripperAction()
00028
00029 valuesg = [0.04]
00030 lgrip.set_values(valuesg)
00031 self.add_action(lgrip)
00032
00033 rgrip = Pr2MoveRightGripperAction()
00034
00035 valuesg = [0.04]
00036 rgrip.set_values(valuesg)
00037 self.add_action(rgrip)
00038
00039 larm = Pr2MoveLeftArmAction()
00040 lvalues = larm.values()
00041 lvalues[0] = 35
00042 lvalues[1] = 63
00043 lvalues[2] = 122
00044 lvalues[3] = -106
00045 lvalues[4] = -60
00046 lvalues[5] = 0
00047 lvalues[6] = 0
00048 larm.set_values(lvalues)
00049 self.add_action(larm)
00050
00051 rarm = Pr2MoveRightArmAction()
00052 rvalues = rarm.values()
00053 rvalues[0] = -72
00054 rvalues[1] = 74
00055 rvalues[2] = -62
00056 rvalues[3] = -60
00057 rvalues[4] = -3
00058 rvalues[5] = 0
00059 rvalues[6] = 0
00060 rarm.set_values(rvalues)
00061 self.add_action(rarm)