A method, system, electronic device, computer program, and readable storage medium for mobile robot path planning guided by B-spline residual diffusion.
By using a diffusion model trained with B-spline control point residuals and a hybrid sampling strategy, the path planning problem in narrow passages and non-convex obstacle scenarios was solved, achieving efficient and safe path planning.
Patent Information
- Application Number
- CN202611496093.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies generate many invalid samples in narrow passages, non-convex obstacles, and long detour scenarios, leading to increased search time and tree size. Furthermore, learning-based planning suffers from endpoint drift, local collisions, and inconsistencies with real-time maps.
A B-spline control point residual training conditional diffusion model is adopted to generate a guiding centerline. Asynchronous requests, confidence gating, and caching mechanisms are combined to ensure online reliability. Hybrid sampling and real-time collision detection ensure the safety and efficiency of path planning.
It reduces the overhead of invalid sampling and search in complex obstacle environments, improves the safety and efficiency of path planning, reduces endpoint drift, and ensures the stability and real-time performance of planning.
Smart Images

Figure CN123113891A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mobile robot technology, specifically relating to a mobile robot path planning method, system, electronic device, computer program, and readable storage medium based on B-spline residual diffusion guidance. Background Technology
[0002] The path is gradually improved by selecting and reconnecting parent nodes. After obtaining the initial solution, the sampling area is further restricted, but in narrow passages, non-convex obstacles, and long detour scenarios, a lot of invalid samples are still generated, resulting in increased search time and tree size.
[0003] Learning-based planning can utilize historical paths to provide search priors. Diffusion models have the ability to generate multiple candidates and are suitable for representing different detour methods such as those on both sides of an obstacle. However, directly generating and executing dense waypoints can easily lead to endpoint drift, local collisions, and inconsistencies with the real-time map.
[0004] Furthermore, multi-step diffusion inference has a certain latency. If the model is called synchronously in the global planning thread, the replanning frequency may be reduced; when the guidance expires or the quality is insufficient, it may also affect the stability of the planning.
[0005] Therefore, this invention provides a method, system, electronic device, computer program, and readable storage medium for mobile robot path planning based on B-spline residual diffusion guidance. As a hybrid planning scheme with limited permissions, the diffusion model only provides sampling priors, and the final path is still completed by the classic sampling planner for collision detection, tree expansion, and reconnection. At the same time, asynchronous requests, confidence gating, caching, and rollback mechanisms are used to ensure online reliability. Summary of the Invention
[0006] The purpose of this invention is to provide a method, system, electronic device, computer program, and readable storage medium for mobile robot path planning based on B-spline residual diffusion guidance. This reduces the overhead of ineffective sampling and search in complex obstacle environments and avoids the safety risks associated with directly executing neural network paths. The core idea is to train a conditional diffusion model using B-spline control point residuals to generate a guiding centerline online; this centerline only changes... The sampling distribution does not replace real-time collision detection and tree search.
[0007] The specific technical solution adopted by this invention is as follows: A mobile robot path planning method based on B-spline residual diffusion guidance includes the following steps: S101: Obtain the occupied grid map, robot initial state, and target state, and calculate the SDF for distance query; S102: Offline sampling start and end point pairs, utilizing... After the teacher planner generates feasible paths, the teacher centerline is obtained through smoothing and resampling. S103: Fit the teacher centerline to the target B-spline control points, and construct coarse control points from the start and end points. The difference between the two is used as the residual training label. S104: Train a Conditional Temporal U-Net with noisy residuals, diffusion time steps, occupied / SDF features, start and end points and coarse control points as inputs; S105: Perform DDIM backsampling online from multiple independent noises to reconstruct multiple B-spline candidate centerlines; S106: Perform endpoint, range, and collision checks on candidates, and combine cost-based bootstrapping, SDF safety correction, and confidence gating to select effective bootstrapping; S107: Select a hybrid method between uniform sampling, Informed elliptic sampling, and centerline neighborhood sampling, according to... Rule expansion, optimization, and reconnection; S108: Extract the optimal path, perform smoothing and final collision verification, and then send it to the local planner and the underlying controller for execution.
[0008] Preferably, in step S103, the target control point sequence is obtained by fitting the teacher's centerline, and a coarse control point sequence is constructed based on the starting point and the target point; the diffusion model learns the control point residuals between the two. (1) Among them, P target It is by The sequence of target control points obtained by fitting the teacher centerline generated by the teacher planner with B-splines; It is a sequence of coarse B-spline control points constructed from the starting point, the target point, and low-frequency shape rules; The clean residual is denoted as R0; Gaussian noise is added to the forward diffusion at time step t: (2) Where R0 is the cleaning residual at time step 0, R0 = ΔP; R t The noisy residual at diffusion time step t; T is the preset maximum diffusion time step; ε is the cumulative signal preservation coefficient corresponding to time step t, i.e., the noise scheduling coefficient; ε is the random noise sampled from a standard Gaussian distribution; N(0,I) is a multivariate Gaussian distribution with zero mean and unit covariance; I is the identity matrix. Conditional denoising networks predict noise based on noisy residuals, time steps, and environmental conditions; training objectives can consist of noise prediction, clean residual reconstruction, curve fitting, endpoint consistency, smoothness, and residual regularization terms. (3) Where L is the total training loss; L noise For noise prediction loss; L x0 Loss due to clean residual reconstruction; L curve L represents the curve fitting loss. endpoint For endpoint consistency loss; L smooth To smooth out the loss; L reg λ is the residual regularization term. n , λ x0 , λ c ,λ e , λ s , λ r These are the weighting coefficients for each loss term; During inference, the predicted residuals are added to the coarse control points, and the continuous guiding centerline is obtained by B-spline interpolation.
[0009] Preferably, in the specific process of SDF security correction in S106, the diffusion service generates a candidate set from different noises; for each candidate centerline, the combined cost of obstacles, smoothing, and length is calculated: (4) Where γ is a candidate guiding centerline; J(γ) is the comprehensive cost of centerline γ; J obs (γ) represents the obstacle / safety distance cost; J smooth (γ) represents the smoothing cost; J len (γ) represents the length cost; w obs ,w smooth ,w len The weights for the three types of costs; The obstacle cost based on SDF is: (5) Among them, J obs (γ) represents the SDF obstacle cost along the entire centerline; K is the number of discrete sampling points used for cost calculation along the centerline; k is the index of the discrete points along the centerline; γ k The two-dimensional coordinates of the k-th sampling point on the center line; SDF(γ) k ) is point γ k The signed distance to the nearest obstacle boundary; d safe Let $z$ be the desired safe distance; $ReLU(z)$ is the linear rectified function $max(0,z)$; (·) 2 For the square penalty; When the distance between a pathpoint and an obstacle is less than the desired safe distance, the cost increases; during the back-diffusion stage, samples can be corrected according to the cost gradient, and SDF refinement can be performed after generation. (6) Where γ is the current candidate centerline to be refined; η is the refinement step size / learning rate; J is the gradient of the comprehensive cost J with respect to the centerline γ; J(γ) is the comprehensive cost of formula (4); ← is the assignment / iteration update symbol; During the correction process, the starting and ending points are fixed, and independent collision checks are performed on the candidates. Finally, the centerline that satisfies the constraints and has the lowest overall cost is selected.
[0010] Preferably, in step S106, during the confidence gating selection process, diffusion inference is executed by an independent service or background thread, while the main planning thread only reads from the cache; the returned results must pass timeliness, source, collision, and confidence checks. (7) Where ApplyGuide is the gated output for whether the centerline is allowed to be used for guiding sampling; 1[·] is the indicator function; fresh indicates whether the guidance is still within the allowed time frame; sourceValid indicates whether the guidance source is valid; collisionFree indicates whether the guiding centerline has passed an independent collision check on the current real-time map; q guide Score the confidence level of the current guidance; q min The minimum allowable confidence threshold is represented by ∧; ∧ represents a logical AND operation. Results that fail the gating are rejected and may enter a cooling-off period; when the cache is invalid, the planner does not wait for the model, but immediately falls back to informed sampling or uniform sampling.
[0011] Preferably, in step 107, the mixed sampling and... In the specific search process, let the sum of the probabilities of uniform sampling, informed elliptic sampling, and centerline neighborhood sampling be 1; let r sample uniformly within [0,1), then: (8) Where, x rand For the present The tree expansion uses random target samples; r is a uniformly random number used to select sampling branches; p u p represents the uniform sampling probability. i p represents the Informed elliptic sampling probability. c X represents the sampling probability of the centerline neighborhood; free s represents the free state space in the current map; s and g represent the planning start and target points; c best Γ is the cost of the best path found in the current search tree; Γ is the effective guiding centerline that is gated and cached by formula (7); Centerline neighborhood sampling selects points from the centerline of the cache and superimposes Gaussian perturbations: (9) Where, x rand The random state points obtained by sampling the neighborhood of the center line; γ j Let j be the selected point on the centerline Γ, where j is the index of the centerline point; δ is the random perturbation applied to the centerline point; N(0,σ) 2 I) has zero mean and covariance σ 2 I is a Gaussian distribution; σ is the standard deviation of the Gaussian perturbation / sampling bandwidth; I is the identity matrix; The uniform sampling probability remains positive throughout, therefore erroneous or missing guides do not exclude feasible paths in free space; each sample still follows the standard... Perform nearest node search, step size expansion, edge collision detection, lowest cost parent node selection, and reconnection.
[0012] A mobile robot path planning system based on B-spline residual diffusion guidance is provided for executing the aforementioned mobile robot path planning method. The mobile robot path planning system includes: The module includes: Map and State Input Module, Teacher Centerline Generation Module, B-Spline Residual Construction Module, Conditional Diffusion Model Training Module, Multi-Candidate Guidance Generation Module, Cost / SDF Correction Module, Asynchronous Request Module, Caching and Gating Module, and Hybrid Sampling Module. The module includes a search module, a path post-processing module, and a local planning and robot execution module.
[0013] An electronic device includes a display screen, a memory, and a processor, wherein the display screen and the memory are both coupled to the processor; the memory stores computer-executable instructions; and the processor executes the computer-executable instructions stored in the memory, causing the electronic device to perform the mobile robot path planning method.
[0014] A computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the mobile robot path planning method.
[0015] A computer program product includes a computer program that, when executed by a processor, implements the mobile robot path planning method.
[0016] The technical effects achieved by this invention are as follows: This invention replaces dense path points with B-spline control point residuals, enabling the network to focus on learning local corrections caused by obstacles, thereby reducing output dimensionality and training difficulty. In this invention, coarse control points provide low-frequency trends between the start and end points, and combined with endpoint loss, can reduce centerline endpoint drift. In this invention, multi-candidate generation can cover different detour categories, and cost guidance and SDF correction together improve the safety of the guide centerline; In this invention, the diffusion model only adjusts the sampling distribution, while all tree edges and the final path still undergo real-time collision detection, balancing efficiency and verifiability. In this invention, asynchronous requests, caching, and gating shift model inference latency out of the main planning loop, and low-quality responses do not block the basic planning. In this invention, the hybrid sampling retains uniformity and the Informed branch, and can degenerate to classic even if the bootstrap is unavailable. search; In simulations, the asynchronous mechanism of this invention reduces the average planning and evaluation time from 0.106730s to approximately 0.015s; the combination of cost guidance and SDF correction increases the candidate collision-free rate from 34.00% to 61.00%. In five repeated experiments of the tracked photovoltaic cleaning robot, the position error of the P2 terminal was 0.413±0.028m, the heading error was 0.155±0.068rad, and the standard deviation of the control time was 1.59s. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the overall process of a mobile robot path planning system guided by B-spline residual diffusion. Figure 2 A schematic diagram illustrating the process of generating the teacher centerline, constructing B-spline residuals, and training the conditional diffusion model. Figure 3 This diagram illustrates the asynchronous bootstrapping process, confidence gating, cache rollback, and online planning. Detailed Implementation
[0018] To make the objectives and advantages of this invention clearer, the invention will be specifically described below with reference to embodiments. It should be understood that the following text is merely used to describe one or more specific embodiments of the invention and does not strictly limit the scope of protection specifically claimed by the invention.
[0019] like Figures 1-3 As shown, a method, system, electronic device, computer program, and readable storage medium for mobile robot path planning based on B-spline residual diffusion guidance can solve the following technical problems: Reduce the proportion of low-value samples in narrow passages, non-convex obstacles, and long detour tasks; Replace dense path points with a fixed number of B-spline control point residuals to reduce the generation dimension while maintaining the start and end point constraints; The feasibility and safety margin of the guide centerline are improved by utilizing multiple candidates, cost-based guidance, and SDF correction. Classical planning can continue even when the model fails or is delayed through asynchronous requests, gating, caching, and rollback; the mobile robot path planning method includes the following steps.
[0020] S101: Obtain the occupied grid map, robot initial state, and target state, and calculate the SDF for distance query; S102: Offline sampling start and end point pairs, utilizing... After the teacher planner generates feasible paths, the teacher centerline is obtained through smoothing and resampling. S103: Fit the teacher centerline to the target B-spline control points, and construct coarse control points from the start and end points. The difference between the two is used as the residual training label. Preferably, in step S103, the target control point sequence is obtained by fitting the teacher's centerline, and a coarse control point sequence is constructed based on the starting point and the target point; the diffusion model learns the control point residuals between the two. (1) in, This is the B-spline control point residual sequence, i.e., the offset of the target control point relative to the coarse control point; in two-dimensional programming, it is usually an M×2 matrix, which serves as the training label and inference output object for the diffusion model. P target It is by The teacher planner generates a sequence of target control points for the teacher centerline fitted with B-splines; and P... coarse Having the same number of control points M and coordinate dimensions, their function is to provide a monitoring target of "where to go". It is a sequence of coarse B-spline control points constructed from the starting point, the target point, and low-frequency shape rules; in two-dimensional programming, it is usually an M×2 matrix, which is used to express the basic trend from the starting point to the end point in advance, so that the network does not need to recover the global direction from zero; M is the number of B-spline control points; it is a positive integer and remains consistent during the training and inference phases. Its role is to determine the residual representation dimension and the geometric degrees of freedom of the B-spline. Formula (1) defines the learning object of the diffusion model of the present invention; unlike directly generating the entire dense path, this method first obtains the target B spline control point sequence by fitting the teacher centerline, and then constructs a coarse control point sequence expressing the low-frequency global trend from the start point and the end point. The diffusion model only learns the offset between the two. Let the j-th control point be denoted as P. target,j and P coarse,j Then ΔP jThis indicates how much the control point needs to be corrected along the x and y directions in the two-dimensional plane. For the implementation of fixed start and end points, the start and end control points are usually directly bound to the start and target points, so the corresponding endpoint residuals can be fixed or constrained to be close to zero through endpoint loss constraints. The reason for using residuals instead of absolute control points is: P coarse It already includes low-frequency global trends between the start and end points. ΔP mainly reflects detours, local bending, and safety distance corrections caused by obstacles, thus reducing the generation dimension and learning difficulty, and helping to maintain endpoint consistency. In equation (1), P target P is the sequence of target control points obtained by fitting the teacher's centerline using B-spline. coarse The coarse control point sequence is constructed based on the starting point and the target point, and both have the same number of control points and coordinate dimensions; ΔP is the residual offset of the target control point relative to the coarse control point, which is the learning object of the conditional diffusion model. The clean residual is denoted as R0; Gaussian noise is added to the forward diffusion at time step t: (2) Where R0 is the clean residual at time step 0, R0=ΔP, which is the same dimension as ΔP. Its function is to provide the real training labels, which are the objects that need to be recovered in the final stage of reverse denoising. R t The noisy residual at diffusion time step t is of the same dimension as R0 and serves as the main input to the conditional denoising network during the training phase. T is the preset maximum diffusion time step, which is a positive integer. Its function is to determine the upper limit of the discrete step number of the complete forward / backward diffusion process. This refers to the accumulated signal hold factor corresponding to time step t, i.e., the noise scheduling factor, typically... Its function is to determine the R0 retention ratio and the noise injection ratio; it is determined by the preset noise scheduling and is not a state variable of the path itself. Formula (2) describes the forward diffusion process during the training of the conditional diffusion model; the residual ΔP in formula (1) is denoted as the clean residual R0, and then Gaussian noise is added at random time step t according to the preset noise schedule to obtain the noisy residual R. t The network receives R during training. t The system learns to recover noise or clean up residuals by processing time step t and other conditional information such as map / start / end point / coarse control points; In equation (2) Control the degree to which cleaning residues are retained. Controlling the amplitude of Gaussian noise; as t increases, typically... R gradually decreases, therefore tThe original residual information in the training process is gradually weakened while the random noise is gradually strengthened. After training, online inference performs reverse DDIM sampling starting from the random noise to gradually obtain the prediction residual. In equation (2), R0 is the residual of the clean B-spline control point, R t The noisy residual at time step t. The cumulative signal preservation coefficient corresponding to the preset noise scheduling is ε, which is the standard Gaussian noise with the same dimension as the residual. N(0,I) represents a Gaussian distribution with zero mean and unit covariance, I is the identity matrix, and t is the diffusion time step. Conditional denoising networks predict noise based on noisy residuals, time steps, and environmental conditions; training objectives can consist of noise prediction, clean residual reconstruction, curve fitting, endpoint consistency, smoothness, and residual regularization terms. (3) Where L is the total training loss; its role is to minimize the final objective of the optimizer. L noise This is the noise prediction loss; its function is to require the network ε_θ(R_t,t,cond) to accurately predict the noise ε added during forward diffusion; cond is the set of conditional information. L x0 This is the clean residual reconstruction loss; its function is to ensure that the clean residual inferred from the network prediction results is consistent with R0. L curve This is the curve fitting loss; its function is to constrain the B-spline centerline obtained by interpolating the predicted control points to be close to the teacher's centerline. L endpoint This is the endpoint consistency loss; its function is to suppress the drift of the start / end point of the generated centerline. L smooth To smooth out losses; its function is to suppress local oscillations, sharp reversals, and abrupt changes in curvature at control points or curves; L reg This is a residual regularization term; its function is to limit the magnitude of the control point residuals to be too large, thereby improving training stability and generalization. All of the above losses are non-scalar quantities; λ n , λ x0 , λ c , λ e , λ s , λ r These are the weighting coefficients for each loss term; they are usually non-negative hyperparameters, and their function is to balance the importance of each sub-objective. During inference, the predicted residuals are added to the coarse control points, and the continuous guiding centerline is obtained by B-spline interpolation.
[0021] Formula (3) is the joint objective function during training of Conditional Temporal U-Net; this invention explicitly provides the noise prediction loss and adds clean residual reconstruction, curve fitting, endpoint consistency, smoothness and residual regularization terms to the complete objective; the weights of each term are used to control the relative contribution of different geometric objectives to the total training objective; The noise prediction loss can be written as The remaining geometric losses are given a functional definition in this invention without limiting a unique expansion form. Therefore, the patent should maintain the expression "functional definition + optional implementation" rather than limiting the scope of protection to a specific distance function. A typical implementation approach is: L x0 Used to compare predicted cleaning residuals with R0; L curve Used to compare the reconstructed B-spline curve with the teacher's centerline; L endpoint Used to compare the start and end points of the reconstructed curve with a given start and end point; L smooth Second-order differences can be used with control points or curve points; L reg Residual norm or threshold penalty can be used; the above are merely equivalent implementation examples and are not the only forms limited by this invention. S104: Train a Conditional Temporal U-Net with noisy residuals, diffusion time steps, occupied / SDF features, start and end points and coarse control points as inputs; S105: Perform DDIM backsampling online from multiple independent noises to reconstruct multiple B-spline candidate centerlines; S106: Perform endpoint, range, and collision checks on candidates, and combine cost-based bootstrapping, SDF safety correction, and confidence gating to select effective bootstrapping; like Figures 1-3 As shown, preferably, in the specific process of SDF security correction in S106, the diffusion service generates a candidate set from different noises; for each candidate centerline, the combined cost of obstacles, smoothing, and length is calculated: (4) Wherein, γ is a candidate boot centerline; it is composed of K discrete points or their B-splines, and its function is to be evaluated, refined and may eventually be written into the boot cache. J(γ) represents the overall cost of the centerline γ; it is a non-negative scalar or a comparable scalar, and its function is that the smaller the value, the more the candidate meets the requirements of safety, smoothness and length. J obs (γ) represents the obstacle / safety clearance cost; it is a non-negative scalar and its function is to penalize the centerline for entering an obstacle or getting too close to an obstacle. J smooth (γ) is the smoothness cost; it is a non-negative scalar and its function is to penalize local reversals, excessive second-order differences, or abrupt curvature changes. J len (γ) represents the length cost; it is a non-negative scalar and its function is to suppress unnecessary long-distance detours. w obs ,w smooth ,w len These are the weights for the three types of costs; they are usually non-negative hyperparameters, and their role is to determine the trade-off between safety, smoothness, and path length. Formula (4) is used to evaluate the overall quality of a diffusion-generated candidate centerline γ, and is also the basis for cost guidance and candidate posterior ranking; the comprehensive cost considers obstacle safety, geometric smoothness and path length at the same time, and does not take path length as the only objective; In practical engineering, w obs When the size increases, it is more important to maintain a distance from obstacles; w smooth When increasing the size, more emphasis is placed on the continuity of the centerline and fewer detours; w len When increasing the value, the emphasis is on shortening the path; the core idea of this invention is not to fix a certain set of values, but to use three differentiable costs to jointly constrain the generation of the centerline; In equation (4), γ is the candidate guiding centerline, J(γ) is the comprehensive cost of the centerline, and J obs J smooth and J len These are obstacle cost, smoothing cost, and path length cost, respectively. obs w smooth and w len These are the weights for the three types of costs, used to adjust the relative importance of safety, smoothness, and path length; The obstacle cost based on SDF is: (5) Among them, J obs (γ) represents the SDF obstacle cost of the entire centerline; it is a non-negative scalar and its function is to measure the degree of insufficient safety clearance of the entire centerline. K is the number of discrete sampling points used for cost calculation of the centerline; it is a positive integer and its function is to determine the discrete density of SDF collision / spacing checks. k is the index of the discrete points on the centerline; k=1,…,K, and its function is to traverse the entire centerline; γ k Let R be the two-dimensional coordinates of the k-th sampling point on the center line; 2 The point in the middle is used to query the SDF value of the current location; SDF(γ k ) is point γ kThe signed distance to the nearest obstacle boundary; it is a distance quantity, with units consistent with map coordinates, and its function is to represent the obstacle clearance at that point; this formula is based on free space, and the sign convention is used because a larger distance indicates greater safety; d safe is the desired safe distance; it is a positive real number that triggers a safe distance penalty when the SDF is less than this value. ReLU(z) is a linear rectified function max(0,z); it is a non-negative output, and its function is to prevent points that meet the safety distance from incurring this penalty. (·) 2 It is a squared penalty; its effect is to amplify the severity of violations involving serious proximity to or entry into obstacle zones. Formula (5) is the obstacle term in the overall cost; for each discrete point γ on the candidate centerline k Query the SDF value; if the distance from the point to the nearest obstacle is less than the expected safe distance d. safe If the gap in safety distance is larger, a positive penalty will be generated, and the larger the squared penalty will be; When SDF(γ) k )≥d safe At that time, ReLU(d) safe -SDF(γ) k When SDF(γ) = 0, no obstacle cost is incurred at this point; when SDF(γ) = 0, no obstacle cost is incurred at this point. k ) <d safe When the safe distance is insufficient, the amount is d. safe -SDF(γ) k The penalty is calculated by squaring the squared values; if the SDF takes a negative value inside the obstacle, the penalty will increase further. d safe Additional safety margins can be set on the cost map that has already expanded according to the robot's shape, or they can be determined directly by combining the robot's equivalent radius / footprint; the specific values are implementation parameters and should not be hard-coded as the protection range. In equation (5), K is the number of discrete sampling points for the candidate centerline, and γ k For the k-th centerline point, SDF(γ) k d is the signed distance from the point to the nearest obstacle boundary. safe To preset the desired safe distance, ReLU(z) = max(0,z); when the obstacle distance at a point is not less than d... safe When the distance is insufficient, the penalty is the square of the safety distance gap, and J is obtained by summing the values over all centerline points. obs (γ); When the distance between a pathpoint and an obstacle is less than the desired safe distance, the cost increases; during the back-diffusion stage, samples can be corrected according to the cost gradient, and SDF refinement can be performed after generation. (6) Wherein, γ is the candidate centerline to be refined; it consists of K two-dimensional points or equivalent optimizable parameters, and its function is to determine the state of the centerline before each iteration; η is the refinement step size / learning rate; it is a positive real number and its function is to control the magnitude of each movement along the negative gradient. Let be the gradient of the overall cost J with respect to the centerline γ; it has the same dimension as γ and its function is to indicate the direction in which the overall cost increases the fastest when the coordinates of each centerline point are changed. J(γ) is the combined cost of formula (4); it is a scalar and its function is to simultaneously include obstacles, safety distance, smoothness and length factors. The left arrow (←) is the assignment / iteration update symbol, which indicates that the result on the right should be used to overwrite the current value of γ. During the correction process, the starting and ending points are fixed, and independent collision checks are performed on the candidates. Finally, the centerline that satisfies the constraints and has the lowest overall cost is selected.
[0022] Formula (6) describes the centerline safety refinement process after generation. Its mathematical form is a gradient descent update: the centerline is adjusted along the direction of decreasing J according to the gradient of the comprehensive cost J with respect to the centerline variable γ. In this invention, this step is complementary to the cost guidance in the diffusion stage and is used to further repair local violations near the barrier boundary. Due to the adoption The negative gradient update, in theory, will adjust in the direction of reducing the overall cost when the step size is small enough; for obstacle terms, the SDF gradient can provide a local direction away from the obstacle boundary; at the same time, the smoothing term suppresses the sawtooth or high-frequency oscillation of adjacent points after correction. During implementation, the start and end points should be fixed, or the start and end points should be reprojected to the given start and target points after each update to avoid safety refinement from breaking the endpoint conditions of the planning task; after refinement is completed, independent real-time collision checks still need to be performed, and gradient refinement itself does not replace collision validity determination. In equation (6), γ is the current candidate centerline, and J(γ) is the comprehensive cost of equation (4). The gradient of the comprehensive cost with respect to each coordinate of the centerline is given by η, which is a positive refinement step size. This formula represents the iterative correction of the centerline along the negative gradient direction of the comprehensive cost to increase obstacle clearance while taking into account smoothness and length. like Figures 1-3 As shown, preferably, in the specific process of confidence gating selection in S106, diffusion inference is executed by an independent service or background thread, and the main planning thread only reads the cache; the returned result needs to pass timeliness, source, collision, and confidence checks: (7) Among them, ApplyGuide is a gated output that determines whether the centerline can be used to guide sampling; 1[·] is an indicator function; it is a Boolean value of 0 or 1, where 1 indicates acceptance and write / update of the buffer, and 0 indicates rejection; `fresh` indicates whether the data is still within the allowed timeframe; it is a Boolean value used to prevent old maps, old targets, or expired responses from continuing to affect the current plan. `sourceValid` determines whether the source is valid; it is a boolean value used to exclude mock, placeholder fallback, source mismatch, or illegal service results. `collisionFree` determines whether the guide centerline passes the independent collision check on the current real-time map; it is a Boolean value used for independent safety checks before learning and guiding the input to the sampling distribution. q guide The confidence score for the current guidance; usually a normalized scalar or comparable quality score, used to determine whether the center line has sufficient information value; q min This is the minimum allowed confidence threshold; a scalar threshold whose function is to reject guidance and trigger cooling if q_guide falls below this value. ∧ represents the logical AND; its function is to require all gating conditions to be true simultaneously. Formula (7) is an engineering enhancement of the basic gating formula of the present invention in the application document; Formula (12) of the present invention mainly specifies the two conditions of "no collision and confidence level not lower than the threshold"; The application document further explicitly incorporates the timeliness fresh and source validity of the asynchronous system into the logic and conditions, so as to be consistent with engineering mechanisms such as caching, expiration detection, and simulated rollback isolation; This invention does not limit q guide It must be calculated using a single formula, which only indicates that the returned message contains confidence information and is used for whether bias sampling is used; therefore, q should be included in the patent. guide It should be kept as a general quality indicator, which can be obtained from candidate integrated cost, minimum obstacle distance, consistency between candidates, model uncertainty, endpoint error or a combination thereof, and is not limited to a fixed calculation formula; The key safety logic of this formula is that even if the model gives a high confidence level, as long as the current real-time map collision check fails, collisionFree=0, and the final ApplyGuide will still be 0; therefore, the neural network confidence level will not replace the classic collision check. In equation (7), ApplyGuide is an indicator of whether the guide has been received, 1[·] is the indicator function; fresh indicates whether the result is within the valid time limit, sourceValid indicates whether the source of the result is valid, collisionFree indicates whether the centerline has passed the independent collision detection of the current cost map, and q guideIndicates the guiding confidence level, q min represents the minimum confidence threshold, ∧ represents logical AND; ApplyGuide=1 only if all conditions are met simultaneously. Results that fail the gating are rejected and may enter a cooling-off period; when the cache is invalid, the planner does not wait for the model, but immediately falls back to informed sampling or uniform sampling.
[0023] S107: Select a hybrid method between uniform sampling, Informed elliptic sampling, and centerline neighborhood sampling, according to... Rule expansion, optimization, and reconnection; S108: Extract the optimal path, perform smoothing and final collision verification, and then send it to the local planner and the underlying controller for execution.
[0024] Preferably, in step 107, the mixed sampling and... In the specific search process, let the sum of the probabilities of uniform sampling, informed elliptic sampling, and centerline neighborhood sampling be 1; let r sample uniformly within [0,1), then: (8) Where, x rand For the present Random target samples used for tree expansion; these are two-dimensional state points, used to subsequently enter Nearest, Steer, CollisionCheck, ChooseParent, and Rewire. r is a uniform random number used to select the sampling branch; its range is r ~ Uniform(0,1), and its function is to randomly mix the three sampling methods according to a set probability. p u p represents the uniform sampling probability. u >0, its function is to preserve the full ability to explore free space and avoid misleading and permanently excluding real and feasible paths; p i p represents the Informed elliptic sampling probability. i ≥0, its function is to concentrate the search within the elliptical region where there is hope for path improvement when the current optimal solution already exists; p c p represents the sampling probability of the centerline neighborhood. c ≥0, and p u +p i +p c =1, its function is to improve sampling efficiency by utilizing the centerline prior provided by the diffusion model; X free This refers to the free state space in the current map; specifically, X\X_obs, which serves as the domain for uniform sampling. s and g are the starting and target points of the planning; X is... free The state in the ellipse serves as the two foci of the Informed ellipse and determines the planning task. c best The cost of the best path found in the current search tree; when no solution is found, it can be considered as ∞, its function is to determine the size of the informed ellipse; when a better solution is found, the ellipse varies with c. best Decline and contraction; Γ is the effective guiding centerline gated and buffered by formula (7); is the point sequence / curve, which serves as the sampling basis for CenterlineSample; Formula (8) determines The random samples used for each tree expansion come from which distribution? The random variable r is uniformly sampled in [0,1), and the three probability intervals are selected for uniform sampling of the complete free space, Informed elliptic sampling, or centerline neighborhood sampling. In two-dimensional path planning, InformedSample(s,g,c) bes t) corresponds to focusing on s and g, and using the current best path cost c. best Constrain the major axis to an elliptical region that can accommodate a better solution; if an initial solution has not yet been found, then c best For an infinite or non-valid Informed region, uniform sampling or valid centerline sampling can be used; This invention specifically requires p u Maintaining a positive value determines that the diffusion model has only "limited permissions": the learning model can only reallocate a portion of the sampling budget and cannot shut down the classical sampling mechanism. Exploration of the entire free space; when Γ is invalid, expired, or rejected, p c The corresponding budget can be reallocated to the uniform or Informed branch; In equation (8), x rand for The random sampling points; r is a branch selection random number uniformly generated within [0,1); p u p i p c These represent the probabilities of uniform sampling, informed elliptic sampling, and centerline neighborhood sampling, respectively, and their sum is 1; X free For free space; s and g are the starting and ending points, respectively; c best Γ represents the cost of the current optimal path; Γ represents the valid guiding centerline that has passed the gating and been cached. Centerline neighborhood sampling selects points from the centerline of the cache and superimposes Gaussian perturbations: (9) Where, xrand These are random state points obtained by sampling from the neighborhood of the center line; they are two-dimensional state points, whose function is to serve as... Random targets for tree expansion; γ j For the j-th selected point on the cache boot centerline Γ; R 2 The point in the middle serves to provide the center location of this sampling; j is the index of the centerline point; δ is the random perturbation applied to the centerline point; it is 1, ..., K or continuously selected according to arc length, and its function is to determine which position near the guiding centerline to sample in this time; it is a two-dimensional random vector, and its function is to make the sampling not strictly fall on a single curve, but to form a search corridor with width around it. N(0,σ 2 I) is a Gaussian distribution with zero mean and covariance σ²I; in two-dimensional programming, I=I², which defines the statistical range of disturbances in the neighborhood of the center line. σ is the standard deviation of the Gaussian perturbation / sampling bandwidth; it is a positive real number, and its function is that a small σ strongly utilizes the center line, while a large σ enhances the exploration near the center line. I is the identity matrix; in two dimensions, it is a 2×2 identity matrix, which represents that the x and y directions have the same variance and are uncorrelated in the basic implementation. Formula (9) provides a specific implementation of CenterlineSample(Γ) in Formula (8): a center point γ is selected from the effective cache centerline Γ. j And by superimposing a zero-mean Gaussian perturbation δ, the final result is obtained. random sampling point x rand ; σ is one of the key parameters of the centerline prior "strength"; if σ is too small, the samples will be highly concentrated on the centerline, and if there is a local deviation in the centerline, the exploration will be insufficient; if σ is too large, the centerline branch will be close to ordinary random sampling, reducing the efficiency gains brought by learning the prior; in practice, it can be set according to the map resolution, channel width or robot size. x generated by formula (9) rand It is still not a directly executable pathpoint; it must be traversed after this point. The steps include step size expansion, state / edge collision checking, parent node selection, and reconnection; if a sample or new edge falls into an obstacle, it is directly rejected by the classical planner. In equation (9), γ j Let δ be the j-th point on the buffer guide centerline Γ, and let δ be the random perturbation superimposed on that point, with zero mean and covariance σ. 2 I is a Gaussian distribution; σ is the neighborhood sampling standard deviation and controls the sampling bandwidth around the center line; I is the identity matrix; x rand For the final result Random sample; The uniform sampling probability remains positive throughout, therefore erroneous or missing guides do not exclude feasible paths in free space; each sample still follows the standard... Perform nearest node search, step size expansion, edge collision detection, lowest cost parent node selection, and reconnection.
[0025] Formulas (1)-(3) address "what the diffusion model learns, how to add noise, and how to train"; Formulas (4)-(6) address "how to evaluate and correct the generated centerline according to safety, smoothness, and length requirements"; Formula (7) addresses "what kind of neural network guidance is allowed to enter the online planner"; Formulas (8)-(9) address "how the accepted guidance only changes..." The nine formulas collectively embody the core technical idea of this invention: "The learning model provides limited-authority sampling priors, while the classical planner is responsible for the final feasibility." A mobile robot path planning system based on B-spline residual diffusion guidance is provided for executing the aforementioned mobile robot path planning method. The mobile robot path planning system includes: The module includes: Map and State Input Module, Teacher Centerline Generation Module, B-Spline Residual Construction Module, Conditional Diffusion Model Training Module, Multi-Candidate Guidance Generation Module, Cost / SDF Correction Module, Asynchronous Request Module, Caching and Gating Module, and Hybrid Sampling Module. The module includes a search module, a path post-processing module, and a local planning and robot execution module.
[0026] An electronic device includes a display screen, a memory, and a processor, wherein the display screen and the memory are both coupled to the processor; the memory stores computer-executable instructions; and the processor executes the computer-executable instructions stored in the memory, causing the electronic device to perform the mobile robot path planning method.
[0027] A computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the mobile robot path planning method.
[0028] A computer program product includes a computer program that, when executed by a processor, implements the mobile robot path planning method.
[0029] In the specific implementation of this invention: Specific implementation methods for offline teacher data construction and model training: Read the 2D occupancy grid map and expand obstacles according to the robot's shape and safety margin, sampling the start and end points from free space. The teacher path is generated, and after a successful search, redundancy removal, smoothing, and equal arc length resampling are performed to obtain the teacher centerline.
[0030] The target control points are obtained by B-spline fitting with endpoint constraints, and coarse control points are obtained by linear interpolation of the start and end points; the difference between the two is used as the residual label. The occupied grid, SDF, start and end points, and coarse control points together constitute the conditional input.
[0031] During training, the diffusion time step and Gaussian noise are randomly sampled, and noisy residuals are generated according to Equation (2). Temporal U-Net predicts the noise and optimizes it according to Equation (3). During the validation phase, the candidate collision-free rate, endpoint error, path length and curve consistency are statistically analyzed, and the model parameters with better performance are selected.
[0032] Online asynchronous bootstrapping and Specific implementation methods of the plan: After the robot receives the target pose, the global planner immediately begins a basic sampling search; the background thread sends a request to the diffusion service when the cache is empty, the target changes, the map changes, or the guidance times out.
[0033] The diffusion service performs DDIM backsampling from multiple sets of independent noise to generate multiple candidate centerlines, and performs cost guidance, SDF correction and candidate selection according to equations (4) to (6).
[0034] The returned result carries a timestamp, source, and confidence level, and a collision check is re-performed on the current cost map. Only the centerline that satisfies equation (7) is written to the cache; the rest are rejected and trigger a rollback or cooldown.
[0035] When expanding the tree, sampling branches are selected according to equations (8) and (9). The guiding centerline only changes the random sample distribution, such as Nearest, Steer, CollisionCheck, ChooseParent, and Rewire. The steps remain the same.
[0036] After the search is completed, the optimal path is shortened, smoothed, and finally checked for collisions. Then, the path is sent to DWA or other local planners to generate speed commands.
[0037] Specific implementation methods for deploying tracked photovoltaic cleaning robots: The implementation platform is a tracked mobile robot equipped with a Livox MID-360 LiDAR, an NVIDIA Jetson Orin NX 8 GB computing platform, and an STM32 low-level controller. Under ROS Noetic, FAST-LIO provides pose and point cloud data, OctoMap generates the occupancy map, the diffusion model runs as an independent Python service, and the C++ global planner asynchronously calls this service.
[0038] The task is for the robot to move towards position P1 near the photovoltaic support, traverse the restricted passage to reach position P2, and wait for subsequent cleaning instructions next to the next photovoltaic panel. The diffusion centerline provides the sampling prior; the actual execution path is still determined by... And real-time collision checks to determine.
[0039] Repeated five times under the same map, target sequence, and control parameters, the average global path of this method was 2.841 ± 0.269 m, the P2 position error was 0.413 ± 0.028 m, the heading error was 0.155 ± 0.068 rad, and the control duration was 57.57 ± 1.59 s. The hardware, positioning and mapping module, and local planner can all be replaced with equivalent implementations.
[0040] The above description is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention. Structures, devices, and operating methods not specifically described or explained in this invention are implemented according to conventional methods in the art unless otherwise specified or limited.
Claims
1. A mobile robot path planning method based on B-spline residual diffusion guidance, characterized in that: Includes the following steps: S101: Obtain the occupied grid map, robot initial state, and target state, and calculate the SDF for distance query; S102: Offline sampling start and end point pairs, utilizing... After the teacher planner generates feasible paths, the teacher centerline is obtained through smoothing and resampling. S103: Fit the teacher centerline to the target B-spline control points, and construct coarse control points from the start and end points. The difference between the two is used as the residual training label. S104: Train a Conditional Temporal U-Net with noisy residuals, diffusion time steps, occupied / SDF features, start and end points and coarse control points as inputs; S105: Perform DDIM backsampling online from multiple independent noises to reconstruct multiple B-spline candidate centerlines; S106: Perform endpoint, range, and collision checks on candidates, and combine cost-based bootstrapping, SDF safety correction, and confidence gating to select effective bootstrapping; S107: Select a hybrid method between uniform sampling, Informed elliptic sampling, and centerline neighborhood sampling, according to... Rule expansion, optimization, and reconnection; S108: Extract the optimal path, perform smoothing and final collision verification, and then send it to the local planner and the underlying controller for execution.
2. The mobile robot path planning method based on B-spline residual diffusion guided by claim 1, characterized in that: Specifically in S103, the teacher centerline is fitted to obtain the target control point sequence, and a coarse control point sequence is constructed based on the starting point and the target point; the diffusion model learns the control point residuals between the two. (1) Among them, P target It is by The sequence of target control points obtained by fitting the teacher centerline generated by the teacher planner with B-splines; It is a sequence of coarse B-spline control points constructed from the starting point, the target point, and low-frequency shape rules; The clean residual is denoted as R0; Gaussian noise is added to the forward diffusion at time step t: (2) Where R0 is the cleaning residual at time step 0, R0 = ΔP; R t The noisy residual at diffusion time step t; T is the preset maximum diffusion time step; ε is the cumulative signal preservation coefficient corresponding to time step t, i.e., the noise scheduling coefficient; ε is the random noise sampled from a standard Gaussian distribution; N(0,I) is a multivariate Gaussian distribution with zero mean and unit covariance; I is the identity matrix. Conditional denoising networks predict noise based on noisy residuals, time steps, and environmental conditions; training objectives can consist of noise prediction, clean residual reconstruction, curve fitting, endpoint consistency, smoothness, and residual regularization terms. (3) Where L is the total training loss; L noise For noise prediction loss; L x0 Loss due to clean residual reconstruction; L curve L represents the curve fitting loss. endpoint For endpoint consistency loss; L smooth To smooth out the loss; L reg λ is the residual regularization term. n , λ x0 , λ c , λ e ,λ s , λ r These are the weighting coefficients for each loss term; During inference, the predicted residuals are added to the coarse control points, and the continuous guiding centerline is obtained by B-spline interpolation.
3. The mobile robot path planning method based on B-spline residual diffusion guided by claim 1, characterized in that: In the specific process of SDF security correction in S106, the diffusion service generates a candidate set from different noises; for each candidate centerline, the combined cost of obstacles, smoothing, and length is calculated: (4) Where γ is a candidate guiding centerline; J(γ) is the comprehensive cost of centerline γ; J obs (γ) represents the obstacle / safety distance cost; J smooth (γ) represents the smoothing cost; J len (γ) represents the length cost; w obs ,w smooth ,w len The weights for the three types of costs; The obstacle cost based on SDF is: (5) Among them, J obs (γ) represents the SDF obstacle cost along the entire centerline; K is the number of discrete sampling points used for cost calculation along the centerline; k is the index of the discrete points along the centerline; γ k The two-dimensional coordinates of the k-th sampling point on the center line; SDF(γ) k ) is point γ k The signed distance to the nearest obstacle boundary; d safe Let $z$ be the desired safe distance; $ReLU(z)$ is the linear rectified function $max(0,z)$; (·) 2 For the square penalty; When the distance between a pathpoint and an obstacle is less than the desired safe distance, the cost increases; during the back-diffusion stage, samples can be corrected according to the cost gradient, and SDF refinement can be performed after generation. (6) Where γ is the current candidate centerline to be refined; η is the refinement step size / learning rate; J is the gradient of the comprehensive cost J with respect to the centerline γ; J(γ) is the comprehensive cost of formula (4); ← is the assignment / iteration update symbol.
4. The mobile robot path planning method based on B-spline residual diffusion guided by claim 3, characterized in that: In S106, during the specific process of confidence gating selection, diffusion inference is executed by an independent service or background thread, and the main planning thread only reads the cache. The returned results must pass checks for timeliness, source, collision, and confidence level. (7) Where ApplyGuide is the gated output for whether the centerline is allowed to be used for guiding sampling; 1[·] is the indicator function; fresh indicates whether the guidance is still within the allowed time frame; sourceValid indicates whether the guidance source is valid; collisionFree indicates whether the guiding centerline has passed an independent collision check on the current real-time map; q guide Score the confidence level of the current guidance; q min The minimum allowable confidence threshold; ∧ represents logical AND; Results that fail the gating are rejected and may enter a cooling-off period; when the cache is invalid, the planner does not wait for the model, but immediately falls back to informed sampling or uniform sampling.
5. The mobile robot path planning method based on B-spline residual diffusion guided by claim 1, characterized in that: In step 107, the mixed sampling and In the specific search process, let the sum of the probabilities of uniform sampling, informed elliptic sampling, and centerline neighborhood sampling be 1; let r sample uniformly within [0,1), then: (8) Where, x rand For the present The tree expansion uses random target samples; r is a uniformly random number used to select sampling branches; p u p represents the uniform sampling probability. i p represents the Informed elliptic sampling probability. c X represents the sampling probability of the centerline neighborhood; free s represents the free state space in the current map; s and g represent the planning start and target points; c best Γ is the cost of the best path found in the current search tree; Γ is the effective guiding centerline that is gated and cached by formula (7); Γ is the effective guiding centerline gated and buffered by formula (7); is the point sequence / curve, which serves as the sampling basis for CenterlineSample; Centerline neighborhood sampling selects points from the centerline of the cache and superimposes Gaussian perturbations: (9) Where, x rand The random state points obtained by sampling the neighborhood of the center line; γ j Let j be the selected point on the centerline Γ, where j is the index of the centerline point; δ is the random perturbation applied to the centerline point; N(0,σ) 2 I) has zero mean and covariance σ 2 I is a Gaussian distribution; σ is the standard deviation of the Gaussian perturbation / sampling bandwidth; I is the identity matrix; The uniform sampling probability remains positive throughout, therefore erroneous or missing guides do not exclude feasible paths in free space; each sample still follows the standard... Perform nearest node search, step size expansion, edge collision detection, lowest cost parent node selection, and reconnection.
6. A mobile robot path planning system guided by B-spline residual diffusion, characterized in that: The mobile robot path planning system is used to perform the mobile robot path planning method according to any one of claims 1-5, and the mobile robot path planning system comprises: The module includes: Map and State Input Module, Teacher Centerline Generation Module, B-Spline Residual Construction Module, Conditional Diffusion Model Training Module, Multi-Candidate Guidance Generation Module, Cost / SDF Correction Module, Asynchronous Request Module, Caching and Gating Module, and Hybrid Sampling Module. The module includes a search module, a path post-processing module, and a local planning and robot execution module.
7. An electronic device, characterized in that, The electronic device includes a display screen, a memory, and a processor, wherein the display screen and the memory are both coupled to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the electronic device to perform the mobile robot path planning method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the mobile robot path planning method as described in any one of claims 1-5.
9. A computer program product, characterized in that, It includes a computer program, which, when executed by a processor, implements the mobile robot path planning method as described in any one of claims 1-5.
