jhu-lcsr / handeye_calib_camodocal

Easy to use and accurate hand eye calibration which has been working reliably for years (2016-present) with kinect, kinectv2, rgbd cameras, optical trackers, and several robots including the ur5 and kuka iiwa.
BSD 2-Clause "Simplified" License
543 stars 178 forks source link

Confusing about A and B #17

Closed chang-yu-wei closed 4 years ago

chang-yu-wei commented 6 years ago

Hi, I find it confusing about generating the desired A and B matrices to feed to this program. Here's several questions:

  1. In the AX=XB slide , A seems to be camera Pose in the upper figure, while in the lower one it seems to be the arm pose. I'm not sure which one is correct? or maybe it doesn't matter?
  2. If the lower one is correct, can I compute A with the equation A = A_j A_i^(-1) and B = B_j^(-1) B_i? I know it's a really basic question, but just to make sure if this is correct.
  3. For the input file(TransformPairsInput.yml), T1 is robot pose and T2 is camera pose, right?

I'm rookie to this field, so thanks a lot for your consideration.

yuyadanyadan commented 5 years ago

Hi chang-yu-wei: from the example of TransformPairsInput.yml, AX = XB; A = A1^(-1) Aj, B = B1^(-1) Bj; which is different from the paper. I'm confused too. What are the pose in the TransformPairsInput.yml? If we want to use our own data, how can we get the data? T1 is from base to arm? T2 is from cam to marker? If you can reply it, I'm appreciated!

classysidd commented 5 years ago

Hi chang-yu-wei:

I have Implemented this code and it works very fine for me. Following are the conventions:

AX=XB

B = Robot base to tip/grabber/tool transformations = B_i+ 1 B _i^(-1) = baseToTip A = Camera to object transformation = A_j+ 1^(-1) A_j = camToTag

So in the code you pass on, estimateHandEye(baseToTip, camToTag)

Don't worry about the reverse way of representing it. He has taken care of it in the code. You just pass on the way I have told you.

ahundt commented 4 years ago

@classysidd is correct. It really doesn't matter which way you pass the transforms in (ex gripper to base vs base to gripper) because there will still be only one solution so as long as you collect transforms the same way the whole time. The algorithm prints out the final result and its inverse, so the actual value you need should be available in either case.