Reconfigurable soft robot obstacle avoidance method based on AFPO and storage medium
Through AFPO algorithm and CPPN encoding, the problem of rigid fitness function of traditional evolutionary algorithms in software robot obstacle avoidance is solved, efficient autonomous obstacle avoidance and form-function collaborative optimization in the blood environment is achieved, and the robot's obstacle avoidance success rate and diversity are improved.
Patent Information
- Application Number
- CN202510377354.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-01
AI Technical Summary
The static solidification characteristics of the fitness function in software robot obstacle avoidance have limited Pareto's cutting-edge exploration capabilities and cannot effectively capture non-dominant solutions between morphology-function-environment, especially in dynamic obstacles or complex fluid environments.
The collision count-driven evolution algorithm based on AFPO is adopted to model the blood environment through a voxelized physics engine, combine the combined mode generation network (CPPN) and age-fitness function to optimize the robot morphology, material distribution and driving parameters, introduce collision penalty terms and non-dominant sorting strategies to achieve multi-objective collaborative optimization.
Efficient obstacle avoidance is achieved in a dynamic blood environment, maintaining a success rate of more than 89%, improving the morphological-function collaborative optimization capability, improving obstacle avoidance efficiency and population diversity, and enhancing the robot's autonomous obstacle avoidance ability in complex fluid environments.
Smart Images

Figure CN120235076A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the cross - field of soft robots, biomedical engineering and evolutionary computing, and particularly relates to an obstacle - avoidance method for a reconfigurable soft robot based on AFPO and a storage medium. Background Art
[0002] In recent years, the combination of computer simulation and evolutionary algorithms has provided new ideas for the design of living organisms. For example, a team from the University of Vermont and Tufts University in the United States created the world's first living robot made of cells - Xenobot, which achieved basic motion functions through cell self - organization. However, its structural design and function implementation still highly rely on manual intervention and cannot cope with dynamic obstacles or complex terrains.
[0003] Robot obstacle - avoidance technologies based on traditional evolutionary algorithms include genetic algorithms (GA) and particle swarm optimization (PSO), which perform parameter optimization through the weighted combination of preset fitness functions (such as path length, energy consumption coefficient or safety margin). However, the static curing characteristics of the fitness function in the application scenarios of soft robots using traditional evolutionary algorithms expose many problems. Genetic algorithms usually simplify multi - objective optimization problems (such as obstacle - avoidance success rate, motion efficiency, morphological deformation degree) into single - objective optimization by using linear weighting methods, resulting in limited exploration ability of the Pareto Front and the solution set distribution being restricted by artificially preset weights. For example, in the optimization of the joint stiffness of a soft robot, if the weight biases towards the motion speed, it may sacrifice deformation safety and cannot capture non - dominated solutions among morphology - function - environment.
[0004] The introduction of the AFPO (Age - Fitness - Pareto Optimization) algorithm driven by collision counting provides a new paradigm for solving the above problems. Traditional robot obstacle - avoidance algorithms (such as genetic algorithms) use fixed - weight fitness functions (such as path length or energy consumption). Compared with traditional evolutionary algorithms, AFPO driven by collision counting can effectively maintain population diversity through age - fitness multi - objective optimization. In the scenario of reconfigurable soft robots, this algorithm can synchronously optimize material deformation parameters and environmental interaction strategies, focusing on the coordination of obstacle - avoidance efficiency and morphological functions in a dynamic environment, and realizing the leap from a rigid kinematic model to a biologically inspired adaptive behavior. Summary of the Invention
[0005] The purpose of the present invention is to provide an obstacle - avoidance method for a reconfigurable soft robot based on AFPO, which can achieve autonomous obstacle - avoidance of a reconfigurable soft robot through an evolutionary algorithm (AFPO) driven by collision counting in a simple blood environment.
[0006] The present invention adopts the following technical solutions to achieve the above purpose:
[0007] The present invention provides an obstacle avoidance method for a reconfigurable soft robot based on AFPO, including the following steps:
[0008] Step 1: Blood environment modeling
[0009] Define the blood density ρ, viscosity μ, and blood flow velocity V through a voxelized physical engine flow parameters, and set obstacle object voxels in three-dimensional space;
[0010] Step 2: Environment interaction setting
[0011] Calculate the fluid force through the fluid resistance coefficient C d and the thrust coefficient C t Based on the voxel network, traverse the grid surface, and generate the total voxel fluid force F according to the relationship between the relative velocity direction and the surface normal vector total ;
[0012] Set the collision counter Col]isionCounter, and use the distance-based collision detection function to calculate the number of collisions between the robot voxels and the obstacle voxels in the environment at each time step;
[0013] Step 3: Individual coding and initialization
[0014] Adopt the composite pattern to generate the network CPPN to jointly encode the robot morphology, material distribution, and drive parameters. The input includes three-dimensional coordinates, radial distance, and bias terms, and the output is the material distribution value;
[0015] Randomly generate an initial population containing multiple individuals, and each individual represents a combination of robot morphology and control strategy;
[0016] Step 4: Construct the fitness function
[0017] Define the collision penalty term F collision , and calculate the obstacle avoidance efficiency according to the number of collisions within the time window;
[0018] Perform morphological optimization, set the maximum surface area to volume ratio SA / V, apply direct selection pressure to extended structures such as limbs, and guide the evolution direction;
[0019] Step 5: Multi-objective evolution
[0020] Set genetic operations, adopt the tournament selection strategy, and update the population in combination with mutation operations;
[0021] Optimize the non-dominated solutions of F collision and the SA / V ratio, promote the diversity of candidate designs, and prevent premature convergence.
[0022] In the above solution, the blood density ρ = 1.06 g / cm 3 , the blood viscosity μ = 0.0035 Pa·s, and the blood flow velocity V flow = 5 cm / s.
[0023] 3. The method according to claim 1, wherein the total voxel fluid force F in step 2 total :
[0024]
[0025] F d = -C d ·Area·V rel 2 ·N
[0026] F t = C t ·V flow ·(-N)
[0027] V rel = V vox - V f]uid
[0028]
[0029] wherein, V rel is the difference between the voxel velocity vector V vox and the fluid velocity vector V fluid , N is the surface normal vector, Area is the area of the triangular surface, and A, B, C are the vertex coordinate vectors.
[0030] In the above solution, the collision detection in step 2 includes three stages: fast filtering, neighboring voxel exclusion, and precise detection;
[0031] Among them, the fast filtering stage:
[0032] Based on the condition ||P i - P j || 2 < 1.5D 2 screen the voxel pairs of the robot body and the obstacle voxels, where P i , P j are the three-dimensional coordinates of voxels i and j, and D is the basic distance threshold. In this stage, the voxel pairs with a spacing exceeding 1.5 times the threshold are excluded to reduce the computational amount;
[0033] The neighboring voxel exclusion stage:
[0034] When the obstacle voxel Skip collision detection, where N(i) represents the set of neighboring voxels of the robotic voxel i, and avoid repeated detection of the connected voxels bound to the structure;
[0035] Accurate detection stage:
[0036] The accurate determination condition for collision detection is:
[0037]
[0038] where S i , S j is the local scaling ratio of voxels i and j. When the distance between two voxels is less than D times their average diameter, an increment operation of the collision counter is triggered.
[0039] In the above solution, in step 3, the regulatory gene and the structural gene add all the input weighted edges as the input of their interaction function, and this function includes the following types: ±sin(), ±abs(), ±square(), ±sqrt(abs()).
[0040] When initializing, 100 nodes are randomly selected, and their interaction functions are replaced with functions randomly selected from the set {±sin(), ±abs(), ±square(), ±sqrt(abs())}.
[0041] In the above solution, in step 3, the initial population size is 50 individuals, and the genotype encoding of each individual contains at least zero sets of regulatory genes (hidden nodes) and two sets of structural genes (output nodes).
[0042] In the above solution, the specific fitness function formula in step 4 is as follows:
[0043]
[0044] where F collision represents the collision penalty term, SA / V represents maximizing the surface area - volume ratio, CollisionCounter represents the cumulative number of collisions recorded by the collision counter, α represents the weight coefficient of the collision penalty term, and β represents the weight coefficient of the morphological optimization term.
[0045] In the above solution, step 5 specifically includes the following steps:
[0046] Step 5.1: Set genetic operations, adopt the tournament selection strategy, and update the population in combination with the mutation operation;
[0047] Step 5.2: Introduce an age mechanism. Every time a generation of evolution passes, the age of the surviving individuals +1, the age of the new individuals is initialized to 0, and the goal is to minimize the age to maintain population diversity;
[0048] Step 5.3: Introduce the concept of Pareto domination, and retain the non-dominated solutions that optimize both F collision and the SA / V ratio through non-dominated sorting, and calculate the two objective values of each individual:
[0049] Minimize collisions: f1 = F collision ,
[0050] Maximize the morphological efficiency:
[0051] Perform non-dominated stratification on the population, preferentially retain the individuals with higher levels, promote the diversity of candidate designs, and prevent premature convergence.
[0052] The proposed obstacle avoidance method for reconfigurable soft robots based on AFPO has the following significant advantages compared with traditional evolutionary algorithms and obstacle avoidance technologies:
[0053] 1. The dynamic fitness function improves the adaptability of obstacle avoidance
[0054] By introducing collision counting as the core penalty term, the obstacle avoidance priority is dynamically adjusted, overcoming the problem of rigid optimization objectives caused by static weights in traditional genetic algorithms. This method adaptively balances the obstacle avoidance efficiency and morphological optimization according to real-time collision data, and shows stronger robustness in dynamic environments such as blood flow. The simulation results show that this method can still maintain an obstacle avoidance success rate of more than 89% under complex fluid interference.
[0055] 2. Multi-objective collaborative optimization and Pareto front exploration
[0056] Adopt the age-fitness Pareto optimization (AFPO) mechanism, combine non-dominated sorting with the age minimization objective, effectively maintain the population diversity, and avoid premature convergence. Compared with traditional single-objective optimization algorithms, the coverage rate of the Pareto front is greatly improved, significantly enhancing the ability to capture non-dominated solutions of morphology-function-environment.
[0057] 3. Biocompatibility advantages of morphology-function collaborative coding
[0058] Based on the combined pattern production network (CPPN) joint coding method, realize the integrated optimization of the robot's morphology, material distribution and drive parameters, and generate bionic designs with extended structures. Through the direct selection pressure of maximizing the surface area to volume ratio (SA / V), guide the evolution of efficient configurations that adapt to fluid resistance. Experimental data shows that when the SA / V is increased by 18.1%, the obstacle avoidance efficiency is increased by 82%;
[0059] 4. High-precision fluid environment interaction modeling
[0060] Based on the voxel-based physical engine and the fluid dynamics model, the forces in the blood environment are accurately simulated through the drag formula and the thrust formula. By introducing the fast filtering and neighboring voxel exclusion algorithms, the collision detection efficiency is greatly improved, supporting real-time obstacle avoidance decisions. Brief Description of the Drawings
[0061] Figure 1 : Flowchart of the implementation of the present invention;
[0062] Figure 2 : Schematic diagram of the input and output of the Combinatorial Pattern Producing Network CPPN adopted by the present invention;
[0063] Figure 3 : Diagram of the simulation results of the present invention. Detailed Description of the Embodiments
[0064] The following will give a detailed description of the embodiments of the present invention. Although the present invention will be described and explained in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments only. On the contrary, any modifications or equivalent replacements made to the present invention should be covered within the scope of the claims of the present invention.
[0065] In addition, in order to better illustrate the present invention, numerous specific details are given in the following detailed description of the embodiments. Those skilled in the art will understand that the present invention can be implemented without these specific details.
[0066] The present invention will be further described in detail below with reference to the drawings and specific embodiments.
[0067] Embodiment 1
[0068] (1) Simple blood environment modeling:
[0069] Use the voxel-based physical engine Voxelyze to build a simple blood environment, define the obstacle voxels, and define the basic parameters of the blood. The blood density ρ = 1.06 g / cm 3 , the blood viscosity μ = 0.0035 Pa·s, and the blood flow velocity V flow = 5 cm / s;
[0070] (2) Environmental interaction settings:
[0071] Set the fluid resistance, that is, the resistance coefficient based on density and viscosity. Calculate the total resistance coefficient according to the set fluid resistance. Traverse the grid surface by the fluid dynamics model based on the voxel network. Calculate the fluid resistance and thrust (simulating the blood flow effect) according to the voxel velocity and the relative motion of the fluid, and integrate the resistance and thrust into the resultant force, and then update the physical state;
[0072] Calculation of the area of the triangular facet (Facet):
[0073]
[0074] The Area is the area of the triangular face, and A, B, and C are the vertex coordinate vectors, which is determined by the magnitude of the cross product of two side vectors.
[0075] Drag direction determination condition:
[0076] V rel ·N > 0
[0077] where V rel = V vox - V fluid That is, V rel is the difference between the voxel velocity vector and the fluid velocity vector, and N is the facet normal vector. The physical meaning of this determination condition is that drag is generated when and only when the relative velocity direction of the fluid is in the same direction as the facet normal vector (the face faces the flow direction).
[0078] Drag formula:
[0079] F d = -C d ·Area·V rel 2 ·N
[0080] where F d is the drag, and C d is the drag coefficient based on density and viscosity.
[0081] Thrust formula:
[0082] F t = C t ·V flow ·(-N)
[0083] where F t is the thrust, C t is the thrust coefficient, and V flow is the blood flow velocity.
[0084] Resultant force calculation:
[0085]
[0086] where F total is the total fluid force on the voxel.
[0087] Set the CollisionCounter, and use a distance-based collision detection function to calculate the number of collisions between the robot voxel and the obstacle voxel in the environment at each time step.
[0088] Fast filtering:
[0089] ||Pi -P j || 2 <1.5D 2
[0090] where P i 、P j are the three-dimensional coordinates of voxels i and j, D is the specified base distance threshold, and when the square of the distance between the centers of two voxels is less than 1.5D 2 , then distant voxel pairs are quickly screened
[0091] Adjacent voxel exclusion:
[0092]
[0093] where j is voxel j, N(i) is the set of adjacent voxels of voxel i. The purpose of adjacent voxel exclusion is to skip voxel pairs with existing fixed connections and avoid repeated processing of structurally bound voxels
[0094] Precise detection:
[0095]
[0096] where S i , S j are the local scaling ratios of voxels i and j, and a collision is triggered when the distance between two voxels is less than D times their average diameter;
[0097] The CheckCollision function checks whether voxels i and j are robot voxels and obstacle voxels, and CollisionCounter + 1 if and only if CheckCollision = True.
[0098] (3) Individual encoding and initialization:
[0099] a) Genotype encoding is performed using a Compositional Pattern-Producing Network (CPPN), which can map the spatial coordinates of a three-dimensional rectangular lattice to a specific value to represent the distribution of physical materials. This encoding method is not limited by scale and can achieve mapping in coordinate spaces of any resolution;
[0100] The coordinates of each constituent unit (voxel) are determined by their Cartesian coordinates (x, y, z) and the radial distance to the center of the lattice workspace. These four coordinates (along with a set of bias terms equal to 1) are used as the input to the network (as Figure 2As shown, the input is connected to a variety of regulatory and structural genes (endpoints) through weighted edges (real-valued scalar weights in the range of -1 to +1). The regulatory genes and structural genes sum up all the weighted edges of the input as the input of their interaction function, and this function includes the following types: ±sin(), ±abs(), ±square(), ±sqrt(abs()). The output of the regulatory gene is re-weighted and continues to be passed to interact with other regulatory genes (hidden nodes) or with one of the two structural genes (output nodes);
[0101] b) Generate a population and randomly initialize 50 individuals, where each individual represents a combination of a robot form and a control strategy;
[0102] (4) Construct a fitness function:
[0103] The specific fitness function formula is as follows:
[0104]
[0105] Among them, Fitness is the total fitness, is the collision penalty term, is to maximize the surface area to volume ratio, CollisionCounter represents the cumulative number of collisions recorded by the collision counter, α represents the weight coefficient of the collision penalty term, and β represents the weight coefficient of the form optimization term;
[0106] (5) Multi-objective evolution:
[0107] a) Set genetic operations, adopt the tournament selection strategy, and update the population in combination with the mutation operation;
[0108] For example:
[0109] Selection strategy: Use tournament selection. Each time, randomly select several individuals (such as 3 - 5) from the population, compare their fitness values, select the best one as the parent, retain the dominant individuals through local competition, and at the same time avoid the loss of diversity caused by global ranking selection.
[0110] Mutation operation: Apply random perturbations to the selected individual genes (such as the weights of the CPPN network), introduce new gene combinations, prevent the algorithm from falling into local optimal solutions, and increase the exploration ability of the solution space.
[0111] b) To solve the problem of premature convergence of the population in traditional evolutionary algorithms, introduce an age mechanism. After each generation of evolution, the age of the surviving individuals +1, the age of the new individuals is initialized to 0, and the goal is to minimize the age to maintain the diversity of the population;
[0112] c) Introduce the concept of Pareto dominance, and retain the simultaneous optimization of F through non-dominated sorting collisionFor the non-inferior solutions of the SA / V ratio, calculate the two objective values of the individual: f1 = F collision (Minimize collisions), (Maximize morphological efficiency) Perform non-dominated sorting on the population, preferentially retain individuals with higher levels, promote the diversity of candidate designs, and prevent premature convergence.
[0113] For example:
[0114] 1. Definition of dominance relationship
[0115] Definition of Pareto dominance: Individual A dominates individual B if and only if A is not inferior to B in all objectives and is strictly better in at least one objective, eliminating the interference of artificial weight preset on the solution set distribution.
[0116] Non-dominated sorting process: Calculate the objective values:
[0117] f1 = F collision (Minimize collisions),
[0118] Example:
[0119] Individual X: Number of collisions = 1 (f1 = 0.5), SA / V = 0.96
[0120] Individual Y: Number of collisions = 22 (f1 = 0.04), SA / V = 0.78
[0121] Then X dominates Y (fewer collisions and better morphology).
[0122] 2. Non-dominated sorting process
[0123] First layer screening: Find all solutions that are not dominated by other individuals → Form the Pareto Front.
[0124] Iterative processing: Remove the stratified individuals, repeat the screening for the remaining individuals → Form the second layer, third layer, etc.
[0125] Preferential retention: Preferentially select individuals with higher levels (e.g., the first layer is better than the second layer).
[0126] 3. Anti-premature mechanism
[0127] Diversity retention: Within the same level, retain individuals with a uniform distribution in the objective space (e.g., individuals with both high SA / V and low collisions and individuals with medium SA / V and zero collisions).
[0128] Dynamic balance: Automatically adjust the optimization direction through the non-dominated relationship, rather than fixed weights (e.g., when the number of collisions is generally low, the algorithm automatically focuses on morphological optimization).
[0129] From the simulation results, it can be concluded that the present invention solves the core problems of traditional methods in a fluid environment, such as single target, premature convergence, and insufficient biocompatibility, through collision counting drive, maximizing the surface area-to-volume ratio, CPPN encoding, and age-Pareto mechanism, realizing the global co-evolution of obstacle avoidance and morphology of soft robots, and providing a highly robust autonomous obstacle avoidance solution for evolving soft robots in a blood environment.
[0130] As described above, the above are only the preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A reconfigurable soft robot obstacle avoidance method based on AFPO, characterized in that: The following steps are involved: Step 1: Modeling the blood environment Define blood density ρ, viscosity μ and blood flow velocity V through voxelized physics engine flow Parameters and set obstacle pixels in three-dimensional space; Step 2: Environment Interaction Settings Through the fluid resistance coefficient C d and thrust coefficient C t Calculate the fluid force, traverse the grid surface based on the voxel network, and generate the voxel total fluid force F according to the relationship between the relative velocity direction and the surface normal vector total ; Set the collision counter Col]isionCounter, and use the distance-based collision detection function to calculate the number of collisions between the robot voxel and the obstacle voxel in the environment at each time step; Step 3: Individual encoding and initialization The combined pattern generation network CPPN is used to jointly encode the robot morphology, material distribution and drive parameters. The input includes three-dimensional coordinates, radial distance and offset terms, and the output is the material distribution value. An initial population of multiple individuals is randomly generated, each of which represents a combination of robot morphology and control strategy; Step 4: Construct a fitness function Define the collision penalty term F collision , and calculate the obstacle avoidance effectiveness based on the number of collisions within the time window; Perform morphological optimization, set the maximum surface area to volume ratio SA / V, exert direct selection pressure on extended structures such as limbs, and guide the direction of evolution; Step 5: Multi-objective evolution Set up genetic operations, adopt the tournament selection strategy, and combine mutation operations to update the population; Optimize F collision Non-inferior solutions to the SA / V ratio promote diversity in candidate designs and prevent premature convergence.
2. The method according to claim 1, characterized in that Blood density ρ = 1.06 g / cm 3 , blood viscosity μ = 0.0035 Pa.s and blood flow velocity V flow =5cm / s.
3. The method according to claim 1, characterized in that The total fluid force F of the voxel in step 2 total : F d =-C d ·Area·V rel 2 ·N F t =C t ·V flow ·(-N) V rel =V vox -V fluid Among them, V rel is the voxel velocity vector V vox With the fluid velocity vector V fluid The difference between the two, N is the face normal vector, Area is the area of the triangle face, and A, B, and C are the vertex coordinate vectors.
4. The method according to claim 1, characterized in that: The collision detection in step 2 includes three stages: fast filtering, neighboring voxel exclusion, and precise detection; Among them, the rapid filtering stage: Based on the condition ‖P i -P j ‖ 2 <1.5D 2 Filter robot voxel and obstacle voxel pairs, where P i , P j is the three-dimensional coordinate of voxel i and j, D is the basic distance threshold, and in this stage, voxel pairs with a distance exceeding 1.5 times the threshold are excluded to reduce the amount of calculation; Neighboring voxel exclusion stage: When the obstacle Skip collision detection when N(i), where N(i) represents the set of neighboring voxels of robot voxel i, avoiding repeated detection of connected voxels bound by the structure; Precision detection stage: The precise conditions for collision detection are: Where S i , S j is the local scaling ratio of voxels i and j. When the distance between two voxels is less than their average diameter D times, the collision counter increment operation is triggered.
5. The method according to claim 1, characterized in that In step 3, the regulatory genes and structural genes add up all the input weighted edges as the input of their interaction function, which includes the following types: ±sin(), ±abs(), ±square(), ±sqrt(abs()). During initialization, 100 nodes are randomly selected and their interaction functions are replaced with functions randomly selected from the set {±sin(), ±abs(), ±square(), ±sqrt(abs())).
6. The method according to claim 1, characterized in that In step 3, the population size is initialized to 50 individuals, and the genotype code of each individual includes at least zero sets of regulatory genes and two sets of structural genes.
7. The method according to claim 1, characterized in that The specific fitness function formula in step 4 is as follows: Among them, F collision represents the collision penalty term, SA / V represents the maximized surface area to volume ratio, CollisionCounter represents the cumulative number of collisions recorded by the collision counter, α represents the weight coefficient of the collision penalty term, and β represents the weight coefficient of the morphological optimization term.
8. The method according to claim 1, characterized in that Step 5 specifically includes the following steps: Step 5.1, set up genetic operations, adopt the tournament selection strategy, and update the population in combination with mutation operations; Step 5.2: Introduce an age mechanism. After each generation of evolution, the age of the surviving individuals is increased by 1, and the age of the new individuals is initialized to 0. The goal is to minimize the age to maintain population diversity. Step 5.3: Introduce the concept of Pareto dominance and optimize F by retaining it through non-dominated sorting collision With the non-inferior solution of SA / V ratio, calculate the two objective values of the individual: Minimize collisions: f1 = F collision , Maximize morphological effectiveness: The population is non-dominated and stratified, individuals at the top of the hierarchy are retained preferentially to promote the diversity of candidate designs and prevent premature convergence.
9. A storage medium, characterized in that: When the processor executes the program in the storage medium, the method described in any one of claims 1 to 8 is implemented.