def USBCamSwitchCamera(camera):
    r"""Switch currently streaming cam

    Parameters
    ---------
    camera : int
        Number of camera from /dev/video*
    """
    if not is_strict_int(camera):
        raise InvalidParametersException()

    USBCam.switchCamera(camera)
Exemplo n.º 2
0
def USBCamSwitchCamera(camera):
    r"""Switch currently streaming cam

    Parameters
    ---------
    camera : int
        Number of camera from /dev/video*
    """
    if not is_strict_int(camera):
        raise InvalidParametersException()

    USBCam.switchCamera(camera)
Exemplo n.º 3
0
def setWheelSpeed(wheel, speed):
    r"""Sets speed of a specified wheel of rover.

    Parameters
    ----------
    wheel : int
        Wheel selector.
    speed : int
        Target speed in scale 1-100.

    Returns
    -------
    status_code : int
        Returns 0, because we want to handle errors and thats impossible with
        notifications.
    """

    if not (is_strict_int(wheel) and is_strict_int(speed)):
        raise InvalidParametersException()

    status_code = 0
    return status_code
def setWheelSpeed(wheel, speed):
    r"""Sets speed of a specified wheel of rover.

    Parameters
    ----------
    wheel : int
        Wheel selector.
    speed : int
        Target speed in scale 1-100.

    Returns
    -------
    status_code : int
        Returns 0, because we want to handle errors and thats impossible with
        notifications.
    """

    if not (is_strict_int(wheel) and is_strict_int(speed)):
        raise InvalidParametersException()

    status_code = 0
    return status_code
Exemplo n.º 5
0
def setJointSpeed(joint, speed):
    r"""Sets speed of a specified joint.

    Parameters
    ----------
    joint : int
        Joint selector.
    speed : int
        Target speed in scale 1-100.

    Returns
    -------
    status_code : int
        Returns 0, because we want to handle errors and thats impossible with
        notifications.
    """

    if not (is_strict_int(joint) and is_strict_int(speed)):
        raise InvalidParametersException()

    # Body
    status_code = 0
    return status_code
Exemplo n.º 6
0
def USBCamStartStream(camera):
    r"""
    Starts camera streaming -> need to know params for vlc from camera.sdp file

    Parameters
    ----------
    camera : int
        Number of camera from /dev/video*
    """

    if not is_strict_int(camera):
        raise InvalidParametersException()

    USBCam.startStream(camera)
def setJointSpeed(joint, speed):
    r"""Sets speed of a specified joint.

    Parameters
    ----------
    joint : int
        Joint selector.
    speed : int
        Target speed in scale 1-100.

    Returns
    -------
    status_code : int
        Returns 0, because we want to handle errors and thats impossible with
        notifications.
    """

    if not (is_strict_int(joint) and is_strict_int(speed)):
        raise InvalidParametersException()

    # Body
    status_code = 0
    return status_code
def USBCamStartStream(camera):
    r"""
    Starts camera streaming -> need to know params for vlc from camera.sdp file

    Parameters
    ----------
    camera : int
        Number of camera from /dev/video*
    """

    if not is_strict_int(camera):
        raise InvalidParametersException()

    USBCam.startStream(camera)
Exemplo n.º 9
0
def getJointSpeed(joint):
    r"""Returns speed of a specified joint.

    Parameters
    ----------
    joint : int
        Joint selector.

    Returns
    -------
    speed: int
        Speed of a specified joint in scale 1-100.
    """

    if not is_strict_int(joint):
        raise InvalidParametersException()

    speed = 0
    return speed
Exemplo n.º 10
0
def getJointAngle(joint):
    r"""Returns angle of a specified joint.

    Parameters
    ----------
    joint : int
        Joint selector.

    Returns
    -------
    angle : float
        Angle of a specified joint in radians.
    """

    if not is_strict_int(joint):
        raise InvalidParametersException()

    angle = 0.0
    return angle
Exemplo n.º 11
0
def getWheelSpeed(wheel):
    r"""Returns speed of a specified wheel.

    Parameters
    ----------
    wheel : int
        Wheel selector.

    Returns
    -------
    speed: int
        Speed of a specified wheel in radians.
    """

    if not is_strict_int(wheel):
        raise InvalidParametersException()

    speed = 0
    return speed
def getJointSpeed(joint):
    r"""Returns speed of a specified joint.

    Parameters
    ----------
    joint : int
        Joint selector.

    Returns
    -------
    speed: int
        Speed of a specified joint in scale 1-100.
    """

    if not is_strict_int(joint):
        raise InvalidParametersException()

    speed = 0
    return speed
def getJointAngle(joint):
    r"""Returns angle of a specified joint.

    Parameters
    ----------
    joint : int
        Joint selector.

    Returns
    -------
    angle : float
        Angle of a specified joint in radians.
    """

    if not is_strict_int(joint):
        raise InvalidParametersException()

    angle = 0.0
    return angle
def getWheelSpeed(wheel):
    r"""Returns speed of a specified wheel.

    Parameters
    ----------
    wheel : int
        Wheel selector.

    Returns
    -------
    speed: int
        Speed of a specified wheel in radians.
    """

    if not is_strict_int(wheel):
        raise InvalidParametersException()

    speed = 0
    return speed
Exemplo n.º 15
0
def setJointAngle(joint, angle):
    r"""Sets angle of a specified joint.

    Parameters
    ----------
    joint : int
        Joint selector.
    angle : float
        Target angle in radians.

    Returns
    -------
    status_code : int
        Returns 0, because we want to handle errors and thats impossible with
        notifications.
    """

    if not (is_strict_int(joint) and isinstance(angle, float)):
        raise InvalidParametersException()

    # add validation
    response = manipulator.joints[joint].set_angle(angle)
    status_code = response.status
    return status_code
def setJointAngle(joint, angle):
    r"""Sets angle of a specified joint.

    Parameters
    ----------
    joint : int
        Joint selector.
    angle : float
        Target angle in radians.

    Returns
    -------
    status_code : int
        Returns 0, because we want to handle errors and thats impossible with
        notifications.
    """

    if not (is_strict_int(joint) and isinstance(angle, float)):
        raise InvalidParametersException()

    # add validation
    response = manipulator.joints[joint].set_angle(angle)
    status_code = response.status
    return status_code