# Automatic Wheels and Camera Calibration for Monocular and Differential Mobile Robots

^{*}

## Abstract

**:**

## 1. Introduction

- $(X,Y,Z)$ are the coordinates of a 3D point in the world space;
- $(u,v)$ are the coordinates of the projection point in pixels;
- s is a scale factor;
- A is a camera matrix, or a matrix of intrinsic parameters;
- $\left[R\right|t]$ extrinsic parameters, where R is a rotation matrix and t-translation;
- $({c}_{x},{c}_{y})$ is a principal point that is usually in the image center;
- ${f}_{x},{f}_{y}$ are the focal lengths expressed in pixel units.

## 2. Analogues Overview

#### 2.1. Existing Calibration Methods

#### 2.2. Results of Overview

## 3. Calibration Process

#### 3.1. Start Preset

#### 3.2. Camera Calibration

- Which board is currently being viewed;.
- Which direction to turn;
- When to stop;
- What to do if the chessboard is not found in the picture.

- The number of the board being observed (the boards are numbered starting from 0 counterclockwise). The initial value is determined by the robot’s position;
- The direction of the robot’s rotation. The initial value can be arbitrary; for definiteness, it is assumed to be clockwise;
- Is there a chessboard in the frame? The initial value is “true”, since the initial position of the robot suggests that the board is in the camera’s field of view;
- Is the robot in recovery mode? The recovery mode refers to a situation where the robot does not observe the chessboard, but knows where to move in order to find it. This can be either in a situation of transition from board to board or when the robot has turned so that it is not already observing the extreme board.

- Obtain frame from the camera;
- Find a chessboard on the camera frame;
- Save information about board corners found in the image;
- Determine the direction of rotation according to the schedule;
- Make a step;
- Either repeat the steps described above, or complete the data collection and proceed with the camera calibration using OpenCV.

#### 3.3. Moving to Wheel Calibration

#### 3.4. Wheel Calibration

- $\theta $—robot angle,
- ${\omega}_{1}\phantom{\rule{0.166667em}{0ex}}{\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.

- ${\omega}_{1}\phantom{\rule{0.166667em}{0ex}}{\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.

- 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}\phantom{\rule{0.166667em}{0ex}}{\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.

#### 3.5. Implementation

## 4. Accuracy Evaluation

#### 4.1. Evaluated Parameters

#### 4.2. Evaluation Methods

#### 4.3. Calibration Results Analysis

## 5. Method Modifications

#### 5.1. Moving the Robot Out of the Calibration Area

- Orient the robot coaxially with the orientation of the floor markers;
- Move straight as long as there is at least one marker in the frame;
- Stop;
- Transfer the robot control to standard robot control algorithms.

#### 5.2. Calibration Refinement during the Robot’s Operation

## 6. Future Work

## 7. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Zhang, Z. A flexible new technique for camera calibration. IEEE Trans. Pattern Anal. Mach. Intell.
**2000**, 22, 1330–1334. [Google Scholar] [CrossRef][Green Version] - Faugeras, O.D.; Luong, Q.T.; Maybank, S.J. Camera self-calibration: Theory and experiments. In European Conference on Computer Vision; Springer: Berlin/Heidelberg, Germany, 1992; pp. 321–334. [Google Scholar]
- Polyakov, A.; Kornilova, A.V.; Kirilenko, I.A. Auto-calibration and synchronization of camera and MEMS-sensors. Proc. ISP RAS
**2018**, 30, 169–182. [Google Scholar] [CrossRef] - Civera, J.; Bueno, D.R.; Davison, A.J.; Montiel, J. Camera self-calibration for sequential bayesian structure from motion. In Proceedings of the 2009 IEEE International Conference on Robotics and Automation, Kobe, Japan, 12–17 May 2009; pp. 403–408. [Google Scholar]
- Dixon, W.E.; Dawson, D.M.; Zergeroglu, E.; Behal, A. Adaptive tracking control of a wheeled mobile robot via an uncalibrated camera system. IEEE Trans. Syst. Man Cybern. Part (Cybernetics)
**2001**, 31, 341–352. [Google Scholar] [CrossRef] [PubMed][Green Version] - Carrera, G.; Angeli, A.; Davison, A.J. SLAM-based automatic extrinsic calibration of a multi-camera rig. In Proceedings of the 2011 IEEE International Conference on Robotics and Automation, Shanghai, China, 9–13 May 2011; pp. 2652–2659. [Google Scholar]
- Censi, A.; Franchi, A.; Marchionni, L.; Oriolo, G. Simultaneous calibration of odometry and sensor parameters for mobile robots. IEEE Trans. Robot.
**2013**, 29, 475–492. [Google Scholar] [CrossRef] - Martinelli, A.; Tomatis, N.; Siegwart, R. Simultaneous localization and odometry self calibration for mobile robot. Auton. Robot.
**2007**, 22, 75–85. [Google Scholar] [CrossRef] - Fazekas, M.; Gáspár, P.; Németh, B. Calibration and Improvement of an Odometry Model with Dynamic Wheel and Lateral Dynamics Integration. Sensors
**2021**, 21, 337. [Google Scholar] [CrossRef] [PubMed] - Camera Calibration. 2013. Available online: https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_calib3d/py_calibration/py_calibration.html (accessed on 14 December 2020).
- Wheel Calibration in Duckietown. 2017. Available online: https://docs.duckietown.org/DT19/downloads/opmanual_duckiebot/docs-opmanual_duckiebot/builds/754/opmanual_duckiebot/out/wheel_calibration.html (accessed on 15 April 2021).
- Camera Calibration and Validation in Duckietown. 2017. Available online: https://docs.duckietown.org/DT19/downloads/opmanual_duckiebot/docs-opmanual_duckiebot/builds/754/opmanual_duckiebot/out/camera_calib.html (accessed on 28 March 2021).
- Zhang, Z.; Liu, Y.; Tan, X.; Zhang, M. Robust sharpness metrics using reorganized DCT coefficients for auto-focus application. Asian Conference on Computer Vision; Springer: Berlin/Heidelberg, Germany, 2014; pp. 172–187. [Google Scholar]

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Chaika, K.; Filatov, A.; Filatov, A.; Krinkin, K.
Automatic Wheels and Camera Calibration for Monocular and Differential Mobile Robots. *Appl. Sci.* **2021**, *11*, 5806.
https://doi.org/10.3390/app11135806

**AMA Style**

Chaika K, Filatov A, Filatov A, Krinkin K.
Automatic Wheels and Camera Calibration for Monocular and Differential Mobile Robots. *Applied Sciences*. 2021; 11(13):5806.
https://doi.org/10.3390/app11135806

**Chicago/Turabian Style**

Chaika, Konstantin, Anton Filatov, Artyom Filatov, and Kirill Krinkin.
2021. "Automatic Wheels and Camera Calibration for Monocular and Differential Mobile Robots" *Applied Sciences* 11, no. 13: 5806.
https://doi.org/10.3390/app11135806