halcon手眼标定之 fix the pose ambiguity解析 (calibrate_hand_eye_scara_stationary_cam实例)

       最近在做的项目有用到手眼标定,是关于两个康耐视工业相机和爱普生SCARA机器人之间的手眼标定,相机是固定安装,属于Eye-to-hand固定方式。考虑到halcon中用于标定的算子和实例都比较丰富,并且halcon作为一款商用的视觉与图像处理软件,其可靠性、精度等都是opencv所不能比的。此次所用到的标定实例是calibrate_hand_eye_scara_stationary_cam,在研究这个实例的过程中发现,整个手眼标定的过程大致可以分为两个大的步骤,首先是粗略求解,然后是精确求解。

开始标定之前,需要输入的是标定板的描述文件,后缀名是.cpd的文件,这个文件的相关信息在之前的博客中有详细的描述。

另外,需要获取一组用于标定的图像,另外就是相对应的机械臂tool相对于base的描述,不过需要注意的是这个描述有7个参数,三个矩阵的平移参数t,三个矩阵的旋转参数r,另一个是一个f参数,这个暂时不知道是什么参数,可以看到下面这个记事本,此时的f参数是0。

之后读取这些标定的图片和机器人姿态并进行手眼标定,获得了一个BaseInCamPosePre矩阵,注意这个矩阵最后还带了个Pre,说明接下来还会有一个机器人基坐标系在相机坐标系下的表达BaseInCamPose,这个是校正之后的。

那问题就来了,在标定的实例中,有这么一段:

* 3. Fix the pose ambiguity

* When calibrating a SCARA robot, it is impossible to determine
* all pose parameters unambiguously. In case of a stationary
* camera, the Z translation of ObjInToolPose cannot be determined.
* Therefore, it is necessary to fix the unknown translation in
* Z by moving the robot to a pose of known height in the camera
* coordinate system. For this, the calibration plate is (detached from
* the robot and) placed at an arbitrary position such that it can be
* observed by the camera. The pose of the calibration plate must
* then be determined in the camera coordinate system
* (-> ObjInCamPoseRef). Afterwards, the tool of the robot is manually
* moved to the origin of the calibration plate (-> ToolInBasePoseRef).
* The two poses can be used to fix the Z ambiguity by using the
* procedure fix_scara_ambiguity_stationary_cam.

大致的意思是说前面的操作对于矩阵ObjInToolPose中平移量Z无法确定,所以需要进行确定,并给出了操作的步骤:首先是将标定板从机械臂上取下来,放在相机能够看到的地方,当然,机械臂也应该要够得到,然后,相机拍照,获得标定板在相机坐标系下的表达,并将机械臂移动至标定板的原点,读取此时的tool坐标系,利用这两个坐标系的值作为输入,利用算子fix_scara_ambiguity_stationary_cam计算出一个ZCorrection偏差,该偏差在算子set_origin_pose中会对BaseInCamPosePre进行校正,校正的是Z方向的偏置量,然后获得最终的BaseInCamPose。

然后,Why?为哈要进行这一步?

。looking for an answer

最后,在算子set_origin_pose (Operator)的帮助文档中找到了这么一段话:

A typical application of this operator when defining a world coordinate system by placing the standard calibration plate on the plane of measurements. In this case, the external camera parameters returned by camera_calibration correspond to a coordinate system that lies above the measurement plane, because the coordinate system of the calibration plate is located on its surface and the plate has a certain thickness. To correct the pose, call set_origin_pose with the translation vector (0,0,D), where D is the thickness of the calibration plate.

注意这句话:the plate has a certain thickness,校正的原因是标定板有一定的厚度!获取到厚度D后,利用算子set_origin_pose将D考虑进去,得到最后校正的机器人基坐标系在相机坐标系下的表达。

 

  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值