Research on self-reconfiguration strategy of modular spherical robot

Self-reconfigurable robot is a complex system composed of multiple modular robots. Aiming at high efficiency and low energy consumption of self-reconfigurable robot configuration transformation, a self-reconfiguration strategy based on module mapping of the common parts is proposed. This strategy describes the configuration of the robot in the form of a graph, and a method to determine the central node of configuration is proposed. The central node module as the starting node for comparison of different configurations, and the common part between the two configurations is reserved. Then the module closest to the target module is searched, the target configuration is reconfigured from the inside to the outside with the minimum energy consumption constraint. Finally, based on the experiment results, compared with other self-reconfiguration strategies, the proposed self-reconfiguration strategy reduces the times of reconfiguration operations and improves the reconfiguration efficiency.


Introduction
The modular self-reconfigurable robot 1,2 is composed of several modules with connectors. When faced with an unstructured dynamic unknown environment, it can reconfigure different configurations through a series of operations such as moving, disconnecting, and connecting, so as to adapt to different environments and perform different tasks. Modular self-reconfigurable robots are mainly divided into three categories according to their topological structure [3][4][5] : (1) lattice type: Most of the modules are cubes. In the configuration, each module is on the regular grid. Changing the position of the module, the configuration changes accordingly, such as Melecubes, 6 Roombots, [7][8][9] M-Cube, 10,11 Cebot, 12,13 and so on. (2) Chain type: The modules are connected in series to form a chain type, such as CONRO, 14,15 Xmobot, 16 USS, 17 PolyBot, 18,19 and so on.
Aiming at the transformation between different configurations of self-reconfigurable robot, Casal and Yim 29 proposed the strategy of self-reconfiguration of Divideand-Conquer to match configurations in a layered manner, which involves many redundant reconfiguration steps and leads to low reconfiguration efficiency. Butler et al. 30 proposed a Melt-Group self-reconfiguration algorithm based on Crystalline module. This algorithm uses centralized control, which gradually "grows" the target configuration from a simple configuration. The centralized control method will reduce the efficiency of selfreconfiguration as the number of modules increases. Stoy et al. 31 designed a method to transform configuration based on the transfer of hormone signals between modules to stimulate other hormones and generate corresponding reconfiguration action. This method has a single applicability, and the signal strength will be weakened in the transmission process, affecting the reconfiguration operation. Chao Liu 32,33 proposed a self-reconfiguration strategy based on configuration decomposition for SMORES modules. By mapping two configurations with the same number of modules, a distributed reconfiguration operation was developed. This method did not specify the mapping starting point and did not take energy consumption into account, which made the reconfiguration efficiency low. The above self-reconfiguration strategies are all only suit for two configurations with the same total number of modules, but two configurations with different total number of modules have not been studied.
To improve the efficiency of self-reconfiguration for modular spherical robot, this article proposes a selfreconfiguration strategy based on module mapping of the common parts, which can reduce the energy consumption of configuration transformation by retaining common parts between the two configurations, shorten the moving distance of modules during the reconfiguration process and improve the efficiency of self-reconfiguration.
The structure of the article is as follows: The second section introduces the hardware structure of the spherical module; the third section introduces the configuration representation method of the self-reconfigurable robot based on the spherical module; the fourth section proposes the self-reconfiguration strategy, including determination of the central node module of the configuration, module mapping of common parts, and reconfiguration operation planning; the fifth section gives some experiments and results; and in the sixth section, the conclusions and future work are given.

Spherical module
The self-reconfigurable robot system studied in this article takes the connectable and openable spherical robot as the basic module, which is a hybrid-type modular robot. It combines the design concept of spherical robot and modular robot to solve the problem of poor motion ability of traditional modular robot. As shown in Figure 1, it is an evolutionary version of the robot designed in Ma et al., 34 there are six retractable and rotatable connectors distributed on the spherical module. Three of them are active connectors (connector 1, 3, 5) and other three connectors are passive connectors (connector 2, 4, 6), and connector 1 and connector 2 can swing up and down. The connection between connectors mainly depends on mechanism (latch structure), while electromagnetic devices are installed to assist the connection and ensure the reliability of the connection between the two modules. Considering the communication requirement between modules, there are some communication interfaces on the connectors of the module.
The spherical module can not only perform tasks by rolling alone but also connect with other modules to form different configurations. The spherical module moves in two ways: (1) Spherical shell closure: the movement of the spherical module is realized by deviation of mass center, and the movement of the mass block inside the module can change the mass center of the spherical module. When the mass block is driven forward by the long axis motor, the spherical module starts to move forward. When the short axis motor drives the mass block to the left and right, the spherical module turns to the corresponding direction, as shown in Figure 2(a). (2) Spherical shell opening: The spherical module becomes a wheel-type robot, and the left and right hemispherical shells are equivalent to the left and right wheels of the wheel-type robot, which can realize differential motion and are mainly used for the connecting motion between modules, as shown in Figure 2 All connection modes between unit modules are listed in Figure 3. Connection modes (a) to (h) can be butted through the proximity of two spherical unit modules and the expansion and contraction of connectors. However, due to the limitation of the unit module itself and the extension length of the connector, the connection mode of (i) will cause interference when the two spherical unit module connectors 5 and 6 are connected. Therefore, there are only eight connection modes (a) to (i) in the figure between spherical unit modules. And among the eight connection modes, (e) requires two spherical unit modules to be close to each other, so as to provide a horizontal coupling force for the connection between them to complete the docking smoothly, while all other connection modes can be moved from one spherical unit module to the vicinity of another spherical unit module, and their connectors can be aligned to complete the connection.
In the connection relationship (a) to (h) in Figure 3, not every connected spherical unit module can move flexibly. Among the four connection relationships, such as (b), (d), (f), and (h), due to the rigid connection between the two modules and the limitation of the weight of the spherical unit module, the two modules cannot move flexibly under these four connection modes. Under the three connection relationships, such as (a), (c), and (g), the long axis motor of one spherical unit module can be powered off, and the connected other spherical unit module can drive it to move, just like a four-wheel vehicle. In this way, such as (e), the two hemispherical shells close to the two connected unit  modules follow, and the other two hemispherical shells are equivalent to the two wheels of a two-wheeled vehicle. The module in this connection mode can still move flexibly and stably like a two-wheeled vehicle.

Configuration representation
The configuration representation of self-reconfigurable robot is the basis of the self-reconfiguration strategies. Combining the characteristics of the spherical module with the knowledge of graphics, the spherical module can be simplified to a node, as shown in Figure 4. M i denotes the number of the module in the self-reconfigurable robot system, and connection line denotes the connectors distributed on the spherical module. The digital 1 to 6 corresponds to the number of the connector, where the odd numbers indicate the active connector and the even numbers indicate the passive connector. Only the connection between the active connector and the passive connector is an effective connection.
The self-reconfigurable robot is composed of several modules and can be described by the directed topology diagram in the graph theory. Let G ¼ ðV ; EÞ represents a configuration of the robot, where V ¼ fM 1 ; M 2 ;M 3 :::M i g represents the set of all node modules of the configuration G, and E ¼ fe 1;2 ; e 2;3 ; e 3;4 :::e i;j g represents the set of edges connected between two modules of the configuration G. As shown in Figure 5, it is a graphical representation of snake configuration. In Figure 6, it is a graphical representation of planar quadruped configuration (the representation of spatial quadruped configuration is the same as that of planar quadruped configuration). The e i;j ¼ ðc n ; c m Þ in E represents the connecting edge between module M i and module M j , c n and c m represent the connectors used for the connection of the two modules. For example as shown in Figure 5 exists in configuration G 1 and configuration T 1 , there is a common part of the two configurations and can be expressed as e G 1 i;j ¼ e T 1 p;q . An example in Figure 7, the common parts of the two configurations are as follows: Commonly used nomenclature is listed in the following.

Self-reconfiguration strategy
The self-reconfiguration strategy is defined as: based on the given two different configurationsG and T, a strategy is formulated to reduce the transformation steps from configuration G to configuration T and decrease energy consumption. The self-reconfiguration operation of most robots consists of disconnecting, moving, and connecting. Connection operation requires two modules to align and then activate the relevant connecting mechanism. Correspondingly, a disconnection operation invalidates the connection of the connector involved and separates the two modules. This article not only decreases the energy consumption of connection and disconnection but also considers minimizing the energy consumption in the moving process. The self-reconfiguration strategy can be divided into three steps: First, the central node module of the configuration is determined. Then, the central node module is used as the starting node of configuration comparison to obtain the common parts of the two configurations. Finally, the common parts move to the corresponding position by differential motion according to the target configuration information and the noncommon parts are reconfigured.

Central node module
In any configuration of self-reconfigurable robot, the array CN j shows the distribution of modules around M j . For example as in Figure 6, CN 9 ½3 ¼ 3, it represents there are three modules connected with c 3 of M 9 in the planar  quadruped configuration (i.e.M 10 , M 11 , M 12 ). And the sum of the elements in the CN of any module is equal to Ns À 1. Therefore, when the number of nonzero elements in the module CN is great than one. Suppose num1 is the largest element in CN j 1 and num2 is the largest element in CN j 2 . If num1 > num2, it means that the modules around M j1 are evenly distributed, then M j1 is the central node module of the configuration. In any configuration of a self-reconfigurable robot, all modules remain connected, and each module communicates with the connected modules obtaining its own CN through a communication interface. Assuming that the connector c n of the M 1 is connected to the connector c m of the M 2 , we can determine CN M 1 ½c n . Firstly, the CN½i of each connector in M 2 (except connector c m ) is determined. Then, the S j i of M 2 is calculated by equation (1). Finally, S j i is passed to M 1 and CN M 1 ½c n ¼ S j i þ 1. In the whole selfreconfigurable robot system, if a node module with only one connector connected to other modules is called leaf node module. Therefore, the process of determining CN can be started by either leaf node module until CN of all modules in the entire robotic system are determined. For example in Figure 6, connector c 1 of the M 8 is connected to connector c 2 of the M 9 , for the M 9 , CN M 9 ½1 ¼ 0, where j is the module, i is the connector connected with other modules, n is all connector of the M j .
The CN of all modules in the current configuration can be determined by the above method. Since there is only one nonzero element in CN of leaf node module, and the leaf node module cannot become the central node module of the configuration. Therefore, the modules with the number of nonzero elements greater than or equal to 2 in the CN are recorded. If the recorded module is unique, this module is the central node module of the current configuration. If they are not unique, then the elements in CN are sorted in descending order to get CN . Next, if the first element in CN is the minimum value and the module is unique, this module is the central node module of the configuration; if it is not unique, continue to compare the second elements in CN to find the minimum value, until find the qualified module as the central node module of the current configuration through iteration. If more than one module is found at the same time, then select any one as the central node module of the configuration. The algorithm pseudo code of this process is as in Algorithm 1: Table 1 shows the CN and CN of snake configuration. The module M 4 is finally determined as the central node module of snake configuration. Table 2 shows the CN and CN of planar quadruped configuration. The module M 8 is finally determined as the central node module of planar quadruped configuration.

Module mapping of common parts
The self-reconfiguration process of modular robot is that the robot transforms from the initial configuration to the target configuration according to the characteristics of the environment. In this process, the initial configuration and the target configuration should be analyzed and compared to find out the common parts and noncommon parts  between the two configurations. The existing connection between modules in the initial configuration should be retained as much as possible in the target configuration so as to reduce the energy and time consumption of disconnection and connection operation, and improve the reconfiguration efficiency. The energy consumption of each self-reconfiguration operation from G to T can be defined as: cost mov ðM i ; M j Þ represents the energy required to move module M i in G to moduleM j in T; cost con ðM i ; M j Þ represents the energy required to connect module M i and module M j ; cost dis ðM i ; M j Þ represents the energy required to disconnect module M i from module M j ; Then the total energy consumed by the robot from G to T is as follows: In order to improve the efficiency of reconfiguration and reduce the energy consumption in the process of selfreconfiguration, firstly, the initial configuration and the target configuration are compared to obtain all the common parts of the two configurations, and the connection of the common parts is retained to reduce the times of disconnection and connection operations in the self-reconfiguration process, and ensure that P cost con ðM i ; M j Þ and P cost dis ðM m ; M n Þ are the minimum.
Based on the given initial configuration G ¼ ðV ; EÞ and target configuration T ¼ ðV 0 ; E 0 Þ, according to the method in the "Central node module" section, the central node module M c and M 0 c of the initial configuration and target configuration are determined, respectively. Starting from the M c of the initial configuration G, and using depth first search algorithm, we can obtain all the branch chains G 1 . . . . . . G k of the initial configuration G. (In any configuration, from the central node module to the leaf node module is a branch chain.) In the snake configuration shown in Figure 5, the central node module is M 4 , and there are two branch chains G 1 ¼ fV 1 ; E 1 g and G 2 ¼ fV 2 ; E 2 g, V 1 ¼ f4; 5; 6; 7g and V 2 ¼ f4; 3; 2; 1g, E 1 ¼ fe 4;5 ð1; 2Þ; e 5;6 ð1; 2Þ; e 6;7 ð1; 2Þg and E 2 ¼ fe 1;2 ð1; 2Þ; e 2;3 ð1; 2Þ; e 3;4 ð1; 2Þg. Meanwhile, starting from the central node M 0 c of the target configuration T, all its branch chains T 1 . . . . . . T l also are obtained. The planar quadruped configuration we can see that in Figure 6 has a central node module is M 8 and four branch chains 1Þg. Next, the connection information of each branch chain of the initial configuration is compared with that of all branch chains in the target configuration. Then all edges with the same connection in the initial configuration G and the target configuration T are obtained, then mapping modules of the common parts.
Note that there are several conflicts in the reconfiguration need to consider: 1. The M c of initial configuration is not the M 0 c of target configuration after reconfiguration. 2. Multiple edges of the initial configuration have the same connection information with one edge of the target configuration. 3. One edge of the initial configuration has the same connection information with multiple edges of the target configuration. 4. The adjacent edges in the initial configuration have the same connection information with the nonadjacent edges in the target configuration. 5. The adjacent edges in the target configuration have the same connection information with the nonadjacent edges in the initial configuration.
Therefore, all results should be filtered. For (1), the central node of the initial configuration that does not map to the central node of the target configuration is deleted from all results. For (2) and (3), the coordinates of the central node of the initial configuration are assigned to the central node of the target configuration. In the case of multiple edges have the same connection information with one edge, the distance between each edge and this edge is calculated respectively, and the edge with the shortest distance is selected to map with this edge (if there are several shortest edges, choose one of them), and  (4) and (5), the distance between the two mapping edges is also calculated, and the pair of mapping edges with the shortest distance is retained. (If more than one edge meets the condition, select any one.) In this way, the remaining mapping edges are all the common parts of configuration G and configuration T. The algorithm pseudo code of this process is as seen in Algorithm 2.

Reconfiguration operating
The process of transforming self-reconfigurable robot from initial configuration G to target configuration T follows the principle of disconnecting first and then connecting. First, disconnect the connection of noncommon parts in initial configuration G. Then, according to the connection information of target configuration T, the module performs the reconfiguration from the inside to the outside. This can avoid locking due to the occupancy conflict of the module during the reconfiguration process and make other modules unable to connect with the module. After mapping the initial configuration G with the target configuration T, the noncommon part of the initial configuration G is separated according to the minimum times of disconnections. The common part of initial configuration G which is the same as target configuration T moves to the corresponding position of target configuration T through differential motion, as shown in Figure 8(b). Next, the reconfiguration operation is conducted for the noncommon parts. According to the connection information of target configuration T, the central node module of initial configuration G or the common part containing the central node module is taken as the reconfiguration center, and the number of the target module in the current configuration is determined, as shown in Figure 8(c). Then, the target modules broadcast their location information one by one in order, all the surrounding modules calculate the distance from the modules to their own the target position, and select several modules closest to the target modules in the current configuration (satisfying the number of connections required by the target modules), as shown in Figure 8(d). Each module uses the planning algorithm (such as RRT, etc.) to generate the feasible path to the target module according to the environmental information and its own state, and conduct the orientation transformation to connect with the target module. In this way, the position of the target module in the current configuration is broadcast, and the nearest module is determined. Feasible path is generated to ensure the safe and orderly movement of the module near the module to be connected to complete the connection operation, and finally implement the target configuration T, as shown in Figure 8(e), (f), and (g). The reconfiguration process from snake configuration to planar quadruped configuration is shown in Figure 8.
The self-reconfiguration strategy takes into account the energy consumption during the transition from initial configuration to target configuration. By comparing the connection information of initial configuration and target configuration, the common parts of them are retained, thus reducing the energy consumption caused by disconnection P cost dis ðM i ; M j Þ and connection P cost con ðM i ; M j Þ . Meanwhile, the distance between the initial configuration and the common part of the target configuration is reduced as much as possible so as to reduce the energy loss in the process of part moving P cost mov ðM i ; M j Þ . In the process of reconfiguration, we will find the connectable module that is nearest to the target module in the current configuration and generate a feasible path for it so as to reduce the energy consumption P cost mov ðM i ; M j Þ . Through obtaining common parts and reconfiguration operations, the total energy consumption is minimized, thus reducing the energy consumption and improving the efficiency of reconfiguration.

Experiments and results
We have implement the algorithm on a desktop PC (Intel Core i5-6500, 3.20 GHz, 4 GB SDRAM). We perform two types of experiments. First, we reconfigure two configurations with different total number of modules to verify the feasibility of the algorithm. Second, we reconfigure two configurations with same total number of modules to verify the superiority of the algorithm compared with other algorithms.

The total number of modules is different
In the existing self-reconfiguration strategies, such as Hou et al., 35 most self-reconfiguration strategies are to find the part with the most same connection relationship between the initial configuration and the target configuration, keep it unchanged in the initial configuration, then reconfigure other parts, and they are only applicable to the case that the total number of modules in the initial configuration and the target configuration are the same. This article is looking for the part with the most same connection relationship between the initial configuration and the target configuration and considers reducing the energy consumption in the transformation process. Therefore, the self-  reconfiguration strategy proposed in this article considers the energy loss on its basis, so it has certain advantages.
In this section, we completed two reconfiguration tasks to verify the feasibility of the self-reconfiguration strategy. First, we completed the reconfiguration task from snake configuration to planar quadruped configuration. (The total number of modules in the target configuration is larger than that in the initial configuration.) The common parts of snake configuration and planar quadruped configuration are shown in Figure 9 and represented by dotted lines. The combination of digit and dot is used to represent the module and connection line represents the connection between two modules, the digit on the connection line corresponds to the connection relationship between the two modules as shown in Table 3. For example, in the snake configuration of Figure 9, the digital 1 on the connection line between M 1 and M 2 indicates the connection between c 1 of M 1 and c 2 of M 2 (or the connection between c 2 of M 1 and c 1 of M 2 ). The central node of snake configuration is M 4 , the central node of planar quadruped configuration is M 8 . Snake configuration has two branched chains G 1 , G 2 , planar quadruped configuration has four branched chains T 1 , T 2 , T 3 , T 4 . The results of edges with the same connection relationship are shown in Table 4. After filtering, the results of module mapping of the common parts are e G 1;2 ¼ e T 1;2 , e G 3;4 ¼ e T 4;8 ,e G 4;5 ¼ e T 8;9 ,e G 6;7 ¼ e T 11;12 . The reconfiguration process is shown in Figure 8. The snake configuration disconnects the edges e 2;3 and e 5;6 . Based on the connection information of the planar quadruped configuration, the M 3 ,M 4 ,M 5 which maintain the connection of the snake configuration are taken as the reconfiguration center, while the rest of the common parts move to the corresponding position in a differential motion manner. The scattered modules around them move orderly to the target modules to in the reconfiguration center one by one to perform the reconfiguration operation, thus forming the planar quadruped configuration. Because the graphic representation of spatial configuration is the same as that of planar configuration. If the target configuration is a spatial quadruped configuration, the robot can first reconfiguration its corresponding planar quadruped configuration, then gradually adjust to form the spatial quadruped configuration.
Second, we completed the reconfiguration task from windmill configuration to H-shape configuration. (The total number of modules in the initial configuration is larger than that in the target configuration.) The common parts of snake configuration and planar quadruped configuration are shown in Figure 10      The results of module mapping of the common parts are e G 1;2 ¼ e T 3;2 , e G 2;3 ¼ e T 2;4 , e G 3;6 ¼ e T 4;5 , e G 6;9 ¼ e T 5;6 . The reconfiguration process is shown in Figure 11. The windmill configuration disconnects the edges e 3;4 and e 3;7 . According to the connection information of H-shaped configuration, the M 1 ,M 2 ,M 3 ,M 6 , and M 9 which maintain the connection of the windmill configuration are taken as the reconfiguration center, and the scattered modules move orderly to the target modules in the reconfiguration center one by one, forming the H-shaped configuration.

The total number of modules is same
In this section, we completed two reconfiguration tasks and compared them with other reconfiguration strategies to verify the superiority of the strategy. First, we completed the reconfiguration task from H-shaped configuration to snake configuration. The common parts of H-shaped configuration and snake configuration are shown in Figure 12 and represented by dotted lines. The center node of H-shaped configuration is M 4 , and that of snake configuration also is M 4 . The result of module mapping of the common parts is e G 1;2 ¼ e T 1;2 , e G 2;3 ¼ e T 2;3 , e G 5;6 ¼ e T 6;5 , e G 5;7 ¼ e T 6;7 . The reconfiguration process is shown in Figure 13. The H-shape configuration disconnects edge e 2;4 and edge e 4;5 , moves related modules (M 1 , M 2 , M 3 , M 6 , M 5 , M 7 ), and connects M 3 and M 4 to form edge e 3;4 , connects M 4 and M 6 to form edge e 4;6 . However, the results of module mapping of selfreconfiguration strategy of Chao Liu 32 are 1 ! 7, 2 ! 5, 3 ! 6, 4 ! 4, 5 ! 3, 6 ! 2, and 7 ! 1. The reconfiguration process is shown in Figure 14. The H-shape configuration disconnects these edges which are e 1;2 , e 7;5 , e 2;4 , and In Dutta et al., 36 the energy consumption of selfreconfigurable robot in configuration transformation is defined, but there is no quantitative analysis. In order to facilitate comparison with other self-reconfiguration strategies, this article uses the method of defining its energy   reduces the energy consumption by 16.25% and improves the efficiency of self-reconfiguration. Second, we completed the reconfiguration task from A configuration to B configuration. The common parts of A configuration and B configuration are shown in Figure 15 and represented by dotted lines. The center node of A configuration is M 1 , and that of B configuration also is M 1 . The result of module mapping of the common parts are e G 1;2 ¼ e T 1;8 , e G 2;3 ¼ e T 8;9 , e G 4;5 ¼ e T 6;3 , e G 8;9 ¼ e T 4;2 . The reconfiguration process is shown in Figure 16. The A configuration needs to disconnect edge e 1;4 , edge e 1;8 , edge e 1;6 , and edge e 6;7 , move related modules (M 4 , M 5 , M 6 , M 7 , M 8 , M 9 ), connect M 9 and M 1 to form edge e 9;1 , connect M 5 and M 1 to form edge e 5;1 , connect M 6 and M 9 to form edge e 6;9 , and connect M 5 and M 7 to form edge e 5;7 . However, the results of module mapping of self-reconfiguration strategy of Chao Liu 32 are 1 ! 1, 2 ! 8, 3 ! 9, 4 ! 2, 5 ! 5, 6 ! 4, 7 ! 6, 8 ! 3, and 9 ! 7. The reconfiguration process is shown in Figure 17. The A configuration needs to disconnect edge e 1;4 , edge e 1;8 , edge e 1;6 , and edge e 6;7 , move related modules (M 4 , The energy consumption of the robot guided by the selfreconfiguration strategy proposed in this article is obtained as follows: