Solution is off in translation along one Axis
ivadimi opened this issue · comments
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.
Configuration
- Ros Melodic
- OpenCV 3.2 w/Charuco board
- Realsense d435 (color stream)
- Yaskawa GP12 Robot Arm
- Camera is rigidly attached to link_5_b (so it has 5 DOF instead of 6)
- Samples taken, 15-20;
What could be potentially the cause of this?
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:
- Keep the camera close to the target. Partial views are fine, as long as the target is still being detected.
- Between each sample, be sure to include a large rotation (30 degrees) of the camera/EEF.
- 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.