Compare Hand-Eye Methods
SUMMARY
compare_hand_eye_methods re-solves the same dataset with every hand-eye method. Methods that converge to similar poses are jointly trustworthy; an outlier, often DANIILIDIS, indicates a method-specific local optimum rather than a data problem.
SUPPORTED TARGETS
Available only on CharucoTarget, it re-solves an eye-in-hand dataset, which requires per-corner ArUco ids.
UNITS
robot_T_tcp_list, camera_T_target_list, and each result's tcp_T_camera are (4, 4) SE(3) matrices with translation in meters. pose_deg is [x, y, z, rx, ry, rz] with translation in meters and rotation in degrees; consensus_threshold_deg is in degrees.
The Skill
python
results = diagnostics.compare_hand_eye_methods(
target, robot_T_tcp_list, image_list, camera_T_target_list,
intrinsic_matrix, distortion_coefficients,
)
print(diagnostics.format_method_comparison(results))| Skill | Returns | Description |
|---|---|---|
compare_hand_eye_methods(target, robot_T_tcp_list, image_list, camera_T_target_list, intrinsic_matrix, distortion_coefficients, per_view_error_threshold=1.0) | dict[str, HandEyeMethodResult | None] | Re-solves with every method in HAND_EYE_METHOD_BY_NAME_MAP. A None entry marks a method that raised or failed to converge. |
format_method_comparison(method_results, consensus_threshold_deg=1.5) | str | Human-readable report; flags methods more than consensus_threshold_deg from the consensus pose. |
| Parameter | Type | Description |
|---|---|---|
target | CharucoTarget | Calibration target used for the solve. |
robot_T_tcp_list | list[(4, 4) ndarray] | Per-frame robot base to TCP transforms. |
image_list | list[ndarray] | Per-frame BGR images. |
camera_T_target_list | list[(4, 4) ndarray] | Per-frame target poses. |
intrinsic_matrix | (3, 3) ndarray | Camera matrix. |
distortion_coefficients | ndarray | Distortion coefficients. |
per_view_error_threshold | float | Per-view reprojection error cutoff, in pixels. Default 1.0. |
consensus_threshold_deg | float | Rotation difference above which a method is flagged as an outlier, in degrees. Default 1.5, for format_method_comparison(). |
The Code
python
from telekinesis.axon import diagnosticsHandEyeMethodResult
| Field | Type | Description |
|---|---|---|
method_name | str | Method name, e.g. "TSAI". |
tcp_T_camera | (4, 4) ndarray | Solved transform. |
pose_deg | list[float] | [x, y, z, rx, ry, rz], translation in meters and rotation in degrees. |
Best Practices
- A single outlier method doesn't necessarily mean bad data.
DANIILIDISin particular is more prone to converging to a local optimum than the other four; if the remaining methods agree withinconsensus_threshold_deg, trust the consensus over the outlier rather than the reverse. - Re-run after any change to the intrinsics or the target definition. A comparison run against stale intrinsics or a stale target definition will report a misleading consensus.