Mechanical arm movement trajectory planning method and trajectory planning model construction method

CN122606645APending Publication Date: 2026-08-21上海云骥智行智能科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611088878.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

[0005]本申请提供一种机械臂移动轨迹规划方法、轨迹规划模型构建方法,用以解决现有技术中机械臂移动轨迹生成不连贯,需将生成的多段移动轨迹拼接为完整的移动轨迹;机械臂移动轨迹的规划中避障与轨迹生成脱节,依赖后处理的问题

Benefits of technology

[0061]1、该方案从初始的待处理轨迹开始,通过预训练的轨迹规划模型进行多轮迭代去噪优化,在整个迭代过程中,模型始终是基于车辆和障碍物点云数据,对整体轨迹进行同步的优化和修正,最终输出的目标移动轨迹自然是一条连续的轨迹,消除了现有技术中因分段生成轨迹和后续拼接导致的机械臂抖动、轨迹覆盖遗漏或重复覆盖的问题;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122606645A_ABST
    Figure CN122606645A_ABST
Patent Text Reader

Abstract

The application provides a mechanical arm moving track planning method and a track planning model construction method, which comprises the following steps: acquiring first point cloud data of a target vehicle and second point cloud data of obstacles in an environment where the target vehicle is located; performing denoising processing in multiple iteration rounds based on the first point cloud data, the second point cloud data and an initial to-be-processed track, wherein the denoising processing comprises the following steps: predicting noise information in the to-be-processed track of the current iteration round based on the first point cloud data and the second point cloud data by a pre-trained track planning model; obtaining a processed track based on a difference between the to-be-processed track of the current iteration round and the noise information, and taking the processed track as the to-be-processed track of the next iteration round; and taking the processed track in the last iteration round as a target moving track of the mechanical arm after the denoising processing in the multiple iteration rounds is performed. The method can output an entire continuous moving track, and the generated moving track has high quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of path planning technology, and in particular to a method for planning the movement trajectory of a robotic arm and a method for constructing a trajectory planning model. Background Technology

[0002] In automated car wash scenarios, using robotic arms to replace manual cleaning has become an important development trend. The robotic arm is equipped with cleaning actuators (such as nozzles and brushes) at its end effector, and cleans the vehicle surface by moving along a predetermined trajectory within its workspace. To ensure efficient cleaning, avoid repeated cleaning or omissions, guarantee uniform cleaning, and prevent collisions between the robotic arm and obstacles in the vehicle or environment (such as rearview mirrors, antennas, and other accessories), a reasonable movement trajectory must be planned for the robotic arm.

[0003] Currently, there are two main approaches to planning the movement trajectory of a robotic arm in car washing: The first is traditional geometric planning methods, such as the A* method and the fast-exploration random tree method. These methods first discretize the continuous, high-degree-of-freedom motion space (configuration space) of the robotic arm, then simplify the planning problem into a "point-to-point search" problem between discrete nodes. However, for tasks like car washing that need to cover large and complex surfaces, the vehicle surface needs to be divided into multiple local regions. Each region is searched to generate multiple short trajectories covering the sub-regions. Finally, additional planning logic connects these segmented trajectories in a certain order to form a complete movement trajectory. The second approach is a segmented prediction method based on deep learning. First, the vehicle's 3D model or point cloud is divided into several local regions (such as doors, hood, and roof). Then, for each local region, a deep learning model is trained to predict the sub-trajectory of the robotic arm performing the washing action within that region. Finally, the sub-trajectories are stitched together to form a complete movement trajectory.

[0004] All the aforementioned existing technologies require stitching together the segmented sub-trajectories. This stitching process, as a post-processing step, necessitates smoothing at the junctions of the sub-trajectories. However, smoothing may not completely eliminate discontinuities between trajectories, causing the robotic arm to vibrate when switching between trajectory segments, affecting cleaning uniformity and increasing mechanical wear. At the boundaries of trajectory segmentation and stitching, gaps or overlapping coverage (where two trajectories overlap) can easily occur, reducing cleaning efficiency and quality. Furthermore, in existing technologies, obstacle avoidance constraints are not used as optimization targets; instead, an ideal trajectory is generated first, followed by obstacle avoidance post-processing. However, this post-processing may compromise the smoothness and optimality of the original trajectory. Summary of the Invention

[0005] This application provides a method for planning the movement trajectory of a robotic arm and a method for constructing a trajectory planning model, in order to solve the problems in the prior art where the generation of the robotic arm's movement trajectory is not continuous and requires splicing the generated multiple segments of the movement trajectory into a complete movement trajectory; and the problem that obstacle avoidance and trajectory generation are disconnected in the planning of the robotic arm's movement trajectory, relying on post-processing.

[0006] In a first aspect, this application provides a method for planning the movement trajectory of a robotic arm, the method comprising:

[0007] Acquire first point cloud data of the target vehicle and second point cloud data of obstacles in the environment where the target vehicle is located. The first point cloud data includes multiple three-dimensional coordinate point data of the surface of the target vehicle and the second point cloud data includes multiple three-dimensional coordinate point data of the surface of the obstacle.

[0008] Based on the first point cloud data, the second point cloud data, and the initial trajectory to be processed, a denoising process is performed in multiple iterations. The denoising process includes:

[0009] Based on the first point cloud data and the second point cloud data, the pre-trained trajectory planning model predicts the noise information in the trajectory to be processed in the current iteration round;

[0010] Based on the difference between the trajectory to be processed and the noise information in the current iteration, the processed trajectory is obtained, and the processed trajectory is used as the trajectory to be processed in the next iteration.

[0011] After performing the denoising process in the multiple iterations, the processed trajectory in the last iteration is taken as the target movement trajectory of the robotic arm.

[0012] Optionally, obtaining the processed trajectory based on the difference between the trajectory to be processed and the noise information in the current iteration includes:

[0013] Subtract the noise information from the trajectory to be processed in the current iteration to obtain the trajectory to be detected;

[0014] Based on the trajectory to be detected and the second point cloud data, calculate the distance value between each trajectory point in the trajectory to be detected and the nearest obstacle, and determine the trajectory points whose corresponding distance values ​​are less than a preset threshold as target points;

[0015] Based on the distance value corresponding to the target point, the collision gradient vector of the target point is calculated, and the collision gradient vector points in the direction in which the distance value increases the fastest;

[0016] The processed trajectory is obtained by weighting the trajectory to be detected and the collision gradient vector.

[0017] Secondly, this application provides a method for constructing a trajectory planning model, the method comprising:

[0018] Acquire third point cloud data of the target object, and fourth point cloud data of obstacles in the environment where the target object is located. The third point cloud data includes multiple three-dimensional coordinate point data of the surface of the target object, and the fourth point cloud data includes multiple three-dimensional coordinate point data of the surface of the obstacle.

[0019] Based on the third point cloud data, a first feature vector of the target object surface is generated, and based on the fourth point cloud data, a second feature vector of the obstacle is generated.

[0020] A conditional feature vector is obtained based on the first feature vector and the second feature vector;

[0021] Based on the conditional feature vector and the noise trajectory, predicted noise information in the noise trajectory is generated. The noise trajectory is obtained by adding real noise information to the real trajectory. The real trajectory is the movement trajectory of the motion mechanism on the surface of the target object.

[0022] Calculate the noise prediction loss value between the predicted noise information and the actual noise information, and construct a trajectory planning model based on the noise prediction loss value.

[0023] Optionally, obtaining the conditional feature vector based on the first feature vector and the second feature vector includes:

[0024] Perform a first linear transformation on the first feature vector to obtain the first query vector;

[0025] A second linear transformation is performed on the second feature vector to obtain multiple first key vectors, and a third linear transformation is performed on the second feature vector to obtain a first value vector corresponding to each first key vector;

[0026] Calculate the first similarity between the first query vector and each of the first key vectors;

[0027] Based on the first similarity corresponding to the first key vector, a first weight parameter corresponding to the first value vector corresponding to the first key vector is determined, wherein the first similarity is positively correlated with the first weight parameter;

[0028] Based on the first weight parameter corresponding to each first value vector, calculate the first weighted sum of the first value vectors, and obtain the conditional feature vector based on the first weighted sum.

[0029] Optionally, obtaining the conditional feature vector based on the first weighted sum includes:

[0030] The first feature vector and the second feature vector are concatenated to form a joint feature vector;

[0031] The conditional feature vector is obtained based on the joint feature vector and the first weighted sum.

[0032] Optionally, generating the predicted noise information in the noise trajectory based on the conditional feature vector and the noise trajectory includes:

[0033] The noise trajectory is subjected to a first linear transformation to obtain a second query vector;

[0034] A second linear transformation is performed on the second feature vector to obtain multiple second key vectors, and a third linear transformation is performed on the second feature vector to obtain a second value vector corresponding to each second key vector;

[0035] Calculate the second similarity between the second query vector and each of the second key vectors;

[0036] Based on the second similarity corresponding to the second key vector, a second weight parameter corresponding to the second value vector corresponding to the second key vector is determined, wherein the second similarity is positively correlated with the second weight parameter;

[0037] Based on the second weight parameter corresponding to each second value vector, calculate the second weighted sum of the second value vectors, and use the second weighted sum as the context vector;

[0038] The predicted noise information is generated based on the conditional feature vector, the context vector, and the noise trajectory.

[0039] Optionally, constructing the trajectory planning model based on the noise prediction loss value includes:

[0040] Subtract the predicted noise information from the noise trajectory to obtain the denoised trajectory;

[0041] Based on the denoised trajectory and the fourth point cloud data, the distance between each trajectory point in the denoised trajectory and the nearest obstacle is calculated, and the trajectory points whose corresponding distance values ​​are less than a preset threshold are determined as target points.

[0042] Based on the distance value corresponding to the target point, the collision loss value corresponding to the target point is calculated, and the distance value is negatively correlated with the collision loss value;

[0043] The trajectory planning model is constructed based on the weighted sum of the noise prediction loss value and the collision loss value.

[0044] Thirdly, this application provides a robotic arm movement trajectory planning device, the device comprising:

[0045] The first acquisition module is used to acquire first point cloud data of the target vehicle and second point cloud data of obstacles in the environment where the target vehicle is located. The first point cloud data includes multiple three-dimensional coordinate point data of the surface of the target vehicle, and the second point cloud data includes multiple three-dimensional coordinate point data of the surface of the obstacle.

[0046] The trajectory planning module is used to perform denoising processing in multiple iterations based on the first point cloud data, the second point cloud data, and the initial trajectory to be processed. The denoising processing includes:

[0047] Based on the first point cloud data and the second point cloud data, the pre-trained trajectory planning model predicts the noise information in the trajectory to be processed in the current iteration round;

[0048] Based on the difference between the trajectory to be processed and the noise information in the current iteration, the processed trajectory is obtained, and the processed trajectory is used as the trajectory to be processed in the next iteration.

[0049] After performing the denoising process in the multiple iterations, the processed trajectory in the last iteration is taken as the target movement trajectory of the robotic arm.

[0050] Fourthly, this application provides a trajectory planning model construction apparatus, the apparatus comprising:

[0051] The second acquisition module is used to acquire the third point cloud data of the target object and the fourth point cloud data of the obstacles in the environment where the target object is located. The third point cloud data includes multiple three-dimensional coordinate point data of the surface of the target object and the fourth point cloud data includes multiple three-dimensional coordinate point data of the surface of the obstacle.

[0052] The feature vector generation module is used to generate a first feature vector of the surface of the target object based on the third point cloud data, and to generate a second feature vector of the obstacle based on the fourth point cloud data.

[0053] A conditional feature vector is obtained based on the first feature vector and the second feature vector;

[0054] The prediction module is used to generate predicted noise information in the noise trajectory based on the conditional feature vector and the noise trajectory. The noise trajectory is obtained by adding real noise information to the real trajectory. The real trajectory is the movement trajectory of the motion mechanism on the surface of the target object.

[0055] The model building module is used to calculate the noise prediction loss value between the predicted noise information and the real noise information, and to build a trajectory planning model based on the noise prediction loss value.

[0056] Fifthly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0057] The memory stores computer-executed instructions;

[0058] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect, or to implement the method as described in the second aspect.

[0059] In a sixth aspect, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect or the method described in the second aspect.

[0060] The robotic arm trajectory planning method and trajectory planning model construction method provided in this application have the following technical effects:

[0061] 1. This solution starts with the initial trajectory to be processed and performs multiple rounds of iterative denoising optimization through a pre-trained trajectory planning model. Throughout the iteration process, the model is always based on vehicle and obstacle point cloud data to synchronously optimize and correct the overall trajectory. The final output target movement trajectory is naturally a continuous trajectory, eliminating the problems of robotic arm shaking, trajectory coverage omission or duplicate coverage caused by segmented trajectory generation and subsequent splicing in the existing technology.

[0062] 2. In the denoising process of each iteration, the trajectory planning model predicts the noise in the current trajectory based on both vehicle point cloud data and obstacle point cloud data. That is, when the model predicts noise information, it simultaneously considers the two constraints of covering the target vehicle surface and avoiding obstacles. Compared with the existing technology that relies on post-processing for obstacle avoidance, the generated movement trajectory has higher quality. Attached Figure Description

[0063] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0064] Figure 1 This is a schematic flowchart of the robotic arm movement trajectory planning method provided in the embodiments of this application;

[0065] Figure 2 This is a schematic flowchart of the method for generating processed trajectories provided in an embodiment of this application;

[0066] Figure 3 This is a schematic diagram of the trajectory planning model construction method provided in the embodiments of this application;

[0067] Figure 4 This is a schematic diagram of the method for generating conditional feature vectors through a cross-attention mechanism provided in an embodiment of this application;

[0068] Figure 5 This is a schematic diagram of a method for generating predictive noise information through a collision attention mechanism, provided in an embodiment of this application.

[0069] Figure 6 A schematic diagram of the robotic arm movement trajectory planning device provided in the embodiments of this application;

[0070] Figure 7 A schematic diagram of the trajectory planning model construction device provided in the embodiments of this application;

[0071] Figure 8 A schematic diagram of the structure of the electronic device provided in this application.

[0072] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0073] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments matching this application. Rather, they are merely examples of apparatuses and methods matching some aspects of this application as detailed in the appended claims.

[0074] To address the issues in existing technologies where robotic arm trajectory generation is discontinuous, requiring the splicing of multiple generated trajectories into a complete one, and where obstacle avoidance and trajectory generation are disconnected in trajectory planning, relying on post-processing, the inventors of this application have considered acquiring point cloud data of the vehicle surface and obstacle point cloud data of the vehicle's environment. Then, multiple iterative steps are performed. In each iteration: a pre-trained trajectory planning model is used to predict noise information in the current trajectory based on this point cloud data and the current iteration's trajectory; based on the difference between the current trajectory and this noise information, the trajectory for the next iteration is obtained. After multiple iterations, the final trajectory of the robotic arm on the vehicle surface is obtained.

[0075] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0076] Figure 1 This is a flowchart illustrating the robotic arm trajectory planning method provided in an embodiment of this application. This method can be applied to a server, such as... Figure 1 As shown, the method includes:

[0077] S101. Obtain first point cloud data of the target vehicle and second point cloud data of obstacles in the environment where the target vehicle is located. The first point cloud data includes multiple three-dimensional coordinate point data of the surface of the target vehicle and the second point cloud data includes multiple three-dimensional coordinate point data of the surface of the obstacle.

[0078] In this step, the server receives two frames of pre-processed 3D point cloud data through its communication interface (such as Ethernet, Wi-Fi, or a 5G module):

[0079] First point cloud data: This data represents the outer surface of the target vehicle. Specifically, after the 3D scanning equipment (such as a depth camera or LiDAR) deployed in the car wash station collects the raw data of the target vehicle's outer surface, the raw data is preprocessed through coordinate system 1, noise reduction, and downsampling to obtain the first point cloud data. This data is a set of 3D coordinates containing N points, each point being a 3D coordinate (x, y, z), used to characterize the geometric shape of the target vehicle in the current coordinate system.

[0080] The second point cloud data represents the surface of obstacles in the environment where the target vehicle is located. Its source and processing method are the same as the first point cloud data. This data contains a set of three-dimensional coordinates of M points, each point being a three-dimensional coordinate (x, y, z), used to characterize the spatial occupancy of objects that need to be avoided (such as rearview mirrors, antennas, support pillars, etc.) in the current coordinate system. If there are no obstacles in the environment where the target vehicle is located, this data can be set to an empty set, or it can be filled with a zero vector by the server.

[0081] After the server obtains the first point cloud data and the second point cloud data, it can store these two types of data in memory as input data for subsequent trajectory planning steps.

[0082] S102. Based on the first point cloud data, the second point cloud data, and the initial trajectory to be processed, perform denoising processing in multiple iterations. The denoising processing includes:

[0083] Based on the first and second point cloud data, the pre-trained trajectory planning model predicts the noise information in the trajectory to be processed in the current iteration round.

[0084] Based on the difference between the trajectory to be processed and the noise information in the current iteration, the processed trajectory is obtained, and the processed trajectory is used as the trajectory to be processed in the next iteration.

[0085] The server first performs an initialization step. Specifically, the server can generate an initial trajectory to be processed in memory. This trajectory can be a random noise sequence that conforms to a multidimensional Gaussian distribution and has the shape [T, 6]. Here, T represents the total number of time steps of the trajectory to be processed, and 6 corresponds to the 6-DOF pose of the robotic arm end effector at each time step. The 6-DOF pose can be, for example, a 3D position and a 3D rotation angle.

[0086] Next, the server performs iterative denoising processing from k=1 to k=K. In the k-th iteration, the following denoising processing is performed:

[0087] 1. Predicting noise: The server takes the trajectory to be processed in the current iteration, the first point cloud data, the second point cloud data, and the current iteration index k (or the corresponding time step scheduling parameter) as input data and inputs them into the pre-trained trajectory planning model. This model is a deep neural network whose internal structure has been trained to understand the geometric features of vehicles and obstacles.

[0088] The trajectory planning model calculates based on these input data and outputs a noise information prediction value. This noise information prediction value is exactly the same in dimension as the current trajectory to be processed. It is the noise component of the random noise in the current trajectory to be processed, estimated by the trajectory planning model.

[0089] 2. Trajectory Update: The server can calculate the difference between the trajectory to be processed in the current iteration and the noise information predicted by the trajectory planning model, based on the update formula in the denoising algorithm. Denoising algorithms can be, for example, DDPM (Denoising Diffusion Probabilistic Models) or DDIM (Denoising Diffusion Implicit Models).

[0090] Specifically, the difference between the trajectory to be processed in the current iteration and the noise information predicted by the trajectory planning model is obtained in the following way, i.e., the processed trajectory:

[0091] Taking DDPM as an example, its update formula is:

[0092]

[0093] in, It is the trajectory to be processed in the current iteration round. This is the processed trajectory calculated in the current iteration round, and this trajectory will be used as the trajectory to be processed in the next iteration round. It is the predicted noise information, and its input includes: the trajectory to be processed in the current iteration round. First point cloud data Second point: cloud data Index of the current iteration round ; These are predefined scheduling parameters, based on the total number of iterations and the current iteration (…). A set of pre-calculated coefficients, stored in the server's memory or configuration file, are used to control the intensity of noise addition or removal; It is a standard Gaussian noise, which is zero in deterministic sampling like DDIM; This is the variance parameter.

[0094] Taking DDIM as an example, its update formula is:

[0095]

[0096] The parameters in this update formula have the same meaning as those in the DDPM update formula. It is based on the total number of iterations and the current iteration ( Pre-calculated, predefined scheduling parameters function as described in the DDPM formula. same.

[0097] The result of the above updated formula calculation is a cleaner processed trajectory. It should be noted that, in a physical sense, the noise reduction process is to subtract the noise estimated by the model from the current noisy trajectory to be processed, so that it is closer to a reasonable, collision-free robotic arm motion trajectory.

[0098] After obtaining the processed trajectory density, the processed trajectory obtained in this round is completely stored in memory and used as the trajectory to be processed in the next iteration round for repeating the above denoising process.

[0099] S103. After performing denoising processing for multiple iterations, the processed trajectory in the last iteration is used as the target movement trajectory of the robotic arm.

[0100] After iterative denoising, the server reads the processed trajectory from the last iteration (Kth iteration) from memory. At this point, the trajectory has evolved from initial Gaussian noise into a smooth, continuous 6-DOF pose sequence that meets obstacle avoidance requirements. The server identifies this trajectory as the target movement trajectory for the robotic arm and sends the trajectory data to the robotic arm control system via its control interface. This control interface can be, for example, a ROS topic, an EtherCAT master station, or a custom TCP protocol. The robotic arm control system then drives the servo motors of each joint according to this target movement trajectory to complete the full-coverage cleaning operation on the target vehicle.

[0101] Figure 1 The robotic arm trajectory planning method shown has the following technical advantages:

[0102] 1. This method starts from the initial trajectory to be processed and performs multiple rounds of iterative denoising optimization through a pre-trained trajectory planning model. Throughout the iteration process, the model is always based on vehicle and obstacle point cloud data to synchronously optimize and correct the overall trajectory. The final output target movement trajectory is naturally a continuous trajectory, eliminating the problems of robotic arm shaking, trajectory coverage omission or duplicate coverage caused by segmented trajectory generation and subsequent splicing in the existing technology.

[0103] 2. In the denoising process of each iteration, the trajectory planning model predicts the noise in the current trajectory based on both vehicle point cloud data and obstacle point cloud data. That is, when the model predicts noise information, it simultaneously considers the two constraints of covering the target vehicle surface and avoiding obstacles. Compared with the existing technology that relies on post-processing for obstacle avoidance, the generated movement trajectory has higher quality.

[0104] exist Figure 1 Based on the method shown, the inventors of this application further considered that obstacle avoidance constraint guidance could be introduced during the generation of the processed trajectory. During trajectory generation, a real-time, physically constrained obstacle avoidance "push" could be applied to dynamically push the generated trajectory away from the obstacle. Accordingly, embodiments of this application provide a method for generating a processed trajectory. Figure 2 This is a schematic flowchart of the method for generating processed trajectories provided in the embodiments of this application, as shown below. Figure 2 As shown, the method includes:

[0105] S201. Subtract the noise information from the trajectory to be processed in the current iteration to obtain the trajectory to be detected;

[0106] In this step, the update formulas for DDPM or DDIM from the aforementioned embodiments can be used to obtain the trajectory to be detected. . It is the movement trajectory of the robotic arm with initial noise removal and a reasonable shape, but obstacle avoidance constraints have not yet been fully considered.

[0107] S202. Based on the trajectory to be detected and the second point cloud data, calculate the distance between each trajectory point in the trajectory to be detected and the nearest obstacle, and determine the trajectory points whose corresponding distance values ​​are less than a preset threshold as target points.

[0108] It should be noted that, The trajectory point in the image is a 6-dimensional pose point, which includes the point's 3-dimensional position coordinates. The server iterates through each trajectory point, and for each trajectory point, its 3D position coordinates are... The server calculates the Euclidean distance between itself and all points in the second point cloud data (the point cloud data of obstacles). Specifically, the server can quickly find the nearest neighbor with respect to all points in the second point cloud data (e.g., using a KD-Tree-based spatial acceleration structure) through a nearest neighbor search algorithm. The nearest obstacle point is identified, and the distance between them is recorded. , That is, representing the trajectory point Spatial distance to the surface of the nearest obstacle.

[0109] Next, the server calculates the value of each trajectory point. It is compared with a preset threshold (safe distance threshold), which can be configured, for example, set to 0.05 meters. If a certain trajectory point If the value is less than the preset threshold, the trajectory point is determined to be in a collision risk area or has already undergone theoretical penetration, and the server marks the trajectory point as the target point.

[0110] The server can provide the index of the target point and its corresponding distance value. Stored in a list.

[0111] S203. Calculate the collision gradient vector of the target point based on the distance value corresponding to the target point. The collision gradient vector points in the direction where the distance value increases the fastest.

[0112] Collision gradient vector The direction is defined as the distance from the target point to the obstacle. The direction of fastest acceleration is geometrically the direction of the unit vector pointing from the nearest obstacle point to the target point. This is because moving along this direction allows the target point to move away from the obstacle at the fastest speed, thus increasing the speed of acceleration. .

[0113] Collision gradient vector The magnitude (size) is related to the collision risk and can optionally be the collision gradient vector. The modulus and Inversely proportional, that is The smaller the value, the smaller the collision gradient vector. The larger the magnitude, the stronger the obstacle avoidance correction force is obtained for trajectory points with higher collision risk. For example, the collision gradient vector... It can be calculated in the following ways:

[0114]

[0115] in, For the above unit vector, This is a preset threshold.

[0116] S204. Based on the weighted sum of the trajectory to be detected and the collision gradient vector, the processed trajectory is obtained.

[0117] In this step, all the calculated collision gradient vectors are first integrated into a gradient field with the same dimension as the trajectory to be detected. For trajectory points that are not target points, their collision gradient vector is 0.

[0118] Then, the server will detect the trajectory. With gradient field According to the preset guiding weight coefficient The weighted summation is performed as follows:

[0119]

[0120] in, The processed trajectory will serve as the trajectory to be processed in the next iteration. Used to control the intensity of collision guidance in order to balance the denoising smoothness of the trajectory and the mandatory nature of obstacle avoidance.

[0121] Figure 2 The method for obtaining the processed trajectory shown has the following technical effects:

[0122] 1. After each round of denoising (S201), the method immediately performs collision detection based on the latest trajectory to be detected (S202) and calculates the correction direction (S203). Then, the trajectory is corrected in real time (S204). Thus, in the process of the trajectory evolving from random noise to the final target movement trajectory, the obstacle avoidance constraint guides each step of trajectory generation, thereby ensuring that the output target movement trajectory has collision-free characteristics from the source, avoiding the risk of trajectory quality degradation or correction failure that may be caused by traditional obstacle avoidance post-processing.

[0123] 2. Compared with traditional rule-based or search-based obstacle avoidance methods, which may cause trajectory abrupt changes, jitter, or sharp turns, this method incorporates obstacle avoidance correction in the form of collision gradient vectors (S203) into the trajectory update process through weighted summation (S204). The adjustment of the trajectory is continuous and differentiable. This method can smoothly "push" the collision risk point (target point) away from the obstacle, thereby ensuring the continuity and smoothness of the final robotic arm movement trajectory, which is beneficial to improving cleaning uniformity and robotic arm movement stability.

[0124] In view of the trajectory planning model used in the aforementioned embodiments, this application provides a method for constructing a trajectory planning model. Figure 3 This is a schematic flowchart of a trajectory planning model construction method provided in an embodiment of this application. This method can be applied to a server. Figure 3 As shown, the method includes:

[0125] S301. Obtain the third point cloud data of the target object and the fourth point cloud data of the obstacles in the environment where the target object is located. The third point cloud data includes multiple three-dimensional coordinate point data of the surface of the target object and the fourth point cloud data includes multiple three-dimensional coordinate point data of the surface of the obstacles.

[0126] In this step, the server can read a large number of sample pairs from the training dataset constructed by Cosine, and each sample pair specifically includes:

[0127] The third type of point cloud data is the 3D point cloud data of the target object (which can be a vehicle or any type of object). This point cloud data can be obtained by scanning the target object with a 3D laser scanner, or by sampling from a 3D computer-aided design model, and contains a large number of 3D coordinate points characterizing the geometry of the target object's outer surface.

[0128] Fourth point cloud data: This refers to the obstacle point cloud data associated with the target object. The source of this point cloud data could be, for example:

[0129] 1. Obstacles in the environment where the target object is located (such as protruding parts on a real vehicle, such as rearview mirrors, door handles, antennas, and license plate frames) are obtained by scanning with a 3D laser scanner;

[0130] 2. In a virtual environment, geometric point cloud data artificially added around the target object model to simulate other equipment or the surrounding environment in which the target object is located.

[0131] The associated real trajectory is a planned, smooth, and collision-free cleaning trajectory of the robotic arm end effector paired with the point cloud data mentioned above. This real trajectory records a series of 6-DOF poses in the form of a time series.

[0132] The server can preprocess the above data. For example, it can use downsampling to unify the number of points in the third and fourth point cloud data to a fixed number to adapt to batch processing operations; it can also perform normalization processing to translate the coordinates of the point cloud data so that its centroid is located at the origin of the coordinate system, and scale it so that it is distributed within a unit sphere or unit cube to eliminate the influence of different target object sizes and positions.

[0133] S302. Based on the third point cloud data, generate a first feature vector of the target object surface, and based on the fourth point cloud data, generate a second feature vector of the obstacle.

[0134] In this step, the server first needs to load and instantiate two point cloud encoding networks, which can be implemented based on PointNet++ or Dynamic Graph Convolutional Network (DGCNN).

[0135] Point cloud coding networks include target encoders and obstacle encoders, wherein:

[0136] A target encoder may include, for example, the following levels:

[0137] A multilayer perceptron with multiple shared weights is used for point-level feature transformation;

[0138] The furthest point sampling layer is used to progressively downsample the point cloud;

[0139] Sphere query or K-nearest neighbor grouping layer is used to construct local regions;

[0140] Local feature aggregation layers (such as max pooling layers);

[0141] A global feature pooling layer (such as a max pooling layer) ultimately outputs a first feature vector of fixed dimensions.

[0142] The obstacle encoder has a similar structure to the target encoder, but it can be designed with fewer layers and a smaller number of channels per layer (i.e., smaller feature dimension). Ultimately, the obstacle encoder outputs a second feature vector with a lower dimension. It's important to note that the weight parameters of the target encoder and the obstacle encoder are independent of each other, allowing them to learn the features of the target object and obstacles separately during training. Specifically, the target encoder performs deep learning specifically for the surface geometry of the target object, while the obstacle encoder performs deep learning specifically for the features of the obstacles. The trajectory planning model does not need to guess which features belong to the target object and which belong to the obstacle from the mixed feature information, thus obtaining clear and separate target object and obstacle features, improving the accuracy of subsequent noise prediction.

[0143] The server sends the preprocessed third-point cloud data to the target encoder. This encoder extracts the local features of each point using a multilayer perceptron, and then generates a fixed-dimensional global feature vector, or first feature vector, through hierarchical aggregation operations. The first feature vector can be 64-dimensional, for example. The first feature vector encodes the global geometric topology and local surface curvature information of the target object.

[0144] The server sends the preprocessed fourth point cloud data to the obstacle encoder, and the process is similar to that of the target encoder. This ultimately generates a smaller-dimensional global feature vector, the second feature vector, which can be, for example, 32-dimensional. The second feature vector encodes the spatial distribution and occupancy information of the obstacles.

[0145] S303. Obtain the conditional feature vector based on the first and second feature vectors;

[0146] In this step, the server can concatenate the first feature vector (64-dimensional) and the second feature vector (32-dimensional) corresponding to the same training sample along the feature dimension to obtain the conditional feature vector.

[0147] S304. Based on the conditional feature vector and the noise trajectory, generate the predicted noise information in the noise trajectory. The noise trajectory is obtained by adding real noise information to the real trajectory. The real trajectory is the movement trajectory of the motion mechanism on the surface of the target object.

[0148] In this step, the server first starts from the real trajectory of the training sample, randomly samples a diffusion time step t according to a preset diffusion step scheduling table, and generates Gaussian noise of corresponding intensity based on the noise variance corresponding to that step. Then, the generated noise is added to the real trajectory to synthesize the noise trajectory corresponding to the current time step t. At the same time, the server generates an embedding vector representing time step t.

[0149] Then, the server inputs the following three types of data into the denoising network:

[0150] 1. Noise Trajectory: The trajectory after noise has been added.

[0151] 2. Embedding vector: Represents time step t.

[0152] 3. Conditional eigenvectors: The eigenvectors are obtained from step S303.

[0153] Denoising networks can be, for example, temporal networks based on the U-Net architecture, and can include FiLM layers (Feature-wise Linear Modulation). The core idea of ​​FiLM layers is to use external conditional information (in this application, conditional feature vectors) to dynamically and adaptively adjust the values ​​of the feature maps in the intermediate layers of the network, thereby guiding the network to generate outputs that conform to the conditional information.

[0154] Specifically, the FiLM layer itself contains a small neural network, which may include one or two fully connected layers. The FiLM layer takes an external conditional feature vector as input and outputs two sets of parameter sequences through this small network: a scaling parameter set and a bias parameter set. These two sets of parameter sequences have the same number of channels as the feature map to be modulated in the intermediate layers of the denoising network. Then, the FiLM layer uses these two sets of parameter sequences to perform a channel-by-channel affine transformation on the feature map to be modulated. Specifically, for each channel of the feature map to be modulated, the corresponding scaling parameter is multiplied by all activation values ​​of that channel, and then the corresponding bias parameter is added.

[0155] After forward computation by the denoising network, the server finally outputs predicted noise information with the same dimension as the input noise trajectory, which is the noise added at time step t predicted by the denoising network.

[0156] S305. Calculate the noise prediction loss value between the predicted noise information and the actual noise information, and construct a trajectory planning model based on the noise prediction loss value.

[0157] In this step, the server acquires the actual noise information that is added to the real trajectory. Then, the server calculates the difference between the predicted noise information and the actual noise information. For example, the mean squared error can be used as the loss function, and the calculated value is the noise prediction loss value.

[0158] The server can calculate the gradient of the noise prediction loss value with respect to all trainable parameters, such as the denoising network and the dual encoder network, and then call the optimizer to update all network parameters based on the calculated gradient in order to minimize the loss value.

[0159] In the actual construction process, the server repeatedly executes processes S301 to S305 on all samples in the training dataset to train the trajectory planning model.

[0160] Once the training process meets the preset stopping conditions, the server saves the final optimized set of model network parameters as a complete, deployable trajectory planning model.

[0161] For step S303, a cross-attention mechanism can be used to generate conditional feature vectors. Figure 4 This is a schematic diagram of the method for generating conditional feature vectors through a cross-attention mechanism provided in an embodiment of this application, as shown below. Figure 4 As shown, the method includes:

[0162] S401. Perform a first linear transformation on the first feature vector to obtain the first query vector;

[0163] The server memory can load the first weight matrix used for this step. (For the first linear transformation) The dimension is ,in The target dimension of the conditional feature vector can be, for example, 128 dimensions. It is the dimension of the key vector, for example, it can be 16.

[0164] The server takes the first feature vector (e.g., shape [1, 64]) as input and first projects it onto the target dimension through a linear layer (e.g., a fully connected layer). , to obtain vector (shape [1,128]), then the server performs matrix multiplication:

[0165]

[0166] in, The first query vector has the shape [1, The first query vector is the core information extracted from the features of the target object and used to query the features of the obstacle.

[0167] S402. Perform a second linear transformation on the second feature vector to obtain multiple first key vectors, and perform a third linear transformation on the second feature vector to obtain a first value vector corresponding to each first key vector;

[0168] The server memory can load the second weight matrix used for this step. (For the second linear transformation), third weight matrix (Used for the third linear transformation). The dimension is , The dimension is Under normal circumstances = =128.

[0169] The server projects the second feature vector onto the target dimension through a linear layer. , to obtain vector (shape [1,128]), then calculate:

[0170]

[0171]

[0172] in:

[0173] Let [the first key vector] have the shape [1, ...]. ] is used to match with the first query vector to determine relevance.

[0174] Let be the first value vector, with shape [1, The first value vector contains the original information about the obstacle features.

[0175] S403. Calculate the first similarity between the first query vector and each first key vector;

[0176] In this step, the first similarity is calculated. It can be calculated in the following ways:

[0177]

[0178] in:

[0179] It is the first key vector Transpose of;

[0180] dot product The result of the calculation is a scalar, which measures the similarity between the query vector and the key vector;

[0181] Divide by The purpose is to prevent the dot product result from being too large, which would cause the gradient of the subsequent Softmax function to vanish.

[0182] S404. Based on the first similarity corresponding to the first key vector, determine the first weight parameter corresponding to the first value vector corresponding to the first key vector, wherein the first similarity is positively correlated with the first weight parameter;

[0183] Since the similarity calculated in the previous step may have unstable numerical ranges, it needs to be converted into a probability distribution. The server inputs the first similarity into a Softmax function for normalization calculation to obtain the first weight parameter. :

[0184]

[0185] The output of the Softmax function is a value between 0 and 1, which is the first weight parameter. The first weight parameter is positively correlated with the first similarity; the higher the similarity, the larger the first weight parameter. The first weight parameter indicates the extent to which obstacle information carried by the first value vector should be adopted in the final output to respond to queries about the target object feature region represented by the first query vector.

[0186] S405. Calculate the first weighted sum of the first value vectors according to the first weight parameter corresponding to each first value vector, and obtain the conditional feature vector based on the first weighted sum.

[0187] In this step, the server performs a weighted summation operation to obtain the first weighted sum. :

[0188]

[0189] The server can It can be used directly as a conditional feature vector, or... and After adding or concatenating the elements and passing them through a linear projection layer, the final conditional feature vector is generated.

[0190] Figure 4 The method shown has the following technical effects:

[0191] 1. Through the transformation and matching mechanism of the first query vector, the first key vector, and the first value vector, the trajectory planning model is forced to conduct "question-and-answer" interaction at the feature level. The features of the target object (as a query) actively "ask" the parts of the obstacle features that are related to itself, thereby generating a conditional feature vector rich in interactive semantics, which provides a more accurate contextual environment encoding for subsequent trajectory generation.

[0192] 2. By calculating similarity to determine the first weight parameter, the correlation between each region of the target object's surface and each part of the obstacle can be dynamically calculated. For example, the surface features near the vehicle's rearview mirror will have a high similarity with the key corresponding to "rearview mirror" in the obstacle point cloud, thus obtaining a high weight parameter. This strengthens the obstacle information that is highly related to the potential collision risk in the generated conditional feature vector, while weakening irrelevant information, thereby achieving optimized allocation of computing resources.

[0193] Optionally, the first and second feature vectors can be concatenated into a joint feature vector, based on the joint feature vector and the first weighted sum. This yields the conditional feature vector. Specifically, the server can concatenate the original first and second feature vectors along different feature dimensions to form a joint feature vector. For example, if the first feature vector is 64-dimensional and the second is 32-dimensional, the joint feature vector will be 96-dimensional. The server then combines the obtained joint feature vector with the previously obtained first weighted sum. The two features are then fused, for example by concatenating them along their feature dimensions to form a longer fused vector. The server then transforms this fused vector through a trainable fully connected layer (linear projection layer). The purpose of this layer is to map the fused high-dimensional features to the fixed-dimensional conditional feature vector (e.g., 128-dimensional) required by the trajectory planning model.

[0194] In the above scheme, the joint feature vector contains all the original features of the target object and obstacles that have not been weighted by the cross attention mechanism, which can ensure the integrity of the basic scene information and prevent local information overfitting or loss of important background information that may be caused by the cross attention mechanism.

[0195] For step S304, a collision attention mechanism can be introduced to obtain the predicted noise information. Figure 5 This is a schematic diagram of the method for generating predictive noise information through a collision attention mechanism provided in an embodiment of this application, as shown below. Figure 5 As shown, the method includes:

[0196] S501. Perform a first linear transformation on the noise trajectory to obtain the second query vector;

[0197] In this step, the server reads the noise trajectory at the current time step t from memory. Its dimensions are [B,T,D], where B is the training batch size, T is the trajectory sequence length (e.g., 200 time steps), and D is the feature dimension of each trajectory point (6, corresponding to 6 degrees of freedom pose).

[0198] Then, the server calls the trainable fully connected layer:

[0199]

[0200] and bias:

[0201]

[0202] The server performs matrix multiplication and addition operations:

[0203]

[0204] The above operation projects the features of each trajectory point from D dimensions to... Dimension. Transformed tensor This is the second query vector, with dimensions [B, T, ... The second query vector represents a sequence of vectors extracted from the current noise trajectory to "query" the obstacle features.

[0205] S502. Perform a second linear transformation on the second feature vector to obtain multiple second key vectors, and perform a third linear transformation on the second feature vector to obtain the second value vector corresponding to each second key vector.

[0206] The server reads the second feature vector output from the obstacle encoder, denoted as... Its dimensions are [B,N,C], where B is the batch size, N is the number of feature points in the obstacle point cloud data after encoding, and C is the number of feature channels for each feature point.

[0207] The server makes parallel calls to two independent, trainable fully connected layers:

[0208] Bond Transformation Layer:

[0209]

[0210] Value transformation layer:

[0211]

[0212] Then calculate the second bond vector:

[0213]

[0214] The resulting dimension is [B, N, The tensor has N second bond vectors.

[0215] Calculate the second value vector:

[0216]

[0217] The resulting dimension is [B, N, The tensor has N second key vectors. General and equal.

[0218] S503. Calculate the second similarity between the second query vector and each second key vector;

[0219] In this step, the server performs a batch of matrix multiplication operations, specifically:

[0220]

[0221] for The transpose of .

[0222] The final result It is a matrix of dimensions [B,T,N], where each element... This represents the second similarity between the second query vector of the t-th trajectory point and the key vector of the n-th obstacle feature point in batch b.

[0223] S504. Based on the second similarity corresponding to the second key vector, determine the second weight parameter corresponding to the second value vector of the second key vector, wherein the second similarity is positively correlated with the second weight parameter;

[0224] In this step, the server processes the similarity score matrix. Applying the softmax function in the N-dimensional dimension:

[0225]

[0226] The softmax function transforms the second similarity between each second query vector and all second key vectors into a set of probability distributions, resulting in a tensor. The dimensions are [B,T,N]. Each element in The second weight parameter satisfies:

[0227]

[0228] And for a fixed t, we have:

[0229]

[0230] Since the softmax function is a monotonic function, the higher the original second similarity, the larger the corresponding second weight parameter.

[0231] S505. Calculate the second weighted sum of the second value vectors according to the second weight parameter corresponding to each second value vector, and use the second weighted sum as the context vector;

[0232] In this step, the server utilizes the calculated second weight parameter. For the second value vector Perform batch matrix multiplication and weighted summation:

[0233]

[0234] The obtained tensor This is the context vector, whose dimensions are [B,T, ].

[0235] For the t-th point in the noise trajectory, its corresponding context vector is:

[0236]

[0237] For the first The second value vector corresponding to each obstacle feature point.

[0238] The context vector is the feature vector of all obstacles. The convex combination aggregates the obstacle information most relevant to the current trajectory point, becoming a feature vector with obstacle avoidance guidance function.

[0239] S506. Generate predicted noise information based on the conditional feature vector, context vector, and noise trajectory.

[0240] In this step, the server expands the conditional feature vector from S303 in the spatial dimension to align it with the noise trajectory sequence. Then, the server concatenates the original noise trajectory, the context vector, and the expanded conditional feature vector to obtain the fused feature vector.

[0241] The server inputs the fused feature vector and the embedding vector at time step t into the backbone of the denoising network. After calculation by the multi-layer feedforward neural network of the denoising network (including operations such as convolution, attention, and FiLM modulation), the server finally outputs the predicted noise information.

[0242] Figure 5 The method shown has the following technical effects:

[0243] This method uses a "query-key-value" collision attention calculation to enable each future path point (corresponding to a second query vector) in the noisy trajectory to actively and dynamically "focus" on the most relevant part of the obstacle point cloud data, namely the corresponding second key vector and second value vector. By calculating the second similarity (S503) and the second weight parameter (S504), the trajectory point can extract the most relevant obstacle avoidance information from the obstacle features based on its current spatial position and state (S505 generating a context vector), thus making obstacle avoidance guidance refined, localized, and context-sensitive. For example, when the trajectory point is close to the rearview mirror, its attention will be highly focused on the features of the rearview mirror, thereby obtaining a strong obstacle avoidance signal; while when it is located in an open door panel area, it is almost unaffected by obstacles.

[0244] For step S305, an additional collision loss value can be introduced to construct the trajectory planning model:

[0245] A trajectory planning model is constructed based on noise prediction loss values, including:

[0246] Step 1: Subtract the predicted noise information from the noise trajectory to obtain the denoised trajectory;

[0247] Step 2: Based on the denoised trajectory and the fourth point cloud data, calculate the distance between each trajectory point in the denoised trajectory and the nearest obstacle, and determine the trajectory points whose corresponding distance values ​​are less than a preset threshold as target points;

[0248] Step 3: Calculate the collision loss value corresponding to the target point based on the distance value. The distance value and the collision loss value are negatively correlated.

[0249] Step 4: Construct a trajectory planning model based on the weighted sum of noise prediction loss value and collision loss value.

[0250] Steps one and two can refer to the method for determining the target point in the aforementioned embodiments. Specifically, for step three, one of the following functions can be used to calculate the collision loss value:

[0251] Inverse distance function:

[0252]

[0253] Exponential decay function:

[0254]

[0255] In the above function, This represents the collision loss value. This is the distance value. It is a very small positive number. For the preset threshold, This is the scale parameter.

[0256] Ultimately, the server can use the weighted sum of the noise prediction loss value and the collision loss value as the total loss value, and use the total loss value to update the weight parameters of the trajectory planning model through the backpropagation algorithm.

[0257] By introducing a collision loss value, the trajectory planning model must simultaneously internalize obstacle avoidance constraints (also guaranteed by the collision loss value) while learning prior knowledge of trajectory distribution (guaranteed by the noise prediction loss value). This makes the final generated trajectory more probabilistically likely to fall in areas that both conform to motion laws and are far from obstacles, achieving a balance between obstacle avoidance capability and trajectory generation quality.

[0258] Furthermore, a safety boundary loss value can be introduced, which is designed to be equal to the distance value. Less than the target distance Losses occur at different distances, with larger losses occurring as the distance decreases; the loss is zero when the distance reaches or exceeds the target distance. Specifically, the calculation method for safety boundary loss values ​​is as follows: It can be:

[0259]

[0260] Finally, the total loss value can be calculated as a weighted sum of the noise prediction loss value, the collision loss value, and the safety boundary loss value.

[0261] By introducing a safety boundary loss value, each trajectory point can be encouraged to maintain an ideal target distance from the obstacle. This allows the generated trajectory to not only avoid collisions but also maintain a more robust safety margin.

[0262] The apparatus provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0263] Figure 6 This is a schematic diagram of the robotic arm movement trajectory planning device provided in the embodiments of this application, as shown below. Figure 6 As shown, the device 60 includes:

[0264] The first acquisition module 601 is used to acquire first point cloud data of the target vehicle and second point cloud data of obstacles in the environment where the target vehicle is located. The first point cloud data includes multiple three-dimensional coordinate point data of the surface of the target vehicle and the second point cloud data includes multiple three-dimensional coordinate point data of the surface of the obstacle.

[0265] The trajectory planning module 602 is used to perform denoising processing in multiple iterations based on the first point cloud data, the second point cloud data, and the initial trajectory to be processed. The denoising processing includes:

[0266] Based on the first and second point cloud data, the pre-trained trajectory planning model predicts the noise information in the trajectory to be processed in the current iteration round.

[0267] Based on the difference between the trajectory to be processed and the noise information in the current iteration, the processed trajectory is obtained, and the processed trajectory is used as the trajectory to be processed in the next iteration.

[0268] After performing multiple iterations of denoising, the processed trajectory in the last iteration is used as the target movement trajectory of the robotic arm.

[0269] Figure 7 This is a schematic diagram of the trajectory planning model construction device provided in the embodiments of this application, as shown below. Figure 7 As shown, the device 70 includes:

[0270] The second acquisition module 701 is used to acquire the third point cloud data of the target object and the fourth point cloud data of the obstacles in the environment where the target object is located. The third point cloud data includes multiple three-dimensional coordinate point data of the surface of the target object and the fourth point cloud data includes multiple three-dimensional coordinate point data of the surface of the obstacles.

[0271] The feature vector generation module 702 is used to generate a first feature vector of the surface of the target object based on the third point cloud data, and to generate a second feature vector of the obstacle based on the fourth point cloud data.

[0272] The conditional feature vector is obtained based on the first and second feature vectors;

[0273] The prediction module 703 is used to generate predicted noise information in the noise trajectory based on the conditional feature vector and the noise trajectory. The noise trajectory is obtained by adding real noise information to the real trajectory. The real trajectory is the movement trajectory of the motion mechanism on the surface of the target object.

[0274] The model building module 704 is used to calculate the noise prediction loss value between the predicted noise information and the actual noise information, and to build a trajectory planning model based on the noise prediction loss value.

[0275] Figure 8 A schematic diagram of the structure of the electronic device provided in this application. Figure 8 As shown, the electronic device 80 provided in this embodiment includes at least one processor 801 and a memory 802. Optionally, the device 80 further includes a communication component 803. The processor 801, memory 802, and communication component 803 are connected via a bus 804.

[0276] In a specific implementation, at least one processor 801 executes computer execution instructions stored in memory 802, causing at least one processor 801 to perform the above-described method.

[0277] The specific implementation process of processor 801 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0278] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0279] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0280] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0281] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0282] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0283] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0284] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0285] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0286] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0287] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0288] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0289] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0290] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for planning the movement trajectory of a robotic arm, characterized in that, The method includes: Acquire first point cloud data of the target vehicle and second point cloud data of obstacles in the environment where the target vehicle is located. The first point cloud data includes multiple three-dimensional coordinate point data of the surface of the target vehicle and the second point cloud data includes multiple three-dimensional coordinate point data of the surface of the obstacle. Based on the first point cloud data, the second point cloud data, and the initial trajectory to be processed, a denoising process is performed in multiple iterations. The denoising process includes: Based on the first point cloud data and the second point cloud data, the pre-trained trajectory planning model predicts the noise information in the trajectory to be processed in the current iteration round; Based on the difference between the trajectory to be processed and the noise information in the current iteration, the processed trajectory is obtained, and the processed trajectory is used as the trajectory to be processed in the next iteration. After performing the denoising process in the multiple iterations, the processed trajectory in the last iteration is taken as the target movement trajectory of the robotic arm. The processed trajectory is obtained by taking the difference between the trajectory to be processed and the noise information based on the current iteration round, including: Subtract the noise information from the trajectory to be processed in the current iteration to obtain the trajectory to be detected; Based on the trajectory to be detected and the second point cloud data, calculate the distance value between each trajectory point in the trajectory to be detected and the nearest obstacle, and determine the trajectory points whose corresponding distance values ​​are less than a preset threshold as target points; Based on the distance value corresponding to the target point, the collision gradient vector of the target point is calculated, and the collision gradient vector points in the direction in which the distance value increases the fastest; The processed trajectory is obtained by weighting the trajectory to be detected and the collision gradient vector.

2. A method for constructing a trajectory planning model, characterized in that, The method includes: Acquire third point cloud data of the target object, and fourth point cloud data of obstacles in the environment where the target object is located. The third point cloud data includes multiple three-dimensional coordinate point data of the surface of the target object, and the fourth point cloud data includes multiple three-dimensional coordinate point data of the surface of the obstacle. Based on the third point cloud data, a first feature vector of the target object surface is generated, and based on the fourth point cloud data, a second feature vector of the obstacle is generated. A conditional feature vector is obtained based on the first feature vector and the second feature vector; Based on the conditional feature vector and the noise trajectory, predicted noise information in the noise trajectory is generated. The noise trajectory is obtained by adding real noise information to the real trajectory. The real trajectory is the movement trajectory of the motion mechanism on the surface of the target object. Calculate the noise prediction loss value between the predicted noise information and the actual noise information, and construct a trajectory planning model based on the noise prediction loss value.

3. The method according to claim 2, characterized in that, The process of obtaining a conditional feature vector based on the first feature vector and the second feature vector includes: Perform a first linear transformation on the first feature vector to obtain the first query vector; A second linear transformation is performed on the second feature vector to obtain multiple first key vectors, and a third linear transformation is performed on the second feature vector to obtain a first value vector corresponding to each first key vector; Calculate the first similarity between the first query vector and each of the first key vectors; Based on the first similarity corresponding to the first key vector, a first weight parameter corresponding to the first value vector corresponding to the first key vector is determined, wherein the first similarity is positively correlated with the first weight parameter; Based on the first weight parameter corresponding to each first value vector, calculate the first weighted sum of the first value vectors, and obtain the conditional feature vector based on the first weighted sum.

4. The method according to claim 3, characterized in that, The process of obtaining the conditional feature vector based on the first weighted sum includes: The first feature vector and the second feature vector are concatenated to form a joint feature vector; The conditional feature vector is obtained based on the joint feature vector and the first weighted sum.

5. The method according to claim 2, characterized in that, The step of generating predicted noise information in the noise trajectory based on the conditional feature vector and the noise trajectory includes: The noise trajectory is subjected to a first linear transformation to obtain a second query vector; A second linear transformation is performed on the second feature vector to obtain multiple second key vectors, and a third linear transformation is performed on the second feature vector to obtain a second value vector corresponding to each second key vector; Calculate the second similarity between the second query vector and each of the second key vectors; Based on the second similarity corresponding to the second key vector, a second weight parameter corresponding to the second value vector corresponding to the second key vector is determined, wherein the second similarity is positively correlated with the second weight parameter; Based on the second weight parameter corresponding to each second value vector, calculate the second weighted sum of the second value vectors, and use the second weighted sum as the context vector; The predicted noise information is generated based on the conditional feature vector, the context vector, and the noise trajectory.

6. The method according to claim 2, characterized in that, The process of constructing a trajectory planning model based on the noise prediction loss value includes: Subtract the predicted noise information from the noise trajectory to obtain the denoised trajectory; Based on the denoised trajectory and the fourth point cloud data, the distance between each trajectory point in the denoised trajectory and the nearest obstacle is calculated, and the trajectory points whose corresponding distance values ​​are less than a preset threshold are determined as target points. Based on the distance value corresponding to the target point, the collision loss value corresponding to the target point is calculated, and the distance value is negatively correlated with the collision loss value; The trajectory planning model is constructed based on the weighted sum of the noise prediction loss value and the collision loss value.