# Modular Robotic Design and Reconfiguring Path Planning
## 2 Robotic Design and Modeling
### Building of the Module Reconfiguration Platform
#### 3.1.2 Mathematical Model of the Reconfiguration Platform  
The raster method [30] is simple and easy to implement. It can describe the environment in the form of a grid. It simplifies the relationships between the adjacent grids to ensure the validity of the constructed environment. The modular reconfiguration platform is modeled using the raster method, which represents the platform as a \"20 \(\times\) 20\" two-dimensional raster, and specifies that:  
1. The movement space of modules is a two-dimensional environment.
2. Define the module's movement step; the module moves one grid distance at a time, sets the module's standard length to 200 mm, uniform motion for \"\(v\) = 0.2 m/s\".
3. The coordinate of the module in the grid map is the center point of the grid.  
When the reconfiguration platform receives the robotic reconfiguration signal, it finds a path that satisfies the planning conditions between the initial and target positions by the optimized ant colony algorithm. The global path planning is performed first, and then the local collision avoidance between modules is ensured by the module avoidance criterion to find the shortest path between the initial point and the target point of the modules.  
The planning path \"\(P_{i}\)\" of the function module \"\(i\)\" in the reconfigured platform model is represented by the centroid vector coordinates in the raster model, \(P_{i}\)= \((P_{i1},P_{i2},\ldots,P_{il})\). The total length of the motion path of the functional module is:  
\[min_{p_{i}}d=\sum_{i=1}^{i=n}\left|\left|P_{i}\right|\right| \tag{4}\]  
where: \"\(||P_{i}||\)\" is the path length of the function module \"\(i\)\".  
During the refactoring planning process, constraints need to be defined for the moving process of the functional modules, which includes the motion condition definition and the stop condition definition.  
1. Definition of the motion conditions: the reconfiguration function module is specified to carry out two-dimensional plane motion in the reconfiguration platform for the four directions of front, back, left, and right. The module moves in a certain direction if it meets the defined requirements. \[|x_{a+1}-x_{a}|\leq u,\,\forall\,u>1,\,\,\,u\,\,\text{is $a$ constant}\] (5) \[|y_{a+1}-y_{a}|\leq u,\,\,\,\forall u>1\] (6) \[\sqrt{\left(x_{a+1}-x_{a}\right)^{2}+\left(y_{a+1}-y_{a}\right)^{2}}\leq u,\,\,\forall u>1\] (7)  
Figure 4: Distribution of the module reconfiguration system.  
where: the \"\(a\)\" indicates the functional module moves to the \"_step \(a\)\"_; \"\(x_{a}\)\" and \"\(y_{a}\)\" indicate the horizontal and vertical coordinates of the module at the \"_step \(a\)\"_.
2. Definition of the stop motion conditions: It is stipulated that the reconfiguration function module stops motion only when it moves to the target position. The condition for determining the module to stop is: \[\big{|}\big{(}x_{a-1}+y_{a-1}\big{)}-\big{(}x_{a-2}+y_{a-2}\big{)}\big{|}\geq \big{|}(x_{a}+y_{a})-\big{(}x_{a-1}+y_{a-1}\big{)}\big{|},\forall\ a>2\] (8) that is: when the functional module moves from step \" \(a-2\)\" to step \" \(a-1\)\" with 0 step, the functional module remains stationary and the module reaches the target position.