# Bilateral Teleoperation System with Integrated Position/Force Impedance Control for Assembly Tasks
## 3 Operator Motion Tracking  
The tracking of the operator motion at the local site was performed by a wireless locator system. The locator system consists of two lighthouses and a wearable VIVE  
Figure 1: System of teleoperation assembly.  
Tracker. The tracker is controlled by the operator, and the lighthouse base stations measure the tracker attitude through infrared light scanning. Since the coordinate system of the tracker is determined by the direction of the base station, the position of the base stations needs to be kept in a straight line with the position of the tracker to achieve the consistency of the movement direction from the operator to the robot [30]. The distance between the base station and the tracker is recommended to be about 40-300 cm for ideal results. It should be noted that the display helmet is optional in the application. The number of base stations and trackers can be expanded. With an increase in the number of base stations, the positioning accuracy can be increased.  
As shown in Figure 2, at the local site, the tracker was manipulated by the operator. The position information of the hand was reconstructed in real-time. This involved the following steps:  
Step1: The acquisition of original positioning data from the tracker.  
After the locator services had been placed in the required position, the initial data of the tracker were obtained through the functions provided by the Py_Openvr open source library. Then, the tracker's data were cut and processed to obtain the tracker's position information.  
Step2: The relationship between quaternions and rotation vectors and their conversion.  
The original attitude data captured by the tracker are described by a quaternion, and the control of the attitude of the robot was performed using the direction vector. For any attitude date \(q(w,x,y,z)\) described by quaternion, the corresponding rotation vector \(R(r_{x},r_{y},r_{z})\) described by the direction vector can be calculated using the following equation:  
\[\begin{split} r_{x}&=x\cdot\left|\frac{2\arccos(w)} {\sqrt{1-w^{2}}}\right|\\ r_{y}&=y\cdot\left|\frac{2\arccos(w)}{\sqrt{1-w^{2}}} \right|\\ r_{z}&=z\cdot\left|\frac{2\arccos(w)}{\sqrt{1-w^{2}} }\right|\end{split} \tag{1}\]  
where the direction of the rotation vector is the axis of rotation and its modular is the angle of counterclockwise rotation.  
Step3: Calculating the command pose of the robot from the tracker's position information.  
Since the initial position of the tracker is relevant to the operator's initial position and the operator's initial position is uncertain, the use of the absolute coordinate values  
Figure 2: Human hand–arm tracking.  
of the tracker may cause the uncertainty of the robot's initial position. We adopted the relative position variation in the tracker to achieve control of the robot. Based on the set initial position, the relative movement of the operator can be calculated, and the command position of the robot is calculated using the following equation:  
\[P_{robot\_i}=P_{robot\_0}+P_{tracker} \tag{2}\]  
\[P_{tracker}=P_{tracker\_i}-P_{tracker\_0} \tag{3}\]  
where \(P_{robot\_i}\) is the current control position of the robot, \(P_{robot\_0}\) refers to the initial position of the robot setup, \(P_{tracker}\) represents the relative position variation in the tracker, and \(P_{tracker\_i}\) and \(P_{tracker\_0}\) are the current measured and the first measured position of the tracker, respectively. The orientation of the robot is determined by the absolute tracker attitude.