Industrial quality inspection method and device for trajectory planning of a robot arm

By using reinforcement learning algorithms and PyBullet simulation, combined with kMeans clustering, the problem of robotic arms being unable to capture all surfaces of industrial products was solved, achieving automated and efficient industrial quality inspection and providing smooth robotic arm motion trajectories.

CN117754593BActive Publication Date: 2026-08-25CHANGZHOU MICROINTELLIGENCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410073305.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-18
Publication Date
2026-08-25
Estimated Expiration
2044-01-18

AI Technical Summary

Technical Problem

Industrial quality inspection relies on human judgment, which makes it difficult to collect product data and inaccurate quality control. Robotic arms cannot capture all sides of the inspected industrial products, resulting in missed inspections.

Method used

By employing reinforcement learning algorithms, combined with PyBullet simulation and kMeans clustering, and using a robotic arm trajectory planning method, grouping photo points and constructing an intelligent agent, intelligent trajectory planning for the robotic arm is achieved. The TD3 algorithm is used to optimize the trajectory, solving the problem that the robotic arm cannot photograph all surfaces.

Benefits of technology

It realizes fully intelligent movement step planning of robotic arms, improves quality inspection efficiency, solves the problem of missed inspections, provides smooth and efficient motion trajectory, and forms a closed loop of automated quality inspection of industrial products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117754593B_ABST
    Figure CN117754593B_ABST
Patent Text Reader

Abstract

The application provides a mechanical arm trajectory planning method and equipment in industrial quality inspection, provides intelligent planning software of a mechanical arm movement trajectory in industrial quality inspection by using a reinforcement learning algorithm, and comprises a data solving step, a photographing point grouping step, a robot simulation step and a trajectory planning step, can complete full-intelligent mechanical arm movement step planning and provide reliable movement trajectories, solves the difficulty of industrial product image data acquisition, and improves the quality inspection efficiency through intelligence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method and equipment for planning the trajectory of a robotic arm in industrial quality inspection. Background Technology

[0002] Quality inspection in industrial enterprises remains rudimentary, relying heavily on manpower. The difficulty in collecting product data persists, leading to quality control primarily depending on the subjective judgment of quality inspectors. Summary of the Invention

[0003] The purpose of this invention is to provide a method and equipment for planning the trajectory of a robotic arm in industrial quality inspection.

[0004] To address the above problems, this invention provides a method for planning the trajectory of a robotic arm in industrial quality inspection, comprising: Obtain the robotic arm data corresponding to each photo-taking point of the inspected industrial product, where the arrival order of each photo-taking point in the planned path has been determined; After the robotic arm data is converted into a format, it is concatenated into a JSON file and sent to the specified topic in Kafka. Based on the JSON file in the specified Kafka topic, all photo points are grouped according to the rotation angle of the inspected industrial product that the robotic arm can reach, while minimizing the number of groups. The basic environment for robotic arm simulation was built using PyBullet. Based on the aforementioned basic environment, construct an intelligent agent; The agent is trained based on the JSON file corresponding to each group in the result grouping to obtain the trained agent; Input the JSON file corresponding to each group into the trained agent to obtain the movement step length of the robotic arm at the corresponding photo point in each group.

[0005] Furthermore, in the above method, the robotic arm data includes: kinematic parameters, six-axis radian values, six-axis CAD values, and camera parameters.

[0006] Furthermore, in the above method, the format conversion of the robotic arm data includes: Convert the radian values ​​of the six axes to the angle values ​​of the six axes, and then convert the angle values ​​of the six axes to world coordinates; The kinematic parameters, six-axis CAD values, and camera parameters are converted into corresponding strings according to the preset protocol.

[0007] Furthermore, in the above method, based on the JSON file in the specified Kafka topic, all photo points are grouped according to the rotation angle of the inspected industrial product that the robotic arm can reach, while minimizing the number of groups. This includes: Based on the JSON file in the specified Kafka topic, determine whether the robotic arm can reach each photo point at each angle of rotation of the inspected industrial product, and store the determination results in the result matrix; Based on the result matrix, it is determined whether the inspected industrial product has a rotation angle, at which the robotic arm can reach all the imaging points. If so, all photo locations will be grouped together as the result group; If not, the photo locations will be divided into at least two groups based on the JSON file in the specified Kafka topic and the resulting matrix.

[0008] Furthermore, in the above method, based on the JSON file in the specified Kafka topic, it is determined whether the robotic arm can reach each image capture point at each angle of rotation of the inspected industrial product, and the judgment result is stored in the result matrix, including: Step S311: Solve all the photo points sequentially using inverse kinematics to determine whether the robotic arm can reach the photo point and label it; Step 312: As the inspected industrial product rotates 1-360°, repeat step S311 and save the judgment result to the result matrix.

[0009] Furthermore, in the above method, if none is available, the photo-taking locations are divided into at least two groups based on the JSON file in the specified Kafka topic and the result matrix, including: Step S341: Based on the JSON file in the specified topic in Kafka, and using the kMeans clustering algorithm with the angular velocity of each axis of the robotic arm as the weight coefficient for calculating the distance, all photo-taking points are grouped into at least two groups. Step S342: Based on the result matrix, determine whether each photo point of the robotic arm in each current group has a corresponding reachable rotation angle of the inspected industrial product. If yes, determine the current group as the result group; otherwise, repeat steps S341 to S342 until the result group is determined.

[0010] Furthermore, in the above method, PyBullet is used to build the basic environment for robotic arm simulation, including: Load urdf format model files of 3D simulation of the stage, robotic arm, inspected industrial products and other obstacles, etc. The intelligent agent is configured to plan the optimal motion path of the robotic arm, the range of motion within which the robotic arm can move, and the pose of the camera at the end of the robotic arm. Set the gravitational acceleration, the agent's movement speed, and the angular velocity of the robotic arm axis.

[0011] Furthermore, in the above method, constructing an intelligent agent based on the aforementioned basic environment includes: The network architecture of actor, critic1, critic2, target_actor, target_critic1, and target_critic2 in the trajectory planning model of an agent is constructed using the TD3 reinforcement learning algorithm; Add Gaussian noise to the agent; Define a reward mechanism for reinforcement learning in robotic arm trajectory planning, including: a penalty of -1 if the robotic arm collides or the model iteration count reaches the upper limit; a reward of 1 if the robotic arm reaches the target image point; and a reward in the range of 0 to 1 in other cases, where the reward coefficient is greater the closer the robotic arm is from the current image point to the target image point.

[0012] Furthermore, in the above method, the agent is trained based on the JSON file corresponding to each group in the result grouping to obtain the trained agent, including: The six axes of the cyclic robotic arm are input with the position information of each group, and the movement step length of the six axes of the robotic arm is calculated according to the movement arc of the intelligent agent. The six-axis movement step of the robotic arm is assigned to the simulated robotic arm in PyBullet to drive the movement of the simulated robotic arm. PyBullet is used for collision and reachability detection of the robotic arm. As the robotic arm moves, it is determined whether the robotic arm exceeds the upper and lower limits of the six-axis rotation, the range of the agent's movement, the reachable space of the robotic arm, and the maximum number of steps of the robotic arm. If it exceeds the limit, the robotic arm returns to the initial point and replans the path. Based on the reward mechanism, a reward is given for each iteration of the simulated robotic arm movement. Based on the reward obtained in each iteration, the average of the rewards of the most recent 200 iterations is calculated. When the average reward stabilizes around 1, the model is considered to have converged, that is, the training of the agent is terminated, and the trained agent is saved. According to another aspect of the present invention, a robotic arm trajectory planning device for industrial quality inspection is also provided, comprising: The data acquisition module is used to acquire the robotic arm data corresponding to each photo-taking point of the inspected industrial product. The arrival order of each photo-taking point in the planned path has been determined. The conversion module is used to convert the data from the robotic arm into a format, concatenate it into a JSON file, and send it to the specified topic in Kafka. The grouping module is used to group all photo points according to the rotation angle of the inspected industrial product that the robotic arm can reach, based on the JSON file in the specified Kafka topic, while minimizing the number of groups. The environment module is used to build the basic environment for robotic arm simulation using PyBullet; A building module is used to build intelligent agents based on the aforementioned basic environment; The training module is used to train the agent based on the JSON file corresponding to each group in the result grouping, so as to obtain the trained agent. The output module is used to input the JSON file corresponding to each group into the trained agent to obtain the movement step length of the robotic arm at the corresponding photo point in each group.

[0013] Compared with existing technologies, this invention provides intelligent planning software for robotic arm motion trajectories in industrial quality inspection using reinforcement learning algorithms. The software includes data processing steps, image point grouping steps, robot simulation steps, and trajectory planning steps. It can complete the fully intelligent planning of the robotic arm's movement step length and provide a reliable motion trajectory. This solves the problem of difficult image data acquisition for industrial products while improving quality inspection efficiency through intelligence.

[0014] In industrial quality inspection, due to issues such as workpieces being too large or having irregular shapes, robotic arms cannot capture images of all surfaces of the inspected product. This invention adds a grouping of image capture points during the robotic arm trajectory planning process. By grouping image capture points accessible to the robotic arm at different platform rotation angles into the same group, and by rotating the platform, all surfaces of the inspected product are moved to an angle accessible to the robotic arm, thus solving the problem of missed inspections.

[0015] This invention employs the unsupervised clustering method kMeans algorithm and a forward algorithm for robotic arm to group photographic points. Robot simulation is performed using the PyBullet module encapsulated in Python, and trajectory planning is implemented using the TD3 (Twin Delayed Deep Deterministic policy gradient) deep reinforcement learning algorithm. Through intelligent trajectory planning by the robotic arm, the end-effector camera captures images, solving the pain point of difficult product data collection. From image acquisition, image detection, to reporting NG (non-conforming industrial products), a closed loop of automated quality inspection of industrial products is formed.

[0016] This invention solves the problem of missed detection of defects in industrial products due to the inability to collect image information on certain surfaces. It uses the inverse k-means algorithm of the robotic arm to determine whether the robotic arm can reach the photo point and the kMeans clustering algorithm to group all photo points. All photo points are automatically grouped and trajectory planning is performed.

[0017] This invention uses the PyBullet module for robot simulation. By loading 3D simulation model files in different urdf formats, it can simulate different platforms and industrial products in different factories, and simulate different factory environments, providing training environment support for trajectory planning models.

[0018] This invention uses the TD3 reinforcement learning algorithm for trajectory planning of a robotic arm. The optimal trajectory is obtained through a large amount of learning experience. Compared with traditional calculation methods and machine learning methods, the obtained motion trajectory is smoother and the robotic arm takes less time to move. Attached Figure Description

[0019] Figure 1 This is a flowchart of a robotic arm trajectory planning method in industrial quality inspection according to an embodiment of the present invention. Implementation

[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] like Figure 1 As shown, this invention provides a method for planning the trajectory of a robotic arm in industrial quality inspection, comprising: Step S1: Obtain the robotic arm data corresponding to each photo-taking point of the inspected industrial product, wherein the arrival order of each photo-taking point in the planned path has been determined. Preferably, the robotic arm data includes: kinematic parameters, six-axis radian values, six-axis CAD values, and camera parameters; Step S2: After converting the format of the robotic arm data, concatenate it into a JSON file and send it to the specified topic in Kafka; Preferably, step S2 may include: Step S21: Convert the radian values ​​of the six axes into angular values ​​of the six axes, and then convert the angular values ​​of the six axes into world coordinates; specifically, the radian values ​​of the six axes of the robotic arm are calculated according to mathematical laws. Step S22: Convert the kinematic parameters (gravitational acceleration), six-axis CAD values ​​(for display), and camera parameters into corresponding strings according to the preset protocol. Step S23: Finally, the world coordinates and the string are concatenated into a JSON file and sent to the specified topic in Kafka.

[0022] Step S3: Based on the JSON file in the specified topic in Kafka, group all photo points according to the rotation angle of the inspected industrial product that the robotic arm can reach, while minimizing the number of groups. For example, there are a total of 100 photo spots. The first grouping method can divide the 100 photo points into 3 groups: 20 photo points can be reached by the robotic arm at a 60-degree rotation angle of the inspected industrial product, 30 photo points can be reached by the robotic arm at a 90-degree rotation angle of the inspected industrial product, and 50 photo points can be reached by the robotic arm at a 160-degree rotation angle of the inspected industrial product. The second grouping method can divide the 100 photo points into two groups: 30 photo points where the robotic arm can reach a 180-degree rotation angle of the inspected industrial product, and 70 photo points where each axis of the robotic arm can reach a 120-degree rotation angle of the inspected industrial product. Therefore, since the second grouping method results in fewer groups, the second grouping method can be selected as the grouping result. Preferably, in step S3, based on the JSON file in the specified Kafka topic, all photo points are grouped according to the rotation angle of the industrial product being inspected that the robotic arm can reach, while minimizing the number of groups. This includes: Step S31: Based on the JSON file in the specified topic of Kafka, determine whether the robotic arm can reach each photo point at each angle of rotation of the inspected industrial product, and store the determination result in the result matrix; Preferably, step S31 may include: Step S311: Sequentially perform inverse kinematics calculation (iK) on all photo points to determine whether the robotic arm can reach the photo point and label it, for example, label 1: yes, label 0: no; Step 312: As the inspected industrial product rotates 1-360°, repeat step S311 and save the judgment result to the result matrix; Specifically, using 100 points across 360 degrees, the system determines which of these 100 points are reachable and which are inaccessible for each 1-degree rotation. The resulting matrix can represent each rotation angle with rows and each image point with columns, thus recording whether the robotic arm can reach each image point at each rotation angle. Step S32: Based on the result matrix, determine whether the inspected industrial product has a rotation angle, at which the robotic arm can reach all the photo-taking points. Step S33: If so, all photo locations are directly grouped into one group as the result group; For example, if there are 360 ​​rotation angles and 100 points, and a robotic arm with a rotation angle of 80 degrees can reach all 100 points, then these 100 points are considered as one group, and the grouping result is one group. Step S34: If not, then based on the JSON file in the specified Kafka topic and the result matrix, divide the photo locations into at least two groups. Preferably, step S34 includes: Step S341: Based on the JSON file in the specified topic in Kafka, and using the kMeans clustering algorithm with the angular velocity of each axis of the robotic arm as the weight coefficient for calculating the distance, all photo-taking points are grouped into at least two groups. Step S342: Based on the result matrix, determine whether each photo point of the robotic arm in each current group has a corresponding reachable rotation angle of the inspected industrial product. If yes, determine the current group as the result group; otherwise, repeat steps S341 to S342 until the result group is determined. Step S4: Use PyBullet to build the basic environment for robotic arm simulation; Preferably, step S4 may include: Step S41: Load the urdf format model file of the 3D simulation of the stage, robotic arm, inspected industrial product and other obstacles, etc., where the inspected industrial product is placed; Step S42: Set the action space, observation space, and pose of the end-effector camera for the intelligent agent to plan the optimal action path of the robotic arm. Step S43: Set the gravitational acceleration, the motion speed of the agent (action), and the angular velocity of the robotic arm axis; Step S5: Based on the aforementioned basic environment, construct the intelligent agent; Preferably, step S5 includes: Step S51: The network architecture of actor, critic1, critic2, target_actor, target_critic1 and target_critic2 in the trajectory planning model of the agent is built using the TD3 reinforcement learning algorithm; Among them, TD3 uses two critic1 and critic2 networks to estimate the action value function, reducing the problem of value overestimation; Step S52: Add Gaussian noise to the agent to increase its exploratory nature; Step S53: Define the reward mechanism for reinforcement learning in the robotic arm trajectory planning, including: a penalty of -1 if the robotic arm collides or the model iteration count reaches the upper limit; a reward of 1 if the robotic arm reaches the target photo point; and a reward in the range of 0 to 1 in other cases, where the reward coefficient is greater the closer the robotic arm is from the current photo point to the target photo point. Step S6: Based on the JSON file corresponding to each group in the result grouping, train the agent to obtain the trained agent; Optionally, step S6 includes: Step S61: Loop through the six axes of the robotic arm, input the point information of each group, and calculate the movement step length of the six axes of the robotic arm according to the movement arc of the intelligent agent (action); Step S62: Assign the six-axis movement step size of the robotic arm obtained in step S61 to the simulated robotic arm in PyBullet to drive the simulated robotic arm to move. Step S63: PyBullet is used to perform collision and reachability detection of the robotic arm. As the robotic arm moves, it is determined whether the robotic arm exceeds the upper and lower limits of the six-axis rotation of the robotic arm, the movement range of the agent (action), the reachable space of the robotic arm, and the maximum number of steps of the robotic arm. If it exceeds the limit range, the robotic arm returns to the initial point and replans the path. Based on the reward mechanism, a reward is given for each iteration of the simulated robotic arm movement. Step S64: Based on the reward obtained in each iteration, the average of the rewards of the most recent 200 iterations is calculated. When the average reward stabilizes around 1, the model is determined to have converged, that is, the training of the agent is terminated, and the trained agent is saved.

[0023] Step S7: Input the JSON file corresponding to each group into the trained agent to obtain the movement step length of the robotic arm at the corresponding photo point in each group.

[0024] Here, the movement step size between two adjacent photo points can be further determined through training, that is, whether the two points follow a straight line, an arc, or a broken line, etc.

[0025] This invention provides software for intelligent planning of robotic arm motion trajectories in industrial quality inspection using reinforcement learning algorithms. The software includes data processing steps, image point grouping steps, robot simulation steps, and trajectory planning steps. It can complete the full intelligent planning of the robotic arm's movement step length and provide a reliable motion trajectory. This solves the problem of difficult image data acquisition for industrial products while improving quality inspection efficiency through intelligence.

[0026] In industrial quality inspection, due to issues such as workpieces being too large or having irregular shapes, robotic arms cannot capture images of all surfaces of the inspected product. This invention adds a grouping of image capture points during the robotic arm trajectory planning process. By grouping image capture points accessible to the robotic arm at different platform rotation angles into the same group, and by rotating the platform, all surfaces of the inspected product are moved to an angle accessible to the robotic arm, thus solving the problem of missed inspections.

[0027] This invention employs the unsupervised clustering method kMeans algorithm and a forward algorithm for robotic arm to group photographic points. Robot simulation is performed using the PyBullet module encapsulated in Python, and trajectory planning is implemented using the TD3 (Twin Delayed Deep Deterministic policy gradient) deep reinforcement learning algorithm. Through intelligent trajectory planning by the robotic arm, the end-effector camera captures images, solving the pain point of difficult product data collection. From image acquisition, image detection, to reporting NG (non-conforming industrial products), a closed loop of automated quality inspection of industrial products is formed.

[0028] This invention solves the problem of missed detection of defects in industrial products due to the inability to collect image information on certain surfaces. It uses the inverse k-means algorithm of the robotic arm to determine whether the robotic arm can reach the photo point and the kMeans clustering algorithm to group all photo points. All photo points are automatically grouped and trajectory planning is performed.

[0029] This invention uses the PyBullet module for robot simulation. By loading 3D simulation model files in different urdf formats, it can simulate different platforms and industrial products in different factories, and simulate different factory environments, providing training environment support for trajectory planning models.

[0030] This invention uses the TD3 reinforcement learning algorithm for trajectory planning of a robotic arm. The optimal trajectory is obtained through a large amount of learning experience. Compared with traditional calculation methods and machine learning methods, the obtained motion trajectory is smoother and the robotic arm takes less time to move.

[0031] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0032] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0033] Obviously, those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Therefore, if these modifications and variations fall within the scope of the claims of the invention and their equivalents, the invention is also intended to include these modifications and variations.

Claims

1. A method for planning the trajectory of a robotic arm in industrial quality inspection, characterized in that, include: Obtain the robotic arm data corresponding to each photo-taking point of the inspected industrial product, where the arrival order of each photo-taking point in the planned path has been determined; After the robotic arm data is converted into a format, it is concatenated into a JSON file and sent to the specified topic in Kafka. Based on the JSON file in the specified Kafka topic, all photo points are grouped according to the rotation angle of the inspected industrial product that the robotic arm can reach, while minimizing the number of groups. The basic environment for robotic arm simulation was built using PyBullet. Based on the aforementioned basic environment, construct an intelligent agent; The agent is trained based on the JSON file corresponding to each group in the result grouping to obtain the trained agent; Input the JSON file corresponding to each group into the trained agent to obtain the movement step length of the robotic arm at the corresponding photo point in each group.

2. The robotic arm trajectory planning method in industrial quality inspection as described in claim 1, characterized in that, The robotic arm data includes: kinematic parameters, six-axis radian values, six-axis CAD values, and camera parameters.

3. The robotic arm trajectory planning method in industrial quality inspection as described in claim 2, characterized in that, The data from the robotic arm is converted into a new format, including: Convert the radian values ​​of the six axes to the angle values ​​of the six axes, and then convert the angle values ​​of the six axes to world coordinates; The kinematic parameters, six-axis CAD values, and camera parameters are converted into corresponding strings according to the preset protocol.

4. The robotic arm trajectory planning method in industrial quality inspection as described in claim 1, characterized in that, Based on the JSON file in the specified Kafka topic, and while minimizing the number of groups, all photo points are grouped according to the rotation angle of the inspected industrial product that the robotic arm can reach, including: Based on the JSON file in the specified Kafka topic, determine whether the robotic arm can reach each photo point at each angle of rotation of the inspected industrial product, and store the determination results in the result matrix; Based on the result matrix, it is determined whether the inspected industrial product has a rotation angle, at which the robotic arm can reach all the imaging points. If so, all photo locations will be grouped together as the result group; If not, the photo locations will be divided into at least two groups based on the JSON file in the specified Kafka topic and the resulting matrix.

5. The robotic arm trajectory planning method in industrial quality inspection as described in claim 4, characterized in that, Based on the JSON file in the specified Kafka topic, determine whether the robotic arm can reach each image capture point at each rotation angle of the inspected industrial product, and store the judgment results in a result matrix, including: Step S311: Solve all the photo points sequentially using inverse kinematics to determine whether the robotic arm can reach the photo point and label it; Step 312: As the inspected industrial product rotates 1-360°, repeat step S311 and save the judgment result to the result matrix.

6. The robotic arm trajectory planning method in industrial quality inspection as described in claim 4, characterized in that, If not, then based on the JSON file in the specified Kafka topic and the resulting matrix, divide the photo locations into at least two groups, including: Step S341: Based on the JSON file in the specified topic in Kafka, and using the kMeans clustering algorithm with the angular velocity of each axis of the robotic arm as the weight coefficient for calculating the distance, all photo-taking points are grouped into at least two groups. Step S342: Based on the result matrix, determine whether each photo point of the robotic arm in each current group has a corresponding reachable rotation angle of the inspected industrial product. If yes, determine the current group as the result group; otherwise, repeat steps S341 to S342 until the result group is determined.

7. The robotic arm trajectory planning method in industrial quality inspection as described in claim 1, characterized in that, The basic environment for robotic arm simulation is built using PyBullet, including: Load the urdf format model file of the 3D simulation of the stage, robotic arm, industrial product being inspected and other obstacles; The intelligent agent is configured to plan the optimal motion path of the robotic arm, the range of motion within which the robotic arm can move, and the pose of the camera at the end of the robotic arm. Set the gravitational acceleration, the agent's movement speed, and the angular velocity of the robotic arm axis.

8. The robotic arm trajectory planning method in industrial quality inspection as described in claim 1, characterized in that, Based on the aforementioned basic environment, an intelligent agent is constructed, including: The network architecture of actor, critic1, critic2, target_actor, target_critic1, and target_critic2 in the trajectory planning model of an agent is constructed using the TD3 reinforcement learning algorithm; Add Gaussian noise to the agent; Define a reward mechanism for reinforcement learning in robotic arm trajectory planning, including: a penalty of -1 if the robotic arm collides or the model iteration count reaches the upper limit; a reward of 1 if the robotic arm reaches the target photo point; and a reward in the range of 0 to 1 in other cases, where the reward coefficient is greater the closer the robotic arm is from the current photo point to the target photo point.

9. The robotic arm trajectory planning method in industrial quality inspection as described in claim 8, characterized in that, Based on the JSON file corresponding to each group in the result grouping, the agent is trained to obtain the trained agent, including: The six axes of the cyclic robotic arm are input with the position information of each group, and the movement step length of the six axes of the robotic arm is calculated according to the movement arc of the intelligent agent. The six-axis movement step of the robotic arm is assigned to the simulated robotic arm in PyBullet to drive the movement of the simulated robotic arm. PyBullet is used for collision and reachability detection of the robotic arm. As the robotic arm moves, it is determined whether the robotic arm exceeds the upper and lower limits of the six-axis rotation, the range of the agent's movement, the reachable space of the robotic arm, and the maximum number of steps of the robotic arm. If it exceeds the limit, the robotic arm returns to the initial point and replans the path. Based on the reward mechanism, a reward is given for each iteration of the simulated robotic arm movement. Based on the reward obtained in each iteration, the average of the rewards of the most recent 200 iterations is calculated. When the average reward stabilizes around 1, the model is considered to have converged, that is, the training of the agent is terminated, and the trained agent is saved.

10. A robotic arm trajectory planning device for industrial quality inspection, characterized in that, include: The data acquisition module is used to acquire the robotic arm data corresponding to each photo-taking point of the inspected industrial product. The arrival order of each photo-taking point in the planned path has been determined. The conversion module is used to convert the data from the robotic arm into a format, concatenate it into a JSON file, and send it to the specified topic in Kafka. The grouping module is used to group all photo points according to the rotation angle of the inspected industrial product that the robotic arm can reach, based on the JSON file in the specified Kafka topic, while minimizing the number of groups. The environment module is used to build the basic environment for robotic arm simulation using PyBullet; A building module is used to build intelligent agents based on the aforementioned basic environment; The training module is used to train the agent based on the JSON file corresponding to each group in the result grouping, so as to obtain the trained agent. The output module is used to input the JSON file corresponding to each group into the trained agent to obtain the movement step length of the robotic arm at the corresponding photo point in each group.

Citation Information

Patent Citations

  • Data collection method and device and electronic equipment

    CN112395357A

  • Platform for integrating heterogeneous industrial internet equipment and construction method thereof

    CN114615301A