Robot trajectory prediction method and system based on diffusion model
Patent Information
- Application Number
- CN202611084227.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-20
AI Technical Summary
现有方法大多采用滤波器、MPC、RNN/LSTM、Transformer 或采样式生成策略,但普遍存在以下问题:一是对多模态未来轨迹表达不足,常只能输出单一高概率路径;二是预测结果容易脱离真实运动约束,出现碰撞风险、关节越界或加速度突变;三是在长时域预测中误差累积明显,预测轨迹后半段不稳定;四是在动态障碍物密集、通道狭窄或任务切换频繁的环境中,难以兼顾准确性与实时性
[0027]1.本发明通过任务意图锚定的轨迹先验生成机制,把任务目标、动作阶段和安全优先级转化为轨迹先验锚点,并与历史轨迹共同编码为潜变量初始状态,解决传统扩散轨迹预测往往只从噪声中恢复“像轨迹的轨迹”,但不一定符合当前任务目标,容易出现“路径合理但任务不对”的情况,轨迹生成方向更明确,任务匹配度更高,减少无效候选轨迹,提高控制器可直接使用的概率;
Smart Images

Figure FT_1 
Figure FT_2 
Figure SMS_4
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot motion prediction and control technology, specifically to a robot trajectory prediction method and system based on a diffusion model. Background Technology
[0002] Robot trajectory prediction is a crucial step in robot autonomous navigation, cooperative obstacle avoidance, and motion planning. Existing methods mostly employ filters, MPC, RNN / LSTM, Transformer, or sampling-based generation strategies, but they generally suffer from the following problems: First, they are insufficient in representing multimodal future trajectories, often only outputting a single high-probability path; second, the prediction results are prone to deviating from real motion constraints, leading to collision risks, joint overruns, or sudden acceleration changes; third, errors accumulate significantly in long-term predictions, resulting in instability in the latter half of the predicted trajectory; and fourth, in environments with dense dynamic obstacles, narrow passages, or frequent task switching, it is difficult to balance accuracy and real-time performance. Summary of the Invention
[0003] The purpose of this invention is to provide a robot trajectory prediction method and system based on a diffusion model to solve the technical problems mentioned in the background.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a robot trajectory prediction method based on a diffusion model, the prediction method comprising:
[0005] Acquire the robot's current state information, historical trajectory information, environmental obstacle information, and task intent information to construct a predictive context;
[0006] Based on the prediction context, the trajectory prior anchor points are extracted, and the trajectory prior anchor points are jointly encoded with historical trajectory information to obtain the initial state of low-dimensional latent variables.
[0007] Hierarchical diffusion denoising is performed on the initial state of low-dimensional latent variables to generate multiple candidate trajectory latent variables. In each diffusion denoising stage, a task intent guidance branch is introduced to correct the update direction of the candidate trajectory latent variables.
[0008] A risk corridor constraint map is constructed based on environmental obstacle information, and risk screening and safety correction are performed on candidate trajectory latent variables during the diffusion denoising process.
[0009] The selected candidate trajectories are subjected to physical consistency correction and unified scoring, and the predicted trajectory with the highest score is output, or multiple candidate predicted trajectories with confidence level labels are output.
[0010] Preferably, the task intent information includes at least one of target point information, action stage information, constraint priority information, and task semantic labels, and the task intent guidance branch generates a guidance vector for constraint diffusion update direction based on the task intent information.
[0011] Preferably, the trajectory prior anchor points include at least a starting anchor point, intermediate stage anchor points, and an ending anchor point, wherein the intermediate stage anchor points are jointly determined by the task decomposition results, the distribution of passable areas, and the distribution of dynamic obstacles.
[0012] Preferably, the initial state of the low-dimensional latent variable is obtained by jointly compressing and encoding historical trajectory information and trajectory prior anchor points through a trajectory encoder, and the trajectory encoder includes a temporal feature extraction layer and a latent space mapping layer.
[0013] Preferably, the risk corridor constraint map is constructed based on static obstacles, action obstacles, and restricted areas to form a time-varying risk cost distribution, and the candidate trajectory latent variables are segmented and locally eliminated according to the time-varying risk cost distribution.
[0014] Preferably, the prediction system includes:
[0015] The context building module is used to acquire the robot's current state information, historical trajectory information, environmental obstacle information, and task intent information, and to build a predictive context;
[0016] The trajectory prior anchor point generation module is used to extract trajectory prior anchor points based on the prediction context;
[0017] The latent space coding module is used to jointly encode the trajectory prior anchor points and historical trajectory information into a low-dimensional latent variable initial state;
[0018] The hierarchical diffusion denoising module is used to perform hierarchical diffusion denoising on the initial state of low-dimensional latent variables, and introduces a task intent guidance branch in each diffusion denoising stage.
[0019] The risk corridor constraint module is used to construct a risk corridor constraint map based on environmental obstacle information, and to perform risk screening and safety correction on candidate trajectory latent variables;
[0020] The trajectory re-scoring module is used to perform physical consistency correction and unified scoring on the selected candidate trajectories;
[0021] The output module is used to output the predicted trajectory with the highest score, or to output multiple candidate predicted trajectories with confidence level indicators.
[0022] Preferably, the hierarchical diffusion denoising module includes a main denoising unit and a task intent guidance unit, wherein the main denoising unit is used to perform stepwise denoising on latent variables, and the task intent guidance unit is used to generate a guidance bias based on task semantic information and superimpose it into the denoising update amount.
[0023] Preferably, the risk corridor constraint module includes a risk map construction unit and a trajectory filtering unit, wherein the risk map construction unit is used to convert static obstacles, dynamic obstacles and restricted areas into a time-varying risk cost map, and the trajectory filtering unit is used to eliminate high-risk candidate trajectories based on the time-varying risk cost map.
[0024] Preferably, the trajectory rescoring module includes a kinematic consistency correction unit and a dynamic reachability correction unit, wherein the dynamic consistency correction unit is used to constrain the continuity of the trajectory's position, velocity, and acceleration, and the dynamic reachability correction unit is used to constrain the trajectory to satisfy at least one of a velocity upper limit, an acceleration upper limit, and a turning curvature upper limit.
[0025] Preferably, the prediction system further includes a real-time distillation output module, which is used to distill the trained multi-step diffusion model into a lightweight student module, and perform confidence-gated output based on the task matching degree of the candidate trajectory, the collision risk score, and the uncertainty score.
[0026] Compared with the prior art, the beneficial effects of the present invention are:
[0027] 1. This invention uses a trajectory prior generation mechanism anchored to task intent to transform task objectives, action phases, and safety priorities into trajectory prior anchor points, which are then co-encoded with historical trajectories as the initial state of latent variables. This solves the problem that traditional diffusion trajectory prediction often only recovers "trajectory-like trajectories" from noise, but these may not necessarily match the current task objective, and are prone to situations where "the path is reasonable but the task is wrong". The trajectory generation direction is clearer, the task matching degree is higher, invalid candidate trajectories are reduced, and the probability that the controller can directly use them is increased.
[0028] 2. This invention uses a low-dimensional latent space diffusion and trajectory reconstruction mechanism to first compress high-dimensional trajectories into latent variable space, then perform diffusion denoising in the latent space, and finally reconstruct the trajectory sequence. This solves the problems of high computational burden, fast noise propagation, and unstable prediction of long sequences that are easily caused by direct diffusion in high-dimensional trajectory space. It reduces the diffusion dimension, improves computational efficiency, reduces the accumulation of errors in long sequences, and makes the trajectory smoother and more stable in the long time domain.
[0029] 3. This invention employs a risk corridor hierarchical constraint mechanism to construct a risk cost map during each round of denoising. This mechanism applies hierarchical constraints to obstacles, restricted areas, dynamic people / vehicles, and narrow passages, rather than performing collision checks only after generation. This addresses the issue that traditional post-constraint corrections often result in infeasibility being discovered only at the final stage, leading to repeated resampling or execution failures. Furthermore, in complex environments, this approach significantly impacts safety and response speed. By suppressing high-risk branches in advance during generation, this invention improves obstacle avoidance foresight and safety margins, making it particularly suitable for human-machine collaboration, warehousing, and indoor navigation scenarios where dynamic obstacles frequently change.
[0030] 4. This invention uses a real-time distillation output mechanism with confidence gating to uniformly score multiple candidate trajectories. It achieves rapid output through a lightweight model after distillation and confidence gating. This solves the problem that diffusion models usually have many inference steps. Although they have high accuracy, they are prone to delays when directly used for online robot control and cannot meet the requirements of real-time closed loop. While maintaining multimodal expression and safety screening capabilities, this invention significantly improves response speed and can output the main trajectory and alternative trajectories, making it easy for the controller to quickly switch according to changes in the field. Attached Figure Description
[0031] Figure 1 This is a schematic diagram of the system framework of the present invention;
[0032] Figure 2 This is a schematic diagram of the algorithm flow of the present invention. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] Please see Figure 1 and Figure 2 This invention provides an embodiment of a robot trajectory prediction method and system based on a diffusion model, with a unified implementation method:
[0035] In one specific embodiment, the robot trajectory prediction method based on a diffusion model provided by the present invention includes the following steps:
[0036] First, the robot's current state, historical trajectory, environmental obstacle information, and task intent information are acquired and uniformly constructed into a prediction context. Second, trajectory prior anchors are extracted based on the prediction context, and these anchors are jointly encoded with historical trajectory information to generate a low-dimensional latent variable initial state. Then, hierarchical diffusion denoising is performed on the low-dimensional latent variable initial state to progressively generate multiple candidate trajectory latent variables. At each diffusion denoising stage, a task intent-guided branch is introduced to correct the update direction of the candidate trajectory latent variables, and risk screening and safety correction are performed on the candidate trajectory latent variables based on a risk corridor constraint graph. Finally, physical consistency correction and unified scoring are performed on the screened candidate trajectories, outputting either the highest-scoring predicted trajectory or a multi-candidate predicted trajectory with confidence level indicators. This method is consistent with the basic framework of "input—noise initialization—diffusion denoising—constraint embedding—output" disclosed in the original material, but further adds task intent, latent space encoding, and risk corridor screening, thereby enhancing the executability and stability of multimodal trajectory generation.
[0037] During the training phase, historical trajectory samples are first standardized and normalized to construct a training dataset; then, time steps t and clean trajectories x0 are randomly sampled, and Gaussian noise is sampled. Noisy trajectory x is generated using the forward diffusion formula. t Then, noise is predicted using a neural network. The parameters are updated via backpropagation using noise prediction error as the base loss; simultaneously, conditional loss and constraint loss are superimposed to ensure that the trajectory conforms to both task conditions and physical feasibility. The original material provides basic definitions for forward diffusion, denoising mean, noise prediction loss, and total loss, and this implementation method uses these definitions to generate low-dimensional latent space trajectories.
[0038] In one specific implementation, the trajectory data can be represented as In the formula, d represents the state dimension, and N represents the number of prediction steps. For mobile robots, d can take features such as position, velocity, and orientation, typically between 3 and 6. For robotic arms, d can take joint angles, angular velocities, and end-effector pose as features, typically between 6 and 14. N represents the prediction time step length. The larger N is, the longer the prediction time domain, but the computational complexity also increases accordingly.
[0039] The forward diffusion process satisfies the following formula:
[0040]
[0041] This represents the trajectory data at diffusion step t, where d is the state dimension and N is the number of time steps; These are the noise scheduling parameters for step t; It is the identity matrix; This represents a Gaussian distribution with mean μ and covariance Σ.
[0042] Noise scheduling parameter β t The choice of has a significant impact on model performance. This invention adopts a cosine scheduling strategy:
[0043]
[0044] Where T is the total number of diffusion steps. It is a small constant to avoid division by zero.
[0045] After T-step diffusion, the marginal distribution of the trajectory xt approximates a standard normal distribution:
[0046]
[0047] The inverse denoising process is the reverse of the diffusion process, and its goal is to reduce noise from the noise trajectory x. t A cleaner trajectory was recovered from x. t-1 This process is parameterized by a neural network:
[0048]
[0049] in, It is the denoised mean predicted by the neural network θ; The pre-defined variance can be calculated using the following formula:
[0050]
[0051] The denoised mean is predicted using the following formula:
[0052]
[0053] in It is noise predicted by the neural network.
[0054] The training objective is to minimize the noise prediction error. Specifically, given a clean trajectory x0 and random noise... We calculate the trajectory xt after adding noise in step t:
[0055]
[0056] Then, let the network predict the original noise. The loss function is defined as the mean square error between the predicted noise and the actual noise:
[0057]
[0058] To further improve the tenderness, this invention also introduces conditional constraints and constraint losses:
[0059]
[0060] Among them, L noise Used to constrain the network to accurately predict noise; L condition Used to constrain trajectory and task intent Figure 1 Straight; L constraint The λ1 and λ2 are used to constrain the trajectory to meet kinematic, dynamic, and collision safety conditions.
[0061] One of the key innovations of this invention is to embed physical constraints into the denoising process of the diffusion model to ensure that the generated trajectory conforms to physical laws.
[0062] The robot's motion must satisfy kinematic constraints, including the relationship between position, velocity, and acceleration:
[0063]
[0064] in, It is a position vector. It is a velocity vector. It is an acceleration vector.
[0065] For robots with joint angles, such as robotic arms, the joint angles also need to be considered. angular velocity and angular acceleration The relationship between them, and the constraints of forward and inverse kinematics.
[0066] According to the Newton-Euler equations, the motion of a robot is affected by external forces and control forces:
[0067]
[0068] in It is a quality matrix. It is the Coriolis and centrifugal force matrix. It is the gravity vector; It is joint torque.
[0069] To ensure the robot's safety during movement, a minimum distance must be maintained from obstacles:
[0070]
[0071] Where d(·) is the distance function, d min It is the minimum safe distance.
[0072] This invention employs a gradient-based constraint embedding method, which, after each denoising step, uses gradient descent to pull the trajectory back to the region that satisfies the constraints.
[0073]
[0074] in, It is a constraint violation function used to measure the degree to which the trajectory x violates the constraints. These are constraint weights, which control the strength of constraint correction. It is the gradient of the constraint violation function with respect to the trajectory.
[0075] Constraint violation function The design satisfies the following condition: when the trajectory satisfies all constraints, When the trajectory violates the constraints, The specific form is:
[0076]
[0077] Where c i (x) is the i-th constraint function, w i That is the corresponding weight.
[0078] Please see Figure 1 and Figure 2 This invention provides an embodiment of a robot trajectory prediction method and system based on a diffusion model, for multimodal trajectory prediction of indoor mobile robots.
[0079] In this embodiment, the robot is an indoor mobile robot, AGV, or delivery robot. The system collects current state information through LiDAR, depth camera, IMU, and wheel speed encoder. The current state information includes at least position information, speed information, orientation angle information, local grid map information, and historical trajectory point information; it also collects environmental obstacle information, including static walls, temporary obstacles, dynamic pedestrians, and channel boundary information. Task intent information includes the target point, preferred travel direction, avoidance strategy, and current navigation task stage. The combination of the output module, noise initialization module, diffusion denoising module, and constraint embedding module is consistent with the system structure in the original material, but this embodiment adds task intent anchoring risk corridor modeling.
[0080] During prediction, prior trajectory anchors are first generated based on the target point, locally passable areas, and dynamic obstacle distribution. These prior anchors include a starting anchor, local turning anchors, and an ending anchor. Then, historical trajectories and prior trajectory anchors are input into the trajectory encoder, which outputs the initial state of low-dimensional latent variables. During diffusion denoising, the main denoising branch is responsible for updating the generated trajectory, the task intent guidance branch outputs a guidance bias based on the preferred travel direction, and the risk corridor constraint map assigns higher costs to areas closer to obstacles. If a candidate trajectory segment traverses a high-cost area, the segment is corrected using constraint gradients to shift it towards a passable area.
[0081] For example, with T=100 and N=50, the robot predicts its trajectory within the next 5 seconds, and each diffusion update simultaneously considers task guidance and obstacle risk. If a candidate trajectory approaches an obstacle area at step 30, and the corresponding constraint function c... i If C(x) is positive, then a penalty is applied to that segment using C(x), and the candidate trajectory for that segment is pulled back from the high-risk area. Finally, a main trajectory and several alternative trajectories are output for the upper-level path planner to choose from. The advantage of this implementation is that when a dynamic pedestrian suddenly changes direction, trajectory prediction does not rely solely on end-point replanning, but risk suppression is completed during the denoising process, making it more suitable for crowded indoor environments.
[0082] Please see Figure 1 and Figure 2 This invention provides an embodiment of a robot trajectory prediction method and system based on a diffusion model, for joint space trajectory prediction in industrial robotic arm grasping tasks:
[0083] In this embodiment, the robot is a six-axis or seven-axis industrial robotic arm. The system collects joint angles, angular velocities, angular accelerations, end effector pose, gripper state, workpiece position information, and information on restricted areas at the workstation. Task intent information includes action stages such as approaching the workpiece, end effector alignment, gripper closure, and lifting / removing. For robots with joint angles, such as robotic arms, the original material clearly states that joint angles must be considered simultaneously. angular velocity angular acceleration In addition to forward and inverse kinematic constraints, this implementation further refines the guide trajectory for the motion phase.
[0084] During implementation, historical joint trajectories and staged motion anchor points are jointly encoded to form the initial state of latent variables, and then diffusion denoising is performed in the latent space. Different motion stages correspond to different guiding biases: in the workpiece approach stage, the bias term is mainly used to shorten the spatial distance between the end effector and the workpiece; in the gripper closing stage, the bias term mainly limits attitude errors and velocity mutations; in the lifting and retraction stage, the bias term is mainly used to maintain a safe clearance with the workpiece surface. At the same time, dynamic reachability correction is introduced to check the joint torque and acceleration constraints of the candidate trajectory. If the candidate trajectory causes the joint torque τ to exceed the system's allowable range, it is corrected by adjusting the curvature and peak velocity of that trajectory segment.
[0085] In a preferred implementation, the prediction dimension d of the robotic arm trajectory can be 7 to 14, T can be 80 to 120, and the constraint weight λ can be 0.5. This numerical range allows the model to maintain high trajectory accuracy without affecting the grasping rhythm due to excessive denoising. During final scoring, the system comprehensively considers the grasping success probability, end-effector posture error, joint smoothness, and energy consumption, and outputs the trajectory with the highest score to the robotic arm controller. Compared to the conventional method of directly regressing the robotic arm trajectory, this implementation can more stably handle issues such as workstation occlusion, workpiece posture uncertainty, and grasping action phase switching.
[0086] Please see Figure 1 and Figure 2 This invention provides an embodiment of a robot trajectory prediction method and system based on a diffusion model, for safe trajectory prediction in human-robot collaborative scenarios.
[0087] In this embodiment, the robot is a collaborative robot, and both humans and the robot coexist in the working environment. The system acquires key points of the human skeleton, arm movement direction, human position boundaries, and the robot's current pose and historical trajectory through a vision camera, depth camera, and distance perception module. Task intent information includes the collaborative process stage, the location of the manipulated object, and the collaboration priority. Since the original material clearly shows that trajectory prediction is applicable to human-robot collaboration scenarios, this implementation directly incorporates human dynamic information into the risk corridor constraint graph to improve collaboration safety.
[0088] During the prediction process, the system first constructs a dynamic risk zone based on human movement trends, and then generates trajectory prior anchor points based on the robot's task objective and human movement trends. In the diffusion and denoising stage, if a human arm enters one side of the robot's preset collaborative space, the risk cost in that area increases. The system automatically compresses the sampling probability of candidate trajectories on that side, causing the robot's trajectory to shift to the other side or enter a waiting state. For areas close to the human head, chest, and hands, the system sets a stricter safety distance d. min This ensures that candidate trajectories avoid high-risk regions during the generation phase. Collision avoidance constraint d(x) in the original material. robot (t),x obstacle )≥d min It can be directly used for the description of human safety boundaries in this embodiment.
[0089] In a preferred embodiment, the system simultaneously outputs a main trajectory and several alternative trajectories. The main trajectory is used for robot execution, while the alternative trajectories are used for rapid switching when human movements suddenly change. If a candidate trajectory meets the distance constraint but its task matching degree is below a set threshold, then that trajectory is not used as the final output. The advantage of this embodiment is that it does not simply perform collision avoidance, but synchronously couples human movement trends, process stages, and trajectory generation, making it more suitable for actual human-robot collaborative production lines.
[0090] Please see Figure 1 and Figure 2 This invention provides an embodiment of a robot trajectory prediction method and system based on a diffusion model, for long-term trajectory prediction in complex environments for unmanned mobile platforms.
[0091] In this embodiment, the robot is an unmanned vehicle, an unmanned delivery vehicle, or an outdoor mobile platform. The system collects vehicle attitude, speed, heading angle, tire slip state, road surface adhesion coefficient, local slope, and dynamic information of surrounding vehicles and pedestrians. Task intent information includes destination, recommended road, speed limit, and priority avoidance objects. To improve long-term prediction stability, this embodiment adopts a three-segment anchor point modeling approach, dividing the future trajectory into a near-end control segment, a mid-range transition segment, and a far-end arrival segment, and constructing stage anchor points for each segment. This approach further addresses the long-sequence error accumulation problem within the original multimodal trajectory prediction framework.
[0092] In the latent space diffusion stage, the system first uses a trajectory encoder to compress historical trajectories and stage anchor points into a low-dimensional representation, and then performs diffusion denoising. For slopes, curves, and low-adhesion surfaces, the risk corridor constraint map introduces additional perturbation terms, such as sideslip risk, centrifugal risk, and braking risk, so that vehicle dynamics constraints are considered during trajectory generation. If the predicted trajectory exhibits velocity spikes or curvature anomalies at a certain time, it is smoothed through dynamic reachability correction. Since the original material already provides dynamic constraints... The general expression is used in this implementation for dynamic reachability screening of unmanned platforms.
[0093] During deployment, the system can use a distilled, lightweight student model for online inference and set an early-stop gating mechanism: when the task matching degree, risk score, and uncertainty of the candidate trajectory reach a preset threshold, the subsequent diffusion steps are stopped early. If T is set to 100, the actual number of inference steps can be dynamically reduced to 60 steps or even less depending on the scenario, thus balancing real-time performance and accuracy. This implementation is particularly suitable for unmanned platforms with complex road environments, strong external disturbances, and the need for rapid decision-making.
[0094] Please see Figure 1 and Figure 2 This invention provides an embodiment of a robot trajectory prediction method and system based on a diffusion model, for trajectory prediction in collaborative scheduling of multiple robots in warehouses.
[0095] In this embodiment, the robot is a warehouse AGV, AMR, or sorting robot. The system collects the pose, speed, historical trajectory, task queue, charging status, and information on shelf distribution, aisle width, and congested areas in the warehouse map for each robot. Task intent information includes pickup point, delivery point, priority, task deadline, and avoidance rules. Unlike the system in the original material that focuses on prediction for a single robot, this embodiment treats multiple robots as dynamic obstacles to each other, thus considering trajectory prediction and collaborative scheduling simultaneously.
[0096] In implementation, the "picking-transfer-release" process is broken down into multiple stages, with trajectory anchors constructed for each stage. Then, latent space diffusion is used to generate the future trajectory of a single robot. The risk corridor constraint map includes not only static obstacles and restricted areas but also inter-robot conflict constraints. That is, if two trajectories pass through the same narrow passage within the same time window, the risk cost of that area increases significantly, prompting candidate trajectories to automatically select different time windows or different travel paths. The constraint violation function C(x) and gradient correction formula can be directly used to penalize and correct conflicting trajectories.
[0097] During the scoring phase, the system not only calculates the trajectory length but also comprehensively considers task priority, channel occupancy, congestion costs, and collision risks. If a trajectory, although the shortest, causes high-priority robots to become blocked, it will be downgraded. In addition to the trajectory point sequence, the output provides confidence level, estimated time, and conflict risk level, enabling the warehouse scheduling system to perform further task rearrangement. This implementation allows trajectory prediction to directly serve collaborative scheduling, moving beyond simple path generation.
[0098] Working principle:
[0099] This invention first acquires current state information and environmental perception information from robot sensors. The state information includes at least one or more of position, velocity, acceleration, joint angle, and angular velocity. The environmental perception information includes at least lidar point cloud, visual image, obstacle distribution, and passable area information. Then, this information, along with task intent information such as task objective, action stage, and safety priority, is used to construct a prediction context. Based on this prediction context, the system first generates trajectory prior anchor points, and then uses a trajectory encoder to jointly map historical trajectories and anchor points into low-dimensional latent variables, serving as the input basis for subsequent diffusion generation. The purpose of this is to shift trajectory prediction from "pure noise generation" to "task constraint-guided generation," providing a clear direction for subsequent denoising.
[0100] During trajectory generation, the system performs hierarchical diffusion denoising on low-dimensional latent variables. In the forward diffusion stage, Gaussian noise is gradually added to the trajectory according to the noise scheduling parameter βt, causing the trajectory to gradually degenerate into a standard normal distribution; in the backward diffusion stage, the noise is predicted by a neural network. And based on the denoised mean µ θ (x t The candidate trajectory is gradually recovered. Unlike ordinary diffusion generation, this invention introduces a task intent-guided branch and a risk corridor constraint graph in each denoising step: on the one hand, it allows the trajectory to converge towards the target point, action stage, and safety preference direction; on the other hand, it screens and corrects obstacles, restricted areas, and high-risk areas in advance, rather than doing end-point repair after the trajectory is generated.
[0101] In the output phase, the system performs physical consistency correction and unified scoring on multiple candidate trajectories after screening. Scoring factors include at least task matching degree, trajectory smoothness, collision risk, and uncertainty. Subsequently, it outputs the single trajectory with the highest score, or multiple candidate trajectories with confidence indicators for the controller to select the best one to execute. Physical consistency correction mainly relies on kinematic constraints, dynamic constraints, and collision avoidance constraints. Kinematic constraints limit the continuous relationship between position, velocity, and acceleration; dynamic constraints limit the accessibility of joint torques and motion states; and collision avoidance constraints ensure the minimum safe distance between the robot and obstacles. The system finally sends the results to the robot controller for path planning, motion control, or cooperative decision-making.
[0102] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A robot trajectory prediction method based on a diffusion model, characterized in that: The prediction method includes: Acquire the robot's current state information, historical trajectory information, environmental obstacle information, and task intent information to construct a predictive context; Based on the prediction context, the trajectory prior anchor points are extracted, and the trajectory prior anchor points are jointly encoded with historical trajectory information to obtain the initial state of low-dimensional latent variables. Hierarchical diffusion denoising is performed on the initial state of low-dimensional latent variables to generate multiple candidate trajectory latent variables. In each diffusion denoising stage, a task intent guidance branch is introduced to correct the update direction of the candidate trajectory latent variables. A risk corridor constraint map is constructed based on environmental obstacle information, and risk screening and safety correction are performed on candidate trajectory latent variables during the diffusion denoising process. The selected candidate trajectories are subjected to physical consistency correction and unified scoring, and the predicted trajectory with the highest score is output, or multiple candidate predicted trajectories with confidence level labels are output.
2. The robot trajectory prediction method based on a diffusion model according to claim 1, characterized in that: The task intent information includes at least one of target point information, action phase information, constraint priority information, and task semantic labels, and the task intent guidance branch generates a guidance vector for the constraint diffusion update direction based on the task intent information.
3. The robot trajectory prediction method based on a diffusion model according to claim 1, characterized in that: The trajectory prior anchor points include at least a starting anchor point, intermediate anchor points of each stage, and an ending anchor point, wherein the intermediate anchor points of each stage are determined by the task decomposition results, the distribution of passable areas, and the distribution of dynamic obstacles.
4. The robot trajectory prediction method based on a diffusion model according to claim 1, characterized in that: The initial state of the low-dimensional latent variable is obtained by jointly compressing and encoding historical trajectory information and trajectory prior anchor points through a trajectory encoder, and the trajectory encoder includes a temporal feature extraction layer and a latent space mapping layer.
5. The robot trajectory prediction method based on a diffusion model according to claim 1, characterized in that: The risk corridor constraint diagram is constructed based on static obstacles, action obstacles, and restricted areas to form a time-varying risk cost distribution. Based on the time-varying risk cost distribution, the candidate trajectory latent variables are segmented for risk scoring and local elimination.
6. A robot trajectory prediction system based on a diffusion model, used to execute the robot trajectory prediction method based on a diffusion model as described in any one of claims 1-5, characterized in that: The prediction system includes: The context building module is used to acquire the robot's current state information, historical trajectory information, environmental obstacle information, and task intent information, and to build a predictive context; The trajectory prior anchor point generation module is used to extract trajectory prior anchor points based on the prediction context; The latent space coding module is used to jointly encode the trajectory prior anchor points and historical trajectory information into a low-dimensional latent variable initial state; The hierarchical diffusion denoising module is used to perform hierarchical diffusion denoising on the initial state of low-dimensional latent variables, and introduces a task intent guidance branch in each diffusion denoising stage. The risk corridor constraint module is used to construct a risk corridor constraint map based on environmental obstacle information, and to perform risk screening and safety correction on candidate trajectory latent variables; The trajectory re-scoring module is used to perform physical consistency correction and unified scoring on the selected candidate trajectories; The output module is used to output the predicted trajectory with the highest score, or to output multiple candidate predicted trajectories with confidence level indicators.
7. The robot trajectory prediction system based on the diffusion model according to claim 6, characterized in that: The hierarchical diffusion denoising module includes a main denoising unit and a task intent guidance unit. The main denoising unit is used to perform stepwise denoising on latent variables, and the task intent guidance unit is used to generate a guidance bias based on task semantic information and add it to the denoising update amount.
8. The robot trajectory prediction system based on a diffusion model according to claim 6, characterized in that: The risk corridor constraint module includes a risk map construction unit and a trajectory filtering unit. The risk map construction unit is used to convert static obstacles, dynamic obstacles and restricted areas into a time-varying risk cost map, and the trajectory filtering unit is used to eliminate high-risk candidate trajectories based on the time-varying risk cost map.
9. The robot trajectory prediction system based on the diffusion model according to claim 6, characterized in that: The trajectory re-scoring module includes a kinematic consistency correction unit and a dynamic reachability correction unit. The dynamic consistency correction unit is used to constrain the continuity of the trajectory's position, velocity, and acceleration, while the dynamic reachability correction unit is used to constrain the trajectory to meet at least one of the following: a velocity upper limit, an acceleration upper limit, and a turning curvature upper limit.
10. The robot trajectory prediction system based on the diffusion model according to claim 6, characterized in that: The prediction system also includes a real-time distillation output module, which is used to distill the trained multi-step diffusion model into a lightweight student module and perform confidence-gated output based on the task matching degree of the candidate trajectory, the collision risk score, and the uncertainty score.