Ejemplo n.º 1
0
def change_wrist(body):
    """
    Set wrist location

    :param body: Location object
    :type body: dict | bytes

    :rtype: Location
    """
    if connexion.request.is_json:
        body = Location.from_dict(connexion.request.get_json())

    location = body.location

    AX12.wrist(location)

    return Location(location)
Ejemplo n.º 2
0
def change_wrist_torque(body):
    """
    Set wrist torque

    :param body: Sate object
    :type body: dict | bytes

    :rtype: State
    """
    if connexion.request.is_json:
        body = State.from_dict(connexion.request.get_json())

    state = body.state

    AX12.set_wrist_state(state)

    return State(state)
Ejemplo n.º 3
0
def read_wrist():
    """
    Get wrist location


    :rtype: Location
    """
    location = AX12.get_wrist()

    return Location(location)
Ejemplo n.º 4
0
def read_grip():
    """
    Get grip location


    :rtype: Location
    """
    location = AX12.get_grip()

    return Location(location)
Ejemplo n.º 5
0
def read_pivot():
    """
    Get pivot location


    :rtype: Location
    """
    location = AX12.get_pivot()

    return Location(location)
Ejemplo n.º 6
0
def read_elbow():
    """
    Get elbow location


    :rtype: Location
    """
    location = AX12.get_elbow()

    return Location(location)
Ejemplo n.º 7
0
def read_shoulder():
    """
    Get shoulder location


    :rtype: Location
    """
    location = AX12.get_shoulder()

    return Location(location)
Ejemplo n.º 8
0
def read_hand():
    """
    Get hand location


    :rtype: Location
    """
    location = AX12.get_hand()

    return Location(location)