为了实现对水下机械手运动范围的检测,研发了一套多目立体视觉测量系统。通过测量机械手末端空间运动轨迹,利用空间圆拟合算法可计算出被测关节的实际运动范围。对其中的核心算法空间圆拟合进行了研究。首先空间圆可看作是由一个平面与球体相交而成,其圆心必定在球体上任意两点连线的中垂面上,可基于空间向量的拟合方法推导出中垂面的方程,与拟合的空间平面联立即可求出空间圆方程,进而利用拟合出来的空间圆的圆心坐标求出圆半径。然后对实际测量过程中的错误跟踪点进行了分析,如果在空间圆拟合的过程中对错误跟踪点不加以去除,则会带来错误的拟合结果,从而会大大影响测量结果的正确性。最后提出了基于RANSAC(Random Sample Consensus)的空间圆拟合算法,它可以从一组包含错误点的测量数据集中通过迭代方式有效剔除粗大误差点,从而估计出数学模型的参数和正确的拟合结果。仿真测试及实际测量实验的结果表明,当粗大误差点所占总测量点数的比例小于20%时,所提出的算法可有效地剔除所有粗大误差点,很好地解决了机械手运动范围检测系统在实际工程应用中所遇到的问题。
In order to detect the motion range of an underwater manipulator, a multiple stereo vision measurement system is developed. By measuring the motion trajectory of the end of the manipulator, the actual rotation range of a joint measured angle can be calculated by spatial circle fitting algorithm, The key algorithm of the measurement system--spatial circle fitting algorithm is studied. First, spatial circle is the intersection of a plane and a sphere Therefore, the center of spatial circle must be on the middle vertical plane of a line defined by two arbitrary points on the sphere The middle vertical plan can be derived by spatial vector fitting method. Next, the equation of the spatial circle can be built by simultaneous equations of the middle vertical plan and the plane fitted. Further, the radius can be calculated by the center of fitting circle Then, the wrong tracking points during the actual engineering measurement task are analyzed. The fitting result will be incorrect if all the measured points used for spa- tial fitting directly without excluding outliers, which will affect the correctness of the measurement results greatly. At last, a RANSAC(Random Sample Consensus)-based spatial circle fitting algorithm is proposed. The outliers can be excluded effectively from a set of measuring data through an iterative approach to estimate the parameters of mathematical model. Therefore, the correct fitting results can be guaranteed. The results of simulation and actual experiments show that the outliers can be removed successfully, if the percentage of outliers in all points is less than 20%, the correctness of the spatial circle fitting algorithm is nearly up to 100%. The proposed algorithm can solve the problem effectively while applying the measurement system to detect the motion range of a manipulator in the practical engineering application.