Abstract
The hand-eye calibration problem is an important application problem in robot research. Based on the 2-norm of dual quaternion vectors, we propose a new dual quaternion optimization method for the hand-eye calibration problem. The dual quaternion optimization problem is decomposed to two quaternion optimization subproblems. The first quaternion optimization subproblem governs the rotation of the robot hand. It can be solved efficiently by the eigenvalue decomposition or singular value decomposition. If the optimal value of the first quaternion optimization subproblem is zero, then the system is rotationwise noiseless, i.e., there exists a “perfect” robot hand motion which meets all the testing poses rotationwise exactly. In this case, we apply the regularization technique for solving the second subproblem to minimize the distance of the translation. Otherwise we apply the patching technique to solve the second quaternion optimization subproblem. Then solving the second quaternion optimization subproblem turns out to be solving a quadratically constrained quadratic program. In this way, we give a complete description for the solution set of hand-eye calibration problems. This is new in the hand-eye calibration literature. The numerical results are also presented to show the efficiency of the proposed method.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The hand-eye calibration problem is an important part of robot calibration, which has wide applications in aerospace, medical, automotive and industrial fields [10, 16]. The problem is to determine the homogeneous matrix between the robot gripper and a camera mounted rigidly on the gripper or between a robot base and the world coordinate system. In 1989, Shiu and Ahmad [32] and Tsai and Lenz [33] used one motion (two poses) to formulate the hand-eye calibration problem as solving a matrix equation
where X is the unknown homogeneous transformation matrix from the gripper (hand) to the camera (eye), A is the measurable homogeneous transformation matrix of the robot hand from its first to second position and B is the measurable homogeneous transformation matrix of the attached camera and also, from its first to second position. To allow the simultaneous estimation of both the transformations from the robot base frame to the world frame and from the robot hand frame to sensor frame, Zhuang et al. [41] derived another homogeneous transformation equation
where X and Z are unknown homogeneous transformation matrices from the gripper to the camera and from the robot base to the world coordinate system, respectively, A is the transformation matrix from the robot base to the gripper and B is the transformation matrix from the world base to the camera. It is worth mentioning that there are other kinds of mathematical models for hand-eye calibration problem. In this paper, we focus on the models (1) and (2).
Over the years, many different methods and solutions are developed for the hand-eye calibration problem. Based on how the rotation and translation parameters are estimated, these approaches are broadly divided into two categories: separable solutions and simultaneous solutions. The separable solutions arise from solving the orientational component separately from the positional component. By using rotation matrix and translation vector to represent homogeneous transformation matrices, the hand-eye calibration equation is decomposed into rotation equation and position equation. The rotation parameters are first estimated. After that, the translation vectors could be estimated by solving a linear system. The different techniques that focus on the parametrization of rotation matrices include angle axis [32, 33, 35], Lie algebra [25], quaternions [3, 4, 14], Kronecker product [21, 31] and so on. The main drawback in these methods is that rotation estimation errors propagate to position estimation errors.
On the other hand, the simultaneous solutions arise from simultaneously solving the orientational component and the positional component. The rotation and translation parameters are solved either analytically or by means of numerical optimization. For analytical approaches, many techniques were proposed including quaternions [22], screw motion [2], Kronecker product [1], dual tensor [5], dual Lie algebra [6] and so on. The approaches based on numerical optimization include Levenberg–Marquardt algorithm [28, 42], gradient/Newton method [11], linear matrix inequality [12], alternative linear programming [40] and so on. For more details about solution methods for hand-eye calibration problem, one can refer to [10, 30] and references therein.
Among the solution methods for hand-eye calibration problem, the technique of dual quaternions was used to represent rigid motions by Daniilidis and Bayro-Corrochano [8]. Based on the dual quaternion parameterization, a simultaneous solution for the hand-eye problem was proposed by using the singular value decomposition [7, 8]. Compared with homogeneous transformation matrices, dual quaternions are considered to be a more efficient and compact way of representing the rotation and translation changes in a rigid body. Since the number of variables is reduced and the constraints are simple, the methods based on dual quaternions are computationally more efficient than the methods based on homogeneous transformation matrices [39]. In fact, it has been shown that the dual quaternion representation gives an efficient and robust way to estimate the solution of hand-eye calibration problem, as shown in [18,19,20, 23, 29, 34]. This also motivates us to use dual quaternions to formulate the hand-eye calibration problem as an optimization problem.
As far as we know, most existing methods for solving hand-eye calibration problems could handle the case when the rotation axes are not parallel. However, these methods may fail for the special case when the rotation axes are parallel, which is called the problem of pose singularity. For these methods, there is no description of the solution when the rotation axes are parallel, and it is difficult to judge whether the derived solutions are reliable or not.
In this paper, we propose a new dual quaternion optimization method for the hand-eye calibration problem based on the 2-norm of dual quaternion vectors, aiming to give a complete description of the solution set of the hand-eye calibration problem.
The theoretical base of dual quaternion optimization was established in [27], where a total order for dual numbers, the magnitude of a dual quaternion and the norm for dual quaternion vectors were proposed. Then, a two-stage solution scheme for equality constrained dual quaternion optimization problems was proposed in [26], with the hand-eye calibration problem and the simultaneous localization and mapping problem as application examples. It was shown in [26] that an equality constrained dual quaternion optimization problem could be solved by solving two quaternion optimization subproblems.
In the solution scheme of [26], the optimization solution set of the first quaternion optimization subproblem is designed as a constraint of the second quaternion optimization subproblem. This poses a challenge for implementing such a two-stage solution scheme in practice. In this paper, we propose a regularization-patching method to solve such a dual quaternion optimization problem arising from the hand-eye calibration problem. To apply the two-stage scheme of [26] to the hand-eye calibration problem, we may solve the first quaternion optimization subproblem efficiently by the eigenvalue decomposition or singular value decomposition. If the optimal value of the first subproblem is equal to zero, a regularization function is used to solve the second quaternion optimization subproblem. Otherwise, the solution of the second subproblem is determined by solving a patched quaternion optimization problem. In fact, the optimal value of the first subproblem is equal to zero if and only if there exists a “perfect” robot hand motion which meets all the testing poses exactly. In this case, we say that the hand-eye calibration system is rotationwise noiseless. The flowchart of proposed method is presented in Fig. 1. In this way, we give a complete description for the solution set of the hand-eye calibration problem. This is new in the hand-eye calibration literature and should be useful in applications.
In the next section, we present some preliminary knowledge on dual numbers, quaternions and dual quaternions. Based on dual quaternion optimization, the reformulations and analysis for hand-eye calibration equations \(AX=XB\) and \(AX=ZB\) are given in Sects. 3 and 4, respectively. In Sect. 5, we present the numerical results to show the efficiency of proposed methods. Some final remarks are made in Sect. 6.
Throughout the paper, the sets of real numbers, dual numbers, quaternion numbers and dual quaternion numbers are denoted by \({\mathbb {R}}\), \({\mathbb {D}}\), \({\mathbb {Q}}\) and \(\mathbb{D}\mathbb{Q}\), respectively. The sets of n-dimensional real vectors, quaternion vectors and dual quaternion vectors are denoted by \({{\mathbb {R}}}^n\), \({{\mathbb {Q}}}^n\) and \({\mathbb{D}\mathbb{Q}}^n\), respectively. Scalars, vectors and matrices are denoted by lowercase letters, bold lowercase letters and capital letters, respectively.
2 Preliminaries
2.1 Dual Numbers
A dual number \(q \in {\mathbb {D}}\) can be written as \(q = q_{st} + q_\mathcal {I}\epsilon \), where \(q_{st}, q_\mathcal {I}\in {\mathbb {R}}\) and \(\epsilon \) is the infinitesimal unit satisfying \(\epsilon ^2 = 0\). We call \(q_{st}\) the standard part of q, and \(q_\mathcal {I}\) the infinitesimal part of q. Dual numbers can be added in terms of components and multiplied by the formula
The dual numbers form a commutative algebra of dimension two over the reals. The absolute value of \(q = q_{st} + q_{\mathcal {I}} \epsilon \in {\mathbb {D}}\) is defined as
A total order “\(\le \)” for dual numbers was introduced in [27]. Given two dual numbers \(p, q \in {\mathbb {D}}\), \(p = p_{st} + p_\mathcal {I}\epsilon \), \(q = q_{st} + q_\mathcal {I}\epsilon \), where \(p_{st}, p_\mathcal {I}, q_{st}, q_\mathcal {I}\in {\mathbb {R}}\), we say that \(p \le q\), if either \(p_{st} < q_{st}\), or \(p_{st} = q_{st}\) and \(p_\mathcal {I}\le q_\mathcal {I}\). In particular, we say that p is positive, nonnegative, non-positive or negative, if \(p > 0\), \(p \ge 0\), \(p \le 0\) or \(p < 0\), respectively.
2.2 Quaternion Numbers
A quaternion number \(q \in {\mathbb {Q}}\) has the form \( q = q_0 + q_1 \textbf{i}+ q_2 \textbf{j}+ q_3 \textbf{k}, \) where \(q_0, q_1, q_2, q_3 \in {\mathbb {R}}\) and \(\textbf{i}, \textbf{j}, \textbf{k}\) are three imaginary units of quaternions satisfying
The conjugate of q is the quaternion \(q^*=q_0 - q_1 \textbf{i}- q_2 \textbf{j}- q_3 \textbf{k}\). The scalar part of q is \(\text {Sc}(q) = \frac{1}{2}(q+q^*)=q_0\). Clearly, \(\text {Sc}(q^*) = \text {Sc}(q)\) and \((p q)^* = q^* p^*\) for any \(p, q \in {\mathbb {Q}}\). The multiplication of quaternions is associative and distributive over vector addition, but is not commutative. The magnitude of q is
The quaternion \(q \in {\mathbb {Q}}\) is called a unit quaternion if \(|q|=1\). It is well known [36] that the unit quaternion
can be used to described the rotation around a unit axis \(\textbf{n} = (n_1, n_2, n_3)^\top \in {\mathbb {R}}^3\) with an angle of \(-\pi \le \theta \le \pi \). On the other hand, given a unit quaternion \(q = q_0 + q_1 \textbf{i}+ q_2 \textbf{j}+ q_3 \textbf{k}\in {\mathbb {Q}}\), the rotation matrix R can be obtained by
For any \(a = a_0 + a_1 \textbf{i}+ a_2 \textbf{j}+ a_3 \textbf{k}\in {\mathbb {Q}}\), denote \( \overrightarrow{a}= (a_0, a_1, a_2, a_3)^\top \in {\mathbb {R}}^4\) and
Clearly, \(|a| = \Vert \overrightarrow{a} \Vert _2\). By direct calculations, we have the following propositions.
Proposition 2.1
For any \(a = a_0 + a_1 \textbf{i}+ a_2 \textbf{j}+ a_3 \textbf{k}\in {\mathbb {Q}}\) and \(b = b_0 + b_1 \textbf{i}+ b_2 \textbf{j}+ b_3 \textbf{k}\in {\mathbb {Q}}\), the following statements hold:
-
(i)
\(\textrm{Sc}(r _1 a + r_2 b) = r_1 \textrm{Sc}(a) + r_2 \textrm{Sc}(b)\) for any \(r_1, r_2 \in {\mathbb {R}}\).
-
(ii)
\(\textrm{Sc}(a^* b) = \textrm{Sc}(a b^*) =\textrm{Sc}(b^* a) = \textrm{Sc}(b a^*) = \overrightarrow{a}^\top \overrightarrow{b}\).
-
(iii)
\(M(a^*) = M(a)^\top \), \(W(a^*) = W(a)^\top \).
-
(iv)
\( \overrightarrow{ab} = M(a) \overrightarrow{b} = W(b) \overrightarrow{a} \).
-
(v)
\(M(a)^\top M(a) = W(a)^\top W(a) = \Vert \overrightarrow{a} \Vert _2^2 I_{4\times 4}\), where \(I_{4\times 4}\) is the identity matrix of size \(4 \times 4\).
Proposition 2.2
If a and b are two quaternion numbers satisfying \(\text {Sc}(a^* b) = 0\), then for any \(q \in {\mathbb {Q}}\), we have \( \text {Sc} (q^* a^* b q) = \text {Sc} (q^* b^* a q) = 0.\)
Proof
Since \(\text {Sc}(a^* b) = 0\), we have \(a^* b + b^*a = 0\). According to Proposition 2.1, one can obtain that \( \text {Sc} (q^* a^* b q) = \text {Sc} (q^* b^* a q) = \text {Sc} \left( q^* (\frac{a^* b + b^* a}{2}) q \right) = 0\) for any \(q \in {\mathbb {Q}}.\) \(\square \)
Next we introduce the 2-norm for quaternion vectors, which can be found in [27]. Denote \(\textbf{x}= (x_1, x_2, \cdots , x_n)^\top \in {{\mathbb {Q}}}^n\) for quaternion vectors. The 2-norm of \(\textbf{x}\in {{\mathbb {Q}}}^n\) is defined as
The conjugate transpose of \(\textbf{x}\) is defined as \(\textbf{x}^* = (x_1^*, x_2^*, \cdots , x_n^*)\). More details about quaternions and quaternion vectors could be found in [37].
2.3 Dual Quaternion Numbers
A dual quaternion number \(q \in \mathbb{D}\mathbb{Q}\) has the form \( q = q_{st} + q_\mathcal {I}\epsilon \), where \(q_{st}, q_\mathcal {I}\in {\mathbb {Q}}\). The conjugate of \(q = q_{st} + q_\mathcal {I}\epsilon \) is \(q^* = q_{st}^* + q_\mathcal {I}^* \epsilon \). The magnitude of a dual quaternion number \(q = q_{st} + q_\mathcal {I}\epsilon \) is defined as
The dual quaternion number \(q \in \mathbb{D}\mathbb{Q}\) is called a unit dual quaternion if \(|q|=1\). Note that \(q = q_{st} + q_{\mathcal {I}} \epsilon \in \mathbb{D}\mathbb{Q}\) is a unit dual quaternion if and only if \( q_{st}^* q_{st}= 1\) and \( q_{st}^* q_{\mathcal {I}} + q_{\mathcal {I}}^* q_{st} = 0 \). According to Proposition 2.2, we have the following result.
Corollary 2.3
If \(q = q_{st} + q_{\mathcal {I}} \epsilon \in \mathbb{D}\mathbb{Q}\) is a unit dual quaternion, then \(\text {Sc}(q_{st}^* q_{\mathcal {I}}) = \text {Sc}(q_{\mathcal {I}}^* q_{st}) = 0\), and for any \(a \in {\mathbb {Q}}\), we have \( \text {Sc}( a^* q_{st}^* q_{\mathcal {I}} a ) = \text {Sc}( a^* q_{\mathcal {I}}^* q_{st} a ) = 0. \)
It has been shown that the 3D motion of a rigid body can be represented by a unit dual quaternion [7]. Consider a rigid motion in SE(3) represented by a \(4 \times 4\) homogeneous transformation matrix
where \(R \in {\mathbb {R}}^{3 \times 3}\) is the rotation matrix about an axis through the origin and \(\textbf{t} \in {\mathbb {R}}^3\) is the translation vector. Let \(q_{st} \in {\mathbb {Q}}\) be the unit quaternion encoding the rotation matrix R, and let \(t \in {\mathbb {Q}}\) be the quaternion satisfying \(\overrightarrow{t} = \left( \begin{array}{c} 0 \\ \textbf{t} \end{array} \right) \). Then the transformation matrix T is represented by the dual quaternion \( {q = q_{st} + q_\mathcal {I}\epsilon }, \) where \(q_\mathcal {I}= \frac{1}{2} t q_{st}\). It is not difficult to check that \(q \in \mathbb{D}\mathbb{Q}\) is a unit dual quaternion since
On the other hand, given a unit dual quaternion \(q = q_{st} + q_\mathcal {I}\epsilon \in \mathbb{D}\mathbb{Q}\), the corresponding homogeneous transformation matrix T can be obtained by (4), where the rotation matrix \(R \in {\mathbb {R}}^{3 \times 3}\) can be derived from the unit quaternion \(q_{st}\) according to (3) and the translation vector \(\textbf{t} \in {\mathbb {R}}^{3 }\) can be derived from
It follows that \(\Vert \textbf{t}\Vert _2^2 = 4 q_\mathcal {I}q_{st}^* q_{st} q_\mathcal {I}^* = 4|q_\mathcal {I}|^2\). In other words, for a unit dual quaternion, the magnitude of its infinitesimal part is half of the length of the corresponding translation vector.
Denote \(\textbf{x}= (x_1, x_2, \cdots , x_n)^\top \in {\mathbb{D}\mathbb{Q}}^n\) for dual quaternion vectors. We may also write
where \(\textbf{x}_{st}, \textbf{x}_\mathcal {I}\in {{\mathbb {Q}}}^n\). The 2-norm of \(\textbf{x}\in {\mathbb{D}\mathbb{Q}}^n\) is defined as
Denote by \(\textbf{x}^*:= (x_1^*, x_2^*, \cdots , x_n^*)\) the conjugate transpose of \(\textbf{x}\in \mathbb{D}\mathbb{Q}^n\). According to Proposition 6.3 of [27], it holds that
for any \(\textbf{x}\in \mathbb{D}\mathbb{Q}^n\) with \(\textbf{x}_{st} \ne \textbf{0}\).
3 Hand-Eye Calibration Equation \(AX=XB\)
The hand-eye calibration problem is to find the matrix X such that
for \(i=1,2,\ldots , n\), where X is transformation matrix from the gripper (hand) to the camera (eye), \(A^{(i)}\) is the transformation matrix between the grippers of two different poses and \(B^{(i)}\) the transformation matrix between the cameras of two different poses. The transformation matrices X, \(A^{(i)}\) and \(B^{(i)}\) are encoded with the unit dual quaternions
for \(i=1,2,\ldots ,n\). Let \(\textbf{a} = \left( a^{(1)}, a^{(2)}, \ldots , a^{(n)} \right) ^\top \in \mathbb{D}\mathbb{Q}^n\) and \(\textbf{b} = \big (b^{(1)}, b^{(2)}, \ldots , b^{(n)} \big )^\top \in \mathbb{D}\mathbb{Q}^n\). The hand-eye calibration problem (8) can be reformulated as the dual quaternion optimization problem
In the following, we assume that the optimal solution set of (9) is non-empty.
Denote \(\textbf{f}(x)=\textbf{a} x- x \textbf{b} \in \mathbb{D}\mathbb{Q}^n\). According to (6) and (7), we have
Problem (9) can be divided to two different cases, which need to be handled very differently. One case is that the standard part of the optimal value of (9) is zero. Another case is that the standard part of the optimal value of (9) is positive. Physically, the standard part of the optimal value of (9) is zero if and only if there exists a “perfect” robot hand motion x, which meets all the n testing poses rotationwise exactly. In this case, we say that system is rotationwise noiseless. The following proposition provides a way to check whether the system is rotationwise noiseless or not.
Proposition 3.1
If \({\hat{x}}\) is an optimal solution of (9), the standard part \({\hat{x}}_{st}\) is an optimal solution of the quaternion optimization problem
Hence, the system is rotationwise noiseless if and only if the optimal value of (10) is equal to zero.
Proof
According to the definition of total order for dual numbers, the result could be easily proved since \(\textbf{f}_{st}(x) = \textbf{a}_{st} x_{st}- x_{st} \textbf{b}_{st} \). \(\square \)
Denote the optimal solution set of (10) by \(X_{st}\). If the optimal value of (10) is equal to zero, we consider the regularized quaternion optimization problem
where \(\gamma \) is the parameter that balances the loss function and the regularization term. In fact, \(x_{st} \in X_{st}\) implies \(x_{st}^* x_{st} =1\), and \(x_{\mathcal {I}}^* x_\mathcal {I}\) is proportional to the norm square of translation vector. By adding the regularization term, we try to find the best solution with minimal distance of translation. This explains the role of regularization.
If the optimal value of (10) is not equal to zero, we consider the quaternion optimization problem
By using the matrix representation for quaternion numbers, problems (10), (11) and (12) could be solved efficiently. For \(i=1,2,\ldots , n\), we have
and
Denote
It follows that
Denote the minimal eigenvalue of matrix \(L_{11}\) by \(\lambda _0\). As a result, problem (10) is equivalent to finding the unit eigenvectors corresponding to \(\lambda _0\).
Similarly, for \(i=1,2,\ldots , n\), we have
Denote
and
It follows that
As a result, problem (11) is equivalent to the optimization problem
where \(\overrightarrow{X_{st}}\) is the set of all the unit eigenvectors corresponding to the minimal eigenvalue of matrix \(L_{11}\). Once the set \(\overrightarrow{X_{st}}\) is determined, problem (16) turns out to be a quadratically constrained quadratic program (QCQP).
To be specific, suppose that the dimension of the eigenspace of the minimal eigenvalue of \(L_{11}\) is k. Let \(Q \in {\mathbb {R}}^{4 \times k}\) be the matrix whose columns form an orthonormal basis of the eigenspace, i.e., \(Q^\top Q = I_{k \times k}\). It is not difficult to see that \(\overrightarrow{X_{st}} = \{ Q \textbf{y}: \textbf{y}^\top \textbf{y}=1, \textbf{y}\in {\mathbb {R}}^k \}\). Problem (16) can be rewritten as
In particular, if the dimension of the eigenspace is one, i.e., \(k=1\), the solution set \(\overrightarrow{X_{st}} = \{ \textbf{q}, -\textbf{q}\} \), where \(\textbf{q}\in {\mathbb {R}}^4\) is the normalized basis of the eigenspace. In this case, problem (17) could be solved efficiently by representing \(\overrightarrow{ x_{\mathcal {I}}}\) in the orthogonal complement space of \(\textbf{q}\).
In the following, we reformulate problem (12) as an optimization problem by using the matrix representation for quaternion numbers. According to Proposition 2.1, we have
for \(i=1,2,\ldots , n\). It follows that
where \(L_{11}\) and \(L_{12}\) are given by (13) and (15), respectively. Note that \(\overrightarrow{X_{st}}\) is the set of all unit eigenvectors corresponding to the minimal eigenvalue \(\lambda _0\) of \(L_{11}\). Under the constraints of (12), one can obtain that
since \(L_{11}\) is symmetric. It turns out that problem (12) is equivalent to the optimization problem
Similarly, if Q is the matrix whose columns form an orthonormal basis of the eigenspace of \(\lambda _0\), the optimal \(\overrightarrow{x_{st}}\) can be derived by computing the unit eigenvectors corresponding to the minimal eigenvalue of \(\text {Sym}\left( Q^\top L_{12} Q\right) = \left( Q^\top L_{12} Q + Q^\top L_{12}^\top Q \right) /2\). Since the objective function in (18) does not contain \(\overrightarrow{x_\mathcal {I}}\), the optimal \(\overrightarrow{x_\mathcal {I}}\) can be any vector which is orthogonal to the optimal \(\overrightarrow{x_{st}}\). We may need to find a proper one via sewing a patch on the optimal set of \(\overrightarrow{x_\mathcal {I}}\) once the optimal \(\overrightarrow{x_{st}}\) is determined. Considering the continuity of the norm, it is naturally necessary to further search for \(x_\mathcal {I}\) under the constrains of \(\overrightarrow{x_{st}}^\top \overrightarrow{x_{\mathcal {I}}} = 0\), such that \(\Vert \textbf{f}_\mathcal {I}(x)\Vert _2\) is reduced as much as possible, i.e.,
This explains the role of the patching.
Note that in this way, we give a complete description for the solution set of the hand-eye calibration problem. This is new in the hand-eye calibration literature and should be useful in applications.
To conclude, the solution method for hand-eye calibration equation \(AX=XB\) is summarized in Algorithm 1.
4 Hand-Eye Calibration Equation \(AX=ZB\)
In 1994, Zhuang et al. [41] generalized (1) to \(AX=ZB\), where X is transformation matrix from the gripper to the camera, Z is the transformation matrix from the robot base to the world coordinate system, A is the transformation matrix from the robot base to the gripper and B is the transformation matrix from the world base to the camera. Given n measurements \(\left( A^{(i)}, B^{(i)}\right) _{i=1}^n\), the problem is to find the best solution X and Z such that
for \(i=1,2,\ldots , n\). The transformation matrices X, Z, \(A^{(i)}\) and \(B^{(i)}\) are encoded with the unit dual quaternions
for \(i=1,2,\ldots ,n\). Let \(\textbf{a} = \left( a^{(1)}, a^{(2)}, \ldots , a^{(n)} \right) ^\top \in \mathbb{D}\mathbb{Q}^n\) and \(\textbf{b} = \big (b^{(1)}, b^{(2)}, \ldots , b^{(n)} \big )^\top \in \mathbb{D}\mathbb{Q}^n\). The hand-eye calibration problem (20) can be reformulated as the dual quaternion optimization problem
Similarly, we say that the system is rotationwise noiseless if and only if the standard part of the optimal value of (21) is zero.
Denote \(\textbf{g}(x, z)=\textbf{a} x- z \textbf{b} \in \mathbb{D}\mathbb{Q}^n\). To solve problem (21), according to the definition of 2-norm for dual quaternion vectors, we first consider the quaternion optimization problem
Note that \(a = a_{st} + a_{\mathcal {I}} \epsilon \in \mathbb{D}\mathbb{Q}\) is a unit dual quaternion if and only if \( a_{st}^* a_{st}= 1\) and \( \text {Sc}\left( a_{st}^* a_{\mathcal {I}} \right) = a_{st}^* a_{\mathcal {I}} + a_{\mathcal {I}}^* a_{st} = 0 \). For \(i=1,2,\ldots , n\), we have
since x, z, \(a^{(i)}\) and \(b^{(i)}\) are unit dual quaternions. Denote
It follows that
Then problem (22) is equivalent to the optimization problem
Denote the maximal singular value of \(K_{11}\) by \(\sigma _1\), the set of optimal vector pairs of (24) by \(\overrightarrow{\Omega _{st}}\). As a result, problem (22) aims at finding the unit singular vector pairs for \(\sigma _1\), which can be solved efficiently by the singular value decomposition (SVD).
If the optimal value of (22) is equal to zero, i.e., \(\sigma _1 = n\), consider the regularized optimization problem
where \(\gamma \) is the regularization parameter and
Once the set \(\overrightarrow{\Omega _{st}}\) is determined, problem (25) could be also written as an QCQP. To be specific, suppose the singular value decomposition of matrix \(K_{11}\) is \(K_{11}=U \Sigma V^\top \), where \(U, V \in {\mathbb {R}}^{4 \times 4}\) are orthogonal and \(\Sigma \in {\mathbb {R}}^{4 \times 4}\) is diagonal. Let \(Q_1 \in {\mathbb {R}}^{4 \times k}\) be the matrix whose columns are the columns of U corresponding to \(\sigma _1\), and let \(Q_2 \in {\mathbb {R}}^{4 \times k}\) be the matrix whose columns are the columns of V corresponding to \(\sigma _1\). It is not difficult to see that \( \overrightarrow{\Omega _{st}} = \left\{ \left( Q_1 \textbf{y}, Q_2 \textbf{y}\right) : \textbf{y}^\top \textbf{y}=1, \textbf{y}\in {\mathbb {R}}^k \right\} \). In fact, for any unit vectors \(\textbf{y}_1\) and \(\textbf{y}_2\), the value of objective function of (24) at the point \(\left( \overrightarrow{x_{st}}, \overrightarrow{z_{st}} \right) = \left( Q_1 \textbf{y}_1, Q_2 \textbf{y}_2 \right) \) is
according to the Cauchy–Schwarz inequality. Without loss of generality, we assume \(\sigma _1 > 0\). Then the equality holds if and only if \(\textbf{y}_1 = \textbf{y}_2\). As a result, problem (25) can be rewritten as an QCQP:
In particular, when \(k=1\), problem (26) could be solved efficiently by representing \(\overrightarrow{ x_{\mathcal {I}}}\) and \(\overrightarrow{ z_{\mathcal {I}}} \) in the corresponding orthogonal complement space of \(Q_1\) and \(Q_2\), respectively.
On the other hand, if the optimal value of (22) is not equal to zero, consider the optimization problem
According to Corollary 2.3, we have
since x, z, \(a^{(i)}\) and \(b^{(i)}\) are unit quaternions for \(i=1,2,\ldots , n\). It follows that
Denote
and
By simple computation, one can obtain that
where \(K_{11}\), \(K_{12}\) and \(K_{21}\) are given by (23), (28) and (29), respectively. Under the constraints of problem (27), \(\overrightarrow{x_{st}}\) and \(\overrightarrow{z_{st}}\) are left-singular and right-singular vectors corresponding to the maximal singular value \(\sigma _1\) for \(K_{11}\), which means
Then we have \(\overrightarrow{ x_{st}}^\top K_{11} \overrightarrow{ z_{\mathcal {I}}} = \sigma _1 \overrightarrow{ z_{st}}^\top \overrightarrow{ z_{\mathcal {I}}} = 0\) and \(\overrightarrow{ x_{\mathcal {I}}}^\top K_{11} \overrightarrow{ z_{st}} = \sigma _1 \overrightarrow{ x_{\mathcal {I}}}^\top \overrightarrow{ x_{st}} = 0\) under the constraints of problem (27). As a result, problem (27) is equivalent to the optimization
Similarly, given the singular value decomposition \(K_{11} = U \Sigma V^\top \), let \(Q_1\) be the matrix whose columns are the columns of U corresponding to \(\sigma _1\), and let \(Q_2\) be the matrix whose columns are the columns of V corresponding to \(\sigma _1\). The optimal \(\overrightarrow{x_{st}}\) and \(\overrightarrow{z_{st}}\) can be derived by computing the unit eigenvectors corresponding to the maximal eigenvalue of \(\text {Sym}\left( Q_1^\top (K_{12}+K_{21}) Q_2 \right) \). Since the objective function in (30) does not contain \( \overrightarrow{ x_{\mathcal {I}}}\) and \( \overrightarrow{ z_{\mathcal {I}}}\), the optimal \(\overrightarrow{x_{\mathcal {I}}}\) can be any vector which is orthogonal to the optimal \(\overrightarrow{x_{st}}\), and the optimal \(\overrightarrow{z_{\mathcal {I}}}\) can be any vector which is orthogonal to the optimal \(\overrightarrow{z_{st}}\). Considering the continuity of the norm, once the optimal \(\overrightarrow{x_{st}}\) and \(\overrightarrow{z_{st}}\) are determined, we try to find the best one in the optimal set of \(\overrightarrow{x_\mathcal {I}}\) and \(\overrightarrow{z_\mathcal {I}}\) such that the patching function \(\Vert \textbf{g}_{\mathcal {I}} (x, z) \Vert _2^2\) is minimized, i.e.,
To conclude, the solution method for hand-eye calibration equation \(AX=ZB\) is summarized in Algorithm 2.
5 Numerical Experiments
In this section, we report a set of synthetic experiments to show the efficiency of proposed methods for hand-eye calibration problem. All the codes are written in MATLAB R2017a. The numerical experiments were done on a desktop with an Intel Core i5-2430 M CPU dual-core processor running at 2.4GHz and 6GB of RAM.
In the implementation of our proposed methods, we use GloptiPoly [13] to construct SDP relaxations of QCQPs, and call the interior point optimizer in MOSEK [24] to solve SDPs. Further, GloptiPoly can also recover the solution to the original problem and certify its optimality. We set the regularization parameter \(\gamma = 2 \times 10^{-6}\). For hand-eye calibration model \(AX=XB\), we compare our method with the direct estimation proposed by Tsai et al. [33] (denoted by “Tsai89”), the Kronecker method proposed by Andreff et al. [1] (denoted by “Andreff99”), the classic dual quaternion method proposed by Daniilidis [7] (denoted by “Daniilidis99”), the improved dual quaternion method proposed by Malti et al. [23] (denoted by “Malti10”) and the dual quaternion method using polynomial optimization proposed by Heller et al. [12] (denoted by “Heller14”).
For hand-eye calibration model \(AX=ZB\), we compare our method with the quaternion method proposed by Zhuang et al. [41] (denoted by “Zhuang94”), the quaternion method proposed by Dornaika et al. [9] (denoted by “Dornaika98”), the classic dual quaternion method proposed by Li et al. [18] (denoted by “Li10”), the dual quaternion method using polynomial optimization proposed by Heller et al. [12] (denoted by “Heller14”) and the dual quaternion method proposed by Li et al. [20] (denoted by “Li18”).
Numerical experiments are carried out as follows. First, the original homogeneous transformation matrices \({\hat{X}}\) and \({\hat{Z}}\) in (2) are given by
and
Second, we generate n transformation matrices \(A^{(i)}\), \(i=1,2,\ldots , n\). Then the transformation matrix \(B^{(i)}\) is computed by \(B^{(i)} = {\hat{Z}}^{-1} A^{(i)} {\hat{X}}\) for \(i=1,2,\ldots , n\). We use the methods Zhuang94, Dornaika98, Li10, Heller14, Li18 and Algorithm 2 to solve the hand-eye calibration equation \(AX=ZB\) with the given matrices \(\left( A^{(i)}, B^{(i)}\right) _{i=1}^n\). For hand-eye calibration equation \(AX=XB\), we construct \(\frac{n(n-1)}{2}\) pairs of matrices \(\left( \left( A^{(i)}\right) ^{-1} A^{(j)}, \left( B^{(i)}\right) ^{-1} B^{(j)} \right) _{i<j}\), denoted by \(\left( \tilde{A}^{(s)}, \tilde{B}^{(s)}\right) _{s=1}^{n(n-1)/2}\). Then the methods Tsai89, Andreff99, Daniilidis99, Malti10, Heller14 and Algorithm 1 are used to solve the hand-eye calibration equation \(AX=XB\) with the given matrices \(\left( \tilde{A}^{(s)}, \tilde{B}^{(s)}\right) _{s=1}^{n(n-1)/2}\). The estimation errors are computed by
It is worth mentioning that the computation time for our algorithms consists of the time of constructing SDP relaxations, the time of solving SDPs and the time of checking the optimality of the solutions. This is the reason why the proposed algorithms may need more time to get the solution when compared with other direct methods, such as Tsai89, Andreff99, Daniilidis99 for hand-eye calibration model \(AX=XB\) and Zhuang94, Dornaika98 and Li10 for hand-eye calibration model \(AX=ZB\). Here we mainly focus on the quality of the solutions and the comparison of the computation time within the same type of methods. In fact, the proposed algorithms could be improved by using other efficient ways of solving the resulting QCQP, such as copositive relaxations or doubly nonnegative relaxations as in [15, 17].
5.1 Measurements with Non-parallel Rotation Axis
Four measurements of A with non-parallel rotation axis are given by
As described above, we have four measurements \(\left( A^{(i)}, B^{(i)}\right) \) for equation \(AX=ZB\), and six motions \(\left( \tilde{A}^{(s)}, \tilde{B}^{(s)}\right) \) for equation \(AX=XB\). The numerical results for \(AX=XB\) and \(AX=ZB\) with non-parallel rotation axis are reported in Tables 1 and 2, respectively. Algorithms 1 and 2 show the best behavior in terms of estimation error. Note that the first three methods in Table 1 and the first three methods in Table 2 get the solution via solving linear equations, while the other methods need to call SDP solvers to get the solution. That explains why Algorithm 1 may need more computation time to get the solution when compared with the first three methods in Table 1, and Algorithm 2 may need more computation time to get the solution when compared with the first three methods in Table 2.
5.2 Measurements with Parallel Rotation Axis
In this subsection, we test our algorithms for the case that all the axes of measurements are parallel, which is often the situation for the hand-eye calibration of SCARA robots [34]. In this case, it has been shown that the problem is not well defined and there exists a 1D manifold of equivalent solutions with identical algebraic error [2, 38]. To evaluate the quality of solutions, we try to find the solution such that the third component of its translation vector is equal to zero, and then compare it with the real solution \({\hat{X}}\) and \({\hat{Z}}\) given by (32) and (33), respectively.
Four measurements of A are generated with the same rotation axis, but with different angles. Without loss of generality, the normalized rotation axis is \(\textbf{n} = ( 0, 0, 1)^\top \). For \(A^{(1)}, A^{(2)}, A^{(3)}, A^{(4)}\), the rotation angles are \(\theta _1 = \frac{\pi }{6}\), \(\theta _2=\frac{\pi }{3}\), \(\theta _3 = -\frac{\pi }{6}\) and \(\theta _4 = -\frac{\pi }{3}\), while their translation vectors are randomly generated given by
respectively. The numerical results for \(AX=XB\) and \(AX=ZB\) with parallel rotation axis are reported in Tables 3 and 4, respectively. As we can see, the transformation matrices could be also estimated by the proposed algorithms with the minimal error. In this case, the linear equations used in Tsai89, Andreff99, Zhuang94 and Dornaika98 have infinite solutions, and the SVDs used in Malti10 and Li18 have infinite unit singular vectors corresponding to the minimal singular value. As expected, the particular solutions derived by these methods could result in larger estimation errors when compared with other methods.
5.3 Measurement Estimation with Noise
In practice, the measurement of B is typically estimated using visual processing. Since visual estimation is noisy, this set of experiment aims comparing the robustness of the different methods to disturbances in the measurement of B.
The four measurements \(\left( A^{(i)}, B^{(i)}\right) _{i=1}^4\) are the same as those in Sect. 5.1. The rotation and translation of \(B^{(i)}\) are disturbed by adding zero mean Gaussian noise with increasing standard deviation. Note that the motions \(\tilde{B}^{(s)}\) are also disturbed when adding noise to the measurements \(B^{(i)}\). The standard deviation of the additive noise increases from 0 to 0.02 in steps of 0.002. For each standard deviation, the average errors of \(e_X\) and \(e_Z\) are recorded after 10 runs of each method. The robustness testing for \(AX=XB\) and \(AX=ZB\) with noisy measurements of B are plotted in Figs. 2 and 3, respectively. For \(AX=XB\), Algorithm 1 may be not as robust as Daniilidis99 and Heller14. However, Algorithm 2 shows the competitive robustness to the noise when compared with other methods for \(AX=ZB\).
6 Final Remarks
In this paper, we establish a new dual quaternion optimization method for the hand-eye calibration problem based on the 2-norm of dual quaternion vectors. A two-stage method is also proposed by using the techniques of regularization and patching. However, there are still some problems that need further study. We have the following final remarks.
-
1.
Can we use some other norms for dual quaternion vectors, e.g., 1-norm, \(\infty \)-norm, instead of 2-norm in this method?
-
2.
We may also consider some other hand-eye calibration models, such as multi-camera hand-eye calibration.
-
3.
How can we choose the regularization parameter \(\gamma \) to improve the efficiency of the method?
-
4.
Can we extend this method to the simultaneous localization and mapping problem?
Data availability statement.
The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request form.
References
Andreff, N., Horaud, R., Espiau, B.: Robot hand-eye calibration using structure-from-motion. Int. J. Robot. Res. 21, 228–248 (2001)
Chen, H.H.: A screw motion approach to uniqueness analysis of head-eye geometry. In: 1991 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 145–151 (1991)
Chou, J.C.K., Kamel, M.: Quaternions approach to solve the kinematic equation of rotation, \(A_a A_x = A_x A_b\), of a sensor-mounted robotic manipulator. In: 1988 IEEE International Conference on Robotics and Automation, pp. 656–662 (1988)
Chou, J.C.K., Kamel, M.: Finding the position and orientation of a sensor on a robot manipulator using quaternions. Int. J. Robot. Res. 10, 240–254 (1991)
Condurache, D., Burlacu, A.: Orthogonal dual tensor method for solving the \(AX= XB\) sensor calibration problem. Mech. Mach. Theory 104, 382–404 (2016)
Condurache, D., Ciureanu, I.A.: A novel solution for \(AX= YB\) sensor calibration problem using dual Lie algebra. In: 2019 6th International Conference on Control, Decision and Information Technologies (CoDIT), pp. 302–307 (2019)
Daniilidis, K.: Hand-eye calibration using dual quaternions. Int. J. Robot. Res. 18, 286–298 (1999)
Daniilidis, K., Bayro-Corrochano, E.: The dual quaternion approach to hand-eye calibration. In: 13th International Conference on Pattern Recognition, pp. 318–322 (1996)
Dornaika, F., Horaud, R.: Simultaneous robot-world and hand-eye calibration. IEEE Trans. Robot. Automat. 14, 617–622 (1998)
Enebuse, I., Foo, M., Ibrahim, B.S.K.K., Ahmed, H., Supmak, F., Eyobu, O.S.: A comparative review of hand-eye calibration techniques for vision guided robots. IEEE Access 9, 113143–113155 (2021)
Gwak, S., Kim, J., Park, F.C.: Numerical optimization on the Euclidean group with applications to camera calibration. IEEE Trans. Robot. Automat. 19, 65–74 (2003)
Heller, J., Henrion, D., Pajdla, T.: Hand-eye and robot-world calibration by global polynomial optimization. In: 2014 IEEE International Conference on Robotics and Automation (ICRA), pp. 3157–3164 (2014)
Henrion, D., Lasserre, J.B., Löfberg, J.: GloptiPoly 3: moments, optimization and semidefinite programming. Optim. Methods Softw. 24, 761–779 (2009)
Horaud, R., Dornaika, F.: Hand-eye calibration. Int. J. Robot. Res. 14, 195–210 (1995)
Ito, N., Kim, S., Kojima, M., Takeda, A., Toh, K.C.: BBCPOP: A sparse doubly nonnegative relaxation of polynomial optimization problems with binary, box and complementarity constraints. ACM Trans. Math. Softw. 45, 34 (2019)
Jiang, J., Luo, X., Luo, Q., Qiao, L., Li, M.: An overview of hand-eye calibration. Int. J. Adv. Manuf. Technol. 119, 77–97 (2022)
Kim, S., Kojima, M., Toh, K.C.: A Lagrangian-DNN relaxation: a fast method for computing tight lower bounds for a class of quadratic optimization problems. Math. Program. 156, 161–187 (2016)
Li, A., Wang, L., Wu, D.: Simultaneous robot-world and hand-eye calibration using dual-quaternions and Kronecker product. Int. J. Phys. Sci. 5, 1530–1536 (2010)
Li, C., Chen, Y., Li, D.: A proximal linearized algorithm for dual quaternion optimization with applications in hand-eye calibration. Pac. J. Optim. (2023). https://doi.org/10.61208/pjo-2023-044
Li, W., Lv, N., Dong, M., Lou, X.: Simultaneous robot-world/hand-eye calibration using dual quaternion. Robot (in Chinese) 40, 301–308 (2018)
Liang, R., Mao, J.: Hand-eye calibration with a new linear decomposition algorithm. J. Zhejiang Univ-sc. A 9, 1363–1368 (2008)
Lu, Y.C., Chou, J.C.K.: Eight-space quaternion approach for robotic hand-eye calibration. In: 1995 IEEE International Conference on Systems, Man and Cybernetics. Intelligent Systems for the 21st Century, pp. 3316–3321 (1995)
Malti, A., Barreto, J.P.: Robust hand-eye calibration for computer aided medical endoscopy. In: 2010 IEEE International Conference on Robotics and Automation, pp. 5543–5549 (2010)
MOSEK ApS: The MOSEK optimization toolbox for MATLAB (Version 9.3). https://docs.mosek.com/9.3/toolbox/index.html (2022)
Park, F.C., Martin, B.J.: Robot sensor calibration: solving \(AX= XB\) on the Euclidean group. IEEE Trans. Robot. Automat. 10, 717–721 (1994)
Qi, L.: Standard dual quaternion optimization and its applications in hand-eye calibration and SLAM. Commun. Appl. Math. Comput. 5, 1469–1483 (2023)
Qi, L., Ling, C., Yan, H.: Dual quaternions and dual quaternion vectors. Commun. Appl. Math. Comput. 4, 1494–1508 (2022)
Remy, S., Dhome, M., Lavest, J.M., Daucher, N.: Hand-eye calibration. In: 1997 IEEE/RSJ International Conference on Intelligent Robot and Systems, Innovative Robotics for Real-World Applications (IROS’97), pp. 1057–1065 (1997)
Schmidt, J., Vogt, F., Niemann, H.: Robust hand-eye calibration of an endoscopic surgery robot using dual quaternions. In: Pattern Recognition: 25th DAGM Symposium, pp. 548–556 (2003)
Shah, M., Eastman, R.D., Hong, T.: An overview of robot-sensor calibration methods for evaluation of perception systems. In: Proceedings of the Workshop on Performance Metrics for Intelligent Systems, pp. 15–20 (2012)
Shah, M.: Solving the robot-world/hand-eye calibration problem using the Kronecker product. J. Mech. Robot. 5, 031007 (2013)
Shiu, Y.C., Ahmad, S.: Calibration of wrist-mounted robotic sensors by solving homogeneous transform equations of the form \(AX= XB\). IEEE Trans. Robot. Automat. 5, 16–29 (1989)
Tsai, R.Y., Lenz, R.K.: A new technique for fully autonomous and efficient 3d robotics hand/eye calibration. IEEE Trans. Robot. Automat. 5, 345–358 (1989)
Ulrich, M., Steger, C.: Hand-eye calibration of SCARA robots using dual quaternions. Pattern Recognit Image Anal. 26, 231–239 (2016)
Wang, C.C.: Extrinsic calibration of a vision sensor mounted on a robot. IEEE Trans. Robot. Automat. 8, 161–175 (1992)
Wang, X., Zhu, H.: On the comparisons of unit dual quaternion and homogeneous transformation matrix. Adv. Appl. Clifford Algebras 24, 213–229 (2014)
Wei, M., Li, Y., Zhang, F., Zhao, J.: Quaternion Matrix Computations. Nova Science Publishers, New York (2018)
Zhang, H.: Hand/eye calibration for electronic assembly robots. IEEE Trans. Robot. Automat. 14, 612–616 (1998)
Zhang, Z., Zhang, L., Yang, G.Z.: A computationally efficient method for hand-eye calibration. Int. J. Comput. Assist. Radiol. Surg. 12, 1775–1787 (2017)
Zhao, Z.: Simultaneous robot-world and hand-eye calibration by the alternative linear programming. Pattern Recognit. Lett. 127, 174–180 (2019)
Zhuang, H., Roth, Z., Sudhakar, R.: Simultaneous robot-world and tool/flange calibration by solving homogeneous transformation of the form \(AX=YB\). IEEE Trans. Robot. Automat. 10, 549–554 (1994)
Zhuang, H., Shiu, Y.C.: A noise-tolerant algorithm for robotic hand-eye calibration with or without sensor orientation measurement. IEEE Trans. Syst. Man Cybern. 23, 1168–1175 (1993)
Acknowledgements
We are very thankful to Wei Li for helpful discussion and providing the data and MATLAB code for the methods in [20].
Funding
Open access funding provided by The Hong Kong Polytechnic University.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Guoyin Li.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Zhongming Chen; This author’s work was partially supported by Zhejiang Provincial Natural Science Foundation of China (No. LY22A010012). Chen Ling; This author’s work was partially supported by National Natural Science Foundation of China (No. 11971138) and City University of Hong Kong (Project 9610034). Liqun Qi; This author’s work was supported by Hong Kong Innovation and Technology Commission (InnoHK Project CIMDA). Hong Yan; This author’s work was supported by Hong Kong Innovation and Technology Commission (InnoHK Project CIMDA) and City University of Hong Kong (Project 9610034).
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Chen, Z., Ling, C., Qi, L. et al. A Regularization-Patching Dual Quaternion Optimization Method for Solving the Hand-Eye Calibration Problem. J Optim Theory Appl 200, 1193–1215 (2024). https://doi.org/10.1007/s10957-024-02377-7
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10957-024-02377-7