The parameters that worked for me with a RealSense R200 and the circles pattern from https://nerian.com/support/resources/... (printed on US letter size) were:
srv.request.tag_frame = "calibration_circles_frame"; // This is defined in a URDF. It's known.
srv.request.camera_frame = "camera_ee_depth_frame"; // Unknown pose. Find its relation to target_frame
srv.request.target_frame = "base_link"; // This is defined in a URDF. It's fixed
camera_pose_calibration::PatternParameters circle_pattern;
circle_pattern.pattern_width = 4; // 4 circles wide
circle_pattern.pattern_height = 11; // 11 circles long
circle_pattern.pattern_distance = 0.038; // Distance between circle centers. [m]
circle_pattern.neighbor_distance = 1; // Expected distance between pixels of image
circle_pattern.valid_pattern_ratio_threshold = 0.5; // Min. ratio of valid pixels to NaN's
srv.request.pattern = circle_pattern;
I still had an unexplained 45 degree rotation and a Z-offset, but those were easy enough to correct manually. So it was easier than calibrating by hand, for sure.
The RealSense is more tricky than most cameras, I think, because the point cloud is published in the frame camera_depth_optical_frame, which is a child of camera_depth_frame. So camera_depth_frame is what actually needs to be attached to camera_link in the URDF. Maybe this was the cause of the extra rotation -- which I corrected for with an extra transformation matrix.
Are you referring to the old version, or the new package?
This one: camera_pose_calibration
Yeah, so the Indigo version?
Ah, yes. Indigo.