A robotic arm positioning method, system, and electronic device
By combining a BP neural network model with a pre-set physical detection unit, the problem of overall detection error of the robotic arm is solved, and rapid and accurate positioning and efficient and energy-saving robotic arm detection are achieved.
Patent Information
- Application Number
- CN202311610150.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-11-28
AI Technical Summary
Existing robotic arm detection methods can only detect behavioral characteristics from a local perspective and cannot achieve effective error detection as a whole, resulting in the inability to detect abnormal operation in a timely manner.
By combining a BP neural network model with a preset physical detection unit, the system acquires robotic arm drive data, generates operation commands, obtains running video data, identifies errors, and updates the network model to adjust the robotic arm's positioning.
It enables the robotic arm to quickly and accurately position itself in the shortest possible time, improving detection accuracy and efficiency, reducing errors, and expanding the range of application scenarios.
Smart Images

Figure CN117444974B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotic arm technology, and in particular to a robotic arm positioning method, system, and electronic device. Background Technology
[0002] Robotic arms play a crucial role in human-machine integrated environments, assisting human workers in completing more complex, efficient, and precise tasks. This collaborative model not only improves work efficiency and quality but also reduces personnel injuries and error rates, bringing immense convenience and significantly contributing to the development of industrial manufacturing. However, robotic arms can also be affected by various uncontrollable factors, leading to malfunctions and a series of safety hazards. Therefore, real-time monitoring is necessary.
[0003] However, existing target detection methods, which typically use computer vision to monitor objects in real time, often identify the monitored objects as operating normally, thus failing to detect abnormal operation of the robotic arm at the microscopic level, resulting in significant application limitations.
[0004] Therefore, detection methods based on smart sensors are usually used to monitor the monitored object in real time. However, these methods can only detect the behavioral characteristics of the monitored object from a local perspective, making it difficult to achieve good detection results in overall detection. Summary of the Invention
[0005] This invention provides a robotic arm positioning method, system, and electronic device, which solves the technical problem that existing technologies can only detect the behavioral characteristics of the object being detected from a local perspective, thus making it difficult to achieve good detection results in overall detection.
[0006] The first aspect of this invention provides a robotic arm positioning method, comprising:
[0007] In response to a received robotic arm positioning request, acquire the robotic arm drive data corresponding to the robotic arm positioning request;
[0008] The robotic arm drive data is input into the initial network model, the operation instructions of the robotic arm are output, and the robotic arm is operated according to the operation instructions to obtain the operation video data of the robotic arm.
[0009] A preset recognition system is used to check whether there is an error between the video data of the robotic arm's operation and the preset target position, and a recognition result is generated.
[0010] A preset physical detection unit is used to detect positioning errors in the recognition results, and a target detection result is generated.
[0011] Based on the target detection results, the initial network model is updated to generate the target network model;
[0012] The target network model outputs operation commands for the robotic arm, and the joint axis axial rotation angle of the robotic arm is controlled according to the operation commands to generate the positioning position of the robotic arm.
[0013] Optionally, the step of inputting the robotic arm drive data into the initial network model, outputting the robotic arm operation instructions, operating the robotic arm according to the operation instructions, and acquiring the robotic arm's operation video data includes:
[0014] The robot arm's driving data voltage, current, and moving speed are input into the initial network model, and the robot arm's operation commands are output.
[0015] Control the operation of the robotic arm according to the operating instructions of the robotic arm, and acquire the operation video data of the robotic arm.
[0016] Optionally, the step of using a preset recognition system to determine whether there is an error between the robotic arm's operating video data and the preset target position, and generating a recognition result, includes:
[0017] Target recognition points are set at each joint of the robotic arm;
[0018] The robotic arm's operational video data is extracted frame by frame to generate multiple operational images;
[0019] Extract the initial position image and the stop position image of the robotic arm from the running image;
[0020] The grid position of the target recognition point in the image of the robot arm's stop position is identified by a preset recognition system, and the spatial coordinates of the center point of the target recognition point are generated.
[0021] Determine whether the spatial coordinates of the center point are the same as the preset target position;
[0022] If so, there is no error, and the step of using a preset physical detection unit to perform positioning error detection on the recognition result and generate target detection result is executed;
[0023] If not, then there is an error, and the target recognition points of the robotic arm in each of the running images are identified in a preset order, the error start time and error start position are determined, and the step of using a preset physical detection unit to perform positioning error detection on the recognition results and generate target detection results is executed.
[0024] Optionally, the step of identifying the target recognition points of the robotic arm in each of the running images in a preset order and determining the error start time and error start position includes:
[0025] Obtain multiple input and output parameters of the initial network model;
[0026] The initial position images and the stop position images are identified in a preset order;
[0027] Determine whether the input parameters have an error compared to the actual parameters of the corresponding initial position image, or determine whether the output parameter image has an error compared to the actual parameters of the corresponding stop position image;
[0028] If so, the error start time and error start position are determined according to the time and position corresponding to the initial position image or the stop position image corresponding to the initial occurrence of the error.
[0029] Optionally, the step of using a preset physical detection unit to perform positioning error detection on the recognition result and generating a target detection result includes:
[0030] When the recognition result is that there is no error, multiple running images are extracted from all the running images to generate sample running images;
[0031] The robotic arm is controlled to run according to the spatial coordinates of the center point of each target recognition point in the sample running image;
[0032] A preset physical detection unit is used to detect the positioning error of the robotic arm during operation, and a first target detection result is generated.
[0033] If the recognition result indicates an error, the robotic arm is controlled to operate according to the running video data.
[0034] The preset physical detection unit is used to detect the positioning error of the robotic arm during operation, and a second target detection result is generated.
[0035] Optionally, the step of updating the initial network model and generating the target network model based on the target detection result includes:
[0036] When the target detection result indicates the presence of a localization error, the weights and thresholds of the hidden layer of the initial network model are updated according to the error value corresponding to the target detection result, thereby generating an updated network model.
[0037] Use the updated network model as the new initial network model;
[0038] Jump to execute the steps of inputting the robotic arm drive data into the initial network model, outputting the robotic arm operation instructions, operating the robotic arm according to the operation instructions, and obtaining the robotic arm's running video data;
[0039] The target network model is generated until the target detection result indicates that there is no localization error.
[0040] A robotic arm positioning system provided in a second aspect of the present invention includes:
[0041] The robotic arm drive data module is used to respond to a received robotic arm positioning request and obtain robotic arm drive data corresponding to the robotic arm positioning request.
[0042] The video data module is used to input the robotic arm drive data into the initial network model, output the robotic arm operation instructions, operate the robotic arm according to the operation instructions, and obtain the robotic arm operation video data.
[0043] The recognition result module is used to use a preset recognition system to check whether there is an error between the operating video data of the robotic arm and the preset target position, and generate a recognition result;
[0044] The target detection result module is used to perform positioning error detection on the recognition result using a preset physical detection unit, and generate a target detection result.
[0045] The target network model module is used to update the initial network model based on the target detection results and generate a target network model.
[0046] The positioning module is used to output operation commands for the robotic arm through the target network model, control the axial rotation angle of the joint axis of the robotic arm according to the operation commands, and generate the positioning position of the robotic arm.
[0047] Optionally, the running video data module includes:
[0048] The operation instruction submodule is used to input the voltage, current and moving speed of the robotic arm drive data into the initial network model and output the operation instructions of the robotic arm.
[0049] The acquisition submodule is used to control the operation of the robotic arm according to the operation instructions of the robotic arm and acquire the operation video data of the robotic arm.
[0050] Optionally, the recognition result module includes:
[0051] The target recognition point module is used to set target recognition points at each joint of the robotic arm;
[0052] The running image submodule is used to extract the running video data of the robotic arm frame by frame and generate multiple running images;
[0053] An extraction submodule is used to extract the initial position image and the stop position image of the robotic arm from the running image;
[0054] The center point spatial coordinates submodule is used to identify the grid position of the target recognition point in the stop position image of the robotic arm through a preset recognition system, and generate the center point spatial coordinates of the target recognition point;
[0055] The first judgment submodule is used to determine whether the spatial coordinates of the center point are the same as the preset target position;
[0056] The error-free submodule is used to determine if there is no error and to execute the step of using a preset physical detection unit to perform positioning error detection on the recognition result and generate the target detection result.
[0057] An error submodule is used to identify the target recognition points of the robotic arm in each of the running images according to a preset order if no error exists, determine the error start time and error start position, and perform the step of using a preset physical detection unit to perform positioning error detection on the recognition results and generate target detection results.
[0058] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the robotic arm positioning method as described in any of the preceding claims.
[0059] As can be seen from the above technical solutions, the present invention has the following advantages:
[0060] 1. By setting up a BP neural network model, the robotic arm can quickly and accurately position itself in the shortest time. It can also automatically adjust the voltage of the robotic arm during operation based on changes in the drive data variables, resulting in high efficiency and energy saving.
[0061] 2. By setting up a preset physical positioning detection unit, the error of the robotic arm can be reduced to the greatest extent, and the images of the robotic arm working can be analyzed and compared at the same time, which can further improve the accuracy.
[0062] 3. By setting up the YOLOv verification system, data can be collected on the robotic arm under different working environments and conditions for parameter training. The data is then included in the training set to provide inverse feedback parameters to the neural network model, which can improve the application scope of the robotic arm. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is a flowchart of the steps of a robotic arm positioning method provided in Embodiment 1 of the present invention;
[0065] Figure 2 This is a flowchart of the steps of a robotic arm positioning method provided in Embodiment 2 of the present invention;
[0066] Figure 3 This is a schematic diagram of a BP neural network provided in Embodiment 1 of the present invention;
[0067] Figure 4 This is a flowchart illustrating the steps of a YOLOv recognition system provided in Embodiment 1 of the present invention;
[0068] Figure 5 This is a structural block diagram of a robotic arm positioning system provided in Embodiment 3 of the present invention. Detailed Implementation
[0069] This invention provides a robotic arm positioning method, system, and electronic device to address the technical problem that existing technologies can only detect the behavioral characteristics of the object being detected from a local perspective, thus failing to easily achieve good detection results in overall detection.
[0070] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0071] Please see Figure 1 , Figure 1 This is a flowchart illustrating the steps of a robotic arm positioning method provided in Embodiment 1 of the present invention.
[0072] The present invention provides a robotic arm positioning method, comprising the following steps:
[0073] Step 101: In response to the received robotic arm positioning request, obtain the robotic arm drive data corresponding to the robotic arm positioning request.
[0074] It should be noted that a robotic arm positioning request refers to a request to monitor the positioning information of the robotic arm in real time, so as to perform corresponding operations according to the positioning information of the robotic arm, and improve the accuracy of the robotic arm by correcting or adjusting the posture of the robotic arm.
[0075] The robotic arm drive data includes instantaneous voltage, working voltage, initial voltage, ending voltage, average working voltage, maximum working voltage, mass of the object held by the robotic arm, average wind resistance along the robotic arm's running path, wind direction and speed in the robotic arm's working environment, working environment temperature of the robotic arm, internal temperature change curve of the robotic arm, humidity of the robotic arm's working environment, and the self-generated working vibration frequency of the robotic arm during operation.
[0076] Specifically, the instantaneous voltage and working voltage during the operation of the robotic arm are obtained through the working voltage value input unit; the initial voltage, final voltage, average working voltage, and maximum working voltage during the operation of the robotic arm are obtained through the working current value input unit; the mass of the object being held is obtained based on the model of the object being held through the object mass input unit; the average wind resistance along the running path is obtained based on the model of the object and its running path through the object wind resistance input unit; the wind direction and wind speed in the working environment of the robotic arm are obtained through the wind force and wind direction input unit; the working environment temperature and the internal temperature change curve of the robotic arm are obtained through the ambient temperature input unit; the humidity of the working environment of the robotic arm is obtained through the ambient humidity input unit; and the working vibration frequency generated by the robotic arm during operation is obtained through the vibration frequency input unit.
[0077] In practical implementation, when responding to a received robotic arm positioning request, multiple driving data of the robotic arm are obtained through multiple units such as the working voltage value input unit, the working current value input unit, the weight of the supported item input unit, the wind resistance of the supported item input unit, the wind force and direction input unit, the ambient temperature input unit, the ambient humidity input unit, and the vibration frequency input unit, and the robotic arm driving data is generated.
[0078] Step 102: Input the robotic arm drive data into the initial network model, output the robotic arm operation instructions, operate the robotic arm according to the operation instructions, and obtain the robotic arm operation video data.
[0079] It should be noted that the initial network model refers to the BP neural network.
[0080] In practice, the robotic arm drive data is input into an initial network model for training. The output layer of the initial network model outputs the corresponding operation commands for the robotic arm drive data, and the robotic arm is controlled to perform operations according to the operation commands, while acquiring video data of the robotic arm's operation process. The video data is video data of the robotic arm's motion trajectory recorded by a camera.
[0081] Step 103: Use a preset recognition system to check whether there is an error between the robotic arm's running video data and the preset target position, and generate a recognition result.
[0082] It should be noted that the preset recognition system refers to the YOLOv recognition system.
[0083] The preset target position refers to the target position that the robotic arm is expected to reach, as indicated by the operation instructions output by the BP neural network.
[0084] In practical implementation, the YOLOv recognition system is used to identify whether the starting and stopping positions of the robotic arm in the running video data have errors with the preset target positions output by the BP neural network. If there are errors, the error recognition result is output; if there are no errors, the error recognition result is output.
[0085] Step 104: Use a preset physical detection unit to perform positioning error detection on the recognition results and generate target detection results.
[0086] It should be noted that the preset physical detection unit refers to the laser ranging unit. During the training phase, a transmission point is set on the robotic arm, and the laser ranging unit is used to detect the error of the transmission point.
[0087] The target detection result refers to the final detected error.
[0088] In practice, if there is no error, certain video frames from the entire running video data are extracted to control the operation of the robotic arm according to the output parameters / operation instructions of the BP neural network corresponding to the running images. During the operation of the robotic arm, a laser ranging unit is used to detect the positioning error of each emission point on the robotic arm to determine whether there is an error. If there is no error, the target detection result without error is obtained.
[0089] If an error exists, the robotic arm is controlled to run according to the operation instructions output by the BP neural network. During the operation of the robotic arm, the laser ranging unit is used to detect the positioning error of each emission point on the robotic arm, find out the error start time and error start position, and obtain the target detection result with error.
[0090] Step 105: Based on the target detection results, update the initial network model and generate the target network model.
[0091] It should be noted that the target network model refers to the optimal BP neural network model obtained after training and validating the initial BP neural network model.
[0092] In practice, if the target detection result shows no error, there is no need to update the initial network model.
[0093] When the target detection result shows an error, the hidden layer of the initial BP network model is updated, and the weights and thresholds of the hidden layer are optimized to obtain the optimal BP neural network model, i.e., the target BP neural network model.
[0094] Step 106: Output the operation instructions for the robotic arm through the target network model, control the axial rotation angle of the joint axis of the robotic arm according to the operation instructions, and generate the positioning position of the robotic arm.
[0095] It should be noted that by outputting the operation instructions of the robotic arm through the target BP neural network model, controlling the axial rotation angle of the joint axis of the robotic arm according to the operation instructions, and running according to the axial rotation angle of the joint axis, the current positioning position of the robotic arm can be obtained.
[0096] Please see Figure 2-4 , Figure 2 This is a flowchart of a robotic arm positioning method provided in Embodiment 2 of the present invention.
[0097] The present invention provides a robotic arm positioning method, comprising the following steps:
[0098] Step 201: In response to the received robotic arm positioning request, obtain the robotic arm drive data corresponding to the robotic arm positioning request.
[0099] In this embodiment of the invention, the specific implementation of step 201 is similar to that of step 101, and will not be repeated here.
[0100] Step 202: Input the voltage, current and moving speed of the robotic arm drive data into the initial network model, and output the operation commands of the robotic arm.
[0101] It should be noted that by inputting data such as voltage, current, and movement speed from the robotic arm drive data into the initial BP neural network model, operation commands (output parameters) can be output.
[0102] Step 203: Control the operation of the robotic arm according to the operating instructions of the robotic arm, and obtain the operation video data of the robotic arm.
[0103] It should be noted that the robotic arm is controlled to move according to the operation instructions. During the movement of the robotic arm, the position information of the robotic arm is continuously captured, and the video of the robotic arm's operation is recorded to generate operation video data.
[0104] In practical implementation, taking a three-axis robotic arm as an example, and considering the need to lift an object with a mass of KG, the robotic arm's operation command is to move the three-axis robotic arm from A(0,0,0) to B(3,0,4). (See reference...) Figure 3 As shown, the robotic arm drive data displays the voltage of the three-axis robotic arm as U1, the current as I1, the moving speed as V1, the temperature in the working environment as C, the humidity as RH%, the wind resistance as CW, the wind direction in the object's movement direction as CWV, the object's own resistance as G, and the object's own vibration frequency as OP. Because the straight-line distance between points A and B is the shortest, but the robotic arm needs to operate through interpolation, and because it is a three-axis robotic arm, the initial BP neural network model outputs the following parameters: moving 3 units laterally and 5 units in the reverse direction will reach point B. If the robotic arm holds an object, the corresponding relevant units in the hidden layer of the initial BP neural network model are activated; otherwise, they are not activated.
[0105] Specifically, the interpolation method involves determining the coordinates from the initial point to the target point, calculating the tilt, adjusting the alignment of the robotic arm, and then driving it to move crisscrossingly in the Z, X, and Y directions via motors. Each movement involves a minimum distance, determined by the stepper motor. Since the horizontal direction is X-axis (3-0=3) and the Z-axis is Z-axis (4-0=4), using the Pythagorean theorem, the straight-line distance between points A and B is 5. Therefore, the robotic arm needs to move a distance of 5.
[0106] Step 204: Use a preset recognition system to check whether there is an error between the robot arm's running video data and the preset target position, and generate a recognition result.
[0107] Optionally, step 204 includes the following steps S11-S17:
[0108] S11. Target recognition points are set at each joint of the robotic arm;
[0109] S12. Extract the robotic arm's operating video data frame by frame and generate multiple operating images;
[0110] S13. Extract the initial position image and the stop position image of the robotic arm from the running image;
[0111] S14. The grid position of the target recognition point in the image of the robot arm's stop position is identified by the preset recognition system, and the spatial coordinates of the center point of the target recognition point are generated.
[0112] S15. Determine whether the spatial coordinates of the center point are the same as the preset target position;
[0113] S16. If yes, then there is no error, and the step of using a preset physical detection unit to detect the positioning error of the recognition result and generate the target detection result is executed.
[0114] S17. If not, then there is an error, and the target recognition point of the robotic arm in each running image is identified in a preset order, the error start time and error start position are determined, and the steps of using a preset physical detection unit to perform positioning error detection on the recognition result and generate target detection result are executed.
[0115] It should be noted that target recognition points are set at each joint of the robotic arm, and the video data of the robotic arm's operation is extracted frame by frame to obtain multiple running images. Each running image is labeled, and the labeled running images are divided into training and validation sets according to a certain ratio.
[0116] In practice, the running images from the training set are input into the initial BP neural network model for training, and the corresponding output parameters, i.e., the preset target position, are output. The initial position image and the stopped position image of the robotic arm are extracted from the running images. The YOLOv recognition system is used to identify the grid data of the target recognition points in the stopped position image of the robotic arm. The grid data includes the grid position, and the grid position of the target recognition point includes the longitudinal, transverse, and normal directions. (See also...) Figure 4 As shown, the grid containing target identification points is further divided for identification, and then the spatial coordinates of the center point of the target identification points are output. Specifically, Figure 3 The circles in the image represent the joint axes of the robotic arm. The robotic arm is designed with highlighted circular areas for easy visual capture. The grid is a grid of image divisions. The presence of joint axes is determined by the hue saturation of the grid. The first step is to extract all grids with joint axes. Then, the percentage of joint axes located within the grid is analyzed by hue saturation. Finally, the center coordinates of the shutdown axis are calculated. The robotic arm can be used to calculate whether it has reached the target coordinates.
[0117] Determine whether the spatial coordinates of the center point of the target recognition point in the stopped position image are the same as the preset target position. If they are the same, it means there is no error, and proceed to step 205. If they are not the same, it means there is an error. Identify the target recognition points of the robotic arm in each running image in a preset order, determine the error start time and error start position, and proceed to step 205.
[0118] Optionally, the step S17, which identifies the target recognition points of the robotic arm in each running image according to a preset order and determines the error start time and error start position, includes the following steps S21-S24:
[0119] S21. Obtain multiple input and output parameters of the initial network model;
[0120] S22. Identify the initial position image and the stop position image in a preset order;
[0121] S23. Determine whether there is an error between the input parameters and the actual parameters of the corresponding initial position image, or determine whether there is an error between the output parameter image and the actual parameters of the corresponding stop position image.
[0122] S24. If so, then the error start time and error start position are determined according to the time and position corresponding to the initial position image or the stop position image corresponding to the initial occurrence of the error.
[0123] In practice, when errors occur, the starting time and position of the error are determined by uniformly extracting frames from the video of the robotic arm's operation using a binary method. The output and input parameters of the BP neural network at that time are then obtained, and the input parameters are compared with the actual parameters to determine if there is an error.
[0124] Specifically, multiple input parameters and corresponding output parameters of the initial network model are obtained, and each initial position image and corresponding stop position image are arranged in order from beginning to end. The actual parameters of the initial position images at the same time are compared with the corresponding input parameters to check for errors, and the actual parameters of the stop position images at the same time are compared with the corresponding output parameters to check for errors. If an error exists, the time and position corresponding to the earliest initial position image or stop position image where the error begins are selected, and this time and position are used as the error start time and error start position.
[0125] Step 205: Use a preset physical detection unit to perform positioning error detection on the recognition results and generate target detection results.
[0126] Optionally, step 205 includes the following steps S31-S35:
[0127] S31. When the recognition result is that there is no error, multiple running images are extracted from all running images to generate sample running images;
[0128] S32. Control the operation of the robotic arm according to the spatial coordinates of the center point of each target recognition point in the sample running image;
[0129] S33. Use a preset physical detection unit to detect the positioning error of the robotic arm during operation and generate the first target detection result;
[0130] S34. When the recognition result indicates an error, control the robotic arm to run according to the running video data;
[0131] S35. Use a preset physical detection unit to detect the positioning error of the robotic arm during operation and generate the second target detection result.
[0132] It should be noted that the sample running images are multiple running images from the sampling detection.
[0133] The first target detection result refers to the detection result obtained when the robotic arm executes a running image without errors.
[0134] The second target detection result refers to the detection result obtained when the robotic arm executes a running image with errors.
[0135] In specific implementation, when the recognition result is that there is no error, some running images are extracted from all running images as sample running images, and the robotic arm is controlled to run according to the spatial coordinates of the center point of each target recognition point of the robotic arm in the sample running images. During the operation, the laser ranging unit (i.e. the preset physical detection unit) is used to detect the positioning error of the emission point on the robotic arm and generate the first target detection result.
[0136] When the identification result indicates an error, the robotic arm is controlled to operate according to the running video data. During the operation, a laser ranging unit (i.e., a preset physical detection unit) is used to detect the positioning error of the emission point on the robotic arm and generate a second target detection result.
[0137] Step 206: Based on the target detection results, update the initial network model and generate the target network model.
[0138] Optionally, step 206 includes the following steps S41-S44:
[0139] S41. When the target detection result indicates that there is a localization error, update the weights and thresholds of the hidden layer of the initial network model according to the error value corresponding to the target detection result, and generate an updated network model.
[0140] S42. Use the updated network model as the new initial network model;
[0141] S43. Jump to execute the steps of inputting the robotic arm drive data into the initial network model, outputting the robotic arm operation instructions, operating the robotic arm according to the operation instructions, and obtaining the robotic arm's running video data.
[0142] S44. Continue until the target detection result indicates that there is no localization error, then generate the target network model.
[0143] It should be noted that when the target detection result indicates the presence of a localization error, the weights and thresholds of the hidden layers of the initial BP neural network model can be optimized according to the error value corresponding to the target detection result to form a new initial network model, i.e., the network model is updated.
[0144] Proceed to step 202 to continue training the BP neural network model. This allows for adjustments to the weights and thresholds of the hidden layers of the BP neural network model to achieve higher control precision.
[0145] Once the trained BP neural network model has been validated on the validation set, and the output parameters are found to have no localization error or the localization error is within the allowable error range, the current BP neural network model can be identified as the target BP neural network model, i.e., the target network model.
[0146] Specifically, when the robotic arm holds an object, it can also activate the corresponding related units in the hidden layer of the BP neural network model.
[0147] Step 207: Output the operation instructions of the robotic arm through the target network model, control the axial rotation angle of the joint axis of the robotic arm according to the operation instructions, and generate the positioning position of the robotic arm.
[0148] In practice, the output parameters (operation commands) of the robotic arm are output through the target network model to control the axial rotation angle and movement of the joint axis of the robotic arm, while recording the positioning position of the robotic arm.
[0149] Please see Figure 5 , Figure 5 This is a structural block diagram of a robotic arm positioning system provided in Embodiment 3 of the present invention.
[0150] The present invention provides a robotic arm positioning system, comprising:
[0151] The robotic arm drive data module 501 is used to obtain the robotic arm drive data corresponding to the received robotic arm positioning request in response to the received robotic arm positioning request.
[0152] The video data module 502 is used to input the robotic arm drive data into the initial network model, output the robotic arm operation instructions, operate the robotic arm according to the operation instructions, and obtain the robotic arm's running video data.
[0153] The recognition result module 503 is used to use a preset recognition system to check whether there is an error between the operating video data of the robotic arm and the preset target position, and generate a recognition result;
[0154] The target detection result module 504 is used to perform positioning error detection on the recognition result using a preset physical detection unit and generate the target detection result.
[0155] The target network model module 505 is used to update the initial network model and generate the target network model based on the target detection results.
[0156] The positioning module 506 is used to output the operation instructions of the robotic arm through the target network model, control the axial rotation angle of the joint axis of the robotic arm according to the operation instructions, and generate the positioning position of the robotic arm.
[0157] Optionally, running the video data module 502 includes:
[0158] The operation instruction submodule is used to input the voltage, current and movement speed of the robotic arm drive data into the initial network model and output the operation instructions of the robotic arm.
[0159] The acquisition submodule is used to control the operation of the robotic arm according to the operation instructions of the robotic arm and to acquire the operation video data of the robotic arm.
[0160] Optionally, the recognition result module 503 includes:
[0161] The target recognition point module is used to set target recognition points at each joint of the robotic arm;
[0162] The running image submodule is used to extract the running video data of the robotic arm frame by frame and generate multiple running images;
[0163] The extraction submodule is used to extract the initial position image and the stop position image of the robotic arm from the running image;
[0164] The center point spatial coordinates submodule is used to identify the grid position of the target recognition point in the image of the robot arm's stop position through a preset recognition system, and generate the center point spatial coordinates of the target recognition point.
[0165] The first judgment submodule is used to determine whether the spatial coordinates of the center point are the same as the preset target position;
[0166] The error-free submodule is used to determine if there is no error and to perform the steps of using a preset physical detection unit to detect the positioning error of the recognition result and generate the target detection result.
[0167] An error submodule is used to identify the target recognition points of the robotic arm in each running image according to a preset order if no error exists, determine the error start time and error start position, and perform the steps of using a preset physical detection unit to detect the positioning error of the recognition results and generate target detection results.
[0168] Optionally, the error submodule includes:
[0169] The input parameter submodule is used to obtain multiple input and output parameters of the initial network model;
[0170] The recognition submodule is used to recognize the initial position images and the stop position images in a preset order;
[0171] The second judgment submodule is used to determine whether the input parameters have an error with the actual parameters of the corresponding initial position image or to determine whether the output parameter image has an error with the actual parameters of the corresponding stop position image.
[0172] The error start position submodule is used to determine the error start time and error start position according to the time and position corresponding to the initial position image or the stop position image corresponding to the initial occurrence of the error.
[0173] Optionally, the target detection result module 504 includes:
[0174] The sample running image submodule is used to extract multiple running images from all running images to generate sample running images when the recognition result is that there is no error.
[0175] The control submodule is used to control the operation of the robotic arm according to the spatial coordinates of the center point of each target recognition point of the robotic arm in the sample running image;
[0176] The first target detection result submodule is used to detect the positioning error of the robotic arm during operation using a preset physical detection unit and generate the first target detection result.
[0177] The operation submodule is used to control the robotic arm to run according to the running video data when the recognition result is that there is an error;
[0178] The second target detection result submodule is used to detect the positioning error of the robotic arm during operation using a preset physical detection unit, and generate the second target detection result.
[0179] Optionally, the target network model module 505 includes:
[0180] The updated network model submodule is used to update the weights and thresholds of the hidden layers of the initial network model according to the error value corresponding to the target detection result when the target detection result indicates that there is a localization error, thereby generating an updated network model.
[0181] A new initial network model submodule is used to take the updated network model as the new initial network model;
[0182] The jump rotor module is used to jump to the execution of the steps of inputting the robot arm drive data into the initial network model, outputting the robot arm operation instructions, operating the robot arm according to the operation instructions, and acquiring the robot arm's running video data.
[0183] The target network model submodule is used to generate the target network model until the target detection result indicates that there is no localization error.
[0184] An electronic device provided in Embodiment 4 of the present invention includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor performs the steps of the robotic arm positioning method as described in any of the above embodiments.
[0185] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0186] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0187] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0188] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0189] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0190] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A robotic arm positioning method, characterized in that, include: In response to a received robotic arm positioning request, acquire the robotic arm drive data corresponding to the robotic arm positioning request; The robotic arm drive data is input into the initial network model, the operation instructions of the robotic arm are output, and the robotic arm is operated according to the operation instructions to obtain the operation video data of the robotic arm. A preset recognition system is used to check whether there is an error between the video data of the robotic arm's operation and the preset target position, and a recognition result is generated. A preset physical detection unit is used to detect positioning errors in the recognition results, and a target detection result is generated. Based on the target detection results, the initial network model is updated to generate the target network model; The target network model outputs operation commands for the robotic arm, and the joint axis axial rotation angle of the robotic arm is controlled according to the operation commands to generate the positioning position of the robotic arm; The step of using a preset recognition system to check for errors between the robotic arm's operational video data and the preset target position, and generating a recognition result, includes: Target recognition points are set at each joint of the robotic arm; The robot arm's operation video data is extracted frame by frame to generate multiple operation images, and the robot arm's stop position image is extracted from the operation images; The preset recognition system identifies the grid position of the target recognition point in the stop position image and generates the spatial coordinates of the center point of the target recognition point. The robotic arm has a highlighted circular area at each joint pivot point for easy visual capture. The image of the stopped position is divided into multiple grids. The hue saturation of each grid is used to determine whether a joint pivot point is located within the grid. Grids containing joint pivot points are extracted. The proportion of joint pivot points located within the grid is determined by the hue saturation. The center coordinates of the joint pivot points are calculated based on the proportion. The robotic arm is then used to determine whether it has reached the preset target position based on the spatial coordinates of the center points of each target recognition point, and the recognition result is generated.
2. The robotic arm positioning method according to claim 1, characterized in that, The steps of inputting the robotic arm drive data into the initial network model, outputting the robotic arm operation commands, operating the robotic arm according to the operation commands, and acquiring the robotic arm's operation video data include: The voltage, current, and moving speed of the robotic arm drive data are input into the initial network model, and the operation commands of the robotic arm are output. Control the operation of the robotic arm according to the operating instructions of the robotic arm, and acquire the operation video data of the robotic arm.
3. The robotic arm positioning method according to claim 2, characterized in that, The step of using a preset recognition system to check for errors between the robotic arm's operating video data and the preset target position, and generating a recognition result, further includes: Extract the initial position image of the robotic arm from the running image; Determine whether the spatial coordinates of the center point are the same as the preset target position; If so, there is no error, and the step of using a preset physical detection unit to perform positioning error detection on the recognition result and generate target detection result is executed; If not, then there is an error, and the target recognition points of the robotic arm in each of the running images are identified in a preset order, the error start time and error start position are determined, and the step of using a preset physical detection unit to perform positioning error detection on the recognition results and generate target detection results is executed.
4. The robotic arm positioning method according to claim 3, characterized in that, The step of identifying the target recognition points of the robotic arm in each of the running images in a preset order, and determining the error start time and error start position, includes: Obtain multiple input and output parameters of the initial network model; The initial position images and the stop position images are identified in a preset order; Determine whether the input parameters have an error compared to the actual parameters of the corresponding initial position image, or determine whether the output parameter image has an error compared to the actual parameters of the corresponding stop position image; If so, the error start time and error start position are determined according to the time and position corresponding to the initial position image or the stop position image corresponding to the initial occurrence of the error.
5. The robotic arm positioning method according to claim 3, characterized in that, The step of using a preset physical detection unit to perform positioning error detection on the recognition result and generating target detection result includes: When the recognition result is that there is no error, multiple running images are extracted from all the running images to generate sample running images; The robotic arm is controlled to run according to the spatial coordinates of the center point of each target recognition point in the sample running image; A preset physical detection unit is used to detect the positioning error of the robotic arm during operation, and a first target detection result is generated. If the recognition result indicates an error, the robotic arm is controlled to operate according to the running video data. The preset physical detection unit is used to detect the positioning error of the robotic arm during operation, and a second target detection result is generated.
6. The robotic arm positioning method according to claim 1, characterized in that, The step of updating the initial network model and generating the target network model based on the target detection results includes: When the target detection result indicates the presence of a localization error, the weights and thresholds of the hidden layer of the initial network model are updated according to the error value corresponding to the target detection result, thereby generating an updated network model. Use the updated network model as the new initial network model; Jump to execute the steps of inputting the robotic arm drive data into the initial network model, outputting the robotic arm operation instructions, operating the robotic arm according to the operation instructions, and obtaining the robotic arm's running video data; The target network model is generated until the target detection result indicates that there is no localization error.
7. A robotic arm positioning system, characterized in that, include: The robotic arm drive data module is used to respond to a received robotic arm positioning request and obtain robotic arm drive data corresponding to the robotic arm positioning request. The video data module is used to input the robotic arm drive data into the initial network model, output the robotic arm operation instructions, operate the robotic arm according to the operation instructions, and obtain the robotic arm operation video data. The recognition result module is used to use a preset recognition system to check whether there is an error between the operating video data of the robotic arm and the preset target position, and generate a recognition result; The target detection result module is used to perform positioning error detection on the recognition result using a preset physical detection unit, and generate a target detection result. The target network model module is used to update the initial network model based on the target detection results and generate a target network model. The positioning module is used to output the operation instructions of the robotic arm through the target network model, control the axial rotation angle of the joint axis of the robotic arm according to the operation instructions, and generate the positioning position of the robotic arm. The recognition result module includes: The target recognition point module is used to set target recognition points at each joint of the robotic arm; The running image submodule is used to extract the running video data of the robotic arm frame by frame and generate multiple running images; An extraction submodule is used to extract the stop position image of the robotic arm from the running image; The center point spatial coordinates submodule is used to identify the grid position of the target identification point in the stop position image through the preset recognition system, and generate the center point spatial coordinates of the target identification point. The robotic arm has a highlighted circular area at each joint pivot point for easy visual capture. The image of the stopped position is divided into multiple grids. The hue saturation of each grid is used to determine whether a joint pivot point is located within the grid. Grids containing joint pivot points are extracted. The proportion of joint pivot points located within the grid is determined by the hue saturation. The center coordinates of the joint pivot points are calculated based on the proportion. The robotic arm is then used to determine whether it has reached the preset target position based on the spatial coordinates of the center points of each target recognition point, and the recognition result is generated.
8. The robotic arm positioning system according to claim 7, characterized in that, The running video data module includes: The operation instruction submodule is used to input the voltage, current and moving speed of the robotic arm drive data into the initial network model and output the operation instructions of the robotic arm. The acquisition submodule is used to control the operation of the robotic arm according to the operation instructions of the robotic arm and acquire the operation video data of the robotic arm.
9. The robotic arm positioning system according to claim 7, characterized in that, The recognition result module includes: The extraction submodule is also used to extract the initial position image of the robotic arm from the running image; The first judgment submodule is used to determine whether the spatial coordinates of the center point are the same as the preset target position; The error-free submodule is used to determine if there is no error and to execute the step of using a preset physical detection unit to perform positioning error detection on the recognition result and generate the target detection result. An error submodule is used to identify the target recognition points of the robotic arm in each of the running images according to a preset order if no error exists, determine the error start time and error start position, and perform the step of using a preset physical detection unit to perform positioning error detection on the recognition results and generate target detection results.
10. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the robotic arm positioning method as described in any one of claims 1-6.
Citation Information
Patent Citations
Manipulator precise control system and method
CN103737592A
Industrial robot pose precision online compensation method based on deep reinforcement learning
CN113510709A
Mechanical arm dynamic PID control method and device, electronic equipment and storage medium
CN114789453A
