Beispiel #1
0
def set_q_gripper_command(qlimb,limb,command):
    qhand = gripper.commandToConfig(command)
    if limb=='left':
        for i in range(gripper.numDofs):
            qlimb[left_hand_link_start+i] = qhand[i]
    else:
        for i in range(gripper.numDofs):
            qlimb[right_hand_link_start+i] = qhand[i]
def set_q_gripper_command(qlimb, limb, command):
    qhand = gripper.commandToConfig(command)
    if limb == 'left':
        for i in range(gripper.numDofs):
            qlimb[left_hand_link_start + i] = qhand[i]
    else:
        for i in range(gripper.numDofs):
            qlimb[right_hand_link_start + i] = qhand[i]
Beispiel #3
0
def set_model_gripper_command(robot,limb,command):
    """Given the Baxter RobotModel 'robot' at its current configuration,
    this will set the configuration so the gripper on limb 'limb' is
    placed at the gripper command values 'command'.
    """
    qrobot = robot.getConfig()
    qhand = gripper.commandToConfig(command)
    if limb=='left':
        print "Opening left gripper to",command
        for i in range(gripper.numDofs):
            qrobot[left_hand_link_start+i] = qhand[i]
    else:
        print "Opening right gripper to",command
        for i in range(gripper.numDofs):
            qrobot[right_hand_link_start+i] = qhand[i]
    robot.setConfig(qrobot)
def set_model_gripper_command(robot, limb, command):
    """Given the Baxter RobotModel 'robot' at its current configuration,
    this will set the configuration so the gripper on limb 'limb' is
    placed at the gripper command values 'command'.
    """
    qrobot = robot.getConfig()
    qhand = gripper.commandToConfig(command)
    if limb == 'left':
        print "Opening left gripper to", command
        for i in range(gripper.numDofs):
            qrobot[left_hand_link_start + i] = qhand[i]
    else:
        print "Opening right gripper to", command
        for i in range(gripper.numDofs):
            qrobot[right_hand_link_start + i] = qhand[i]
    robot.setConfig(qrobot)
Beispiel #5
0
def set_q_gripper_command(qrobot, limb, command):
    qhand = gripper.commandToConfig(command)
    if limb == "left":
        for i in range(gripper.numDofs):
            qrobot[left_hand_link_start + i] = qhand[i]