Robotics: Mecanum Wheel Vehicle and Optical Sensor

This is the first of a series of blog posts about robotics.

Just before the christmas holidays I ordered myself a rather inexpensive (compared to alternatives) robotic vehicle in order to get experience in the hardware of robotics as well as learn about the famous Robot Operating System ROS.

I chose a vehicle with metal chassis and mecanum wheels, which promised a lot of fun because it can go into several directions by controlling each of the four dc-motors separately.

The model is a Metal Chassis Mecanum Wheel Robotic (for Arduino Mega2560) Introduction (Model ZZ012318MC) from osoyoo which I ordered at Amazon for €129.

The good points:
For your money you get everything you need to play and learn as beginner, including rechargable batteries, charger, and nice extra equiment like an ultrasonic sensor, optical tracking sensor module and a servo motor. There are several different lessons you can do with this equiment and in this way learn about robotics and programming in the Arduino IDE.

The suboptimal points:
In the model I received, the four gear motors have non-neglectable difference in their performance, meaning, if the same power is applied to them, the number of resulting revolutions of the wheels are not the same. You can measure that with the attached rotary encoder. Additionally, the mecanum wheels feel to losly fixed on the axis, and the mounting points for the motors on the chassis are not precise enough (Tolerances of about 2mm).
All of this leads, at least for the model I received, to the inability to drive in a straight line (by powering all motors with the same voltrage) for even 1 meter.
Other robotic vehicles like TurtleBot (with rubber wheels and stepper motor) should not have this difficulties in driving in a straight line and are designed from the beginning to work with ROS.

A video of trying to drive in a straight line is here: https://youtube.com/shorts/jt1zlkfRW5g?feature=share