## Calibration Process
### Wheel Calibration  
The main idea is to calculate the calibration coefficient of the wheels based on a series of experimental robot drives. Consider the calculations required for one experiment. The equation of the robot's motion can be represented as follows  
\[ \begin{cases}x^{\prime}(t)=R\frac{\omega_{1}(t)+\omega_{2}(t)}{2}\cos(\theta(t) )\\ y^{\prime}(t)=R\frac{\omega_{1}(t)+\omega_{2}(t)}{2}\sin(\theta(t))\\ \theta^{\prime}(t)=R\frac{\omega_{1}(t)-\omega_{2}(t)}{L}\end{cases}  \tag{1}\]  
where  
\(\theta\)--robot angle,  
Figure 2: State to state algorithm of camera calibration. \(\omega_{1}\,\omega_{2}\)--angle velocities of left and right wheels;  
\(R\)--wheels radius that should be determined for a particular robot;  
\(L\)--distance between wheels that should be determined for a particular robot. Moreover, if the movement is performed with constant angular velocities, then the differential equation turns into the usual  
\[\left\{ \begin{array}{l}x=tR\frac{\omega_{1}+\omega_{2}}{2}\cos(\theta)\\ y=R\frac{\omega_{1}+\omega_{2}}{2}\sin(\theta)\\ \theta=tR\frac{\omega_{1}-\omega_{2}}{L}\end{array} \right. \tag{2}\]  
where \(t\)--movement time. It can be seen that the orientation angle of the robot (camera) is independent of the coordinates, while the coordinates depend on the angle. Therefore, it is possible to obtain a calibration coefficient even without information about the real speed of the robot in space. If the robot actually travels in a straight line in the world from one marker to the second, its orientation angle relative to the first and second markers should remain unchanged. This statement is based on the requirement that the markers are all oriented in the same way. However, sometimes it is possible that the robot does not move straight, even if it invokes the command of moving straight. This behavior may be caused by a slight difference in wheels radius, a slight difference on wheel engines output torque, wheel wear, etc. To avoid this, the movement model is required to be updated. The angle of the marker's rotation over time can be expressed as \(\Delta\theta\). Since the robot thinks that it moves with equal angular velocities of the wheels, and thinks that its angle deviation is 0, it must be pointed out that one of the wheels should be accelerated by a factor of \(k\) so that the robot rotates on \(\Delta\theta\) in \(\Delta t\) time. In this case, since the formula is constructed relative to the internal representations of the camera, the orientation angle of marker 2 in space should be taken. Namely, \((-\Delta\theta)\)  
\[-\Delta\theta=\Delta tR\frac{\omega_{1}-k\omega_{2}}{L} \tag{3}\]  
From Equation (3), coefficient k can be expressed  
\[k=\frac{\omega_{1}+\frac{\Delta\theta I}{\Delta tR}}{\omega_{2}}\]  
\(\omega_{1}\,\omega_{2}\)--angle velocities of left and right wheels;  
\(R\)--wheel radius;  
\(L\)--distance between the wheels;  
\(\Delta t\)--time for which the robot moved from one marker to another. Based on this, an automatic wheel calibration algorithm is built. Let us consider the first iteration of the experiment--one robot passage--as well. * The robot receives the orientation of the marker closest to it and remembers it. * Next, the robot moves forward with thespeeds of the left and right wheels equal to \(\omega_{1}\,\omega_{2}\) for some fixed time \(t\). The speeds are calculated taking into account the calibration coefficient \(k\), which for the first iteration is chosen to equal 1--that is, it is assumed that the real wheel speeds are equal. * The robot obtains the orientation of the marker closest to it again and calculates the difference in angles between them. * The coefficient \(k_{i}\) for this step is calculated. * The robot moves back for the same time \(t\). In order to reduce the influence of the error in calculating \(k_{i}\), coefficient \(k\) is refined only by the value of \((k_{i}-1)/2\) after each iteration.