ethz-asl/hand_eye_calibration

Add base_world transform matrix

Opened this issue · 2 comments

Hi!
I've been using hand-eye calibration to find the transformation between two coordinate systems, but I am interested in the Base-World transformation, since in my setup they are fixed.
It would be a good idea to also return the base-World transform (and also output it in another calibration.json file).

That's a fair point, feel free to open a PR for this.

Hi Fadri (and others). Thanks for providing this tool!

I am also interested in the Base-World transform and in aligned trajectories. I had a look in the code to check how this is computed for visualization / evaluation, and looking at

aligned_dq_W_E = align_paths_at_index(dq_W_E_vec)
aligned_dq_B_H = align_paths_at_index(dq_B_H_vec)
(poses_B_H, poses_W_H) = get_aligned_poses(aligned_dq_B_H,
aligned_dq_W_E,
best_estimated_dq_H_E)
(rmse_position_all,
rmse_orientation_all,
inlier_flags) = evaluate_alignment(poses_B_H, poses_W_H, config, config.visualize)
every_nth_element = config.visualize_plot_every_nth_pose
plot_poses([poses_B_H[:: every_nth_element],
poses_W_H[:: every_nth_element]],
True, title="3D Poses After Alignment")
it seems that you "simply" re-reference each trajectory with respect to the first pose, which boils to down to aligning the two trajectories by aligning their first pose.

Wouldn't it make more sense, in particular for evaluating the alignment error, but also for visualization, to do some least-squares trajectory alignment based on all poses (Horn algorithm)? Something like implemented in the RGBD benchmark tools (https://github.com/jbriales/rgbd_benchmark_tools/blob/80723c9c9530481ec7dc92d3c3f77575f6a25bec/src/rgbd_benchmark_tools/evaluate_ate.py#L47-L79)? I wounder if there is a specific reason you didn't do that and instead just align world and base frame based on the first pose? Or did I maybe miss something?

In case someone is working on this, the additions I'd love to see are:

  • (optionally) compute W_B using Horn
  • output the final W_B in a second calibration file
  • output the aligned B_H trajectory to a file, i.e. W_E computed from the input B_H, plus final estimates for H_E and W_B
  • all this would be useful both after the initial handeye-calibration and the batch-refinement step