Kinematic Calibration of a Six-Legged Walking Machine Tool

This paper presents the kinematic calibration of a novel six-legged walking machine tool comprising a six-legged mobile robot integrated with a parallel manipulator on the body. Each leg of the robot is a 2-universal-prismatic-spherical (UPS) and UP parallel mechanism, and the manipulator is a 6-PSU parallel mechanism. The error models of both subsystems are derived according to their inverse kinematics. The objective function for each kinematic limb is formulated as the inverse kinematic residual, i.e., the deviation between the actual and computed joint coordinates. The hip center of each leg is first identified via sphere fitting, and the other kinematic parameters are identified by solving the objective function for each limb individually using the least-squares method. Thus, the kinematic parameters are partially decoupled, and the complexities of the error models are reduced. A calibration method is proposed for the legged robot to overcome the lack of a fixed base on the ground. A calibration experiment is conducted to validate the proposed method, where a laser tracker is used as the measurement equipment. The kinematic parameters of the entire robot are identified, and the motion accuracy of each leg and that of the manipulator are significantly improved after calibration. Validation experiments are performed to evaluate the positioning and trajectory errors of the six-legged walking machine tool. The results indicate that the kinematic calibration of the legs and manipulator improves not only the motion accuracy of each individual subsystem but also the cooperative motion accuracy among the subsystems.


Introduction
There is a growing demand for large and accurate parts in several sectors, e.g., railroads, aeronautics, shipping, and power plants [1]. Maintenance and repair of these parts are generally performed in situ and cannot be achieved using conventional machine tools. Thus, various mobile robotic machine tools have been developed for manufacturing and post-production processes for large parts. A mobile parallel robot called the intersector welding robot (IWR) was developed to conduct welding and machining processes inside the International Thermonuclear Experimental Reactor vacuum vessel (VV) [2]. The IWR consists of a Stewart platform-based parallel mechanism and a carriage for moving along rails mounted on the inner surface of the VV sector. In another study, a small six-axis, track-based, portable robot was developed and implemented to perform in situ interventions, such as gouging, welding, grinding, and post-weld heat treatments in hydroelectric turbines [3]. Barnfather investigated the positional capability of a Fanuc F200iB hexapod-format robotic machine [4] and conducted machining trials to evaluate its achievable tolerances [5]. Parallel mechanisms have been widely applied in the development of mobile machine tools, owing to their high stiffness/weight ratios relative to those of serial robots [6].
Although legged robots are mainly designed for tasks in outdoor environments [7], several studies have focused on the use of legged robots in manufacturing applications, owing to their high mobility [8,9]. In our laboratory, a novel six-legged walking machine tool comprising a six-degree-of-freedom (6-DOF) portable parallel kinematic machine tool and a six-parallel-legged robot was developed for mobile machining tasks [10]. In contrast to conventional articulated legs, a 3-DOF parallel mechanism was used for the leg design [11], providing the robot with a high stiffness and large payload. As mentioned in Ref. [12], motion accuracy is one of the primary issues for mobile robots performing machining tasks.
Owing to the manufacturing and assembling errors of the mechanical components, the actual kinematic parameters of the robot can deviate from the nominal values, leading to pose errors in the end effector. Therefore, a calibration process that can identify the actual kinematic parameters is needed to improve the motion accuracy of the robot. Robot calibration has been studied for several decades. Various methods for robot calibration have been proposed, and they can be classified into three categories: open-loop, closed-loop, and screw axis measurement methods. Hollerbach unified these categories by considering an end-point measurement system for forming a joint and closing the kinematic loop and introduced the concept of a calibration index [13]. Many measurement devices, such as laser trackers [14], portable photogrammetry systems [15], telescoping ballbars [16], and touch probes [17], have been used for the kinematic calibration of robots. Among these, laser trackers are the most commonly used.
The Stewart-Gough platform and 6-PUS manipulator are most widely used 6-DOF parallel mechanisms. In addition, kinematic calibration of these mechanisms has been widely studied. Wang and Masory developed an accurate kinematic model for a Stewart platform using the Denavit-Hartenberg method to model each kinematic limb, and they presented an effective algorithm for parameter identification [18,19]. Zhuang proposed a calibration method for Stewart platforms and other parallel manipulators that minimizes the residuals of the inverse kinematics [20]. This method avoided the need to solve the forward kinematic problem; thus, the efficiency of the identification algorithm was improved. Ota proposed a calibration method based on forward kinematics using a double ball bar (DDB) system as the measurement device, and the method was validated using a 6-PUS parallel kinematic milling machine called "HexaM" through simulations and experiments [21]. Besnard and Khalil proposed a numerical method for determining the identifiable parameters of a Stewart-Gough parallel robot via QR decomposition of the observation matrix [22]. Guo selected calibration configurations for a 6-PUS parallel manipulator based on an orthogonal design [23].
Hu proposed an identifiable parameter separation (IPS) method for dividing the kinematic parameters of a 6-PUS parallel kinematic manipulator into two groups [24]. The unit direction vectors of the prismatic joints were first identified independently. Then, the remaining 42 kinematic parameters were identified using a kinematic error model. Thus, the error model was simplified.
The error modeling for lower-mobility parallel mechanisms is more complex than that for 6-DOF parallel mechanisms. Liu proposed a general approach for the geometric error modeling of lower-mobility parallel manipulators [25], using the Sprint Z3 [6], Tricept [26], and Delta [27] robots as examples. Huang presented a DDB-based method for the kinematic calibration of the 3-DOF parallel mechanism of the TriVariant robot [28]. An error model with 14 independent geometric errors was proposed for the 2-UPS & UP parallel mechanism. Chen proposed a two-step parameter identification method for the kinematic calibration of a 3-prismaticrevolute-spherical (PRS) parallel manipulator [29]. First, the planes where the PRS limbs are located are identified, and then the remaining kinematic parameters of each limb are identified using a gradient-based searching algorithm.
However, to the best of the authors' knowledge, there is a paucity of research on the kinematic calibration of legged robots. In contrast to most calibration objects, legged robots have no fixed bases on the ground. The body of a legged robot is supported by the legs to maintain stability; however, the legs must move during the calibration process. This problem has not been considered in previous calibration solutions for traditional robots. To solve the problem, a calibration method for the novel six-legged walking machine tool is proposed herein, in which a laser tracker is used as the measurement device. The six-legged walking machine tool consists of two parallel mechanisms. A general method based on minimizing the inverse kinematic residual of each limb is applied for the error modeling of both the 3-DOF parallel leg and the 6-DOF parallel manipulator. The kinematic errors are grouped by limbs and are identified separately, reducing the complexity of the error models. The effectiveness of the proposed method was verified through a calibration experiment using a Leica AT960 laser tracker to measure the foot-tip positions of each leg and the end-effector poses of the parallel manipulator. The remainder of this paper is organized as follows. In Section 2, the architecture of the system is presented, and the inverse kinematic solutions of the parallel leg and the parallel manipulator are derived. The error models of both subsystems are described in Section 3. The procedure and results of the calibration experiment are presented in Section 4. The validation of the calibration results through additional experiments is presented in Section 5. Finally, the conclusions are presented in Section 6.

Architectural Description and Inverse Kinematics
The mobile robotic machining system to be calibrated is a six-legged mobile robot with a 6-DOF parallel manipulator on its body, as shown in Figure 1. Each leg of the robot is a 3-DOF parallel mechanism comprising a UP limb and two UPS limbs, where the letters U, P, and S represent the universal, prismatic, and spherical joints, respectively. The leg base plate is fixed to the robot body. Three electric cylinders-working as active prismatic joints-are connected to the leg base plate by universal joints. An ankle connector is rigidly connected to the piston-rod end of one electric cylinder. The piston rods of the other electric cylinders are connected to the ankle connector by spherical joints. Hence, the leg architecture is a 2-UPS & UP parallel mechanism. A six-dimensional force/torque (F/T) sensor is mounted at the bottom of the ankle connector, and a passive ball joint connecting the foot plate is mounted on the other side of the sensor.
The parallel manipulator mounted on the robot body is a 6-PSU mechanism. The robot body contains a hexagonal frame functioning as the fixed base of the parallel manipulator. The moving platform is connected to the hexagonal frame by six PSU limbs. Each limb consists of a linear actuator, spherical joint, fixed-length linkage, and universal joint. The linear actuators are placed parallel to each other inside the hexagonal frame. Each linkage is connected to the slider of a linear actuator with a spherical joint on one end and connected to the moving platform with a universal joint on the other end. The moving platform has six DOFs and provides a mechanical interface for mounting a motor spindle or other end effectors.

Inverse Kinematics of Parallel Leg Mechanism
The leg mechanism is illustrated in Figure 2(a). The legs numbered from 1 to 6 are symmetrically arranged around the body in the shape of a hexagon. All the legs have the same kinematic architecture; thus, in the figure, the legs are simplified as dashed lines, except for leg 5, whose complete mechanism is presented as an example. The centers of the universal and spherical joints are denoted as U ij and S ij , respectively, where the first subscript i is the limb index ( i = 1 for the UP limb and i = 2, 3 for the UPS limbs), and the second subscript j is the leg index ( j = 1, 2, ..., 6 ). U 1j is referred to as the hip center of leg j . The center of the passive ball joint on the foot is denoted as S fj and is taken as the reference point of the end effector for each leg. It is referred to as the foot-tip in this study and is used for foot trajectory planning.
The body frame {B} is assigned at the midpoint of U 12 and U 15 , with its x-axis pointing from U 12 to U 15 and its y-axis perpendicular to the hexagon U 11 U 12 U 13 U 16 U 15 U 14 . In the jth leg, the hip frame {H j } is fixed to the leg base plate, whereas its origin O Hj is coincident with U 1j . Its x-axis is perpendicular to the plane U 1j U 3j U 2j , whereas its z-axis is parallel to the line U 3j U 2j . A moving frame {A j } , i.e., the ankle frame, is attached to the piston rod of the UP limb. Its x-axis is coincident with the prismatic joint axis of the UP limb, which passes through U 1j , and its yz-plane passes through the point S 2j . Thus, the origin O Aj can be derived. Its z-axis is parallel to the line S 3j S 2j .
The motion planning of the six-legged robot determines the foot-tip trajectories of each leg with respect to the body frame. The position of S fj with respect to the body frame {B} is denoted as B p fj , and the same position with respect    where R X (θ) , R Y (θ i ) , and R Z (θ i ) represent the rotation matrix about the x-, y-, and z-axes, respectively. They can be expressed as follows: According to the principle of coordinate transformation, B p fj may be written as: where u 1j represents the coordinates of U 1j with respect to the body frame {B} , B p fj is given by motion planning, and u 1j and B Hj R are constants determined by the mounting pose of the leg base plate. As B Hj R −1 = B Hj R T , we have the following: The vector loops of the 2-UPS & UP parallel leg mechanism are presented in Figure 2(b). Because both UPS limbs have the same kinematic structure, only one of them is shown. In the UP limb, the direction vector of the prismatic joint with respect to the ankle frame {A j } is denoted as e 1 . According to the definition of frame {A j } , we have Considering the vector loop U 1j O Aj S fj yields where s fj represents the foot-tip position with respect to the ankle frame {A j } , which is determined by the mechanical structure of the leg. R 1j is a rotation matrix representing the orientation of the ankle frame {A j } with respect to the hip frame {H j } . R 1j is determined by two rotation angles of the universal joint, i.e., the α 1j rotation about the global y-axis and the β 1j rotation about the rotated local z-axis, as follows: (4) e 1 = 1 0 0 T .
(5) R 1j l 1j e 1 + s fj = H p fj , H p fj can be expressed as follows: By substituting Eq. (6) into Eq. (5) and solving the vector function, the generalized coordinates of the UP limb are calculated as follows: where sβ 1j is short for sin β 1j , and cβ 1j is short for cos β 1j .
Considering the vector loop U 1j O Aj S 2j U 2j , the length of the UPS limb can be calculated as follows: where u 2j represents the coordinates of U 2j with respect to the hip frame {H j } , and s 2j represents the coordinates of S 2j with respect to the ankle frame {A j } . Similarly, considering the vector loop U 1j O Aj S 3j U 3j , we have the following: By substituting Eqs. (8-10) into Eqs. (11) and (12), l 2j and l 3j can be calculated.
The joint coordinates of the parallel leg mechanism are the lengths of three limbs, as follows:

Inverse Kinematics of Parallel Manipulator
A schematic of the parallel manipulator is shown in Figure 3(a). Here, A i and B i represent the rotation centers of the universal joint and spherical joint in the ith kinematic limb, respectively; C i represents the initial position of B i when the actuators are in their home positions; and e i represents the unit direction vector of the ith prismatic joint. Therefore, the input variables are the distances between α 1j = arctan s fjx x j − l 1j + s fjx cβ 1j − s fjy cβ 1j z j l 1j + s fjx cβ 1j − s fjy sβ 1j x j + s fjz z j , (11) l 2j = R 1j l 1j e 1 + s 2j − u 2j , (12) l 3j = R 1j l 1j e 1 + s fj − u 3j .
B i and C i . A moving frame {P} is attached to the moving platform. The origin of {P} is located at the center of the hexagon Its z-axis is perpendicular to the hexagonal plane, whereas its x-axis is parallel to A 2 A 1 .
Its y-axis is derived using the right-hand rule. The reference frame {M} is fixed to the hexagonal base frame of the parallel manipulator and is also fixed to the robot body. Its z-axis is the center axis of the hexagonal prism, and its xy-plane is coincident with the front face of the base frame. For the ith kinematic limb, as shown in Figure 3(b), according to the vector loop method, the following equation can be derived: where p represents the origin position of frame {P} with respect to frame {M} , R is a rotation matrix describing the orientation of frame {P} with respect to frame {M} , a i represents the location of the ith universal joint center with respect to frame {P} , c i represents the initial location of the spherical joint with respect to the machine frame {M} , l i = − − → B i A i , and q i represents the displacement of the slider from its initial position.
For brevity, we define Substituting Eq. (15) into Eq. (14) yields By defining L i = �l i � and squaring both sides of Eq. (16), we obtain There are two solutions for a quadratic equation, but only one satisfies the continuity condition considering the initial position of the slider. The final solution is (14) By applying Eq. (18) to all six PSU limbs, the joint coordinates of the parallel manipulator are calculated as follows:

Error Modeling
Generally, a robot calibration process consists of four steps: error modeling, data acquisition (DAQ), parameter identification, and validation. Error modeling is a key step in calibration. An error model is established to describe the relationship between the kinematic-parameter errors and the joint coordinate errors or end-effector pose errors. In this study, only geometric errors are considered in the error modeling. Thus, the non-geometric errors arising from backlash, gear transmission, thermal distortion, and compliance are ignored. We assume that all the universal joints and spherical joints in the mechanism are perfect joints; i.e., the rotation axes of a composite joint intersect at one point. Therefore, the kinematic errors comprise the positional deviations of the passive joints and the length errors of the linkages.

General Error Modeling Method Based on Inverse Kinematics
An objective function for the error model can be derived according to either inverse kinematics or forward kinematics. The closed-form forward kinematic solution of a parallel mechanism is difficult to derive. Hence, we formulate the objective function by comparing the actual joint coordinates with the values computed by the inverse kinematic model. For brevity, we assume that the inverse kinematic solution of a parallel mechanism is represented as follows: where ρ is a vector including all the geometric parameters related to the kinematic model, χ is a vector representing the pose of the end effector, and q is a vector representing the joint coordinates.
For the kth calibration pose, the joint coordinate residuals of a parallel mechanism are formulated as follows: where ρ represents the nominal kinematic parameters of the parallel mechanism, and ρ represents the kinematic-parameter errors to be identified. χ mk represents the actual pose of the end effector, which can be determined using an external measurement device. q k represents the command joint coordinates, which are calculated by substituting the nominal kinematic parameters ρ and target calibration poses χ tk into the inverse Ignoring the servo error of each actuator, q k is used as the actual joint coordinates. The mapping between the kinematic errors and the joint coordinate residuals is performed for each calibration configuration.
Typically, the dimension of ρ is larger than the dimension of the end-effector pose. Thus, additional configurations are needed to construct sufficient equations for parameter identification. Considering all the calibration configurations, the overall joint coordinate residuals are expressed as a system of nonlinear equations for the kinematic errors ρ as follows: where n represents the number of calibration configurations.
The kinematic-parameter identification process involves finding a set of geometric parameters that minimizes the inverse kinematic residuals given the actual end-effector poses. This is a nonlinear least-squares problem, which is expressed as follows: Eq. (20) is linearized as where J e,k is referred to as the error Jacobian mapping of the kinematic errors to the joint coordinate errors.
Applying Eq. (25) to all the calibration configurations yields Here, J e is referred to as the identification Jacobian matrix. Eq. (24) can be solved using the Levenberg-Marquardt algorithm, in which the identification Jacobian matrix is used to perform iterative calculations [30,31].

Error Model of Parallel Leg Mechanism
The inverse kinematic solution of the parallel leg mechanism is determined using Eqs. (3, 5, 11 and 12). The (22) kinematic parameters involved in these equations are u 1j , j , u 2j , u 3j , s fj , s 2j , and s 3j . Inspired by the IPS method proposed by Hu [24] and the two-step calibration method proposed by Chen [29], we divide these kinematic errors into three groups that can be identified sequentially.

Group 1: Pose Errors of the Hip Frame with Respect to the Body Frame
The kinematic parameters in Eq. (3) correspond to the position and orientation of the hip frame {H j } with respect to the body frame {B} , i.e., u 1j and j . The foot-tip is confined to a spherical surface, with its center coincident with U 1j when the actuator in the UP limb is locked. Hence, the actual value of u 1j , which is denoted as ũ 1j , can be directly identified via spherical fitting. A symbol with a tilde on top denotes the actual or identified value of this variable. This notation is used hereinafter. Thus, the position errors of the hip frame can be easily acquired as follows: There are two methods for modeling the orientation error j according to different definitions of the actual hip frame {H j } , as shown in Figure 4. In the figure, the symbol with a tilde represents the actual value, whereas the symbol without a tilde represents the nominal value.
Method 1: The orientation error j is considered, implying that the orientation of {H j } is determined by the actual positions of U 2j and U 3j , according to the definition of {H j } in Section 2.1. Thus, the position errors of Ũ 2j and Ũ 3j with respect to the {H j } frame must satisfy the following constraints: Accordingly, u 2j and u 3j have three total independent variables in the error model.

Nominal position
Actual position Figure 4 Two different ways to define the actual hip frame: a considering the orientation errors, b ignoring the orientation errors Method 2: The orientation error j is ignored, implying that the orientation of {H j } is identical to the nominal value: Thus, frame {H j } is acquired by translating {H j } from U 1j to Ũ 1j without rotation. As such, Ũ 2j and Ũ 3j may not be located in the yz-plane of the frame {H j } , and the constraints in Eq. (28) are invalid. Hence, there are six independent variables among u 2j and u 3j .
In both methods, there are a total of nine independent variables among u 1j , j , u 2j , and u 3j . The definition of frame {H j } affects the values of α 1j and β 1j in Eqs. (9) and (10) but does not affect the final solution of the joint coordinates. Method 2 is used to define the actual hip frame {H j } , because it is easier to solve a least-squares problem without constraint equations. Thus, three independent variables, i.e., the actual coordinates of the hip center ũ 1j , are identified in this step.

Group 2: Remaining Kinematic Errors of the UP Limb
After ũ 1j is identified in the last step, ũ 1j and the measured foot-tip position Bp fj are substituted into Eq. (3) to update Hp fj . Then, Hp fj (x j ,ỹ j ,z j ) is substituted into Eq.

Group 3: Kinematic Errors of the UPS Limbs
In the last step, the actual coordinates of s fj are identified. By substituting s fj into Eqs. (9) and (10), the actual value of R 1j is calculated. The calibration index of the UPS limb is defined as the joint coordinate error, as follows: Hence, there are six kinematic errors to be identified in Group 3, i.e., the coordinates of s 2j and u 2j . Squaring both sides of Eq. Finally, s 2j and u 2j can be identified using the least-squares method to minimize l 2j . s 3j and u 3j can also be identified using the same procedure in this step, because both UPS limbs have the same kinematic architecture.
Therefore, there are a total of 18 independent kinematic errors for the 2-UPS & UP parallel leg mechanism.

Error Model of Parallel Manipulator
By combining Eqs. (15) and (18), a simplified representation of the inverse kinematic solution for the ith kinematic limb in the 6-PSU parallel manipulator is obtained: Thus, the error model of each PSU limb is expressed as follows: (36) (39) q i = I PSU (p, R, a i , c i , e i , L i ). where p and R represent the position and orientation, respectively, of the frame {P} with respect to the frame {M}.
The inverse kinematic residual of each limb is unrelated to the kinematic parameters of the other limbs; therefore, the error parameters of each limb can be identified independently.
Differentiating both sides of Eq. (17) and ignoring the measurement error of the pose yields We define k i as follows: Substituting Eq. (42) into (41) yields As e i is a unit vector, the following constraint must be satisfied: Hence there are only two independent variables in e i . We define e i as follows: The nominal value of e i is 0 0 1 T ; accordingly, we have By combining Eqs. (45) and (46), we have As e ix and e iy are small, e iz ≈ 0 . Therefore, e i can be expressed as follows: Thus, the number of kinematic-error parameters is reduced, and the nonlinear constraint in Eq. (44) can be eliminated.
(44) �e i � = 1. (47) The parameters can be defined as follows: Substituting Eq. (48) into Eq. (43) yields Thus, each PSU limb has nine independent kinematic errors, and the error model of the parallel manipulator has 54 parameters to be identified.

Measurement System
The experimental setup for calibration is shown in Figure 5. A Leica AT960 laser tracker was used as the measurement equipment, and SpatialAnalyzer @ was used as the DAQ software.
From the perspective of typology, the proposed sixlegged walking machine tool consists of seven parallel mechanisms whose bases are mounted on the robot body. In contrast to industrial robots and conventional machine tools, a legged robot is not fixed to the ground. Hence, before measuring the end effectors of each leg and the manipulator, the robot body must first be located by the laser tracker. Accordingly, an artifact with four magnetic (50) nests is mounted on top of the robot body, as shown in Figure 5(b). The magnetic nests are used to hold a spherically mounted retroreflector (SMR) for the laser tracker and thus provide four reference points fixed on the robot body. This allows the laser tracker to locate the robot body from different azimuths. In general, every time the robot changes its position on the ground, the reference points must be measured again. By aligning the reference points, the measured data points of the different legs and the manipulator can be unified into a single coordinate frame fixed on the robot body. In this way, the robot can turn around on the ground, allowing the end effectors of all the legs and the manipulator to be measured.
To measure the foot-tip position of each leg, the passive ball joint structure under the F/T sensor is replaced with an SMR holder, as shown in Figure 5(c). The location of the SMR center S ′ fj with respect to the ankle frame {A j } was designed to be identical to that of the original passive ball joint center S fj ; i.e., L ′ f = L f . Thus, the SMR coordinates represent the foot-tip position.
The end-effector pose of the parallel manipulator is determined by three reference points fixed on the moving platform, as shown in Figure 5(d). Three magnetic nests are fixed on the moving platform to maintain the SMR. The reference points R 1 , R 2 , and R 3 are the center locations of the SMR when it is placed on the magnetic nests. A measurement coordinate frame {P ′ } based on these reference points is established. The origin of {P ′ } is coincident with R 1 . The x-axis of {P ′ } points from R 2 to R 1 , while the y-axis points from R 3 to R 1 . Assuming that the positions of R 1 , R 2 , and R 3 are denoted as r 1 , r 2 , and r 3 , respectively, the orientation of {P ′ } is derived as follows: Hence, the pose of {P ′ } can be represented as (r 1 , R P ) . Considering the distance between the universal joint centers and the mounting flange of the moving platform and the distance between the SMR centers and the mounting flange, the moving-platform frame {P} is acquired by translating {P ′ } along the negative direction of its z-axis by a fixed distance dz. Thus, the orientation of {P ′ } is identical to that of {P} , and the origin coordinates of {P} are as follows: Thus, the pose of the moving platform can be represented by (p P , R P ).
Furthermore, in the practical application of the robot, the calibration artifact is replaced with a spindle or other end effectors. The relative poses of the measurement frame {P ′ } and tool frame {T } with respect to the moving-platform frame {P} are shown in Figure 6. In the moving platform, the front face is precisionmachined and used as the tool flange for mounting the end effectors. A coordinate frame {F 1 } is fixed on the moving platform, with its xy-plane coincident with the tool flange and its origin located at the center of the tool flange. The moving-platform frame {P} is determined by translating {F 1 } along its z-axis with a constant distance d z1 . d z1 can be acquired from the assembly drawing and represents the distance between one of the ideal universal joint centers and the tool flange. The actual universal joint centers may not be located in the xy-plane of {P} . Nevertheless, the position errors of the universal joint centers are considered in the error model, as indicated by Eq. (40).
The calibration artifact is precision-machined as well; thus, the distance between the SMR center and the mounting face d z2 is known. One of the magnetic nests (55)   Similarly, in the spindle module, a reference frame {F 3 } is attached to the mounting face. The position of the tool center point (TCP) with respect to {F 3 } is determined by the tool setting. The origin of the tool frame {T } coincides with the TCP. The orientation of {T } is identical to that of {F 3 } . When the spindle is mounted on the tool flange, {F 3 } is coincident with {F 1 } . Hence, the pose of {T } with respect to {P} can be derived. Although the actual TCP position was not measured in the experiment, the positional accuracy of the TCP can be determined using the pose accuracy of the moving platform. To achieve a high machining accuracy, the TCP position with respect to the tool flange should be measured using other equipment, such as a tool setting gauge, or should be identified by a trial cut, which requires further research.

Calibration Configurations
The configuration of each leg is represented by the foottip position. For each configuration, there are three unknowns in Eq. (30) and six unknowns in Eq. (34). These equations use the common foot-tip position. The number of constraint equations must be greater than or equal to the number of unknowns. Hence, at least six configurations are required for the calibration of the leg. Considering the workspace limit of the leg, three equidistant values within the range of each generalized coordinate of the UP limb are selected: α 1j = −π 18, 0, π 18, β 1j = −π 18, 0, π 18, and l 1j = 900, 950, 1000 . Then, all the combinations of these three coordinates are traversed to generate 27 (3 3 ) foot-tip positions. All the selected configurations are within the leg workspace, as shown in Figure 7(a).
The configuration of the parallel manipulator is represented by the position of the moving platform. For each configuration, nine unknowns exist in Eq. (40). Hence, at least nine configurations are required for the calibration of the manipulator. If the configuration generation method of the leg is applied to the parallel manipulator, there will be 729 (3 6 ) configurations, as each pose has six independent coordinates. A calibration experiment with such a large number of configurations is redundant and time-consuming. Therefore, a random-generation method was used instead, which included the following steps.
Step 1) Randomly generate six coordinates within certain ranges, e.g., Step 2) Substitute the pose into the inverse kinematic solution of the parallel manipulator, and check whether all the joint coordinates are within their travel ranges. If so, the pose is selected as one of the calibration configurations; otherwise, return to step 1) to generate another pose.
Step 3) Repeat steps 1) and 2) until the number of configurations is adequate.
Ultimately, 50 configurations were generated for the calibration of the manipulator, as shown in Figure 7(b).

Calibration Procedures
Because there was no proper fixture to fix the robot body on the ground, we used the robot legs to support the robot. A six-legged robot needs at least three legs standing on the ground to keep the body stable. Hence, the six legs were divided into two groups. Legs 1, 3, and 5 were included in the first group, and the remaining legs constituted the second group. The leg numbering is shown in Figure 2(a). During the calibration of a leg in one group, the legs of the other group were used to elevate and support the robot body as a stable tripod. After the hanging legs were calibrated, they were commanded to support the body in place of the previous supporting legs. Then, the previous supporting legs would hang in the air for calibration, as shown in Figure 8. In this way, all the legs were calibrated.
Before the leg calibration, several preparations were required. The first preparation was the standing-posture adjustment of the robot, as mentioned previously. Subsequently, the motors except those in the calibrating leg were disabled to weaken the disturbance signal. A prismatic joint could be locked by disabling the corresponding motor, as each motor integrated a clutch. The next step was to replace the passive ball-joint component at the bottom of the calibrating leg with the SMR holder, to allow the foot-tip to be measured by the laser tracker. Finally, the reference points on the top of the body had to be measured before the calibration of each leg. The laser tracker had to be relocated in the DAQ software by aligning these reference points with the previous setup to ensure that the measured foot-tip positions of the different legs were unified to a common coordinate frame fixed with the robot body. After performing the above-mentioned preparations, we placed the SMR on the SMR holder of the calibrating leg and executed the calibration program. Two groups of data were measured for the leg calibration. The first group of data contained the foot-tip trajectory when the motor of the UP limb was disabled and the motors of the UPS limbs were actuated. Because the prismatic joint of the UP limb was locked, the distance between the foottip and the universal joint center remained the same. When the UPS limbs were actuated in the same direction, the UP limb swung around an axis passing through the hip center U 1j . When the UPS limbs were actuated in different directions, the UP limb swung around another axis through U 1j . Hence, the foot-tip trajectory was a cross attached to a spherical surface. Subsequently, the UP limb was enabled, the leg was actuated to 27 calibration configurations in sequence, and the corresponding foot-tip positions were logged as the second group of data. After calibration of each leg, the SMR holder was removed, and the original passive ball joint structure was mounted on the leg again. The calibration procedures were repeated for all six legs.
The DAQ and preprocessing procedures of the sixlegged robot in the DAQ software are shown in Figure 9. The measured foot-tip positions of each leg and the reference points are shown in Figure 9(a). The measured data of the six legs were unified to a single coordinate frame by aligning the reference points, as shown in Figure 9(b). The hip center of each leg was identified via sphere fitting of the cross trajectory, as shown in Figure 9(c). Then, the body frame {B} was created according to the sphere centers of the six legs, as shown in Figure 9(d). Finally, the sphere center positions and the foot-tip positions corresponding to the calibration configurations were exported for further processing using {B} as the reference frame, as shown in Figure 9(e).
The calibration procedures of the parallel manipulator were simpler than those of the legged robot. First, all the legs were commanded to recover to their initial configurations, with all six feet standing on the ground; thus, the robot body was kept still. The reference points on the body were measured again to relocate the laser tracker. We then used a handheld probe called the T-Probe together with the laser tracker to scan the geometric feature of the hexagonal frame of the parallel manipulator and create the machine frame {M} , i.e., the reference coordinate frame for the parallel manipulator subsystem. Additionally, the relative pose between the machine frame {M} and the body frame {B} was acquired. Subsequently, the parallel manipulator was actuated to 25 calibration configurations three times, with the SMR placed on the magnetic nests R 1 , R 2 , and R 3 . Thus, the corresponding SMR positions were measured using the laser tracker, as shown in Figure 10.

Data Processing and Parameter Identification
The data processing and parameter identification procedures for the robot are shown in Figure 11. The sphere-fitting process and creation of several reference coordinate frames were conducted in the DAQ software, whereas the objective functions for all the kinematic limbs were solved in MATLAB using the lsqnonlin optimization toolbox function. Several identified parameters of the leg deviated significantly from their nominal values, which indicated that some of the kinematic parameters in the error model of the leg were non-identifiable. Hence, we used QR decomposition of the identification Jacobian of each kinematic limb to distinguish identifiable parameters from nonidentifiable parameters [22].
Considering the UP limb of the leg as an example, by applying Eq. (33) for all calibration configurations, the identification Jacobian J e of the UP limb was obtained as follows: where q 1 represents the joint coordinate errors of the UP limb for all configurations. Then, J e was decomposed into an orthogonal matrix Q and an upper triangular matrix R through QR decomposition. Thus, Eq. (57) can be rewritten as The third diagonal element of R was equal to zero, indicating that the corresponding kinematic parameter s fjz was non-identifiable. The norm of the second diagonal element of R was close to zero and much smaller than the first diagonal element; hence, the corresponding parameter s fjy had low identifiability. Therefore, in the final identification process, s fjy and s fjz were set as zero, and only s fjx was identified.
Similarly, through QR decomposition of the identification Jacobian of the UPS limb, s 2jy , s 2jz , s 3jy , and s 3jz were found to have low identifiability. Hence, their errors were ignored. Thus, nine kinematic parameters of a leg were identified using the error model, with three kinematic parameters identified via sphere fitting. The kinematic parameters of the different legs were identified using the (58) Q T q 1 = R s fj .  Table 1. The parameter identification for the parallel manipulator did not have the same problem as that for the leg. All the kinematic parameters of each PSU limb were identified separately by the error model. The nominal and identified kinematic parameters of the parallel manipulator are compared in Table 2.
The maximum joint coordinate errors before and after calibration are compared for Leg 1, as shown in Figure 12. The vertical axis in each figure represents the maximum absolute value of the three joint coordinate errors for each calibration configuration, i.e., q k ∞ , where q k is defined in Eq. (21). The maximum value of the curve before calibration was 5.48 mm in the 27th configuration. The maximum error was reduced to 0.12 mm after calibration. The results indicate the effectiveness of the calibration method.
Similarly, the maximum joint coordinate errors before and after calibration for the parallel manipulator are compared in Figure 13. The maximum joint coordinate error of all the active joints and all the configurations was reduced from 0.7 to 0.04 mm. Because the initial error of the parallel manipulator was much smaller than that of Leg 1, the reduction in the joint coordinate error of the parallel manipulator was not as significant as that of Leg 1.

Validation
After calibration, the kinematic errors of the entire robot were compensated in the control software. The positioning and trajectory errors of the six-legged   walking machine tool were evaluated through a series of experiments.

Positioning-error Evaluation
In the first experiment, the positioning error of each leg and that of the manipulator were evaluated. Each subsystem was moved to a set of validation configurations different from the calibration configurations. The actual positions of each foot-tip and actual poses of the moving platform were measured using the laser tracker.
In particular, 26 foothold locations frequently used for walking planning of the six-legged robot were selected as the validation configurations for each leg. As shown in Figure 14, the footholds started at the initial position of the foot-tip and then moved along the x, −x, y, and −y directions, and three equidistant points were selected in each direction. Hence, 13 footholds in a horizontal plane were generated as validation configurations. The other 13 validation configurations were generated by transferring these points along the z-axis at a certain distance. Each leg was programmed to move to the validation configurations in sequence, and the corresponding foot-tip positions were measured. The experiment was performed twice using the nominal kinematic parameters and identified kinematic parameters in the control system. The position-error distributions of the legs are shown in Figure 15. The position error is defined as the Euclidean distance between the command position and the measured position of the foot-tip. In the figure, the bars represent the error margins. The highest point of each bar indicates the maximum Euclidean error of each leg, and the dot in the bar indicates the mean error. The blue and orange bars indicate the position-error distributions before and after calibration, respectively. As shown in Figure 15, the position errors of all the legs were significantly reduced after calibration. The maximum position error for all the legs before calibration was 14.83 mm, and this value was reduced to 1.13 mm after calibration. The average position error for the legs was < 0.50 mm after calibration.
For the parallel manipulator, 25 randomly generated configurations different from the calibration configurations were used for the validation experiment. The manipulator was moved to the validation configurations, and the corresponding poses of the moving platform were measured via the three-point method using the same DAQ and processing steps that were employed in the calibration experiment. The pose errors of the parallel manipulator with the kinematic parameters before and after calibration are compared in Figure 16. The position errors are defined as the Euclidean distances between the command positions and the corresponding measured positions. The orientation errors are defined as the rotation angles from the command poses and the corresponding measured poses based on the axis-angle representation of rotation [32]. As shown in Figure 16(a), the position accuracy of the parallel manipulator was significantly improved after calibration. The maximum position error of the moving platform was reduced from 0.53 to 0.07 mm after calibration. Moreover, the maximum orientation error was reduced from 2.5 × 10 −3 to 2.1 × 10 −3 rad, as shown in Figure 16(b). The improvement in the orientation accuracy was not significant and may have been caused by the indirect measurement of the orientation. We checked the primary data and determined that the difference between the maximum and minimum values of ∠R 2 R 1 R 3 was 1.4 × 10 −3 rad, indicating that the orientation measurement error was no smaller than this value. Because the maximum orientation error before calibration was less than twice the measurement error, the insignificant improvement in the orientation accuracy is reasonable.

Trajectory-error Evaluation
To further investigate the trajectory accuracy of both subsystems, the six-legged robot and parallel manipulator were programmed to move along a circular path, and the actual trajectories of the moving platform were captured by the laser tracker. While testing the six-legged robot, the manipulator was commanded to remain still. The 18 actuators of the legged robot were programmed to move synchronously, translating the robot body along a circular path with a radius of 100 mm and keeping all the feet still on the ground. Similarly, while testing the parallel manipulator, the legged robot stood still, and the moving platform was programmed to move along a circular path of 50 mm. The smaller circle radius was limited by the manipulator workspace. Each subsystem was tested twice using the nominal and identified kinematic parameters. The trajectory deviations were acquired by calculating the shortest distance between the captured points and the ideal circular paths, and the results were plotted in a polar diagram, as shown in Figure 17. Here, the radial coordinate indicates the central angle of each captured point on the circular path, and the angular coordinate indicates the trajectory deviation. The trajectory deviations of the robot body and parallel manipulator were both significantly reduced after the kinematic calibration.
The trajectory error is defined as the maximum value of the trajectory deviation. The trajectory error of the body motion of the six-legged robot was reduced from 2.1 to 1.3 mm after calibration. The results indicate that the kinematic calibration of the legs improves not only the motion accuracy of each individual leg but also the cooperative motion accuracy among the different legs. The trajectory error of the parallel manipulator was reduced from 0.54 to 0.048 mm after calibration.
To evaluate the overall trajectory error when the sixlegged mobile robot and manipulator move together, the robot body and manipulator were programmed to move along a straight line in opposite directions at the same speed, with all the feet standing on the ground. The end-effector position was captured by a laser tracker at a frequency of 100 Hz. The experiment was performed in both the lateral and vertical directions, separately. The robot body trajectory of lateral movement included four steps: (1) moving 50 mm to the left, (2) moving 50 mm to the right, (3) moving 50 mm to the right, and (4) moving 50 mm to the left. In the vertical-movement test, the robot body moved up and down with the same sequence and distance. Ideally, the end-effector position should have remained constant during the co-motion of the robot body and manipulator. However, owing to the trajectory errors of the two subsystems and the communication delay between their control systems, the end-effector position deviated from the initial position. The deviation in the end-effector position indicated the co-motion trajectory error. The results are shown in Figure 18, where T is and T ie represent the starting and ending times of the ith (i = 1, 2, 3, 4) motion step. The maximum deviations on the x-, y-, and z-axes during the lateral movement were 0.701, 0.013, and 0.060 mm, respectively. The maximum Euclidean error was 0.702 mm. The maximum deviations on the x-, y-, and z-axes during the vertical movement were 0.181, 0.065, and 0.213 mm, respectively, and the maximum Euclidean error was 0.332 mm. Hence, the six-legged walking machine tool has a higher comotion trajectory accuracy in the vertical direction than in the lateral direction.

Conclusions
This paper presents the kinematic calibration of a six-legged walking machine tool. The error models of the 3-DOF parallel leg and the 6-DOF parallel manipulator were derived by minimizing the inverse kinematic residual of each limb, where the inverse kinematic residual is defined as the difference between the actual and computed joint coordinates. The kinematic parameters of the 2-UPS & UP parallel leg mechanism are divided into three groups, i.e., the hip center position with respect to the robot body, the remaining parameters in the UP limb, and the parameters in the UPS limbs. The kinematic parameters of the 6-PSU parallel manipulator are grouped by limbs as well. The hip center of each leg is first identified via sphere fitting, and the other kinematic parameters are identified by solving the objective function of each limb individually using the least-squares method. Thus, the kinematic parameters are partially decoupled, the complexities of the error models are reduced, and the numerical efficiency of the identification algorithm is improved. A laser-tracker-based kinematic calibration method is proposed for the six-legged walking machine tool. Several artifacts were designed to assist in the measurement of multiple foot-tips. By aligning the reference points on the body, the measured data of the different legs and manipulator were unified to a common coordinate frame. Thus, the lack of a fixed base for the legged robot was addressed. A calibration experiment was performed, and the results indicated that the calibration method significantly improved the motion accuracy of each leg and manipulator.
After calibration, the positioning accuracy and trajectory accuracy of the robot were significantly improved. The maximum position error of the foot-tips was reduced from 14.83 to 1.13 mm, and the maximum position error of the manipulator was reduced from 0.53 to 0.07 mm. The trajectory error of the body motion with all the feet on the ground was reduced from 2.1 to 1.3 mm. In addition, the trajectory error of the parallel manipulator was reduced from 0.54 to 0.048 mm. The co-motion trajectory error when the legged robot and the manipulator moved together was also evaluated after calibration. The result was 0.702 mm, with a range of motion equal to 50 mm. The proposed kinematic calibration method can be extended to other parallel mechanisms, as well as other legged robots.