SCARA四轴机器人eye-to-hand手眼标定(九点标定)

SCARA四轴机器人eye-to-hand手眼标定(九点标定)

9点法标定是工业上使用广泛的二维手眼标定,它分为eye_in_hand和eye_to_hand两种。在做项目时,用到的是eye-to-hand,所以此处以eye-to-hand为例讲述一下手眼标定的流程。

标定板:

方法:

九点标定法直接建立相机和机械手之间的坐标变换关系。首先,让机械手的末端示教标定板上的9个点,得到在机器人坐标系中的机器坐标,同时用相机采集标定板的图像,通过halcon的算法处理后得到9个点的像素坐标,这样就得到了9组对应的坐标。

接下来通过下面的算子建立相机和机械手之间的坐标转换矩阵:

%标定点的列坐标
Column_robot := [275,225,170,280,230,180,295,240,190]
%标定点的行坐标
Row_robot := [55,50,45,5,0,-5,-50,-50,-50]
%Column是标定点的列坐标,Row是标定点的行坐标
vector_to_hom_mat2d(Row,Column,Row_robot,Column_robot,HomMat2D)
%求解变换矩阵,HomMat2D是图像坐标和机械手坐标之间的关系

注意:9个点的像素坐标和机器坐标要一一对应!!!

之后,就可以利用生成的变换矩阵将图像坐标转化为机器人坐标系下的坐标,转化过程如下:

%由像素坐标和转换矩阵求出机器人基础坐标系中的坐标
affine_trans_point_2d(HomMat2D,Row2,Column2,Qx,Qy)

注:

如果相机与机器人坐标系不是平行的,还要考虑相机的标定!

附标定点分割算法:

    read_image (Image, 'C:/Users/123/Desktop/测试图像/Image_1.bmp')

    scale_image (Image, ImageScaled, 1, -15)
    mean_image (ImageScaled, ImageMean, 7, 7)
    
    binary_threshold (ImageScaled, Region, 'max_separability', 'dark', UsedThreshold)

    connection (Region, ConnectedRegions1) 
    erosion_circle (ConnectedRegions1, RegionErosion1, 3.5)
    dilation_circle (RegionErosion1, RegionDilation1, 8.5)
    connection (RegionDilation1, ConnectedRegions2)
    dilation_circle (ConnectedRegions2, RegionDilation2, 3.5)
    select_shape (RegionDilation2, SelectedRegions, ['area','roundness'], 'and', [1500,0.9], [14000,1])
    sort_region (SelectedRegions, SortedRegions, 'character', 'true', 'row')
    area_center (SortedRegions, Area, Row, Column)

 下面是实现后机械手一个抓取的小视频:

爱普生机械手抓取

猜你喜欢

转载自blog.csdn.net/Kevin_Sun777/article/details/112910119