## 3 Motion Mapping
### Construction of Human Skeleton Model and Joint Mapping: GA-LVVJ
The origin of a link frame is located at the intersection between the link itself and its child link, as depicted in Figure 4. The postures of the robot and the human skeleton model that are shown in Figure 4 are defined as the initial postures in this paper. The LShoulderPitch and RShoulderPitch angles are equal to \(\frac{\pi}{2}\), whereas all other joint angles in the initial posture are zero. These joint angles are defined as the initial joint angles. To improve the accuracy of the joint mapping, when extracting the angle of the mother joint between two link vectors, the child link vector should be first projected on the plane vertical to the coordinate axis which represents the rotation axis of the mother joint, then this joint angle can be calculated through the angle between the projected vector and another vector on this plane. When extracting the angle of the child joint between two link vectors, the joint angle can be obtained through the angle between the child link vector and the same plane mentioned above. If there is only one joint between two link vectors, it can be regarded as a mother joint. It is worth noting that since the human torso is not rigid, skeleton points 0, 1, 2, 5, 11, 17 and 21 in the human skeleton model may not all be in the same plane. As shown in Figure 4, to obtain more accurate joint angles, the torso of the human skeleton model is divided into four parts, i.e., the left upper torso, the right upper torso, the left lower torso and the right lower torso. Compared with a single-frame method (such as a method based on a single torso frame [28] or a fixed world frame [13; 27]), the proposed method of torso segmentation yields more precise joint angles for the human skeleton model and improves the imitation similarity for local postures. Next, the process of obtaining several key joint angles for the left side of the body will be presented as an example of GA-LVVJ. (1) Joints of Shoulder_Left: The angles of shoulder joints should be calculated with reference to upper torso links. The axis of LShoulderPitch is collinear with the vector \(\vec{V}_{2\text{-}5}\). Because LShoulderRoll is the child joint of LShoulderPitch, its axis changes with the rotation of LShoulderPitch and is collinear with the the normal vector to Plane 2-5-6, \(\vec{N}_{2\text{-}5\text{-}6}\), which is calculated as  
\[\vec{N}_{2\text{-}5\text{-}6}=\vec{V}_{2\text{-}5}\times\vec{V}_{6\text{-}5}. \tag{1}\]  
When LShoulderPitch is at its initial angle, the axis of LShoulderRoll is collinear with the normal vector to the left upper torso plane, \(\vec{N}_{1\text{-}2\text{-}5}\), i.e.,  
\[\vec{N}_{1\text{-}2\text{-}5}=\vec{V}_{2\text{-}5}\times\vec{V}_{1\text{-}2}. \tag{2}\]  
Then, \(\vec{N}_{1\text{-}2\text{-}5}\) is translated to the origin of the link frame of the left upper torso, point 5, and the \(x\)-axis of the frame is set collinear with \(\vec{N}_{1\text{-}2\text{-}5}\), as depicted in Figure 5. Because the axis of LShoulderPitch is vertical to the torso link in NAO but may not be in the human skeleton model, \(\vec{V}_{1\text{-}2}\), which represents the upper torso link, rather than \(\vec{V}_{2\text{-}5}\), which is aligned with the axis of LShoulderPitch in the human skeleton model, is translated to point 5 and set collinear with the \(x\)-axis of the link frame. \(\vec{V}_{1\text{-}2}\) is collinear with the \(z\)-axis. Then, a reference vector \(\vec{R}_{\text{LUT}}\) is introduced and set collinear with the \(y\)-axis to complete a right-handed frame; this vector is obtained as follows:  
Figure 2.0  
where the subscript LUT is an abbreviation for \"left upper torso\". As previously discussed, LShoulderPitch is the mother joint of LShoulderRoll.