Multi-axis robot motion trajectory intelligent planning method
By constructing a dynamic environment model and real-time monitoring and adjustment, the problem of multi-axis robotic arms being unable to avoid obstacles in dynamic environments has been solved. This has enabled accurate prediction of obstacles and physical feasibility of trajectories, improving the adaptability and safety of robotic arms in complex scenarios.
Patent Information
- Application Number
- CN202511256976.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing multi-axis robotic arm trajectory planning algorithms cannot update motion paths in real time to avoid obstacles, leading to safety hazards. Furthermore, they do not incorporate task objectives and initial robotic arm parameters into a unified optimization framework, resulting in generated trajectories that may exceed the physical capabilities of the robotic arm.
By constructing a dynamic environment model, combining obstacle future trajectory prediction and dynamic constraint optimization, the robot arm's motion trajectory is generated, and trajectory deviations are monitored and adjusted in real time, achieving adaptability and physical feasibility to the dynamic environment.
It significantly improves the real-time adaptability of robotic arms in complex scenarios, reduces the risk of path conflicts caused by sudden environmental changes, and ensures that the generated trajectory is both physically feasible and efficient.
Smart Images

Figure CN120791792B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automation control technology, and in particular to an intelligent planning method for the motion trajectory of a multi-axis robotic arm. Background Technology
[0002] With the rapid development of manufacturing and automation technology, multi-axis robotic arms are increasingly widely used, appearing in everything from traditional industrial manufacturing to emerging service robot fields. Especially in high-precision, repetitive tasks, multi-axis robotic arms demonstrate irreplaceable advantages. Early robotic arm control primarily relied on pre-programmed path planning, using a series of pre-set instructions to complete specific tasks.
[0003] Most existing trajectory planning algorithms rely on pre-defined static environment models, often failing to update the robotic arm's motion path in real time to avoid obstacles, leading to safety hazards and limiting the robotic arm's applicability in dynamic scenarios. Furthermore, existing technologies typically perform dynamic constraint optimization independently after generating the initial trajectory, without integrating the task objective and the robotic arm's initial parameters into a unified optimization framework. This fragmentation results in the generated trajectory potentially exceeding the robotic arm's physical capabilities. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides an intelligent planning method for the motion trajectory of a multi-axis robotic arm to solve the problems of poor environmental adaptability and low trajectory feasibility.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides an intelligent planning method for the motion trajectory of a multi-axis robotic arm, comprising: setting a task objective and initial parameters of the robotic arm; collecting environmental data to generate an environmental map; constructing a dynamic environment model; wherein the task objective includes target point coordinates and a task time window; and the initial parameters of the robotic arm include initial position and posture, joint angles, velocity, and acceleration; constructing a robotic arm trajectory generation model; generating a preliminary trajectory of the robotic arm based on the robotic arm trajectory generation model; checking the dynamic constraints of the preliminary trajectory of the robotic arm; optimizing the preliminary trajectory of the robotic arm; predicting the future trajectory of obstacles based on the dynamic environment model; generating a robotic arm motion trajectory by combining the optimized preliminary trajectory of the robotic arm and the future trajectory of obstacles; executing the robotic arm motion trajectory; monitoring the robotic arm motion state in real time; identifying trajectory deviations through a direct comparison method; and adjusting the robotic arm motion trajectory in real time.
[0008] As a preferred embodiment of the intelligent planning method for the motion trajectory of the multi-axis robotic arm described in this invention, wherein:
[0009] The steps for setting the task objectives and initial parameters of the robotic arm, collecting environmental data to generate an environmental map, and constructing a dynamic environment model are as follows:
[0010] Store the task objectives and initial parameters of the robotic arm as a task configuration file;
[0011] Environmental data includes point cloud data and image data;
[0012] Point cloud data and image data are preprocessed and fused using a multimodal registration method to generate a static environment map;
[0013] The YOLOv5 model is used to identify dynamic obstacles, and the LSTM model is used to predict the motion state of the dynamic obstacles to generate dynamic obstacle state information.
[0014] By integrating static environment maps and dynamic obstacle state information into a unified framework through a spatiotemporal alignment method, a dynamic environment model is constructed.
[0015] As a preferred embodiment of the intelligent planning method for the motion trajectory of a multi-axis robotic arm described in this invention, the specific steps for constructing a robotic arm trajectory generation model and generating a preliminary robotic arm trajectory based on the robotic arm trajectory generation model are as follows.
[0016] The input layer is defined based on the task configuration file, the feature extraction layer is defined based on the fully connected layer and the ReLU activation function, and the trajectory planning layer is defined using the RRT trajectory planning algorithm.
[0017] The trajectory optimization layer is defined using the gradient descent algorithm and a loss function;
[0018] A robotic arm trajectory generation model is constructed based on the input layer, feature extraction layer, trajectory planning layer, and trajectory optimization layer.
[0019] Input the task configuration file into the robotic arm trajectory generation model to generate the initial trajectory of the robotic arm.
[0020] As a preferred embodiment of the intelligent planning method for the motion trajectory of the multi-axis robotic arm described in this invention, wherein:
[0021] The dynamic constraints of the robot arm's initial trajectory are checked, and the initial trajectory is optimized. The specific steps are as follows.
[0022] Dynamic constraints include joint torque limits, joint velocity limits, and acceleration limits;
[0023] Compare the torque, velocity, and acceleration values of each joint of the robotic arm at each time point on the initial trajectory of the robotic arm with the dynamic constraints;
[0024] When the limits are exceeded, the initial trajectory of the robotic arm does not meet the dynamic constraints;
[0025] A linear interpolation algorithm is used to optimize joint angles, and a filtering algorithm is used to optimize joint velocity and acceleration.
[0026] As a preferred embodiment of the intelligent planning method for the motion trajectory of the multi-axis robotic arm described in this invention, wherein:
[0027] The specific steps for predicting the future trajectory of obstacles based on a dynamic environment model are as follows.
[0028] The dynamic obstacle state information is input into the dynamic environment model, and the dynamic environment model, combined with the Kalman filter prediction algorithm, predicts the future trajectory of the obstacle.
[0029] Mean squared error is used as an evaluation index for the prediction results of the future trajectory of obstacles, and the dynamic environment model is updated based on the evaluation index.
[0030] As a preferred embodiment of the intelligent planning method for the motion trajectory of the multi-axis robotic arm described in this invention, wherein:
[0031] The process of generating the robotic arm's motion trajectory by combining the optimized preliminary trajectory of the robotic arm and the future trajectory of the obstacles involves the following specific steps.
[0032] Based on the optimized preliminary trajectory of the robotic arm, the distance between the robotic arm and the obstacle is calculated using the distance collision detection method, and a collision risk analysis is performed.
[0033] Based on the collision risk analysis results, a preliminary trajectory of the robotic arm is planned and smoothed to generate the robotic arm's motion trajectory.
[0034] As a preferred embodiment of the intelligent planning method for the motion trajectory of the multi-axis robotic arm described in this invention, wherein:
[0035] The process involves executing the robotic arm's motion trajectory and monitoring its motion status in real time. Trajectory deviations are identified through a direct comparison method. The specific steps are as follows:
[0036] The robotic arm's motion trajectory and real-time monitoring data are synchronized to a unified timeline through a data synchronization mechanism.
[0037] The trajectory deviation is calculated by selecting the robotic arm parameters at the same time point, setting the parameter deviation threshold according to the task requirements, and comparing the trajectory deviation with the parameter deviation threshold.
[0038] As a preferred embodiment of the intelligent planning method for the motion trajectory of the multi-axis robotic arm described in this invention, wherein:
[0039] The real-time adjustment of the robotic arm's motion trajectory refers to determining an abnormal situation when the trajectory deviation exceeds the parameter deviation threshold, locating and analyzing the abnormal point through trajectory deviation analysis, and adjusting the robotic arm's motion trajectory in real time based on the analysis results.
[0040] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the intelligent planning method for the motion trajectory of a multi-axis robotic arm as described in the first aspect of the present invention.
[0041] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the intelligent planning method for the motion trajectory of a multi-axis robotic arm as described in the first aspect of the present invention.
[0042] The beneficial effects of this invention are as follows: by modeling the dynamic environment, it achieves accurate prediction of the trajectory of dynamic obstacles, significantly improves the real-time adaptability of the robotic arm in complex scenarios, and reduces the risk of path conflict caused by sudden environmental changes; by embedding dynamic constraints into the trajectory planning process, the generated trajectory has both physical feasibility and optimal task efficiency. Attached Figure Description
[0043] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 The flowchart shows a method for intelligent planning of motion trajectories for multi-axis robotic arms.
[0045] Figure 2 A flowchart for constructing a dynamic environment model.
[0046] Figure 3 A flowchart for constructing a robotic arm trajectory generation model.
[0047] Figure 4 This is a flowchart for real-time monitoring and adjustment. Detailed Implementation
[0048] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0049] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0050] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0051] Reference Figures 1-4 As one embodiment of the present invention, this embodiment provides an intelligent planning method for the motion trajectory of a multi-axis robotic arm, comprising the following steps:
[0052] S1. Set the task objectives and initial parameters of the robotic arm, collect environmental data to generate an environmental map, and build a dynamic environment model. The task objectives include the target point coordinates and the task time window. The initial parameters of the robotic arm include the initial position and posture, joint angles, speed and acceleration.
[0053] Store the task objectives and initial parameters of the robotic arm as a task configuration file;
[0054] It should be noted that the task objectives and initial parameters of the robotic arm are stored in a configuration file in JSON key-value pair format, and the configuration file is saved in ASCII text format.
[0055] Environmental data includes point cloud data and image data;
[0056] It should be noted that point cloud data refers to the set of surface points of all objects in the environment space acquired by LiDAR, with each surface point represented by three-dimensional coordinates; image data refers to the two-dimensional visual information of the environment captured by RGB cameras, including pixel-level color (RGB values), texture and coordinate information.
[0057] Point cloud data and image data are preprocessed and fused using a multimodal registration method to generate a static environment map;
[0058] It should be noted that point cloud data is denoised by removing outliers using statistical filtering algorithms, while image data is denoised by smoothing pixel noise using Gaussian filtering. Image pixel coordinates are back-projected into camera 3D coordinates using camera intrinsic parameters, and then transformed to the LiDAR coordinate system using a camera rotation matrix and translation vector. The PCA algorithm is used to extract geometric features from the point cloud data, and the SIFT algorithm is used to extract semantic features from the image data. An initial coordinate correspondence between point cloud data and image data is established based on the rotation matrix and translation vector. The ICP algorithm is used to iteratively optimize the rotation matrix and translation vector, minimizing the Euclidean distance error between corresponding points in the point clouds. Moving targets are detected using the YOLOv5 model, and the corresponding point clouds are filtered. Static point clouds are downsampled using voxel sampling, overlapping regions are merged, and semantic features of the image data are associated with corresponding voxels to generate a static environment map.
[0059] It should also be noted that the rotation matrix describes the rotation relationship between the lidar coordinate system and the camera coordinate system, representing the rotation angle of the lidar coordinate system around each axis; the translation vector describes the displacement between the origin of the lidar coordinate system and the origin of the camera coordinate system, representing the position offset of the lidar relative to the camera.
[0060] The YOLOv5 model is used to identify dynamic obstacles, and the LSTM model is used to predict the motion state of the dynamic obstacles to generate dynamic obstacle state information.
[0061] It should be noted that the image data is input into the YOLOv5 model, the batch size, learning rate, and training epochs are set, and CIoU is used as the loss function. Features are extracted through the backbone network, multi-scale features are fused through the Neck network, and finally the dynamic obstacle state information is output by the Head network. The loss function is calculated, and the accuracy of the YOLOv5 model is updated through the Adam optimizer until the maximum number of training epochs is reached. The YOLOv5 model is then loaded, the size (in pixels) of the input image and the confidence threshold are set, and the image data is input into the YOLOv5 model. In this model, dynamic obstacle state information is generated, including category labels, dynamic obstacle bounding box center coordinates, dynamic obstacle timestamps, and confidence scores. Based on the dynamic obstacle state information output by the YOLOv5 model, dynamic obstacle state information of consecutive frames is collected at fixed time intervals to form time series segments. Time series data is constructed and input into the LSTM model to generate position predictions for the next two steps. The current frame position detected by the YOLOv5 model and the future position predicted by the LSTM model are fused using Kalman filtering to generate dynamic obstacle state information.
[0062] Static environment maps and dynamic obstacle state information are integrated into a unified framework using a spatiotemporal alignment method to construct a dynamic environment model;
[0063] It should be noted that the timestamps of the static environment map and the dynamic obstacle state information are aligned to generate a unified timeline; the center coordinates of the dynamic obstacle bounding boxes are converted to the global coordinates of the static environment map using the calibration parameters built into the sensor to define a spatiotemporal alignment layer; if the update time interval of the dynamic obstacle state information is inconsistent with the update time interval of the static environment map, the time resolution of the dynamic obstacle state information is adjusted by downsampling or interpolation; the center coordinates of the dynamic obstacle bounding boxes are aligned to the global coordinates of the static environment map using a coordinate system transformation alignment method, and the floor function is used to map the continuous coordinates to discrete grid cells to form the dynamic obstacle grid coordinates. If the bounding box center coordinates exceed the range of the static environment map, the grid boundary of the static environment map is expanded, and the grid coordinates of the dynamic obstacles are aligned with the grid coordinates of the static environment map to form a unified spatial resolution. The geometric and speech features in the static environment map are mapped to a unified time axis, and dynamic obstacle state information is inserted under the corresponding timestamp. The static environment map and the dynamic obstacle state information are merged to form a dynamic environment model that includes all obstacle information under the timestamp and global coordinates. Each time new dynamic obstacle state information arrives, only the dynamic obstacle state information at the corresponding timestamp is updated. The geometric and semantic features in the static environment map are only refreshed when the static environment map is updated.
[0064] It should also be noted that the dynamic environment model uses mean squared error as the loss function, Adam as the optimizer, sets the initial learning rate and training epochs, and inputs the static environment map and dynamic obstacle state information into the dynamic environment model for training until the mean squared error reaches its minimum value, thus generating a trained dynamic environment model.
[0065] S2. Construct a robotic arm trajectory generation model, generate a preliminary robotic arm trajectory based on the robotic arm trajectory generation model, check the dynamic constraints of the preliminary robotic arm trajectory, and optimize the preliminary robotic arm trajectory.
[0066] The input layer is defined based on the task configuration file, the feature extraction layer is defined based on the fully connected layer and the ReLU activation function, and the trajectory planning layer is defined using the RRT trajectory planning algorithm.
[0067] It should be noted that the number of input layer nodes is determined based on the target point coordinates and the type and dimension of the robot arm's initial parameters in the task configuration file; multiple fully connected layers are used to implement feature extraction, each containing a certain number of neurons connected by weights and biases; ReLU activation function is used between fully connected layers to achieve nonlinearity; the RRT trajectory planning algorithm defines a tree node structure, with each node containing information such as the robot arm's joint angles and positions; new nodes are generated in the configuration space through random sampling, and the new nodes are connected to existing nodes in the tree to implement the RRT trajectory planning algorithm logic; the RRT trajectory planning algorithm is used to generate the initial obstacle avoidance trajectory, which includes trajectory parameters (initial position, velocity, and acceleration); the trajectory planning layer has multiple MLP layers, each containing a certain number of neurons connected by weights and biases.
[0068] The trajectory optimization layer is defined using the gradient descent algorithm and a loss function;
[0069] It should be noted that the localization loss function is defined based on the initial obstacle avoidance path and the target point coordinates; the gradient of the localization loss function with respect to the trajectory parameters is calculated through backpropagation, the initial learning rate is set to 0.01, and a decay strategy is configured (the trajectory parameters are decayed to 0.9 times their original value every 100 iterations) to update the trajectory parameters.
[0070] A robotic arm trajectory generation model is constructed based on the input layer, feature extraction layer, trajectory planning layer, and trajectory optimization layer.
[0071] It should be noted that the task configuration file is divided into training, validation, and test sets; all parameters of the robotic arm trajectory generation model (weights and biases of fully connected layers and trajectory parameters) are randomly initialized, and the training epochs, batch size, and learning rate of the robotic arm trajectory generation model are set; the training set data is divided according to the set batch size and input into the robotic arm trajectory generation model, and after forward propagation, the trajectory optimization layer outputs the initial trajectory of the robotic arm; the robotic arm motion is simulated using the robotic arm dynamics simulation platform Gazebo to generate the simulated trajectory of the robotic arm, and the error between the initial trajectory and the simulated trajectory of the robotic arm is calculated using the localization loss function; the gradient of the loss with respect to the parameters of each layer of the robotic arm trajectory generation model is calculated using the backpropagation algorithm, starting from the output layer and calculating the gradient of each layer sequentially. The process continues until the gradients of relevant parameters at each layer are calculated. The Adam optimizer is then used to update the parameters of the robotic arm trajectory generation model based on these gradients. The Adam optimizer adjusts the learning rate based on the gradient information of each parameter and calculates the first and second moment corrections of the gradients to update the weights and biases of the robotic arm trajectory generation model. After reaching the set number of training epochs, a validation set is input into the robotic arm trajectory generation model, and the loss and accuracy of the model on the validation set are calculated. If the performance of the robotic arm trajectory generation model on the validation set no longer improves, the learning rate and batch size need to be adjusted. Finally, a test set is input into the robotic arm trajectory generation model, and the accuracy of the trajectory is used to determine whether the model has achieved the expected results. The expression is as follows:
[0072] ;
[0073] in, This indicates the accuracy of the robotic arm's initial trajectory; This represents the total number of trajectory points in the initial trajectory of the robotic arm; The index variable represents the trajectory points of the robotic arm's initial trajectory, and its value ranges from 1 to... ; The first part represents the robotic arm trajectory generation model. Coordinates of a trajectory point; Represents the coordinates of the target point of the mission objective; This represents the error tolerance parameter, with a value range of 0.05-0.2;
[0074] when When the time is right, it indicates that the robotic arm trajectory generation model meets the standard; when If the value is less than 1, it indicates that the robotic arm trajectory generation model is not up to standard and requires increasing the number of iterations or reducing the learning rate.
[0075] Input the task configuration file into the robotic arm trajectory generation model to generate the initial trajectory of the robotic arm;
[0076] Dynamic constraints include joint torque limits, joint velocity limits, and acceleration limits;
[0077] It should be noted that joint torque limit refers to the maximum torque value that each joint can safely output, exceeding which may cause motor overload or mechanical damage; joint speed limit refers to the maximum angular velocity allowed for joint movement, to avoid vibration or loss of control of the robotic arm; acceleration limit refers to the maximum allowable value of joint angular acceleration, to avoid mechanical shock or control delay caused by rapid acceleration and deceleration.
[0078] Compare the joint torque, joint velocity, and joint acceleration values of each joint of the robotic arm at each time point on the initial trajectory of the robotic arm with the maximum allowable values;
[0079] It should be noted that, according to the robot arm product specifications, the maximum permissible torque, maximum permissible speed, and maximum permissible acceleration values of the robot arm are specified. For each joint at each time point on the initial trajectory of the robot arm, the current joint torque value is calculated using the dynamic equation, and the current joint speed and current joint acceleration value are calculated using the kinematic differential equation. The calculated joint torque, joint speed, and joint acceleration values are compared one by one with the corresponding maximum permissible torque, maximum permissible speed, and maximum permissible acceleration values of the joint. If any joint torque, joint speed, or joint acceleration value exceeds the maximum permissible limit, the joint is marked as violating the dynamic constraints.
[0080] When the limits are exceeded, the initial trajectory of the robotic arm does not meet the dynamic constraints;
[0081] A linear interpolation algorithm is used to optimize joint angles, and a filtering algorithm is used to optimize joint velocity and acceleration.
[0082] It should be noted that for each joint exceeding the limit, adjacent non-limit time points are selected in the initial trajectory of the robotic arm as interpolation reference points. A linear interpolation algorithm is used to calculate the corrected joint torque value at the limit-exceeding time point, expressed as follows:
[0083] ;
[0084] in, This represents the optimized joint torque value; This indicates the joint torque value at the starting point of the interpolation. This indicates the joint torque value at the end point of the interpolation; This indicates the moment when optimization is needed. Indicates the time of the interpolation start point; Indicates the time of the interpolation endpoint;
[0085] A second-order low-pass filter is used to smooth the joint velocity; the expression is as follows:
[0086] ;
[0087] in, This represents the optimized speed value. Indicates the current time point Speed value; Indicates the current time point The velocity value at the previous time point; Indicates the current time point; This indicates the point in time preceding the current point in time. This represents the joint velocity smoothing coefficient, and its value range is... , is a parameter that controls the filtering strength. The smaller the value, the smoother the filtered velocity value;
[0088] The joint acceleration is optimized using a Savitzky filter, expressed as follows:
[0089] ;
[0090] in, This represents the optimized acceleration value; It is the size of the filter window, representing the current time point. front and back The acceleration values used in the calculation within each time step; It is half the width of the filter window, representing the current time point. front and back The range of time steps; This represents the relative time index within the filtering window, used to iterate through the current time point. front and back The acceleration values at each time step, with a range of [value missing]. arrive ; This represents the fitting coefficients, used to perform a weighted average of the acceleration values within the filtering window; Indicates the current time point The acceleration value; Indicates the current time point.
[0091] S3. Predict the future trajectory of obstacles based on the dynamic environment model, and generate the robot arm's motion trajectory by combining the optimized preliminary trajectory of the robot arm and the future trajectory of the obstacles.
[0092] The dynamic obstacle state information is input into the dynamic environment model, and the dynamic environment model, combined with the Kalman filter prediction algorithm, predicts the future trajectory of the obstacle.
[0093] It should be noted that the state information of each dynamic obstacle is organized into a dynamic obstacle state vector containing position, velocity, and acceleration. A dynamic obstacle state transition matrix is established based on the motion characteristics of the dynamic obstacle (uniform motion or uniformly accelerated motion). A Kalman filter prediction algorithm is applied to calculate the predicted dynamic obstacle state value for the next time step using the dynamic obstacle state transition matrix. The actual dynamic obstacle state value at the current time is obtained from sensors, and the Kalman gain is calculated. The dynamic obstacle state vector is updated based on the Kalman gain. Using the updated dynamic obstacle state vector, the predicted dynamic obstacle state vectors for multiple future time steps are recursively calculated using the dynamic obstacle state transition matrix. The predicted dynamic obstacle state vectors are then converted into a specific sequence of trajectory points using a time-stepping method. Each trajectory point contains position, velocity, and acceleration information.
[0094] The mean square error is used as an evaluation index for the prediction results of the obstacle's future trajectory, and the dynamic environment model is updated based on the evaluation index.
[0095] It should be noted that the mean square error is calculated based on the dynamic obstacle state prediction vector and the dynamic obstacle state values observed by the sensors, and the expression is as follows:
[0096] ;
[0097] in, It is the mean square error, which represents the deviation between the predicted dynamic obstacle state vector and the dynamic obstacle state value observed by the sensor; This represents the total number of time steps involved in the error calculation; This represents the time step index, with a value range of 1- ; Indicates the first The prediction error vector at each time step. , Indicates the first The dynamic obstacle state prediction vector at each time step Indicates the first Dynamic obstacle state values observed by sensors at each time step;
[0098] The error threshold is set to 0.52. At that time, increase the diagonal elements of the dynamic obstacle state transition matrix, generate new dynamic obstacle prediction trajectories using the updated dynamic environment model, and recalculate. until Generate the latest future trajectory of obstacles.
[0099] Based on the optimized preliminary trajectory of the robotic arm, the distance between the robotic arm and the obstacle is calculated using the distance collision detection method, and a collision risk analysis is performed.
[0100] It should be noted that the initial trajectory points of the robotic arm are divided into discrete point sets according to the same time step. The minimum Euclidean distance between each trajectory point and all obstacles is calculated. Based on the minimum Euclidean distance, the minimum safe distance between the robotic arm's end effector and the obstacle surface is calculated. The static safety threshold is set to 0.2 meters. When the minimum safe distance... At 0.2 meters, the risk level is low, and the minimum safe distance is... At a depth of 0.2 meters, the risk level is high.
[0101] Based on the collision risk analysis results, a preliminary trajectory of the robotic arm is planned and smoothed to generate the robotic arm's motion trajectory.
[0102] It should be noted that if the risk level is low, the original trajectory points of the robotic arm remain unchanged; if the risk level is high, the reverse direction vector from the trajectory point at the minimum safe distance to the obstacle is calculated, and the position of the trajectory point is adjusted to move the robotic arm away from the obstacle; the adjusted initial trajectory of the robotic arm is divided into several segments, each containing continuous trajectory points, and a Bezier curve fitting smoothing algorithm is applied to each segment to smooth the initial trajectory of the robotic arm and generate the robotic arm motion trajectory.
[0103] S4. Execute the robotic arm's motion trajectory and monitor its motion status in real time. Identify trajectory deviations through direct comparison and adjust the robotic arm's motion trajectory in real time.
[0104] The robotic arm's motion trajectory and real-time monitoring data are synchronized to a unified timeline through a data synchronization mechanism.
[0105] It should be noted that the timestamps of all devices are synchronized via a network time protocol; the robotic arm's motion trajectory and real-time monitoring data are used to generate corresponding continuous time series using a linear interpolation method; for each monitoring data point in the real-time monitoring data time series, the corresponding time point is found in the robotic arm's motion trajectory time series to establish a correspondence for real-time collision detection and environmental interaction analysis; when the time series has nonlinear distortion, a dynamic time warping algorithm is used to calculate the optimal time alignment path; and the interpolated robotic arm motion trajectory and real-time monitoring data are merged along a unified time axis using a timestamp matching method to form a comprehensive dataset containing information such as position, speed, and obstacle status.
[0106] Calculate the trajectory deviation by selecting the robot arm parameters at the same time point, set the parameter deviation threshold according to the task requirements, and compare the trajectory deviation with the parameter deviation threshold.
[0107] It should be noted that trajectory deviation includes spatial distance deviation, relative velocity deviation, and angular deviation, while parameter deviation thresholds include distance deviation threshold, velocity deviation threshold, and angular deviation threshold. The robot arm motion trajectory parameters, including position coordinates, velocity components, and joint angles, as well as obstacle state parameters, including obstacle position, velocity components, and size parameters, are extracted from the comprehensive dataset. The trajectory deviation between the robot arm's end effector and the obstacle is calculated. Parameter deviation thresholds are set according to task requirements, and the calculated trajectory deviations are compared with these thresholds. If each trajectory deviation is less than the threshold, the robot arm's motion trajectory is deemed safe; if any trajectory deviation exceeds the limit, the robot arm's motion trajectory is deemed risky and requires adjustment.
[0108] Real-time adjustment of the robotic arm's motion trajectory means that when the trajectory deviation exceeds the parameter deviation threshold, it is judged as an abnormal situation. The abnormal point is located and analyzed by the trajectory deviation analysis method, and the robotic arm's motion trajectory is adjusted in real time based on the analysis results.
[0109] It should be noted that the timestamp of the abnormal situation is recorded with millisecond-level accuracy. Based on the position coordinates in the robotic arm's motion trajectory, the spatial position of the robotic arm's end effector at the time of the abnormal situation is determined, and the state parameters of each joint angle and angular velocity at the time of the abnormal situation are extracted. It is analyzed whether the trajectory deviation is caused by the approach of an obstacle, and it is verified whether the joint torque, velocity, and acceleration at the time of the abnormal situation exceed the physical limitations of the robotic arm. The adjustment method is selected according to the cause of the abnormality. If it is because of the approach of an obstacle, the robotic arm's motion trajectory needs to be replanned to bypass the obstacle. If it is because it exceeds the physical limitations of the robotic arm, the dynamic constraints of the robotic arm need to be readjusted. The adjusted robotic arm motion trajectory is smoothed using Bézier curves.
[0110] This embodiment also provides a computer device applicable to the intelligent planning method for the motion trajectory of a multi-axis robotic arm, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the intelligent planning method for the motion trajectory of a multi-axis robotic arm as proposed in the above embodiment.
[0111] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0112] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the intelligent planning method for the motion trajectory of a multi-axis robotic arm as proposed in the above embodiments. The 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 Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0113] In summary, this invention achieves accurate prediction of the trajectory of dynamic obstacles through dynamic environment modeling, significantly improving the real-time adaptability of the robotic arm in complex scenarios and reducing the risk of path conflicts caused by sudden environmental changes; by embedding dynamic constraints into the trajectory planning process, the generated trajectory combines physical feasibility with optimal task efficiency.
[0114] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for intelligent planning of motion trajectories for multi-axis robotic arms, characterized by: Comprising, setting task targets and initial parameters of the robot arm, collecting environment data to generate an environment map, and constructing a dynamic environment model, the task targets including target point coordinates and a task time window, and the initial parameters of the robot arm including initial position and posture, joint angles, speed, and acceleration; the dynamic environment model is constructed by the following specific steps, storing the task targets and initial parameters of the robot arm as a task configuration file; the environment data includes point cloud data and image data; the point cloud data and image data are preprocessed and fused using a multi-modal registration method to generate a static environment map; a YOLOv5 model is used to identify dynamic obstacles, and an LSTM model is used to predict the motion state of the dynamic obstacles to generate dynamic obstacle state information; the static environment map and the dynamic obstacle state information are integrated into a unified framework through a spatio-temporal alignment method to construct the dynamic environment model; constructing a robot arm trajectory generation model, and generating a preliminary robot arm trajectory based on the robot arm trajectory generation model, by the following specific steps, defining an input layer based on the task configuration file, defining a feature extraction layer based on a fully connected layer and a ReLU activation function, and defining a trajectory planning layer using an RRT trajectory planning algorithm; a trajectory optimization layer is defined using a gradient descent algorithm and a loss function; the robot arm trajectory generation model is constructed according to the input layer, the feature extraction layer, the trajectory planning layer, and the trajectory optimization layer; the task configuration file is input into the robot arm trajectory generation model to generate the preliminary robot arm trajectory; checking the dynamic constraints of the preliminary robot arm trajectory, and optimizing the preliminary robot arm trajectory, by the following specific steps, the dynamic constraints include joint torque limits, joint speed limits, and acceleration limits; the torque value, speed value, and acceleration value of each joint of the robot arm at each time point on the preliminary robot arm trajectory are compared with the dynamic constraints; when the limits are exceeded, the preliminary robot arm trajectory does not meet the dynamic constraints; the joint angle is optimized using a linear interpolation algorithm, and the speed and acceleration of the joint are optimized using a filtering algorithm; predicting the future trajectory of the obstacle according to the dynamic environment model, combining the optimized preliminary robot arm trajectory and the future trajectory of the obstacle to generate a robot arm motion trajectory; executing the robot arm motion trajectory, and monitoring the motion state of the robot arm in real time, identifying the trajectory deviation by direct comparison, and adjusting the robot arm motion trajectory in real time. 2.The multi-axis robot motion trajectory intelligent planning method of claim 1, wherein: the specific steps of predicting the future trajectory of the obstacle according to the dynamic environment model are as follows, the dynamic environment model combines a Kalman filter prediction algorithm to predict the future trajectory of the obstacle; the mean square error is used as an evaluation index for the prediction result of the future trajectory of the obstacle, and the dynamic environment model is updated according to the evaluation index. 3.The method of claim 2, wherein: the specific steps of combining the optimized preliminary robot arm trajectory and the future trajectory of the obstacle to generate a robot arm motion trajectory are as follows, based on the optimized preliminary robot arm trajectory, the distance between the robot arm and the obstacle is calculated using a distance collision detection method, and a collision risk analysis is performed; the preliminary robot arm trajectory is planned according to the collision risk analysis result, and is smoothed to generate a robot arm motion trajectory. 4.The method of claim 3, wherein: The execution mechanical arm motion trajectory, and the mechanical arm motion state is monitored in real time, the trajectory deviation is identified through direct comparison method, the specific steps are as follows, The mechanical arm motion trajectory and real-time monitoring data are synchronized to a unified time axis through a data synchronization mechanism. The trajectory deviation is calculated by selecting the mechanical arm parameters at the same time point, the parameter deviation threshold is set according to the task requirement, and the trajectory deviation is compared with the parameter deviation threshold.
5. The multi-axis robotic arm motion trajectory intelligent planning method of claim 1, wherein: The real-time adjustment of the mechanical arm motion trajectory refers to that when the trajectory deviation exceeds the parameter deviation threshold, it is determined as an abnormal situation, the abnormal point is positioned and analyzed through the trajectory deviation analysis method, and the mechanical arm motion trajectory is adjusted in real time according to the analysis result. 6.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is characterized in that: The processor executes the computer program to realize the steps of the multi-axis mechanical arm motion trajectory intelligent planning method in any one of claims 1-5.
7. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program is executed by the processor to realize the steps of the multi-axis mechanical arm motion trajectory intelligent planning method in any one of claims 1-5.
Citation Information
Patent Citations
Coating production line optimization method based on robot trajectory optimization
CN115716264A
Method to incorporate complex physical constraints in path-constrained trajectory planning for serial-link manipulator
US20220032461A1
Cited By
Multi-axis mechanical arm precise insect suction control method based on low-power-consumption intelligent recognition
CN121552380A