Mechanical arm joint space trajectory planning method based on model prediction path integration

By using a model-based prediction path integral method, combined with the configuration signed distance function, the reliability problem of trajectory planning of the robotic arm in an unknown environment is solved, and safe, smooth, and fast trajectory generation in a highly dynamic, high-dimensional space is achieved. Meet the movement requirements of multi-degree-of-freedom robotic arms.

CN118752484AActive Publication Date: 2024-10-11TIANJIN UNIV

Patent Information

Application Number
CN202410927406.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-10-11
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

Existing robot arm trajectory planning methods are difficult to provide reliable solutions in unknown environments. Especially in highly dynamic and high-dimensional configuration spaces, the calculation amount is large, the convergence speed is slow, and it is easy to fall into local minima, making it impossible to obtain the optimal trajectory. untie.

Method used

The model prediction path integral (MPPI) method is used to estimate the distance between the manipulator and the obstacle and its gradient through the configuration signed distance function (CSDF) to generate the global optimal trajectory. The dynamic model is used to predict the future state trajectory, and the weighted average is used to predict the future state trajectory. Optimize control input to achieve safe, smooth and fast robot arm joint space trajectory planning.

Benefits of technology

It achieves fully autonomous collision distance estimation and global optimal trajectory generation in an unknown environment. The generated trajectory is safe and efficient, and can ensure safe, fast and efficient movement in multi-degree-of-freedom manipulator motion planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118752484A_ABST
    Figure CN118752484A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of mechanical arm joint space trajectory planning, and provides a mechanical arm joint space trajectory planning method based on model prediction path integration to achieve mechanical arm joint space trajectory optimization planning. The joint configuration of the mechanical arm is utilized, and according to the configuration of the mechanical arm and the point cloud of the scene, the estimated value of the distance from the whole mechanical arm body to the nearby obstacle and the gradient of the distance is obtained by utilizing a configuration sign distance function CSDF; then, on the basis of a model prediction path integration method, a rapid, online and global trajectory generator is constructed, initial and target mechanical arm configurations are received, and the collision cost of the current mechanical arm configuration space is estimated according to the distance from a whole mechanical arm body to a nearby obstacle and the estimated value of the gradient of the whole mechanical arm body; and a global optimal track is generated to be executed by the mechanical arm. The method is mainly applied to mechanical arm design and manufacturing occasions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of robot arm joint space trajectory planning, and specifically relates to a method for fast calculation of robot arm configuration space distance and generation of robot arm joint space trajectory. In particular, it relates to a robot arm joint space trajectory planning method based on model prediction path integral Background Art

[0002] The robot arm is the most widely used automated mechanical device in the field of robotics. As a complex system with high precision, multiple inputs and multiple outputs, high nonlinearity, and strong coupling, it is currently widely used to perform various tasks due to its unique operational flexibility. It has played a huge role in industrial manufacturing, medical treatment, entertainment services, military, semiconductor manufacturing, and space exploration, and has become an indispensable part of completing complex tasks in the industry. Motion planning is one of the necessary conditions for the normal operation of the robot arm. Excellent planning algorithms will make the operation of the robot arm more stable and efficient, meeting the needs of various task scenarios. Therefore, in order to obtain better working performance, motion planning for such systems has always been one of the key areas of robotics research. Developing efficient motion planning algorithms and generating safe and smooth motion trajectories are crucial for the robot arm to complete tasks efficiently.

[0003] Regarding the trajectory planning of the manipulator, it is divided into two types according to the planning object: joint space trajectory planning and Cartesian space trajectory planning. Joint space trajectory planning obtains the desired trajectory by establishing a function of the joint angle variable with respect to time. This method has a small amount of calculation and can avoid the situation where there is no solution, but it cannot intuitively control the trajectory of the end effector, which is not ideal in actual operation; while Cartesian space trajectory planning first determines the trajectory of the end effector, and then obtains the relationship between the corresponding joint variables and time variables through inverse kinematics. This method requires a large amount of inverse kinematics solution, which is large in calculation and may cause singular joint angles, making it impossible to plan an executable trajectory. The two methods have their own advantages and disadvantages. For the problem of trajectory planning of the manipulator, they need to be selected according to the specific situation. Classical motion planning algorithms, such as artificial potential field method, sampling-based and bio-inspired heuristic methods, have been widely used to solve motion planning problems. However, most of these methods fail in high-dynamic and high-dimensional configuration spaces, have large amount of calculation and slow convergence speed, which is not conducive to real-time implementation. Domestic and foreign scholars have carried out a lot of research on the problem of trajectory planning of the manipulator. In 2017, Nguyen et al. proposed a fast heuristic planning method to enhance the real-time control of the robot arm, but the planned trajectory has low accuracy. In 2017, Walch et al. used quadratic spline curves for interpolation planning, calculated the obtained trajectory parabola, and the generated trajectory met the constraints. In 2019, Li et al. restricted the joint movement speed and acceleration to reduce joint jitter, and proposed a smooth straight line trajectory planning algorithm. In 2018, Huang et al. proposed a trajectory planning method with optimal acceleration. First, fifth-order B-splines were used to interpolate the trajectory in the joint space. The generated trajectory met the conditions of continuity and operational constraints. In 2021, Ma et al. formulated the time-optimal trajectory planning as a convex optimization problem, while considering the limitations of jerk and torque, which can effectively suppress acceleration mutations and make the velocity curve smoother.

[0004] In summary, domestic and foreign scholars have conducted fruitful research on the problem of robot trajectory planning and achieved rich research results. Although many advances have been made in trajectory planning, it is difficult for existing planning methods for reactive motion of robot arms to provide reliable solutions in unknown environments. Traditional planning methods, such as artificial potential field method or navigation function method, can usually quickly update the trajectory to achieve the purpose of staying away from obstacles. However, since such methods rely on gradient solutions, they are easily affected by local minima and cannot obtain the optimal solution for the trajectory. Therefore, the present invention proposes a trajectory planning method based on model prediction path integral, which guides the robot arm away from the local minimum caused by obstacles by sampling in the joint space of the robot arm, thereby achieving safe, smooth and fast generation of robot arm joint space trajectories. Summary of the invention

[0005] In order to overcome the shortcomings of the prior art, the present invention aims to propose a robot joint space trajectory planning method based on model predictive path integral (MPPI) to achieve the optimization planning of the robot joint space trajectory. To this end, the technical solution adopted by the present invention is a robot joint space trajectory planning method based on model predictive path integral, and the steps are as follows: first, using the joint configuration of the robot, according to the configuration of the robot and the point cloud of the scene, using the configuration signed distance function CSDF, the estimated value of the distance from the entire robot body to nearby obstacles and its gradient is obtained; then, based on the model predictive path integral method, a fast, online, global trajectory generator is constructed, receiving the starting and target robot configurations, and estimating the collision cost of the current robot configuration space according to the estimated value of the distance from the entire robot body to nearby obstacles and its gradient, and generating a global optimal trajectory for the robot to execute.

[0006] The specific steps are as follows:

[0007] Part 1: Calculation method of space distance of robot configuration:

[0008] A method for generating control points on the surface of the robot body, and determining whether the robot will collide with the surrounding environment by calculating the configuration space signed distance function between the generated control points and the surrounding point cloud. The obtained data can be provided to the second part of the model-predicted path integral-based planner for generating collision-free trajectories;

[0009] The point cloud is composed of the surface triangular mesh sampling points of an object of known geometric shape and the point cloud obtained by the depth camera. The obtained point cloud is first downsampled and denoised to reduce the number of points and increase the accuracy of the points. The processed point cloud is unified into a base coordinate system through coordinate transformation to obtain the current working scene point cloud of the robot arm consisting of S points {s k ∈R 3} k=1,…,S

[0010] Current configuration of the robot arm q i :={θ1,θ2,θ3,θ4,θ5,θ6,θ7} is known, where θ1-θ7 are the angle values ​​of the seven joints, which uniquely determine the current posture of the robot. In order to quickly calculate the CSDF value of the current posture, it is necessary to sample some points on the surface of the robot, and indirectly estimate the distance between the robot body and the surrounding obstacles through the sampled points. First, select a set of points that coincide with the joints of the robot, and calculate the position of the given robot configuration in the workspace by using GPU-accelerated forward kinematics. Then, linear interpolation is performed between the positions of the selected points to obtain the current configuration q i A set of C sampling points {cj (q i )∈R 3} j=1,...,C If the robot arm is used to perform grasping tasks, obstacle avoidance of the end effector during grasping is also crucial. To this end, if the geometric shape of the grasped object is known, sampling is performed on the surface of the object. After obtaining the sampling points, they are transformed through forward kinematics and added to the sampling points of the robot arm body. The sampling points on the surface of the robot arm are obtained by the above method. j (q i )∈R 3} j=1,...,C And the working scene point cloud k ∈R 3} k=1,...S After that, the distance between the robot body and the environmental point cloud is estimated. The estimation steps are as follows:

[0011] First, define any point x∈R in space 3 The signed distance function value SDF is:

[0012]

[0013] Among them, ρ∈R + is a very small normal value, ensuring the smoothness of the entire set at zero;

[0014] Then, the CSDF module is used to estimate the minimum distance between the current robot configuration and the environmental point cloud. In the robot workspace, given the configuration q i :={θ1,θ2,θ3,θ4,θ5,θ6,θ7}, we can get the sampling points {c j (q i )∈R 3} j=1,...,C , the configuration signed distance function is defined as:

[0015]

[0016] where r∈R + Is the safety threshold. This module can obtain the distance query between the current robot configuration and the environment point cloud and provide it to the planner for trajectory generation. A positive CSDF means that the current robot configuration will not collide with the environment, otherwise it means that the robot will collide with the environment.

[0017] The second part is the method of generating trajectories in the joint space of the robot: according to the distance between the robot configuration and the environmental point cloud obtained by the CSDF module, the trajectory generation method based on MPPI is used to solve the collision-free trajectory in the joint space of the robot: the dynamic model of the robot is used to predict the dynamics of the robot in the future, and multiple control input sequences are generated through sampling. These sequences are used to predict multiple state trajectories in the future. Each sampled trajectory will be evaluated according to a certain cost function. The lower the weight / the higher the cost, the smaller the impact on the final control input. Then, the trajectory is weighted averaged according to the weight to obtain the final control input. In each iteration, the new sampled trajectory will be adjusted based on the result of the previous iteration, so as to gradually optimize the control input sequence and approach the optimal solution.

[0018] The MPPI model is a discrete-time continuous state system q t+1 =q t +e t ,q t and q t+1 They represent the configurations of the robot at time t and time t+1, respectively, and e t ~N(d t ,Σ),e t It means that the mean is d t , a Gaussian distribution sequence with covariance Σ, where in each iteration, the control domain is given as H and the nominal configurations q0,...,q H , the corresponding nominal displacement d0,...,d H-1 , sample to obtain M displacement sequences E j :={e j,0 ,...,e j,H-1}, j = 1, ..., M, the sampling results are forward calculated through the system model to obtain the rolling cost C (E j ), and then assign certain weights to the M rolling costs to obtain their weighted average, and finally obtain the displacement sequence obtained by the iteration at time t

[0019]

[0020] where α d is a smoothing parameter, e j,t Indicates E j The value at time t, other related parameters are defined as follows:

[0021]

[0022]

[0023] Among them, λ>0 is a smoothing coefficient;

[0024] After each iteration, the displacement sequence obtained by weighted calculation Update the current nominal configuration The updated configuration will be sent to the trajectory actuator to drive the robot arm to move according to the planned trajectory;

[0025] For the rolling cost C(E j ) can be divided into path constraints C r (E j ) and the thrust constraint C terminal (E j ), the specific forms of each constraint are as follows:

[0026] (1) Path constraint C r (E j )

[0027] Path Constraint C r (E j ) is mainly used to penalize the total length of the trajectory C lenth and the collision between the robot and the environment C coll , defined as C r (E j ):=C lenth (E j )+C coll (E j ), where C lenth (E j ) represents the total length of the running track currently sampled by the robot arm, C coll (E j ) is a distance-related value, and the mathematical definitions of its components are as follows:

[0028]

[0029]

[0030] Among them, ω lenth ,ω coll >0 is the adjustment coefficient, the collision cost C coll (E j ) is calculated by the CSDF module in the first part:

[0031]

[0032] Where δ is the distance threshold. When the distance value is less than or equal to δ, C coll (q j,t ,e j,t ) is defined as a constant value of 1. On the contrary, the larger the distance value, the smaller the possibility of collision between the robot arm and the environmental point cloud. coll (qj,t ,e j,t ) is also correspondingly smaller;

[0033] (2) Thrust constraint C terminal (E j )

[0034] The purpose of the break constraint is to penalize the distance between the manipulator and the final target point. The break constraint is defined as the manipulator configuration q obtained by the model output of the control sequence obtained by the current sampling. j,H With the target configuration q goal The distance is mathematically defined as follows:

[0035] C terminal (E j ):=ω terminal ||q j,H -q goal || (9)

[0036] Among them, ω terminal is the adjustment coefficient.

[0037] The trajectory is executed through the joint trajectory controller in ROS. The controller accepts the target position, velocity and acceleration of the specified joint based on the joint trajectory controller of ROS to optimize and generate a smoother trajectory, and interpolates in time at each given path point, so that the robot arm can move continuously, smoothly and collision-free along these estimates, and can realize simultaneous control of multiple joints of the robot arm, thereby improving the performance and efficiency of the robot in various tasks.

[0038] The characteristics and beneficial effects of the present invention are:

[0039] The present invention is of great significance to the research on the spatial trajectory planning algorithm of multi-DOF manipulator joints. When facing an unknown multi-obstacle environment, the present invention can realize fully autonomous manipulator collision distance estimation and global optimal trajectory generation, and the generated trajectory is safe and efficient. The present invention has high theoretical and engineering value, and the advantages of the present invention are summarized as follows:

[0040] (1) The present invention proposes a robot arm collision distance estimation algorithm based on the configuration signed distance function. The traditional bounding box collision detection algorithm uses a simple bounding box model to approximate the geometric shape of the robot arm, and performs collision detection by detecting the intersection relationship between bounding boxes. Although it is simple and efficient, it cannot handle complex geometric shapes and contact constraints. Compared with the traditional algorithm, the method proposed in the present invention is based on the scene point cloud and the sampling points of the body, which can achieve fast and accurate collision detection effects.

[0041] (2) The present invention designs a multi-degree-of-freedom robot arm trajectory generation algorithm based on model prediction path integral, which can generate the globally optimal robot arm joint space trajectory, comprehensively perceive constraints and motion optimization goals, and sample multiple control sequences around the nominal sequence and use the system model for propagation. During the propagation process, the costs of the sampled multiple control sequences are weighted according to a pre-set cost function and a weighted average is obtained, which is used to generate the nominal control sequence of the next iteration and the optimal trajectory generated by the current iteration, thereby ensuring the safety, speed and efficiency of the multi-degree-of-freedom robot arm in the motion planning process.

[0042] (3) The program framework of the method proposed in the present invention can be processed by the CPU and GPU simultaneously, which can maximize the use of the onboard computer containing these two processors, save computing resources for other programs (such as crawling tasks) required to complete other tasks in actual work scenarios, ensure the running frequency of the planner, and ensure the real-time planning. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 : Overall structure diagram of robot arm joint space trajectory planning based on model prediction path integral.

[0044] Figure 2 : Structure diagram of trajectory generator based on model-predicted path integral.

[0045] Figure 3 : Schematic diagram of sampling point generation on the robotic arm surface.

[0046] Figure 4 :Schematic diagram of the virtual robotic arm working scene in the Gazebo simulation environment.

[0047] Figure 5 : The running trajectory of the virtual robotic arm in the Gazebo simulation environment. DETAILED DESCRIPTION

[0048] The present invention aims to propose a robot joint space trajectory planning method based on model predictive path integral (MPPI). In the proposed method, a trajectory generator based on model predictive path integral guides the global optimal path, and executes the trajectory command through the joint trajectory controller, generating real-time safe and smooth motion while satisfying the constraints. First, in order to enable the robot to plan a collision-free trajectory, the present invention proposes a configuration signed distance function (CSDF) module, which directly uses the joint configuration of the robot for calculation. The module receives the configuration of the robot and the point cloud of the scene, and outputs the estimated value of the distance from the entire robot body to the nearby obstacles and its gradient. CSDF is used to perform fast collision check of the trajectory generator. The module is accelerated by GPU to quickly calculate the distance between the current robot configuration and the obstacle. Secondly, based on the model predictive path integral method, the present invention constructs a fast, online, and global trajectory generator, receives the starting and target robot configurations, estimates the collision cost of the current robot configuration space through the CSDF module, and generates a global optimal trajectory for the robot to execute. Furthermore, the joint trajectory controller based on the Robot Operating System (ROS) performs command execution. The module sends smooth and collision-free joint space trajectory commands to the robot arm. The robot arm moves along the planned joint space trajectory, which can be used in a variety of task scenarios and has great application value. The specific steps are as follows:

[0049] Part 1: Calculation method of space distance of robot arm configuration: When the robot arm performs joint space trajectory planning, it needs to consider the distance between its own body and surrounding obstacles, so as to generate a collision-free path and avoid collision with the surrounding environment during movement.

[0050] As a multi-joint serial robot, the robot arm is composed of connecting rods and joints connected sequentially from the base. It is difficult to simplify it into a mass point. In order to calculate the distance between the robot arm body and the surrounding obstacles, the surface of the robot arm needs to be processed. The present invention proposes a method for generating control points on the surface of the robot arm body, and determines whether the robot arm will collide with the surrounding environment by calculating the configuration space signed distance function between the generated control points and the surrounding environment point cloud. At the same time, the obtained data can be provided to the second part of the planner based on model prediction path integral to generate a collision-free trajectory.

[0051] For a robotic arm system equipped with a depth camera sensor with limited field of view constraints, the present invention proposes a configuration space distance calculation method based on point cloud. For the purpose of obstacle avoidance, the working scene of the robotic arm is regarded as a large point cloud. The point cloud is composed of the surface triangular mesh sampling points of an object of known geometric shape and the point cloud acquired by the depth camera. The acquired point cloud is first downsampled and denoised to reduce the number of points and increase the accuracy of the points, thereby improving the calculation efficiency and making trajectory generation more efficient. The processed point cloud is unified into a base coordinate system through coordinate transformation to obtain the current working scene point cloud of the robotic arm consisting of S points {s k ∈R 3} k=1,...,S

[0052] Assume that the current configuration of the robot arm is q i :={θ1,θ2,θ3,θ4,θ5,θ6,θ7} (where θ1-θ7 are the angle values ​​of the seven joints respectively) is known, so the current posture of the robot can be uniquely determined. In order to quickly calculate the CSDF value of the current posture, it is necessary to sample some points on the surface of the robot, and indirectly estimate the distance between the robot body and the surrounding obstacles through the sampled points. First, a set of points that coincide with the joints of the robot are selected, and the position and posture of the given robot configuration in the workspace are calculated by using GPU-accelerated forward kinematics. Then, linear interpolation is performed between the positions of the selected points to obtain the current configuration q i A set of C sampling points {c j (q i )∈R 3} j=1,...,C If the robot arm is used to perform tasks such as grasping, obstacle avoidance of the end effector during grasping is also crucial. To this end, if the geometry of the grasped object is known, sampling can be performed on the surface of the object. After obtaining the sampling points, they are transformed through forward kinematics and added to the sampling points of the robot body. The sampling points on the surface of the robot arm are obtained by the above method {c j (q i )∈R 3} j=1,...,C And the working scene point cloud k ∈R 3} k=1,...S After that, the distance between the robot body and the environmental point cloud is estimated.

[0053] First, define any point x∈R in space 3 The signed distance function value (Signed Distance Function, SDF) is:

[0054]

[0055] Among them, ρ∈R+ It is a very small normal value, which ensures the smoothness of the entire set at the zero point. Through parallel processing by GPU, the distance query between any point in space and the environmental point cloud can be completed quickly.

[0056] Then, the CSDF module is used to estimate the minimum distance between the current robot configuration and the environmental point cloud. In the robot workspace, given the configuration q i :={θ1,θ2,θ3,θ4,θ5,θ6,θ7}, we can get the sampling points {c j (q i )∈R 3} j=1,...,C , the configuration signed distance function is defined as:

[0057]

[0058] where r∈R + Is the safety threshold. This module can obtain the distance query between the current robot configuration and the environment point cloud and provide it to the planner for trajectory generation. A positive CSDF means that the current robot configuration will not collide with the environment, otherwise it means that the robot will collide with the environment.

[0059] The second part is the method for generating the trajectory in the joint space of the manipulator: According to the distance between the manipulator configuration and the environmental point cloud obtained by the CSDF module, the present invention proposes a trajectory generation method based on MPPI to solve the collision-free trajectory in the joint space of the manipulator. The core idea of ​​this method is to use the dynamic model of the system to predict the system dynamics in the future, generate multiple control input sequences through sampling, and use these sequences to predict multiple state trajectories in the future. Each sampled trajectory will be evaluated according to a certain cost function. The lower the weight (the higher the cost), the smaller the impact of the trajectory on the final control input. Then, the trajectory is weighted averaged according to the weight to obtain the final control input. In each iteration, the new sampled trajectory will be adjusted based on the results of the previous iteration, so as to gradually optimize the control input sequence and approach the optimal solution. Compared with traditional methods, this method can be used in scenarios with higher real-time requirements. Through a large number of random sampling, it is not easy to fall into local optimality. It has certain global optimization potential and can handle complex nonlinear systems.

[0060] The MPPI model used in the present invention is a discrete-time continuous state system q t+1 =q t +e t ,q t and q t+1 They represent the configurations of the robot at time t and time t+1, respectively, and e t ~N(d t ,Σ),e t It means that the mean is dt , a Gaussian distribution sequence with covariance Σ. According to the core idea of ​​MPPI, in each iteration, given the control domain H and the nominal configuration q0,...,q H , the corresponding nominal displacement d0,...,d H-1 , sample to obtain M displacement sequences E j :={e j,0 ,...,e j,H-1}, j = 1, ..., M. The sampling results are forward calculated through the system model to obtain the rolling cost C (E j ), and then assign certain weights to the M rolling costs to obtain their weighted average, and finally obtain the displacement sequence obtained by the iteration at time t

[0061]

[0062] where α d is a smoothing parameter, e j,t Indicates E j The value at time t, other related parameters are defined as follows:

[0063]

[0064]

[0065] Among them, λ>0 is a smoothing coefficient.

[0066] After each iteration, the displacement sequence obtained by weighted calculation Update the current nominal configuration The updated configuration will be sent to the trajectory actuator to drive the robotic arm to move according to the planned trajectory.

[0067] For the rolling cost C(E j ) can be divided into path constraints C r (E j ) and the thrust constraint C terminal (E j ), the specific forms of each constraint are as follows:

[0068] (1) Path constraint C r (E j )

[0069] Path Constraint C r (E j ) is mainly used to penalize the total length of the trajectory C lenth and the collision between the robot and the environment C coll , defined as C r (E j):=C lenth (E j )+C coll (E j ), where C lenth (E j ) represents the total length of the running track currently sampled by the robot arm, C coll (E j ) is a distance-related value, and the mathematical definitions of its components are as follows:

[0070]

[0071]

[0072] Among them, ω lenth ,ω coll >0 is the adjustment coefficient, the collision cost C coll (E j ) is calculated by the CSDF module in the first part:

[0073]

[0074] Where δ is the distance threshold. When the distance value is less than or equal to δ, C coll (q j,t ,e j,t ) is defined as a constant value of 1. On the contrary, the larger the distance value, the smaller the possibility of collision between the robot arm and the environmental point cloud. coll (q j,t ,e j,t ) is also correspondingly smaller.

[0075] (2) Thrust constraint C terminal (E j )

[0076] The purpose of the break constraint is to penalize the distance between the manipulator and the final target point. The break constraint is defined as the manipulator configuration q obtained by the model output of the control sequence obtained by the current sampling. j,H With the target configuration q goal The distance is mathematically defined as follows:

[0077] C terminal (E j ):=ω terminal ||q j,H -q goal || (18)

[0078] Among them, ω terminal is the adjustment coefficient.

[0079] The present invention uses MPPI as a global optimal trajectory generator, uses this method to plan the robot joint space trajectory, and then executes the trajectory through the controller for the planned path points. The generated joint space collision-free trajectory is received, and the trajectory is executed by the joint trajectory controller in ROS. The controller interpolates at each given path point in time, so that the robot performs continuous, smooth, and collision-free motion. The joint trajectory controller based on ROS accepts the target position, speed, and acceleration of the specified joint to optimize the generation of a smoother trajectory, and instructs the robot to move along these estimates. Using the joint trajectory controller, it is possible to achieve simultaneous control of multiple joints of the robot, thereby improving the performance and efficiency of the robot in various tasks. When configuring the controller, it is necessary to define the parameters of the joint trajectory controller in the controller configuration file of ROS, including the controlled joint name, type, PID control parameters, etc. Since this algorithm is verified in the Gazebo simulation environment, it is also necessary to configure the relevant hardware interface files, and then start the simulation and controller through the relevant startup files to ensure that they are correctly connected to the hardware interface of the robot.

[0080] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0081] The invention proposes a multi-degree-of-freedom manipulator trajectory generation method based on model prediction path integration, which mainly consists of a simulation environment part and an algorithm part.

[0082] The simulation environment is built by Gazebo. Gazebo is a powerful 3D robot simulation software with good physical simulation performance. Its main features include: (1) Realistic dynamic simulation: supports a variety of high-performance physics engines, such as DART, ODE, SimBody, Bullet, etc.; (2) Realistic 3D visualization effect: Gazebo uses OGRE (open source graphics rendering engine) to achieve good visual effects such as light, shadow, material, etc. (3) Sensors and plug-ins: supports a variety of virtual sensors such as depth cameras, etc., and supports users to independently design and build sensors, robot models and environmental controls in the form of plug-ins through APIs.

[0083] The simulation environment built by Gazebo in this invention is a virtual robotic arm working scene. The algorithm part mainly consists of two parts: multi-degree-of-freedom robotic arm configuration space distance calculation and robotic arm joint space trajectory generation method, which are introduced in detail below:

[0084] The overall structure diagram of the multi-degree-of-freedom robot trajectory generation method based on model prediction path integration is shown in the attached figure. Figure 1All algorithms of the present invention are written in Python and developed based on the ROS robot operating system under the Linux operating system. The method designed by the present invention mainly includes the following two parts:

[0085] Part 1: Calculation method of space distance of robot arm configuration: When the robot arm performs joint space trajectory planning, it needs to consider the distance between its own body and surrounding obstacles, so as to generate a collision-free path and avoid collision with the surrounding environment during movement.

[0086] As a multi-joint serial robot, the robot arm is composed of connecting rods and joints connected sequentially from the base. It is difficult to simplify it into a mass point. In order to calculate the distance between the robot arm body and the surrounding obstacles, the surface of the robot arm needs to be processed. The present invention proposes a method for generating control points on the surface of the robot arm body, and determines whether the robot arm will collide with the surrounding environment by calculating the configuration space signed distance function between the generated control points and the surrounding environment point cloud. At the same time, the obtained data can be provided to the second part of the planner based on model prediction path integral to generate a collision-free trajectory.

[0087] For a robotic arm system equipped with a depth camera sensor with limited field of view constraints, the present invention proposes a configuration space distance calculation method based on point cloud. For the purpose of obstacle avoidance, the working scene of the robotic arm is regarded as a large point cloud. The point cloud is composed of the surface triangular mesh sampling points of an object of known geometric shape and the point cloud acquired by the depth camera. The acquired point cloud is first downsampled and denoised to reduce the number of points and increase the accuracy of the points, thereby improving the calculation efficiency and making trajectory generation more efficient. The processed point cloud is unified into a base coordinate system through coordinate transformation to obtain the current working scene point cloud of the robotic arm consisting of S points {s k ∈R 3} k=1,...,S

[0088] Assume that the current configuration of the robot arm is q i :={θ1,θ2,θ3,θ4,θ5,θ6,θ7} (where θ1-θ7 are the angle values ​​of the seven joints respectively) is known, so the current posture of the robot can be uniquely determined. In order to quickly calculate the CSDF value of the current posture, it is necessary to sample some points on the surface of the robot, and indirectly estimate the distance between the robot body and the surrounding obstacles through the sampled points. First, a set of points that coincide with the joints of the robot are selected, and the position and posture of the given robot configuration in the workspace are calculated by using GPU-accelerated forward kinematics. Then, linear interpolation is performed between the positions of the selected points to obtain the current configuration q i A set of C sampling points {c j (q i )∈R 3}j=1,...,C , as attached Figure 3 As shown. If the robot arm is used to perform tasks such as grasping, obstacle avoidance of the end effector during grasping is also crucial. To this end, if the geometric shape of the grasped object is known, sampling can be performed on the surface of the object. After obtaining the sampling points, they are transformed through forward kinematics and added to the sampling points of the robot body. The sampling points {c j (q i )∈R 3} j=1,...,C And the working scene point cloud k ∈R 3} k=1,...S After that, the distance between the robot body and the environmental point cloud is estimated.

[0089] First, define any point x∈R in space 3 The signed distance function value SDF is:

[0090]

[0091] Among them, ρ∈R + It is a very small normal value, which ensures the smoothness of the entire set at the zero point. Through parallel processing by GPU, the distance query between a point in space and the environment point cloud can be completed quickly.

[0092] Then, the CSDF module is used to estimate the minimum distance between the current robot configuration and the environment point cloud. In the robot workspace, given configuration q i :={θ1,θ2,θ3,θ4,θ5,θ6,θ7}, we can get the sampling points {c j (q i )∈R 3} j=1,...,C , the configuration signed distance function is defined as:

[0093]

[0094] where r∈R + Is the safety threshold. This module can obtain the distance query between the current robot configuration and the environment point cloud and provide it to the planner for trajectory generation. A positive CSDF means that the current robot configuration will not collide with the environment, otherwise it means that the robot will collide with the environment.

[0095] The second part is the method for generating the trajectory in the joint space of the manipulator: According to the distance between the manipulator configuration and the environmental point cloud obtained by the CSDF module, the present invention proposes a trajectory generation method based on MPPI to solve the collision-free trajectory in the joint space of the manipulator. The core idea of ​​this method is to use the dynamic model of the system to predict the system dynamics in the future, generate multiple control input sequences through sampling, and use these sequences to predict multiple state trajectories in the future. Each sampled trajectory will be evaluated according to a certain cost function. The lower the weight (the higher the cost), the smaller the impact of the trajectory on the final control input. Then, the trajectory is weighted averaged according to the weight to obtain the final control input. In each iteration, the new sampled trajectory will be adjusted based on the results of the previous iteration, so as to gradually optimize the control input sequence and approach the optimal solution. Compared with traditional methods, this method can be used in scenarios with higher real-time requirements. Through a large number of random sampling, it is not easy to fall into local optimality. It has certain global optimization potential and can handle complex nonlinear systems.

[0096] The MPPI model used in the present invention is a discrete-time continuous state system q t+1 =q t +e t ,q t and q t+1 They represent the configurations of the robot at time t and time t+1, respectively, and e t ~N(d t ,Σ),e t It means that the mean is d t , a Gaussian distribution sequence with covariance Σ. According to the core idea of ​​MPPI, in each iteration, given the control domain H and the nominal configuration q0,...,q H , the corresponding nominal displacement d0,...,d H-1 , sample to obtain M displacement sequences E j :={e j,0 ,...,e j,H-1}, j = 1, ..., M. The sampling results are forward calculated through the system model to obtain the rolling cost C (E j ), and then assign certain weights to the M rolling costs to obtain their weighted average, and finally obtain the displacement sequence obtained by the iteration at time t

[0097]

[0098] where α d is a smoothing parameter, e j,t Indicates E j The value at time t, other related parameters are defined as follows:

[0099]

[0100]

[0101] Among them, λ>0 is a smoothing coefficient.

[0102] After each iteration, the displacement sequence obtained by weighted calculation Update the current nominal configuration The updated configuration will be sent to the trajectory actuator to drive the robotic arm to move according to the planned trajectory.

[0103] For the rolling cost C(E j ) can be divided into path constraints C r (E j ) and the thrust constraint C terminal (E j ), the specific forms of each constraint are as follows:

[0104] (1) Path constraint C r (E j )

[0105] Path Constraint C r (E j ) is mainly used to penalize the total length of the trajectory C lenth and the collision between the robot and the environment C coll , defined as C r (E j ):=C lenth (E j )+C coll (E j ), where C lenth (E j ) represents the total length of the running track currently sampled by the robot arm, C coll (E j ) is a distance-related value, and the mathematical definitions of its components are as follows:

[0106]

[0107]

[0108] Among them, ω lenth ,ω coll >0 is the adjustment coefficient, the collision cost C coll (E j ) is calculated by the CSDF module in the first part:

[0109]

[0110] Where δ is the distance threshold. When the distance value is less than or equal to δ, Ccoll (q j,t ,e j,t ) is defined as a constant value of 1. On the contrary, the larger the distance value, the smaller the possibility of collision between the robot arm and the environmental point cloud. coll (q j,t ,e j,t ) is also correspondingly smaller.

[0111] (2) Thrust constraint C terminal (E j )

[0112] The purpose of the break constraint is to penalize the distance between the manipulator and the final target point. The break constraint is defined as the manipulator configuration q obtained by the model output of the control sequence obtained by the current sampling. j,H With the target configuration q goal The distance is mathematically defined as follows:

[0113] C terminal (E j ):=ω terminal ||q j,H -q goal || (27)

[0114] Among them, ω terminal is the adjustment coefficient.

[0115] Based on the above two parts, build a virtual robotic arm working scene in Gazebo, configure the relevant hardware interface files, and ensure that the hardware interface files of the robotic arm are correctly connected. The working scene is as shown in the attached figure. Figure 4 According to the generated collision-free trajectory in the joint space, the trajectory is executed through the joint trajectory controller. The controller interpolates the given path points according to time, so that the robot arm can move continuously, smoothly and without collision. The planned running trajectory is shown in the attached figure. Figure 5 shown.

[0116] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for manipulator joint space trajectory planning based on model prediction path integral, characterized in that the steps are: As follows: First, using the joint configuration of the robot arm, according to the configuration of the robot arm and the point cloud of the scene, the configuration signed distance function CSDF is used to obtain the estimated value of the distance from the entire robot arm body to nearby obstacles and its gradient; then, based on the model prediction path integration method, a fast, online, global trajectory generator is constructed, which receives the starting and target robot arm configurations, estimates the collision cost of the current robot arm configuration space according to the estimated value of the distance from the entire robot arm body to nearby obstacles and its gradient, and generates a global optimal trajectory for the robot arm to execute.

2. The method for manipulator joint space trajectory planning based on model prediction path integral as claimed in claim 1, characterized in that: The specific steps are as follows: Part 1: Calculation method of space distance of robot configuration: A method for generating control points on the surface of the robot body, and determining whether the robot will collide with the surrounding environment by calculating the configuration space signed distance function between the generated control points and the surrounding point cloud. The obtained data can be provided to the second part of the model-predicted path integral-based planner for generating collision-free trajectories; The point cloud is composed of the surface triangular mesh sampling points of an object of known geometric shape and the point cloud obtained by the depth camera. The obtained point cloud is first downsampled and denoised to reduce the number of points and increase the accuracy of the points. The processed point cloud is unified into a base coordinate system through coordinate transformation to obtain the current working scene point cloud of the robot arm consisting of S points {s k ∈R 3 k=1,…,S…,S Current configuration of the robot arm q i :={θ1,θ2,θ3,θ4,θ5,θ6,θ7} is known, where θ1-θ7 are the angle values ​​of the seven joints, which uniquely determine the current posture of the robot. In order to quickly calculate the CSDF value of the current posture, it is necessary to sample some points on the surface of the robot, and indirectly estimate the distance between the robot body and the surrounding obstacles through the sampled points. First, select a set of points that coincide with the joints of the robot, and calculate the position of the given robot configuration in the workspace by using GPU-accelerated forward kinematics. Then, linear interpolation is performed between the positions of the selected points to obtain the current configuration q i A set of C sampling points {c j (q i )∈R 3 } j=1,...,C, if the robot arm is used to perform grasping tasks, obstacle avoidance of the end effector during grasping is also very important. Therefore, if the geometric shape of the grasped object is known, sampling is performed on the surface of the object. After obtaining the sampling points, they are transformed through forward kinematics and added to the sampling points of the robot arm body. The sampling points on the surface of the robot arm are obtained by the above method {c j (q i )∈R 3 } j=1,...,C and the work scene point cloud {sk∈R 3 k=1,...S indicates that the distance between the robot body and the environmental point cloud is estimated in the following steps: First, define any point x∈R in space 3 The signed distance function value SDF is: Among them, ρ∈R + is a very small normal value, ensuring the smoothness of the entire set at zero; Then, the CSDF module is used to estimate the minimum distance between the current robot configuration and the environmental point cloud. In the robot workspace, given the configuration q i :={θ1,θ2,θ3,θ4,θ5,θ6,θ7}, we can get the sampling points {c j (q i )∈R 3 } j=1,...,C, the configuration signed distance function is defined as: where r∈R + Is the safety threshold. This module can obtain the distance query between the current robot configuration and the environment point cloud and provide it to the planner for trajectory generation. A positive CSDF means that the current robot configuration will not collide with the environment, otherwise it means that the robot will collide with the environment. The second part is the method of generating trajectories in the joint space of the robot: according to the distance between the robot configuration and the environmental point cloud obtained by the CSDF module, the trajectory generation method based on MPPI is used to solve the collision-free trajectory in the joint space of the robot: the dynamic model of the robot is used to predict the dynamics of the robot in the future, and multiple control input sequences are generated through sampling. These sequences are used to predict multiple state trajectories in the future. Each sampled trajectory will be evaluated according to a certain cost function. The lower the weight / the higher the cost, the smaller the impact on the final control input. Then, the trajectory is weighted averaged according to the weight to obtain the final control input. In each iteration, the new sampled trajectory will be adjusted based on the result of the previous iteration, so as to gradually optimize the control input sequence and approach the optimal solution. The MPPI model is a discrete-time continuous state system q t+1 =q t +e t ,q t and q t+1 They represent the configurations of the robot at time t and time t+1, respectively, and e t ~N(d t ,Σ),e t It means that the mean is d t , a Gaussian distribution sequence with covariance Σ, where in each iteration, the control domain is given as H and the nominal configurations q0,...,q H , the corresponding nominal displacement d0,...,d H-1 , sample to obtain M displacement sequences E j :={e j,0 ,...,e j,H-1 }, j = 1, ..., M, the sampling results are forward calculated through the system model to obtain the rolling cost C (E j ), and then assign certain weights to the M rolling costs to obtain their weighted average, and finally obtain the displacement sequence obtained by the iteration at time t where α d is a smoothing parameter, e j,t Indicates E j The value at time t, other related parameters are defined as follows: Among them, λ>0 is a smoothing coefficient; After each iteration, the displacement sequence obtained by weighted calculation Update the current nominal configuration The updated configuration will be sent to the trajectory actuator to drive the robot arm to move according to the planned trajectory; For the rolling cost C(E j ) can be divided into path constraints C r (E j ) and the thrust constraint C terminal (E j ), the specific forms of each constraint are as follows: (1) Path constraint C r (E j ) Path Constraint C r (E j ) is mainly used to penalize the total length of the trajectory C lenth and the collision between the robot and the environment C coll , defined as C r (E j ):=C lenth (E j )+C coll (E j ), where C lenth (E j ) represents the total length of the running track currently sampled by the robot arm, C coll (E j ) is a distance-related value, and the mathematical definitions of its components are as follows: Among them, ω lenth ,ω coll >0 is the adjustment coefficient, and the collision cost Ccoll(Ej) is calculated by the CSDF module in the first part: Where δ is the distance threshold. When the distance value is less than or equal to δ, C coll (q j,t ,e j,t ) is defined as a constant value of 1. On the contrary, the larger the distance value, the smaller the possibility of collision between the robot arm and the environmental point cloud. coll (q j,t ,e j,t ) is also correspondingly smaller; (2) Thrust constraint C terminal (E j ) The purpose of the break constraint is to penalize the distance between the manipulator and the final target point. The break constraint is defined as the manipulator configuration q obtained by the model output of the control sequence obtained by the current sampling. j,H With the target configuration q goal The distance is mathematically defined as follows: C terminal (From j ):=ω terminal ||q j,H -q goal || (9) Among them, ω terminal is the adjustment coefficient.

3. The robot arm joint space trajectory planning method based on model prediction path integral as claimed in claim 1, characterized in that: The trajectory is executed through the joint trajectory controller in ROS. The controller accepts the target position, velocity and acceleration of the specified joint based on the joint trajectory controller of ROS to optimize and generate a smoother trajectory, and interpolates in time at each given path point, so that the robot arm can move continuously, smoothly and collision-free along these estimates, and can realize simultaneous control of multiple joints of the robot arm, thereby improving the performance and efficiency of the robot in various tasks.

Citation Information

Patent Citations

  • Continuous mechanical-arm space obstacle avoidance trajectory planning method

    CN108237534A

  • Method for guiding a robot arm, guidance system

    CN113766997A

  • Path planning method and system for nuclear emergency disposal robot

    CN116931575A

  • Collision-free motion generation

    US20240131706A1

Cited By

  • Adaptive teleoperation method for narrow scene, computer equipment and storage medium

    CN119820583A

  • Adaptive teleoperation method, computer equipment and storage medium for narrow scenes

    CN119820583B

  • Mechanical arm obstacle avoidance trajectory planning method and system based on environmental perception

    CN120735014A

  • Robot obstacle avoidance trajectory planning method, robot control method and related equipment

    CN120779965A

  • Mechanical arm autonomous grabbing system and method based on visual guidance and visual touch fusion

    CN121267906A