# An Orthogonal Wheel Odometer for Positioning in a Relative Coordinate System on a Floating Ground
## 2 Materials and Methods
### The Motion Model of Four Orthogonal Wheels  
Based on a single wheel, the positioning system we designed uses four orthogonal wheels to solve and obtain accurate coordinate information and angle information. Figure 7 shows the odometer motion model in the X and Y directions of four orthogonal wheels.  
Through the linear velocity acquisition module-magnetic encoder, we can obtain the rotation angle \(\theta_{1}\), \(\theta_{2}\), \(\theta_{3}\) and \(\theta_{4}\) of each omnidirection from the driving wheel. Given that the radius of each omnidirectional driven wheel is R, the distance \(l_{1}\), \(l_{2}\), \(l_{3}\), \(l_{4}\) of the omnidirectional driven wheel can be calculated. The wheel in the front direction is 1, and clockwise is 2, 3, and 4, as shown in Figure 7:  
The wheel axes of the adjacent omnidirectional driven wheels are perpendicular to each other. Through (11), the rotation angle \(\theta\) of the mobile robot relative to itself can be calculated:  
\[l_{n}=\theta_{n}R(n=1,2,3,4) \tag{11}\]  
\[\theta=\frac{l_{1}+l_{2}-l_{3}-l_{4}}{4L} \tag{12}\]  
Figure 7: The motion model of four omnidirectional wheels in world and its own coordinates. The horizontal plane body coordinate system XOY: the center of the body is the center point O, OX direction is the direction of the moving robot, OY direction is the vertical direction of the moving robot. The initial position coordinates of the mobile robot (x, y) are the origin of the world coordinate system.  
By differentiating Equations (11) and (12), we can obtain the distance \(\mathrm{d}_{l_{1}}\), \(\mathrm{d}_{l_{2}}\), \(\mathrm{d}_{l_{3}}\) and \(\mathrm{d}_{l_{4}}\) of the omnidirectional rotation from the driving wheel under each instantaneous moment. Then, the displacement \(\mathrm{d}\mathrm{X}\) and \(\mathrm{d}\mathrm{Y}\) of the mobile robot in the direction of OX and OY relative to the coordinate system XOY with itself as the origin is obtained at every instantaneous moment:  
\[\mathrm{d}\mathrm{X}=\frac{\mathrm{d}_{l_{2}}-\mathrm{d}_{l_{4}}}{2}\cos( \theta)-\frac{\mathrm{d}_{l_{1}}-\mathrm{d}_{l_{3}}}{2}\sin(\theta) \tag{13}\]  
\[\mathrm{d}\mathrm{Y}=\frac{\mathrm{d}_{l_{1}}-\mathrm{d}_{l_{3}}}{2}\cos( \theta)-\frac{\mathrm{d}_{l_{2}}-\mathrm{d}_{l_{4}}}{2}\sin(\theta) \tag{14}\]  
By integrating the displacement \(\mathrm{d}\mathrm{X}\) and \(\mathrm{d}\mathrm{Y}\) in the direction of OX and OY at every instantaneous moment, the displacement \(\mathrm{d}\mathrm{X}\) and \(\mathrm{d}\mathrm{Y}\) in the direction of OX and OY relative to the origin position of the mobile robot can be obtained:  
\[\mathrm{d}\mathrm{X}=f\mathrm{d}\mathrm{X}\mathrm{d}t \tag{15}\]  
\[\mathrm{d}\mathrm{Y}=f\mathrm{d}\mathrm{Y}\mathrm{d}t \tag{16}\]  
Thus, the data received by the magnetic encoders on the orthogonal wheels can be converted into position and velocity information in the world coordinate system. That is, the displacement of \(\mathrm{d}\mathrm{X}\) and \(\mathrm{d}\mathrm{Y}\) relative to the origin position of the mobile robot and the rotation angle relative to itself are obtained.  
In the next chapter, the positioning module using an orthogonal wheel and gyroscope is compared with the positioning sensor system we designed to illustrate the disadvantages of using a gyroscope in some specific situations and the advantages of the positioning sensor system introduced in this paper. The positioning sensor system mainly collects and processes the encoder data on the orthogonal wheels to calculate the real-time position and pose state of the positioning system. Through the acquisition of encoder data, the data are transferred to the central processing unit, and then the central processing unit calculates the pose state of the mobile robot and transmits it to the upper computer through the serial port.