Calibration v0.14.0-beta4
Prerelease, released 2026-08-18. It can still change before the stable release, so do not build a production integration against it. The latest stable version is v0.13.0.
- Package: fizyr.calibration.v2
- Service: fizyr.calibration.v2.CalibrationService
- Proto file: fizyr.calibration.v2.proto
This page documents the interface exactly as v0.14.0-beta4 shipped it. Generate a client from the proto file as described in Generate a client.
What's new in v0.14.0-beta4
Interface changes since v0.13.0
The proto file defines the same RPCs, messages and enums as v0.13.0.
RPCs
RPC | What it does |
|---|---|
Ping | Ping the server to see if communication is working properly. |
Get the version of the calibration interface being used by this server. | |
Get more detailed information about the interface and software (including the version numbers). | |
Get a list of saved calibrations. | |
Get the data of a saved calibration. | |
Set the active calibration to any of the saved calibrations. | |
Delete a saved calibration. | |
Upload a calibration to the server. | |
Start a new calibration cycle. | |
Close an open calibration cycle. | |
List all open calibration cycles. | |
Record a new sample for a calibration cycle. | |
Compute the calibration for a calibration cycle. | |
Save the calibration computed in a calibration cycle. |
Ping
Ping the server to see if communication is working properly.
rpc Ping (Empty) returns (Empty);Request Empty
Response Empty
GetApiVersion
Get the version of the calibration interface being used by this server.
rpc GetApiVersion (GetApiVersionRequest) returns (GetApiVersionResponse);Request GetApiVersionRequest has no fields.
Response GetApiVersionResponse
- version · Version — The pick interface version.
GetServerInfo
Get more detailed information about the interface and software (including the version numbers).
rpc GetServerInfo (GetServerInfoRequest) returns (GetServerInfoResponse);Request GetServerInfoRequest has no fields.
Response GetServerInfoResponse
- info · ServerInformation — The information about the serde.
ListCalibrations
Get a list of saved calibrations.
rpc ListCalibrations (ListCalibrationsRequest) returns (ListCalibrationsResponse);Request ListCalibrationsRequest has no fields.
Response ListCalibrationsResponse
- calibration_ids · repeated string — The IDs of the saved calibrations.
GetCalibration
Get the data of a saved calibration.
Can also be used to get the data of the currently active calibration.
rpc GetCalibration (GetCalibrationRequest) returns (GetCalibrationResponse);Request GetCalibrationRequest
- calibration_id · optional string — The ID of the calibration to retrieve. If not set (or set to an empty string), the active calibration is returned.
- rotation_format · optional RotationFormat — Specify the rotation format to use for the response.
Response GetCalibrationResponse
- calibration · Calibration — The requested calibration.
SetActiveCalibration
Set the active calibration to any of the saved calibrations.
rpc SetActiveCalibration (SetActiveCalibrationRequest) returns (SetActiveCalibrationResponse);Request SetActiveCalibrationRequest
- calibration_id · string — The ID of the saved calibration to set as active calibration.
Response SetActiveCalibrationResponse has no fields.
DeleteCalibration
Delete a saved calibration.
rpc DeleteCalibration (DeleteCalibrationRequest) returns (DeleteCalibrationResponse);Request DeleteCalibrationRequest
- calibration_id · string — The ID of the saved calibration to delete.
Response DeleteCalibrationResponse has no fields.
UploadCalibration
Upload a calibration to the server.
This service can be used to upload calibration data managed by some other system. You can set make_active to true to directly make it the active calibration.
rpc UploadCalibration (UploadCalibrationRequest) returns (UploadCalibrationResponse);Request UploadCalibrationRequest
- calibration · Calibration — The calibration to upload. You can choose the ID of the calibration by setting the Calibration.calibration_id field. If you leave it unset, then a new unique ID is generated automatically.
- overwrite_existing · bool — Overwrite the calibration with the given ID if it already exists. If this is set to false or not specified, an error is returned if a saved calibration with the same ID already exists.
- make_active · bool — If set to true, make the uploaded calibration the active calibration.
Response UploadCalibrationResponse
- calibration_id · string — The ID of the saved calibration. Mostly useful if you left the Calibration.calibration_id field unset during the upload. Otherwise, it is just copy of that value.
StartCalibrationCycle
Start a new calibration cycle.
Note that not all cameras support starting multiple calibration cycles at once. In that case, you must close any open calibration cycle before starting a new one.
A calibration cycle will calibrate the camera with respect to either a fixed frame or a moving frame. A common choice for fixed frame is the base frame of the robot. It is important that this frame does not move (or the robot moves along with it). The moving frame is usually the flange of the robot, or some other tool or end-effector configured on the robot.
If the camera is attached to the moving frame then the calibration plate must be attached to the fixed frame. And the other way around: if the camera is attached to the fixed frame then the calibration plate must be attached to the moving frame.
A normal calibration cycle could consist of the following service calls:
- One call to StartCalibrationCycle to start the cycle.
- One or more calls to RecordSample to add samples.
- One call to ComputeCalibration (which by defalt also saves the calibration and closes the calibration cycle).
- One call to SetActiveCalibration to make the newly computed calibration the active one (if desired).
rpc StartCalibrationCycle (StartCalibrationCycleRequest) returns (StartCalibrationCycleResponse);Request StartCalibrationCycleRequest has no fields.
Response StartCalibrationCycleResponse
- cycle_id · uint32 — The ID of the newly started cycle.
CloseCalibrationCycle
Close an open calibration cycle.
If the calibration has not been computed or saved yet, it is lost.
This service gives an error if there is no calibration cycle currently open.
rpc CloseCalibrationCycle (CloseCalibrationCycleRequest) returns (CloseCalibrationCycleResponse);Request CloseCalibrationCycleRequest
- cycle_id · uint32 — The ID of the calibration cycle.
Response CloseCalibrationCycleResponse has no fields.
ListCalibrationCycles
List all open calibration cycles.
rpc ListCalibrationCycles (ListCalibrationCyclesRequest) returns (ListCalibrationCyclesResponse);Request ListCalibrationCyclesRequest has no fields.
Response ListCalibrationCyclesResponse
- cycle_ids · repeated uint32 — The IDs of all open calibration cycles.
RecordSample
Record a new sample for a calibration cycle.
The robot (or moving frame) must be standing still at the pose indicated in the request.
This will record an image and (try to) detect the calibration pattern in it.
This service gives an error if there is no calibration cycle currently open.
rpc RecordSample (RecordSampleRequest) returns (RecordSampleResponse);Request RecordSampleRequest
- cycle_id · uint32 — The ID of the calibration cycle.
- robot_pose · Pose3 — The pose of the robot (or moving frame).
- region_of_interest · repeated Point2U — Region of interest in pixels to limit the search space of the calibration pattern.
- rotation_format · optional RotationFormat — Specify the rotation format to use for the response. This does not have to match with the format of the robot_pose field. It is only used to choose the rotation format in the response.
Response RecordSampleResponse
- sample_id · uint32 — The ID of the recorded sample. Sample ids are specific to the calibration cycle in which they were recorded.
- pattern_found · bool — Indicates if the pattern was found in the recorded image. If no pattern was found, the sample can not be used for calibration.
- pattern_pose · optional Pose3 — The detected pose of the calibration pattern in the uncalibrated camera frame. NOTE: The call may be forwarded to a camera-vendor-specific calibration algorithm. Such algorithms may not report the pose of the detected pattern. In that case, this field may be empty / omitted even though pattern_found is true.
ComputeCalibration
Compute the calibration for a calibration cycle.
The amount of samples required depends on whether or not skip_pattern_pose_computation is enabled. If it is, only 1 sample is needed, but you can still add more samples to increase the accuracy of the calibration.
If skip_pattern_pose_computation is disabled, then the absolute minimum number of samples is 3. However, it is recommended to record at least 10 samples with different robot positions and orientations.
By default, the calibration will be saved using an auto-generated name, and the calibration cycle will be closed. However, both of these actions can be disabled by setting no_save and no_close respectively.
This service gives an error if there is no calibration cycle currently open.
rpc ComputeCalibration (ComputeCalibrationRequest) returns (ComputeCalibrationResponse);Request ComputeCalibrationRequest
- cycle_id · uint32 — The ID of the calibration cycle.
- no_save · bool — Do not automatically close the computed calibration. You can save it later if desired using the save_calibration service.
- no_close · bool — Do not automatically close the calibration cycle. You should close it later using the CloseCalibrationCycle service.
- moving_camera · bool — Indicates if the camera is mounted attached to the moving frame (the robot).
- skip_pattern_pose_computation · bool — Skip computation of the calibration pattern pose. If this is true, the pattern_pose field is used directly as the pattern pose. This is significantly faster than computing the pattern pose and it requires less samples: only 1 sample is enough, but using more samples can still improve the accuracy of the calibration. However, if you skip the computation of the pattern pose, the calibration will not account for manufacturing tolerances, mounting inaccuracies or measurement errors. If you enable this option, you must set pattern_pose correctly too.
- camera_pose · optional Pose3 — An initial guess for pose of the camera. The pose must be with respect to the fixed frame (if moving_camera is false) or the moving frame (if moving_camera is true). This may be used to speed up the calibration routine, but providing a bad guess may actually slow down the calibration routine, or even lead to inaccurate results.
- pattern_pose · optional Pose3 — The known pose of the calibration plate, or an initial guess for its pose. The pose must be with respect to the moving frame (if moving_camera is false) or the fixed frame (if moving_camera is true). This may be used to speed up the calibration routine, but providing a bad guess may actually slow down the calibration routine, or even lead to inaccurate results. If skip_pattern_pose_computation is set, this pose must be the actual pose of the calibration pattern, and not just an initial guess.
- rotation_format · optional RotationFormat — Specify the rotation format to use for the response. This does not change the way the calibration is stored internally. It is only used for the response message to the request.
Response ComputeCalibrationResponse
- calibration · Calibration — The computed calibration.
SaveComputedCalibration
Save the calibration computed in a calibration cycle.
By default, this service will also close the calibration cycle, but this can be disabled by setting no_close to true.
Note that the ComputeCalibration service already saves the calibration by default.
This service gives an error if there is no calibration cycle currently open, or if no calibration has been computed yet.
rpc SaveComputedCalibration (SaveComputedCalibrationRequest) returns (SaveComputedCalibrationResponse);Request SaveComputedCalibrationRequest
- cycle_id · uint32 — The ID of the calibration cycle.
- calibration_id · optional string — Save the calibration under the given ID. If you leave this unset, a new ID is generated automatically.
- overwrite_existing · bool — Overwrite a calibration with the same ID, if it already exists.
Response SaveComputedCalibrationResponse
- calibration_id · string — The ID of the saved calibration. Useful if you left the SaveComputedCalibrationRequest.calibration_id field unset.
Messages
Messages used by more than one RPC, or inside other messages.
AngleAxis
A rotation of a specific angle around a specific axis.
- angle · float — The angle of rotation in radians.
- axis · Vector3 — The axis of rotation.
Used by Rotation3.
Calibration
An extrinsic camera calibration.
- calibration_id · optional string — The ID of the calibration. This field is only set if the calibration has already been saved. If left unset when adding a calibration, a new unique ID will automatically be generated for it.
- timestamp · uint64 — The timestamp when the calibration was recorded. Specified as number of milliseconds since January 1 1970 00:00 UTC (the Unix epoch).
- num_samples · uint32 — The number of valid samples used to compute this calibration.
- camera_moving · bool — Specifies if the camera is attached to the moving frame (the robot) or the fixed frame.
- camera_pose · Pose3 — The pose of the camera with respect to the parent frame. If camera_moving is true, the parent frame is the moving frame. Otherwise, the parent frame is the fixed frame.
- pattern_pose · Pose3 — The pose of the calibration pattern with respect to the parent frame. If camera_moving is true, the parent frame is the fixed frame. Otherwise, the parent frame is the moving frame.
- root_mean_square_error · optional float — The root mean square error of the pattern pose for all calibration samples. NOTE: The exact meaning of this field depends on the camera. Vendor specific camera algorithms may compute the RMSE slightly different, but a lower error is always better. NOTE: This field may not be provided by all cameras, and it may not be set in manually uploaded calibrations.
- mean_translation_error · optional float — The mean translation error in meters, computed over all calibration samples. NOTE: This field may not be provided by all cameras, and it may not be set in manually uploaded calibrations.
- mean_rotation_error · optional float — The mean rotation error in radians, computed over all calibration samples. NOTE: This field may not be provided by all cameras, and it may not be set in manually uploaded calibrations.
Used by ComputeCalibration, GetCalibration, UploadCalibration.
Empty
An empty message
This message has no fields.
Used by Ping.
EulerRotation
Euler rotation representation
- format · EulerRotationFormat — The format of the Euler angles. This determines the order in which the rotations are applied.
- angles · repeated float — An array containing the angles of rotation for each axis. The order of the angles is the order as per the variant of the format field. This field needs exactly 3 values
Used by Rotation3.
Point2U
A two dimensional point in space.
- x · uint32 — The X component of the point.
- y · uint32 — The Y component of the point.
Used by RecordSample.
Point3
A three dimensional point in space.
- x · float — The X component of the point.
- y · float — The Y component of the point.
- z · float — The Z component of the point.
Used by Pose3.
Pose3
A pose in three dimensional space.
A pose combines a position and an orientation.
- position · Point3 — The position in 3D space.
- orientation · Rotation3 — The orientation in 3D space.
Used by Calibration, ComputeCalibration, RecordSample.
Quaternion
This struct represents a quaternion.
The quaternion w+xi+yj+zk is a convenient representation of orientations and rotations of objects in three dimensions. Operations interpreting the quaternion as rotation have undefined behavior if the quaternion is not normalized.
- x · float — X component of the quaternion.
- y · float — Y component of the quaternion.
- z · float — Z component of the quaternion.
- w · float — W component of the quaternion.
Used by Rotation3.
Rotation3
A rotation in one of several possible formats.
- One of value — at most one of these fields is set.
- AngleAxis · AngleAxis — An angle-axis rotation.
- Quaternion · Quaternion — A rotation represented as quaternion.
- Euler · EulerRotation — A rotation represented as three separate rotations around the major axes.
Used by Pose3.
ServerInformation
Information about a server, including software and API versions.
- interface_name · string — The name of the interface.
- interface_version · Version — The version of the server's interface.
- application_name · string — The name of the application. This is important for interfaces that are implemented by multiple applications, (eg: cameras).
- application_version · Version — The version of the application. This can be useful for logging purposes. However, for checking compatibility with an interface you should always look at the interface name and version, not at the application name or version.
- service_name · string — The name of this particular instance of the application. This can be used to distinguish between different instances of a service if there is more than one instance of the same application running on the system.
Used by GetServerInfo.
Vector3
A three dimensional vector.
- x · float — The X component of the vector.
- y · float — The Y component of the vector.
- z · float — The Z component of the vector.
Used by AngleAxis.
Version
A version with major, minor and patch number.
- major · uint32 — The major version. A change to this value indicates a backwards-incompatible change to the public interface.
- minor · uint32 — The minor version. A change to this value indicates a backwards-compatible change to the public interface.
- patch · uint32 — The patch version. A change to this value indicates an internal change with no impact on the public interface.
Used by GetApiVersion, ServerInformation.
Enums
EulerRotationFormat
The type of Euler (Tait-Bryan) angles and the sequence of the rotation.
- EULER_ROTATION_FORMAT_UNSPECIFIED = 0 — Unspecified value. If used, the server will act as if no value has been specified.
- EULER_ROTATION_FORMAT_INTRINSIC_XYZ = 1 — The angles represent intrinsic rotations in XYZ order. See ROTATION_FORMAT_EULER_INTRINSIC_XYZ for more information.
- EULER_ROTATION_FORMAT_INTRINSIC_XZY = 2 — The angles represent intrinsic rotations in XZY order. See ROTATION_FORMAT_EULER_INTRINSIC_XZY for more information.
- EULER_ROTATION_FORMAT_INTRINSIC_YXZ = 3 — The angles represent intrinsic rotations in YXZ order. See ROTATION_FORMAT_EULER_INTRINSIC_YXZ for more information.
- EULER_ROTATION_FORMAT_INTRINSIC_YZX = 4 — The angles represent intrinsic rotations in YZX order. See ROTATION_FORMAT_EULER_INTRINSIC_YZX for more information.
- EULER_ROTATION_FORMAT_INTRINSIC_ZXY = 5 — The angles represent intrinsic rotations in ZXY order. See ROTATION_FORMAT_EULER_INTRINSIC_ZXY for more information.
- EULER_ROTATION_FORMAT_INTRINSIC_ZYX = 6 — The angles represent intrinsic rotations in ZYX order. See ROTATION_FORMAT_EULER_INTRINSIC_ZYX for more information.
- EULER_ROTATION_FORMAT_EXTRINSIC_XYZ = 7 — The angles represent extrinsic rotations in XYZ order. See ROTATION_FORMAT_EULER_EXTRINSIC_XYZ for more information.
- EULER_ROTATION_FORMAT_EXTRINSIC_XZY = 8 — The angles represent extrinsic rotations in XZY order. See ROTATION_FORMAT_EULER_EXTRINSIC_XZY for more information.
- EULER_ROTATION_FORMAT_EXTRINSIC_YXZ = 9 — The angles represent extrinsic rotations in YXZ order. See ROTATION_FORMAT_EULER_EXTRINSIC_YXZ for more information.
- EULER_ROTATION_FORMAT_EXTRINSIC_YZX = 10 — The angles represent extrinsic rotations in YZX order. See ROTATION_FORMAT_EULER_EXTRINSIC_YZX for more information.
- EULER_ROTATION_FORMAT_EXTRINSIC_ZXY = 11 — The angles represent extrinsic rotations in ZXY order. See ROTATION_FORMAT_EULER_EXTRINSIC_ZXY for more information.
- EULER_ROTATION_FORMAT_EXTRINSIC_ZYX = 12 — The angles represent extrinsic rotations in ZYX order. See ROTATION_FORMAT_EULER_EXTRINSIC_ZYX for more information.
Used by EulerRotation.
RotationFormat
The format of a 3D rotation.
- ROTATION_FORMAT_UNSPECIFIED = 0 — Unspecified value. If used, the server will act as if no value has been specified.
- ROTATION_FORMAT_ANGLE_AXIS = 1 — The rotation is represented as an axis and an angle of rotation.
- ROTATION_FORMAT_QUATERNION = 2 — The rotation is represented as a quaternion.
- ROTATION_FORMAT_EULER_INTRINSIC_XYZ = 3 — The rotation is represented as three intrinsic rotations: around the X axis, then the Y axis and then the Z axis. The rotations are intrinsic: this means that the second rotation is applied in the rotated reference frame of the first rotation, and the third rotation is applied in the rotated reference frame of the second rotation. This representation is also known as (improper) Euler angles or Tait-Bryan angles. Known robots manufacturers that use this representation:
- Staubli (NOTE: uses degrees rather than radians)
- ROTATION_FORMAT_EULER_INTRINSIC_XZY = 4 — The rotation is represented as three intrinsic rotations: around the X axis, then the Z axis and then the Y axis. The rotations are intrinsic: this means that the second rotation is applied in the rotated reference frame of the first rotation, and the third rotation is applied in the rotated reference frame of the second rotation. This representation is also known as (improper) Euler angles or Tait-Bryan angles.
- ROTATION_FORMAT_EULER_INTRINSIC_YXZ = 5 — The rotation is represented as three intrinsic rotations: around the Y axis, then the X axis and then the Z axis. The rotations are intrinsic: this means that the second rotation is applied in the rotated reference frame of the first rotation, and the third rotation is applied in the rotated reference frame of the second rotation. This representation is also known as (improper) Euler angles or Tait-Bryan angles.
- ROTATION_FORMAT_EULER_INTRINSIC_YZX = 6 — The rotation is represented as three intrinsic rotations: around the Y axis, then the Z axis and then the X axis. The rotations are intrinsic: this means that the second rotation is applied in the rotated reference frame of the first rotation, and the third rotation is applied in the rotated reference frame of the second rotation. This representation is also known as (improper) Euler angles or Tait-Bryan angles.
- ROTATION_FORMAT_EULER_INTRINSIC_ZXY = 7 — The rotation is represented as three intrinsic rotations: around the Z axis, then the X axis and then the Y axis. The rotations are intrinsic: this means that the second rotation is applied in the rotated reference frame of the first rotation, and the third rotation is applied in the rotated reference frame of the second rotation. This representation is also known as (improper) Euler angles or Tait-Bryan angles.
- ROTATION_FORMAT_EULER_INTRINSIC_ZYX = 8 — The rotation is represented as three intrinsic rotations: around the Z axis, then the Y axis and then the X axis. The rotations are intrinsic: this means that the second rotation is applied in the rotated reference frame of the first rotation, and the third rotation is applied in the rotated reference frame of the second rotation. This representation is also known as (improper) Euler angles or Tait-Bryan angles. Known robots models that use intrinsic Euler ZYX:
- Mitsubishi Industrial Robot CR750/CR751 Series
- Kawasaki (NOTE: uses degrees rather than radians)
- Kuka (NOTE: uses degrees rather than radians)
- Yaskawa (NOTE: uses degrees rather than radians)
- ROTATION_FORMAT_EULER_EXTRINSIC_XYZ = 9 — The rotation is represented as three extrinsic rotations: around the X axis, then the Y axis and then the Z axis. The rotations are extrinsic: this means that the second rotation is applied in the unrotated base or world frame, and the third rotation is again applied in the unrotated base or world frame. This representation is also known as (improper) Euler angles or Tait-Bryan angles. Known robots models that use intrinsic Euler ZYX:
- Fanuc (NOTE: Fanuc calls them W, P, and R instead of X, Y and Z, and they use degrees rather than radians).
- ROTATION_FORMAT_EULER_EXTRINSIC_XZY = 10 — The rotation is represented as three extrinsic rotations: around the X axis, then the Z axis and then the Y axis. The rotations are extrinsic: this means that the second rotation is applied in the unrotated base or world frame, and the third rotation is again applied in the unrotated base or world frame. This representation is also known as (improper) Euler angles or Tait-Bryan angles.
- ROTATION_FORMAT_EULER_EXTRINSIC_YXZ = 11 — The rotation is represented as three extrinsic rotations: around the Y axis, then the X axis and then the Z axis. The rotations are extrinsic: this means that the second rotation is applied in the unrotated base or world frame, and the third rotation is again applied in the unrotated base or world frame. This representation is also known as (improper) Euler angles or Tait-Bryan angles.
- ROTATION_FORMAT_EULER_EXTRINSIC_YZX = 12 — The rotation is represented as three extrinsic rotations: around the Y axis, then the Z axis and then the X axis. The rotations are extrinsic: this means that the second rotation is applied in the unrotated base or world frame, and the third rotation is again applied in the unrotated base or world frame. This representation is also known as (improper) Euler angles or Tait-Bryan angles.
- ROTATION_FORMAT_EULER_EXTRINSIC_ZXY = 13 — The rotation is represented as three extrinsic rotations: around the Z axis, then the X axis and then the Y axis. The rotations are extrinsic: this means that the second rotation is applied in the unrotated base or world frame, and the third rotation is again applied in the unrotated base or world frame. This representation is also known as (improper) Euler angles or Tait-Bryan angles.
- ROTATION_FORMAT_EULER_EXTRINSIC_ZYX = 14 — The rotation is represented as three extrinsic rotations: around the Z axis, then the Y axis and then the X axis. The rotations are extrinsic: this means that the second rotation is applied in the unrotated base or world frame, and the third rotation is again applied in the unrotated base or world frame. This representation is also known as (improper) Euler angles or Tait-Bryan angles.
Used by ComputeCalibration, GetCalibration, RecordSample.