moveit / moveit_calibration

Hand-eye calibration tools for robot arms.
BSD 3-Clause "New" or "Revised" License
124 stars 70 forks source link

Solution is off in translation along one Axis #89

Open ivadimi opened 3 years ago

ivadimi commented 3 years ago

Description Visually solutions appear to be correct in regards to orientation. However they are always off by some translation along the z Axis. In the screenshot below the camera should be closer to link_5_b along the z Axis.

example_

Configuration

What could be potentially the cause of this?

JStech commented 3 years ago

Calibrating with 5 DoF is harder, depending on the specifics of the robot--if there's a joint arrangement that gives you full 3 DoF in rotation, then you should be able to get a good calibration.

Were you able to rotate around the X and Y axes of the optical frame? Those rotations will make the Z translation observable.

Without going into too much detail (I plan to make a blog post with proper citations once I get the chance), here are the general rules to getting a good calibration:

  1. Keep the camera close to the target. Partial views are fine, as long as the target is still being detected.
  2. Between each sample, be sure to include a large rotation (30 degrees) of the camera/EEF.
  3. Make subsequent rotations around different axes.

My approach is to take the first sample, then apply a large rotation around X, then translate just enough to keep the target in frame and take a second sample. Then repeat, this time rotating around Y for the third sample, and then again around Z for the fourth sample. Then I apply rotations around X and Y, then X and Z, then Y and Z. Then I go back to X and start again until I have ~15 samples. That might not work perfectly for a 5DoF arm, but hopefully you can adapt it somehow.