Edge API Function Reference

  1. Configuration and Calibration
    1. get_projection_matrix
    2. patch_configuration_by_product
    3. patch_configuration
    4. load_configuration
    5. handeye_calibration
    6. handeye_calibration_one_shot
  2. Image Aquisition
    1. trigger
    2. save_image
    3. submit_pose
  3. Result Retrieval
    1. get_pose
    2. get_number_of_detections

Configuration and Calibration

get_projection_matrix

get_projection_matrix(product_id)

Triggers an image capture and updates the intrinsic camera parameters associated with a product. It is recommended to execute intrinsic calibration just before arming a product and running inference for optimal precision.

Arguments:

  • product_id (str): Identifier of the product for which the calibration is performed.

Return Value:

A \(3\times 3\) intrinsic projection matrix flatted in column-major ordering.

patch_configuration_by_product

patch_configuration_by_product(product_id, service, workflow, key, value)

Overwrites a (nested) value in a configuration. The configuration to edit is retrieved based on a product id, service name, and workflow. If the configuration does not exist, it is created.

Arguments:

  • product_id (string): Database id of the product id to which the configuration belongs.
  • service (string): Service to which the configuration belongs.
  • workflow (string): Workflow to which the configuration belongs.
  • key (string): Path of the property in the configuration object to patch.
  • value: Desired new value.

patch_configuration

patch_configuration(config_id, key, value)

Overwrites a (nested) value in a configuration.

The configurations for a product, device, and service can be obtained through calls against accompanying REST API.

Arguments:

  • config_id (string): Database id of the configuration to patch.
  • key (string): Path of the property in the configuration object to patch.
  • value: Desired new value.

load_configuration

load_configuration(product, workflow)

Trigger a reload of the configuration of the inference pipeline.

Arguments:

  • product (string): Product identifier.
  • workflow (string): Name of the workflow to configure.

handeye_calibration

handeye_calibration(session,
                    product_id,
                    representation='vector',
                    degrees=False,
                    eye_in_hand=False,
                    pattern_side_length=0.025,
                    pattern_width=10,
                    pattern_height=7,
                    service='3d.handeye.calibration.vathos.net')

Start a hand-eye calibration based on a series of input images and poses.

Arguments:

  • session (str): A common session name under which the images for this calibration were stored. Must match the value used when creating the calibration data set with save_image.
  • product_id (str): Identifier of the product for which the calibration is performed.
  • representation (string): Representation of the rotational part of the pose returned. A list of supported keywords is found here.
  • degrees (bool): True if rotational part of the pose is defined in degrees, False if defined in radians.
  • eye_in_hand: True if the camera is mounted on the end-effector of the robot, False for static cameras.
  • pattern_sidelength (float): Length of squares in the pattern in meters.
  • pattern_width (int): Number of inner corners of the pattern in horizontal direction.
  • pattern_height (int): Number of inner corners of the pattern in vertical direction.
  • service (str): Either '3d.handeye.calibration.vathos.net' or '1d.handeye.calibration.vathos.net' depending on whether depth should be considered during calibration.

Return Value:

A list of 6 real numbers representing the desired camera pose (relative to the flange for eye_in_hand=True or a robot (user) base otherwise). The pose is in the same format in terms of rotation group parametrization and units as the input poses recorded with save_image.

handeye_calibration_one_shot

handeye_calibration_one_shot(origin,
                    x,
                    y,
                    capture_pose,
                    representation='vector',
                    degrees=False)

Execute a hand-eye calibration based on a single pattern resection. This method only supports the eye-in-hand case and is particularly suited when the absolute robot positioning accuracy varies spatially or no set of poses could be found over a region of sufficiently accurate pose readings.

Arguments:

  • origin (list): Location of the pattern origin relative to the world/robot coordinate system. List of 3 coordinates in meters.
  • x (list): Location of a point on the x axis of the pattern coordinate system relative to the world/robot coordinate system. List of 3 coordinates in meters.
  • y (list): Location of a point on the y axis of the pattern coordinate system relative to the world/robot coordinate system. List of 3 coordinates in meters.
  • capture_pose (list): Pose of the flange coordinate system when capturing the pattern relative to world/robot coordinates. 6 pose parameters = 3 translational parameters in m, 3 rotational parameters interpreted according to the remaining arguments.
  • representation (string): Representation of the rotational part of the pose returned. A list of supported keywords is found here.
  • degrees (bool): True if rotational part of the pose is defined in degrees, False if defined in radians.

All dimensional variables processed or returned by the API are assumed to be in the SI base unit meters. Most robot vendors, however, choose to represent length in millimeters. Conversion between the two is the responsibility of the client application.

Return Value:

A list of 6 real numbers representing the desired camera pose (relative to the flange for eye_in_hand=True or a robot (user) base otherwise). The pose is in the same format in terms of rotation group parametrization and units as capture_pose.

Image Aquisition

trigger

trigger(workflow, 
        wait_for_camera=False, 
        modality='depth'
        cam2plane=None,
        representation='vector',
        degrees=False,
        product_index=-1)

Triggers the inference pipeline but does so in an asynchronous way, i.e., the function returns as soon as the image capture is started without waiting for the first detection to arrive. Polling mechanisms may be built into service-specific functions which are called to obtain the result of an image analysis.

Arguments:

  • workflow (string): Name of inference pipeline to run.
  • wait_for_camera (boolean): True if this function should return after image acquisition is complete. This is useful in situations where the camera is mounted to the end-effector of the robot and moving while capture is in progress would lead to image blur. False if this function should return immediately after triggering (e.g., when the camera is static).
  • modality (string): Either 'depth' or 'rgb'. Selects the pipeline to trigger in case two sensors of different modalities are connected.
  • cam2plane (list): List containing 6 floats, representing the current camera pose relative to some shared reference coordinate system of the scene. The reference coordinate system could be, e.g., the robot’s world coordinate system, a user frame, or a CAD model coordinate system attached to some (detected) item in the scene. The first three values denote the position in space in meters, the last three a rotation/orientation encoded as defined by representation. When cam2plane=None, a coordinate system on the calibrated base plane is used.
  • representation (string): Representation of the rotational part of the pose returned. A list of supported keywords is found here.
  • degrees (boolean): True if rotational part of the pose is defined in degrees, False otherwise.
  • product_index (int): For multi-model products only search for the model that matches this argument’s value. When product_index is -1, return detections of all models.

save_image

save_image(stream_no, pose, representation='vector', degrees=False, session=None, joint_angles=[])

Triggers an image capture and stores the current camera pose with it. Note that just the data is stored but no analysis takes place.

Arguments:

  • stream_no (integer): The number of the stream (e.g., depth or RGB) to save. When a negative integer is passed, all streams are saved. This is necessary for setting service='3d.handeye.calibration.vathos.net' in handeye_calibration.
  • pose (list): List containing 6 floats, representing the current flange pose. The first three values denote the position in space in meters, the last three a rotation/orientation encoded as defined by representation.
  • representation (string): Representation of the rotational part of the pose returned. A list of supported keywords is found here.
  • degrees (boolean): True if rotational part of the pose is defined in degrees, False otherwise.
  • session (str): A unique session id to attach to the image to combine multiple images into a data set, e.g., for hand-eye calibration.
  • joint_angles (list): An optional list of floats indicating the current joint positions at the time of capture in radians.

Return Value:

A list of strings, each representing an id of the stored image’s metadata.

submit_pose

submit_pose(pose, 
         representation,
         degrees,
         class_index,
         grip_index=-1)

Starts refinement of an approximately known object or grip pose relative to the current image.

Arguments:

  • pose (list): Initial 6D pose of the object relative to the camera coordinate system. Can be a raw object pose or a TCP pose. In the latter case, grip_index needs to be set appropriately.
  • representation (string): Representation of the rotational part of the submitted pose. A list of supported arguments is found here.
  • degrees (boolean): True if rotational part of the pose is defined in degrees, False if defined in radians.
  • class_index (int): Object state, either known a-priori or inferred previously in a different workflow.
  • grip_index (int): Index of the grip relative to the default grip in the class determined by class_index. The value is typically obtained as the 17th element of the response of get_pose called in a different workflow. If grip_index<0, then pose is interpreted as a raw object pose.

All dimensional variables processed or returned by the API are assumed to be in the SI base unit meters. Most robot vendors, however, choose to represent length in millimeters. Conversion between the two is the responsibility of the client application.

Result Retrieval

get_pose

get_pose(workflow='votenet', 
         representation='vector',
         degrees=False,
         timeout=10
         product_index=-1,
         retry=False,
         convert_to_camera=True)

Pops a detection from the detection queue.

New object detections arising from the analysis of a single image are stored in a queue as soon as they are ready. This enables the system to continue image analysis while the robot processes the first detected item. This function retrieves the object detection with the highest priority from the queue. Different priorities can be configured such as distance from the camera, longitudinal position on a conveyor belt, confidence, etc.

Arguments:

  • workflow (string): Inference service to address request to.
  • representation (string): Representation of the rotational part of the pose returned. A list of supported arguments is found here.
  • degrees (boolean): True if rotational part of the pose is defined in degrees, False if defined in radians.
  • timeout (int): Maximum time to wait for new detections to be computed.
  • product_index (int): For multi-model products only search for the model that matches this argument’s value. When product_index is -1, return detections of all models.
  • retry (boolean): If True, the function returns an alternative grip for the same object. This is useful when the robot rejects a pick pose on the first try when retry was False after finding that it is not kinematically feasible. Once all grips for on detected object have been polled, the function will respond with negative class and product index (see below) as if there were no more objects found. The client should make sure to call get_pose at least once more with retry=False to make sure all object (not only grip) alternatives have been exhausted.
  • convert_to_camera (boolean): True if the returned object pose (not the pick pose, see below) is returned in camera or scene/plane coordinates as defined in trigger.

Return Value: A list of length 23 composed of

  • pose of the TCP preposition (6 elements): Pose in the format defined by the arguments representation and degrees the TCP should assume for picking but moved backwards in negative z-direction by the configured preposition distance (default 0.05 m).
  • product index (1 element): Index of the detected CAD model. -1 if the detection is invalid.
  • class index (1 element): Index of the stable state. -1 if the detection is invalid.
  • offset relative to the reference pose (6 elements): When multiple grips are defined, the service looks for the first one that is free of collisions. The first in the series of allowed grips is assumed to be the default grip. The offset variables describe the position/orientation of the selected grip relative to the default grip within the detected class defined by class index. This is useful for compensating grip changes at place time.
  • detection timestamp (1 element): A unique identifier of the detection. Can be used to retrieve additional data about the detection or augment it with a-posteriori information from other sources, e.g., whether picking of the object was successful or not.
  • index of the chosen gripper (1 element): Model index of the selected gripper.
  • index of the chosen grip (1 element): Index of the chosen grip. The index is relative to the default grip of the class.
  • object pose: (6 elements): The raw object pose without any grips applied relative to the camera. If the inverse pose, i.e., the pose of the camera relative to the object is desired, set the argument convert_to_camera to False.

All dimensional variables processed or returned by the API are assumed to be in the SI base unit meters. Most robot vendors, however, choose to represent length in millimeters. Conversion between the two is the responsibility of the client application.

get_number_of_detections

get_number_of_detections('votenet')

Returns the size of the detection queue.

New object detections arising from the analysis of a single image are stored in a queue as soon as they are ready. This enables the system to continue image analysis while the robot processes the first detected item. With this function, the number of computed (but yet to retrieve) detections in the current image is returned.

Arguments:

  • workflow (string): Inference service to address request to.

Return Value:

An integer value equalling the size of the detection queue.


Back to top

©2025 Vathos GmbH | All rights reserved.