# Design, Fabrication, and Control Algorithm of Self-Reconfigurable Modular Intelligent Vehicles
## 5 Experimental Validation
### Reconfiguration  
When the modular vehicle is within the visual range of the monocular camera, the coordinate of each AprilTag's geometric center and its rotation relative to the three axes can be calculated through the identification and positioning algorithm; then the results are sent to the ESP8266 module of the main control vehicle through the serial port (Figure 20).  
In the modular vehicle group, the ESP8266 module of the main vehicle reads the spatial attitude and position information transmitted by the OpenMv module and calculates the coordinate information of the submodular vehicle in the world coordinate system, as shown in Figure 21. After making a difference between the coordinates of the target modular unit and the coordinates of the current modular unit, the result is sent to each submodular vehicle through an ESP8226 network.  
The difference in coordination received by each submodule vehicle represents the movement direction of the modular car (positive value means to move forward in this direction; negative value means to move backward). The offset in the X-axis is compensated through the front and rear linear movement, the offset in the Y-axis is compensated through the left and right linear movement, and the yaw angle offset around the Z-axis is compensated through the spin.  
Figure 19: Battery packs and protection board.  
Figure 20: Position and attitude output of a modular vehicle.  
Two submodule cars can also communicate with each other through each ESP8266 module. When the two submodule cars detect that they are in close contact with each other, they will enable the connection magnetic attraction device in the corresponding direction according to the position information to realize the fixed configuration. When the two submodule cars detect that they are about to be separated, the magnetic attraction device in the corresponding orientation will be closed to complete the configuration decomposition.  
After completing the configuration reorganization, each submodule car still receives the motion command of the main module car. At the same time, each submodule car will use the mutual communication between ESP8226s to complete an additional motion coordination program to ensure the consistency of the car group when moving in a fixed configuration. Magnetic attachments around each car will ensure the physical connection of the overall movement.  
In order to measure the positioning accuracy of the submodule car by the reconfiguration control, the modular car is arranged in a grid plane of 40 cm \(\times\) 40 cm, and the OpenMv field of view is aligned with the center of the grid plane. The measured values averaged five times are compared with the coordinates set in the simulation, and the error between the simulated coordinates and the measured world coordinates is shown in Figure 22. According to the experimental results, the positioning error of the submodule car is less than \(\pm\)4 mm, and the positioning error of the yaw angle is within \(\pm\)1\({}^{\circ}\), which can meet the needs of reconfiguration control.  
Figure 21: Coordination calculation.  
Figure 22: Visual positioning error of a modular vehicle.