Automatic Generation of Locomotion Patterns for Soft Modular Reconﬁgurable Robots

: In recent years, soft modular robots have become popular among researchers with the development of soft robotics. However, the absence of a visual 3D simulation platform for soft modular robots hold back the development of the ﬁeld. The three-dimensional simulation platform plays an important role in the ﬁeld of multi-body robots. It can shorten the design cycle, reduce costs


Introduction
Modular reconfigurable robots (MRR) consist of several uniform modular units. Different relative positions between the modular units can form different robot structures, thereby realizing different motion forms and conducting variable tasks. Soft robots are made of soft material, such as silica gel, hydrogel, EAP, and SMP. They have infinite degrees of freedom due to the special characteristics of the soft material, which makes soft robots able to make continuous and large deformation beyond their own scale, and pass through narrow spaces smaller than their own scale. Increasingly, researchers have applied the concept of modularization to the field of soft robots since Onal and Rus [1,2] put forward soft modular robots for the first time. As the term suggests, soft modular reconfigurable robots hold the characteristics of both soft robots and modular reconfigurable robots. Figure 1a-g shows some classic prototypes of soft modular robots. For instance, Vergara et al. [2] simulated cell migration, delamination, involution, and even simple self-reconfiguration using a simple pneumatic cubic soft module. Morin et al. [3,4] designed a kind of pneumatic cubic which has six surfaces with different patterns and materials, so that different shapes can be formed when inflated and a variety of functions can be achieved when combining several cubic modules.
By using the concept of assembling, Lee et al. [5] designed modules with different materials and functions that can be assembled to form the physical prototype according to the tasks' requirements. In addition, there are many analogous designs, such as the multi-spherical modules [6], the soft modular robots actuated by voice coil [7], the reconfigurable bending modules [8], the reconfigurable omnidirectional soft robots [9], and so on. However, the nonlinear mechanical property of soft materials and the large number of units make it difficult to establish a mechanical model and design the controller of soft modular robots manually [10][11][12]. In the field of rigid modular robots, researchers [13][14][15] tend to use a visual three-dimensional dynamic simulation platform that integrates the optimization algorithm to achieve the evolution of a coordinated motion of modular robots and observe the evolution results. Nonetheless, there is a lack of suitable simulation software to achieve modeling, simulation, parameter optimization, and other functions for soft modular robots.
General finite element analysis software, such as ABAQUS and ANSYS, can be used to observe the deformation process of soft robots, but the time required for simulation is too long. Commercial physics engines, such as NVIDIA's PhysX, HAVOK, and BULLET, are often used in PC games so that objects in the virtual world can have physical properties closer to the real world. The physics engines have the ability to simulate soft or fluid material, so they are potentially used in the field of soft robots. In addition, SOFA [16,17] is an open-source dynamic simulation framework developed for the medical field which has built-in ODE integration, linear equation solution, complex constraints, and collision detection, and can be used to simulate rigid bodies, deformable bodies, and fluid. SOFA provides a number of iterative algorithms and mechanical models for users to select. The suitable combination of a mechanical model and algorithm can produce results of high accuracy. As a result, the accuracy of the results depends on the mechanical model established by users, which is not suitable for multi-dynamics simulation of soft modular robots.
In contrast, VOXCAD [18] is an open-source dynamic simulation platform in which objects can be established by any number of linear-elastic heterogeneous voxels. The parameters, such as the elastic modulus, density, Poisson ratio, friction coefficient, and thermal expansion coefficient of voxels can be set. In the simulation environment, voxels can contract and expand with the periodic variation of global temperature, and the whole body composed of voxels is also driven by the temperature. Although the 3D model established by VOXCAD lacks of accuracy, it has high computational efficiency, and the process of modeling is very efficient. Compared with the soft robots with complex cavities, soft modular robots realize deformation and movement by relative motion and coordinated deformation of many simple modules. Although it is difficult for VOXCAD to simulate soft robots with complex structures and cavities, modular robots with simple and regular modules are ideal objects to be modeled in VOXCAD.
The main work of this paper includes two aspects: 1. Design and fabricate a kind of pneumatic reconfigurable soft modular robot with a simple structure; 2. Gait optimization of the soft modular robot using an evolutionary algorithm in VOXCAD.

Related Works
Coevoet et al. [19] established forward and inverse kinematics models suitable for cable-driven and pneumatic soft robots by combining the continuum mechanics model with a finite element method. Based on the kinematics models, motions such as soft hands grasping objects and a flexible manipulator avoiding obstacle can be simulated and controlled in real-time with SOFA. Rieffel et al. [20,21] designed a pneumatic caterpillar-like soft robot that uses SNN (spiking neural networks) as the controller. The evolutionary algorithm is used to optimize the parameters of the controller. In addition, the team also used PhysX as a physical engine to model and simulate a caterpillar-like robot driven by a memory alloy. The results of parameter optimization are observed in the simulation interface. Nevertheless, soft robots are usually made of hyper-elastic material, making it difficult to measure the mechanical parameters of the material accurately, so it is difficult to establish an accurate mechanical model and there is an insurmountable "reality gap" between the simulation and actual experiment.
Veenstra et al. [22] managed to skip the "reality gap" by evolving the parameters of the controller in a real physical prototype. They designed a knifefish-like soft robot which uses a servo motor to drive the silica gel fish fin, and evolved the control parameters of the servo motor by CMA-ES. What makes the method distinctive is that each individual in each generation of the evolution algorithm needs to run in the actual soft robot during the set-up simulation time, and the simulation time cannot be shortened by algorithm optimization or accelerated calculation of the physical engine. The advantage of this method is that it omits the steps of modeling and simulation, thus avoiding the problems of lacking an accurate mathematical model and suitable simulation software. But this approach seems to be energyand time-consuming, and has a lack of stability.
Lipson, Cheney, and Kriegman et al. [23][24][25] completed a lot of research on evolutionary robotics using VOXCAD simulation software. They applied the Compositional Pattern Producing Network-Evolving Neural Networks through Augmenting Topologies (CPPN-NEAT) algorithm to evolve the shape of the soft robot and the parameters of their controllers. They obtained many virtual soft robots of which motion gaits are very close to real aquatic or terrestrial animals in nature. Their research results show that it is very effective to use an evolutionary algorithm to realize the automatic design of the shape and controller of soft robots under the condition that the general design method of the soft robot is not clear. However, the soft robots that they obtained in the computer appears to be so abstract that the results can hardly play a guiding role in the real world. In other words, it is difficult to fabricate real soft robots with the same structure and motion patterns. Although previous researchers [2] used VOXCAD to present a combined movement of soft cubes, they used linear-elastic voxels to simulate the hyper-elastic silica gel module, which somewhat lacks accuracy. The function of dynamic simulation software simulates the real physical world, thus saving time and costs in experiments [26,27]. The characteristics and properties of real robots should present accurately in the computer to the maximum extent, which is a basic requirement to realize structure optimization and motion planning. If the results that are produced by simulation software is limited in the computer and cannot be related to the real world, the meaning of the simulation software might be lost to some extent. Thus, we managed to take advantage of VOXCAD to simulate our real soft robot to exert the capability of VOXCAD as simulation software.

Design and Fabrication Process of the Soft Cube
We designed and fabricated a soft cube with a simple structure as a basic unit of our soft modular robot, and the soft cube can be combined into various configurations, as shown in Figure 2. The fabrication process of the soft cube is illustrated in Figure 3a-f. The soft cube is casted with silica gel. We first created the 3D model of the mold in SOLIDWORKS and fabricated the mold by the 3D printer, then poured the mixture of A and B Ecoflex-50 silica gel into the mold, as shown in Figure 3a,b. The silica gel solidifies after about 4 h at ambient temperature, then we inserted the radial magnets lubricated with Vaseline into the cavity. The function of Vaseline is to ensure the magnets can rotate along the axis. When the two cubes approach each other, the magnets rotate to the polarities that attract each other and combine firmly. In addition, we also glued eight 3D printed plastic blocks to eight vertices of the cubes, as shown in Figure 3c,d. The rigid plastic blocks have two functions: one is to prevent the magnet from sliding out of the cavity when the cubes are inflated, and the other is to ensure that the actual cubes and the cubes in the simulation software are more consistent. One of the eight blocks in the cubes has an air inlet to introduce a 4 mm airline, and the top, middle, and bottom parts are glued together with the special adhesive for silica gel called SIL-POXY, as shown in Figure 3e. Then, the final model is obtained, as shown in Figure 3f.

Simulation in VOXCAD
Previous researchers [22,28] put forward that computational requirements scale proportionally to the amount of voxels simulated, usually exponentially, increasing the computational power needed when more are used, and that a very precise physical model may not be required for the purpose of gait optimization. Therefore, we wanted to use as few voxels as possible to construct our soft robot model to ensure computational efficiency, though of course under the premise that the appearance and deformation are almost consistent with the actual soft cube, as shown in Figure 4. The blue voxels represent rigid materials, and the red voxels represent soft materials. These voxels are linear-elastic, and their physical parameters, such as density and modulus of elasticity, can be modified. The volume-driven method is used in the Voxelyze physical engine. Specifically, each voxel has a thermal expansion coefficient and the global temperature in the simulation software varies periodically according to a function law, which allows each voxel to expand and contract with the variety of laws of temperature. In addition, each voxel has a parameter called phaseoffset so that they can expand and contract with a temperature rhythm that is independent and asynchronous. When voxels are combined to form a certain configuration, the rhythmic expansion and contraction of the monomers lead to an overall locomotion. Admittedly, it is difficult to create an environment with periodic temperature variation in the real physical environment, but the volume-driven may be physically achieved in a variety of ways, not only limited to temperature changes [18]. In view of the fact that the pneumatic-drive is one of the most commonly used and efficient driving methods in the field of soft robotics at present, we chose the pneumatic in the experiment to substitute the thermal drive. Figure 5 illustrates the process of inflating and deflating of soft modular robots in the simulation software and real physical environment. Meanwhile, we measured and compared the deformation of the soft cube during inflation and deflation. Since the deformation of the soft cube is symmetrical, we used the deformation value of one of the surfaces to represent the deformation of the entire soft cube. As shown in Figure 6a, the central pink voxel of the side surface is selected in the simulation software, and its displacement in the direction perpendicular to the surface represents the deformation value of the soft cube, and the displacement can be exported by VOXCAD. As shown in Figure 6b, we used the ultrasonic displacement sensor to measure the deformation of the side surface of the soft cube. The soft cube is attached to four yellow support blocks that can slide freely on the experiment table. The function of the support blocks is to prevent the soft cube from toppling when the bottom surface expands. The ultrasonic sensor is connected with the surface to be measured, and when the soft cube is inflated and deflated, the distance variation between the ultrasonic displacement sensor and the obstacle can be equivalent to the deformation of the surface. We managed to make the deformations in the simulation software and experiment of the soft cube as concordant as possible by adjusting the parameters in the simulation software and the pressure outputted by air pumps, and the final result is shown in Figure 7. In order to quantitatively represent the error between the simulation curve and the experiment curve, we selected 2000 sets of data to calculate the mean square error value, which can be used to characterize the capability of the simulation software, and the value of MSE is 0.6303.

Evolutionary Algorithm and Control Method
Some previous research [6,7,9,29] demonstrates the fact that multi-soft-modules can make a straight motion and turning motion by intermittent contact and friction with the ground, and our soft modular robot also takes the advantage of the method. The different phaseoffset of each module leads to an asynchronous contraction and expansion law, which realizes their intermittent contact with the ground surface. Therefore, the phaseoffset was set to be the genotype in our evolutionary algorithm, and the locomotion distance within the set time was set as fitness. The principle of the evolutionary algorithm was described in previous research [30], and a simple description is made here. When the algorithm is initialized, a set of random values is set for the genotype of each individual in the initial population. The soft robots in the initial population use this set of random control parameters to move at the same time, and the displacement during the set time represents the speed of the robots. The displacement can be measured by VOXCAD and read by the evolutionary algorithm as the evaluation index of the algorithm.
Individuals with poor performance are eliminated, while individuals with excellent performance can be preserved into the next generation, and the genotypes of these individuals cross and regroup to produce other individuals of this generation. As a result, the overall performance of the population gets better and better. In order to improve the search ability of the algorithm, the random mutation is also set for the individuals. Such a process iterates multiple times until the set number of iterations is reached. Our algorithm was run for 500 generations with a population size of 150. The genotype of the individual with the best motion ability in the final population is selected as the control parameters of the actual soft robot, and this set of parameters was transmitted to Arduino via serial to control the on-off time of the solenoid valve set so as to control the deformation sequence of the soft cubes. Figure 8 shows three displacement curves exported by VOXCAD when using three different gaits of worm configuration (Please see more details in the next section). The optimized gait pattern was calculated by an evolutionary algorithm. In the experiential gait pattern, the five soft cubes are actuated in sequence, just like a real worm. The arbitrary gait pattern was actuated by a set of arbitrary control parameters. It can be seen from the displacement curve that the gait pattern calculated by our evolutionary algorithm has outstanding performance. In the experiment of measuring the deformation of the soft cube, we obtained the result that the deformation of the soft cube in the experiment and the simulation can reach the most fitting degree when the pressure values of the air compressor and the vacuum pump are set to 63.2 kp and −63.4 kp. Therefore, the same output air pressure of the air compressor and the vacuum pump are set when we conduct the multi-module coordinated motion experiment. Since the output flow of the air compressor and the vacuum pump is much larger than the input flow of the soft cube, the set air pressure value can be regarded as constant. Therefore, we just use open loop control strategy for the air pressure, and regarded the on-off time sequence of the solenoid valve set as the control variables.

Experiment Platform Setup
As shown in Figure 9, we used Arduino Mega 2560 as a controller to receive displacement data and transmit control signals from the PC to the actuator board of the solenoid valve set. The model of the solenoid valves was T103U-FL from OST Ltd., Taizhou, China. We used an air compressor and a vacuum pump to inflate and deflate the soft cubes. The pumps' model was 15085VED24 from PENGPU Ltd., Shanghai, China. In order to ensure that the output pressure of the air compressor and the vacuum pump was constant, we set up the release valve and the vacuum release valve in the gas circuit. The model of the release valve was IR2010-02-A from SMC, Tokyo, Japan, and the model of the vacuum release valve was IRV10-LC06BZN from SMC. We used an ultrasonic displacement sensor of which model is HC-SR04 to measure the deformation and displacement of the soft robot.

Multi-Module Coordinated Motion
We selected three typical configurations to present the motion ability of the soft modular robot in the experiment condition and simulation software, which are the worm motion form, snake motion form, and quadruped-like motion form. In particular, it was notable that the green voxels in the snake configuration held the same physical characteristics as the red voxels, but had an opposite phase. Figures 10-15 are screenshots from a fixed angle of view, and the direction of locomotion is shown in the Figures. It can be seen that the motion performance of the robots in the simulation software is approximately consistent with that in the experiment condition.

Results and Discussion
Figures 16-18 compare the displacement-time curves that were outputted by VOXCAD and obtained in the experiments, in which the curves on the left side is the output by the simulation software, and the curve on the right side was obtained in the experiments. In the experiment condition, the inflating and deflating period of the soft module was set to 2 s, and we set the period of expansion and contraction of the voxels to 2 s in the simulation software accordingly. It can clearly be seen from the displacement-time curves that the locomotion patterns of the soft modular robots are periodic. For a specific configuration, the curve output by VOXCAD has a similar fluctuation pattern to the curve obtained in the experiment. In order to quantitatively represent the error between the simulation curve and the experiment curve, we calculated the mean and variance value of the two sets of curves for each of the three configurations respectively, which are presented in Table 1. Due to the deformation difference between the experiment and simulation software and fabricating differences between multiple individuals, besides the differences in the mechanical model, driving method, sensor noise, physical condition, and so on, it was difficult for the simulation curve to be completely consistent with the experiment curve, such as the amplitude and gradient. To sum up, VOXCAD can be used to simulate the locomotion of the actual soft modular robot to a certain extent, and the optimization algorithms can be integrated to realize the off-line optimization of the locomotion patterns of the soft modular robot.

Conclusions
Soft modular robots hold the characteristics of both modular robots and soft robots. They have the ability to adapt to complex environments and unknown terrains, besides the contact-friendliness and interaction safety with humans due to the characteristics of soft materials. They can conduct tasks such as unknown environment exploration and narrow space rescuing by being combined into suitable configurations. In the industry, they can also be assembled into a soft gripper to grasp fragile or irregular objects [31], and a soft "conveyor belt" to transport objects. In order to realize complex motion, visualization planning and control software is essential. In our paper, VOXCAD was used to visualize the motion capability evolution of our soft modular robot. In view of the characteristic of VOXCAD, we made a tradeoff between the simulation software and the real physical environment, thus fabricating a physical prototype with a simple structure which is suitable for VOXCAD to simulate, and constructing a physical environment close to that in the simulation software. We also tuned the physical parameters of the simulation software and the experiment conditions so that the simulation result had high correspondence with the experiment result, and the reality gap between the simulation software and the physical environment was bridged to some extent. Meanwhile, we used as few voxels as possible to build our soft modules, sacrificing some accuracy of simulation in exchange for computation efficiency. We regarded the phaseoffset of voxels as control parameters and optimized the parameters by using the evolutionary algorithm. The experimental results demonstrate that the evolution of motion capability of our soft modular robot with an arbitrary combination shape can be realized. To sum up, the experiments showed that VOXCAD offers the ability to simulate the actual soft modular robot and plays a role in saving energy and shortening the design time. The work in this article is a preliminary application of VOXCAD, and there is still a great deal of potential in it to explore. For instance, we will further develop the physical engine to realize the relative motion between modules and the function of self-reconfiguration.