Motion mechanism track generation and position calibration device

By acquiring teaching point data, calibrating sensors and motion mechanisms, matching three-dimensional data point clouds, and calculating offsets, the problems of complex and low efficiency of motion mechanism trajectory generation in the prior art are solved, and fast and accurate trajectory generation and calibration are achieved, and processing efficiency is improved.

CN119515972APending Publication Date: 2025-02-25BEIJING C H L ROBOTICS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411543578.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art is complex and cumbersome when generating the trajectory of the moving mechanism, especially when dealing with complex or irregular parts shapes, it is necessary to accurately plan the work path and set multiple key parameters. Any slight deviation may affect the work effect. At the same time, for the processing technology of different parts, the trajectory generation efficiency is inefficient and secondary calibration is required frequently.

Method used

The initial trajectory is constructed by obtaining teaching point data, input offline programming software to generate theoretical trajectories, and calibrate the sensor and motion mechanism to calculate the rotation matrix and translation vector. The sensor is used to collect three-dimensional data, convert it into a point cloud, and calculate the offset according to the theoretical template. Finally, the operation trajectory of the current part is calculated based on the theoretical trajectory and the offset and sent to the motion mechanism for execution.

Benefits of technology

The trajectory of the moving mechanism is easily planned through a handheld teaching device, which improves the speed and efficiency of trajectory generation, reduces the need for frequent calibration and trajectory regeneration in the prior art, and can effectively deal with trajectory offset problems in different postures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515972A_ABST
    Figure CN119515972A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a motion mechanism track generation and position calibration method, which comprises the following steps of: firstly, acquiring and recording teaching point data generated by a demonstrator-guided action executed based on a motion mechanism, constructing an initial track of a first part, and inputting the initial track into offline programming software to generate a theoretical track; then, the sensor and the movement mechanism are calibrated, and a rotation matrix and a translation vector are obtained through calculation; thirdly, collecting three-dimensional data of the first part through a sensor, and converting the three-dimensional data into a theoretical template in combination with a rotation matrix and a translation vector; and after the current part is in place, collecting the three-dimensional data of the current part, and converting the three-dimensional data into the current point cloud by combining the rotation matrix and the translation vector. The offset is calculated by matching the current point cloud with the theoretical template. And finally, based on the theoretical trajectory and the offset, calculating the operation trajectory of the current part, and sending the operation trajectory to a movement mechanism for execution. Therefore, the trajectory generation speed is improved, recalibration is not needed, different pose offsets can be coped, and the trajectory can be visually created and adjusted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the technical field of motion mechanisms and related technical fields, and in particular, to a method, device, equipment and storage medium applicable to generating and calibrating a motion mechanism trajectory. Background Art

[0002] The process of generating the working trajectory of the motion mechanism is particularly complicated when dealing with complex or irregular parts. It not only requires precise planning of each working path to ensure the uniformity and quality of the work, but also involves the setting and debugging of multiple key parameters (such as working angle, speed, distance, etc.). Any slight deviation may seriously affect the working effect. Especially for a large number of parts in the same batch, when the parts posture difference during loading leads to deviation from the theoretical trajectory, which in turn triggers secondary calibration, the problem becomes more prominent.

[0003] The existing technology has the following disadvantages: not only is the trajectory generation process cumbersome, the secondary editing of the trajectory is also difficult, and the trajectory generation efficiency is low for the different processing technologies required for specific parts. When faced with the same batch of parts that need secondary calibration, the calibration work needs to be repeated. Summary of the invention

[0004] The embodiments described herein provide a method, device, apparatus, and storage medium for generating and calibrating the trajectory of a motion mechanism, which solve the problems existing in the prior art.

[0005] According to a first aspect of the present disclosure, a method for generating a motion mechanism trajectory and calibrating a position is provided, comprising:

[0006] Acquire and record teaching point data generated based on the motion mechanism and the guided action of the teach pendant, and construct an initial trajectory of the first part according to the teaching point data;

[0007] Inputting the initial trajectory of the first part into the offline programming software for operation to generate a theoretical trajectory;

[0008] Calibrate the sensor and the motion mechanism, and calculate the rotation matrix and translation vector between the sensor and the motion mechanism;

[0009] The sensor is used to collect the three-dimensional data of the first part, and the data is converted into a point cloud in the sensor coordinate system. The rotation matrix and translation vector between the sensor and the motion mechanism are combined to calculate the theoretical template.

[0010] After the current part reaches the specified position, the sensor is used to collect the three-dimensional data of the current part, which is converted into a point cloud in the sensor coordinate system, and the current point cloud is calculated by combining the rotation matrix and translation vector between the sensor and the motion mechanism;

[0011] Matching the current point cloud with the theoretical template and calculating the offset;

[0012] Based on the theoretical trajectory and the offset, the operation trajectory of the current part is calculated and sent to the motion mechanism for execution.

[0013] In some embodiments of the present disclosure, the teaching point data includes position data and operation information, wherein the position data includes at least the position and posture of each joint of the motion mechanism, and the operation information includes at least the speed, acceleration and joint angle, and the teaching point data is stored in the form of spatial coordinates and joint coordinates.

[0014] In some embodiments of the present disclosure, the step of calibrating the sensor and the motion mechanism and calculating the rotation matrix and the translation vector between the sensor and the motion mechanism includes:

[0015] Placing a calibration plate with a known geometric shape in the working area of ​​the motion mechanism, and determining the relative position relationship between the calibration plate through synchronous observation of the sensor and the motion mechanism;

[0016] The sensor captures an image of the calibration plate, identifies and records the three-dimensional spatial positions of feature points on the calibration plate using a visual processing algorithm, and then records the three-dimensional spatial positions of these feature points in a sensor coordinate system;

[0017] While the sensor is capturing images, the motion mechanism moves its end effector to a plurality of different positions on the calibration plate and records these positions in the motion mechanism coordinate system, and calculates a transformation matrix between the sensor coordinate system and the motion mechanism coordinate system by collecting data from a plurality of positions;

[0018] Based on the positions of the feature points photographed by the sensor and the corresponding point information recorded by the motion mechanism, a rotation matrix and a translation vector between the sensor and the motion mechanism are calculated.

[0019] In some embodiments of the present disclosure, the step of using the sensor to collect three-dimensional data of the first part, converting it into a point cloud in the sensor coordinate system, and calculating the theoretical template in combination with the rotation matrix and translation vector between the sensor and the motion mechanism includes:

[0020] Scanning the surface of the first part by the sensor to collect its three-dimensional data, and estimating the depth information of each point on the surface of the part by measuring the reflection and parallax of the light;

[0021] Converting the depth information into a series of three-dimensional coordinate points to form a three-dimensional model data set, which represents the position of each point on the surface of the first part in space, thereby presenting the geometric shape and structure of the first part;

[0022] During the scanning process, the sensor takes multiple shots, and uses a registration algorithm to stitch and fuse multiple scanning results to obtain the theoretical template, which is a theoretical point cloud of the first part in the motion mechanism coordinate system.

[0023] In some embodiments of the present disclosure, after the current part reaches the specified position, the three-dimensional data of the current part is collected by the sensor, and converted into a point cloud in the sensor coordinate system, and the current point cloud is calculated by combining the rotation matrix and the translation vector between the sensor and the motion mechanism, including:

[0024] Scanning the surface of the current part by the sensor to collect its three-dimensional data, and estimating the depth information of each point on the surface of the current part by measuring the reflection and parallax of the light;

[0025] The depth information collected by the sensor is converted into a series of three-dimensional coordinate points to form a three-dimensional model data set, which represents the position of each point on the surface of the current part in space, thereby presenting the geometric shape and structure of the current part;

[0026] During the scanning process, the sensor takes multiple shots, especially when scanning complex parts, and the multiple scanning results are spliced ​​and fused by using a registration algorithm to obtain a current point cloud, which is the point cloud of the current part in the motion mechanism coordinate system.

[0027] In some embodiments of the present disclosure, the step of matching the current point cloud with the theoretical template includes:

[0028] In the preparation stage, the theoretical template and the current point cloud are obtained;

[0029] Find matching point pairs between the theoretical template and the current point cloud by using an ICP algorithm;

[0030] Calculate the centroids of the theoretical template and the current point cloud respectively, and calculate the rotation matrix R and the translation vector T in the transformation matrix according to the matching point pairs, wherein the transformation matrix is ​​used to represent the change in the position and posture of the current point cloud relative to the theoretical template;

[0031] Calculate the optimal transformation matrix [R, T] through the SVD method;

[0032] Perform iterative optimization, apply the calculated transformation matrix to transform the point cloud, and recalculate the nearest neighbor point until the transformation amount converges;

[0033] In some disclosed embodiments of the present invention, the step of calculating the offset includes:

[0034] According to the rotation matrix R and the translation vector T, the trajectory offset Δ between two point clouds is calculated, specifically including:

[0035] The rotation matrix R is represented by the rotation angle θ around a certain axis. The rotation angle and direction are extracted from the matrix R by axis-angle representation, which is defined as ΔR = R;

[0036] The translation vector T represents the displacement of the point cloud in three-dimensional space, and its length ‖T‖ is the displacement distance of the point cloud, which is defined as ΔT = T;

[0037] The offset Δ is expressed as: Δ=[ΔR, ΔT], where ΔR is the rotation matrix and ΔT is the translation vector.

[0038] In some embodiments of the present disclosure, the step of calculating the working trajectory of the current part based on the theoretical trajectory and the offset, and sending it to the motion mechanism for execution includes:

[0039] Obtaining the theoretical trajectory, which is composed of key positions and postures, representing the travel path of the motion mechanism during the operation process, and the position and posture include position and attitude;

[0040] Convert the position and posture of each point in the trajectory into homogeneous coordinate form, that is, integrate the position and posture information into a homogeneous transformation matrix;

[0041] According to the offset Δ, a corresponding transformation matrix is ​​constructed, which is composed of a rotation matrix R and a translation vector T, representing the change in posture from the first part to the current part;

[0042] The homogeneous coordinate matrix of each trajectory point is transformed using the offset Δ to obtain a new trajectory point posture. The operating trajectory of the current part is obtained by multiplying the theoretical trajectory by the offset.

[0043] According to a second aspect of the present disclosure, there is provided a motion mechanism trajectory generation and position calibration device, comprising:

[0044] A construction module is used to obtain and record teaching point data generated based on the motion mechanism and the guided action of the teach pendant, and to construct an initial trajectory of the first part according to the teaching point data;

[0045] A generation module, used for inputting the initial trajectory of the first part into the offline programming software for processing to generate a theoretical trajectory;

[0046] A calibration module, used to calibrate the sensor and the motion mechanism, and calculate the rotation matrix and translation vector between the sensor and the motion mechanism;

[0047] A first processing module is used to collect three-dimensional data of the first part using the sensor, convert it into a point cloud in the sensor coordinate system, and calculate a theoretical template by combining the rotation matrix and translation vector between the sensor and the motion mechanism;

[0048] The second processing module is used to collect the three-dimensional data of the current part by using the sensor after the current part reaches the specified position, convert it into a point cloud in the sensor coordinate system, and calculate the current point cloud by combining the rotation matrix and the translation vector between the sensor and the motion mechanism;

[0049] A matching module, used for matching the current point cloud with the theoretical template and calculating an offset;

[0050] The calculation module is used to calculate the working trajectory of the current part based on the theoretical trajectory and the offset, and send it to the motion mechanism for execution.

[0051] According to a third aspect of the present disclosure, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the method in any one of the above embodiments are implemented.

[0052] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0053] The method, device, equipment and storage medium for generating and calibrating the position of the motion mechanism trajectory provided by the embodiments of the present disclosure obtain and record the teaching point data generated by the guided action of the teach pendant executed by the motion mechanism, construct the initial trajectory of the first part, and input it into the offline programming software to generate the theoretical trajectory. Next, the sensor and the motion mechanism are calibrated, and the rotation matrix and translation vector are calculated. Then, the three-dimensional data of the first part is collected by the sensor and converted into a theoretical template in combination with the rotation matrix and translation vector. After the current part is in place, the three-dimensional data of the current part is also collected and converted into the current point cloud in combination with the rotation matrix and translation vector. The offset is calculated by matching the current point cloud with the theoretical template. Finally, based on the theoretical trajectory and the offset, the operating trajectory of the current part is calculated and sent to the motion mechanism for execution. The handheld teach pendant is used to conveniently plan the trajectory path of the motion mechanism, thereby generating the required operation trajectory. This trajectory can then be imported into the offline programming software for flexible editing, making it easy to add process details according to actual needs and fully optimize processing efficiency. In addition, the point cloud data of the current part posture can be captured by the sensor, and it can be accurately compared with the theoretical template generated by the handheld teach pendant, and then the change matrix between the postures of different parts in the same batch can be calculated. With this matrix, the theoretical trajectory can be offset and adjusted in the offline programming software to quickly generate a trajectory that adapts to the new posture. This significantly improves the speed and efficiency of trajectory generation. It can efficiently deal with the trajectory offset problem of parts in different postures without recalibration or trajectory regeneration. Users can not only intuitively create and adjust trajectories, but also quickly add settings such as operation processes.

[0054] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below. It should be noted that the drawings described below only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure, wherein:

[0056] Figure 1 It is a flow chart of a method for generating a motion mechanism trajectory and calibrating a position provided by an embodiment of the present disclosure;

[0057] Figure 2 It is a structural schematic diagram of a motion mechanism trajectory generation and position calibration device provided by an embodiment of the present disclosure;

[0058] Figure 3 It is a structural diagram of a computer device provided in an embodiment of the present disclosure.

[0059] In the drawings, reference numerals with the same last two digits correspond to the same elements. It should be noted that the elements in the drawings are schematic and not drawn to scale. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work also fall within the scope of protection of the present disclosure.

[0061] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase "embodiments" in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0062] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists, A and B exist at the same time, and B exists. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0063] Furthermore, in all embodiments of the present disclosure, terms such as “first” and “second” are used only to distinguish one component (or a part of a component) from another component (or another part of a component).

[0064] In the description of the present application, unless otherwise specified, "plurality" means more than two (including two), and similarly, "multiple groups" means more than two groups (including two).

[0065] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0066] At present, the process of generating the working trajectory of the motion mechanism is particularly complicated when dealing with complex or irregular part shapes. It not only requires precise planning of each working path to ensure the uniformity and quality of the operation, but also involves the setting and debugging of multiple key parameters (such as working angle, speed, distance, etc.). Any slight deviation may seriously affect the working effect. Especially for a large number of parts in the same batch, the problem is more prominent when the deviation from the theoretical trajectory occurs due to the difference in the posture of the parts during loading, which in turn triggers secondary calibration. The existing technology has the following disadvantages: not only is the trajectory generation process cumbersome, the difficulty of secondary editing of the trajectory is also great, and the trajectory generation efficiency is low for different processing technologies required for specific parts. When facing the same batch of parts that need secondary calibration, the calibration work needs to be repeated.

[0067] In order to solve the above problems, the embodiments of the present disclosure provide a method for generating and calibrating the trajectory of a machine motion mechanism. The motion mechanism is guided by a teach pendant, and the teaching point data is recorded to construct the initial trajectory of the first part. The initial trajectory is processed by offline programming software to generate a theoretical trajectory. After the sensor and the motion mechanism are calibrated, the three-dimensional data of the first part is obtained and converted into a theoretical template. After the current part is in place, the three-dimensional data of the current part is also collected and converted into the current point cloud, which is matched with the theoretical template to calculate the offset. Based on the theoretical trajectory and offset, the operating trajectory of the current part is calculated and sent to the motion mechanism for execution.

[0068] It can be seen that technicians can easily plan the trajectory of the motion mechanism through a handheld teaching pendant, import the generated operation trajectory into the offline programming software for editing, flexibly add processes, and optimize efficiency. The sensor captures the part point cloud, compares it with the theoretical template, calculates the posture change matrix, and realizes the rapid offset adjustment of the trajectory in offline programming. This improves the speed of trajectory generation, does not require recalibration, and can cope with different posture offsets. Technicians can intuitively create and adjust the trajectory and quickly set the operation process.

[0069] For example, the embodiments of the present application can be applied to exemplary application scenarios. In this scenario, the motion mechanism establishes a communication connection with the teach pendant, and the user holds the teach pendant to guide the motion mechanism to move to a specific position and start generating the initial trajectory. During the teaching process, the user guides the motion mechanism to move step by step through the teach pendant, records the data of the end effector of the motion mechanism at each teaching point, and sends the data of the teaching point to the controller; the controller can obtain and record the teaching point data generated based on the motion mechanism and the guided action of the teach pendant, and the controller can construct the initial trajectory of the first part according to the teaching point data. The controller inputs the initial trajectory into the offline programming software for processing and generates a theoretical trajectory. After the controller calibrates the sensor and the motion mechanism, it obtains the three-dimensional data of the first part and converts it into a point cloud in the coordinate system of the motion mechanism as a theoretical template. After the current part is in place, the controller also collects data and converts it into the current point cloud, matches it with the theoretical template and calculates the offset. Based on the theoretical trajectory and offset, the controller calculates the operating trajectory of the current part and sends it to the motion mechanism for execution.

[0070] It can be understood that the above scenarios are only used for illustrative purposes and are not used to limit the application scenarios of the embodiments of the present application. In fact, the embodiments of the present application can also be applied to other applicable scenarios.

[0071] See also Figure 1 , Figure 1 A schematic flow chart of a method for generating a motion mechanism trajectory and calibrating a position provided by an embodiment of the present disclosure is shown. The method may specifically include:

[0072] S110, acquiring and recording teaching point data generated based on the motion mechanism and the action guided by the teach pendant, and constructing an initial trajectory of the first part according to the teaching point data.

[0073] In a specific embodiment, the motion mechanism generally includes all machine devices that can automatically perform work. The teach pendant, whose full name is the teaching programmer, is a handheld device used for motion mechanism control. It is the human-machine interaction interface of the industrial motion mechanism. Most operations of the industrial motion mechanism, such as movement, program writing, trial operation, operation execution, and status viewing, are basically completed through it. The teach pendant allows engineers to record and edit the motion of the motion mechanism and save the programming content to the controller. The user can set the motion path of the motion mechanism through the teach pendant to realize the motion of the motion mechanism according to the predetermined trajectory. The teach pendant can store motion mechanism data and support data export function. The user can monitor the status of the motion mechanism, such as position, speed, etc., in real time through the teach pendant to ensure that the motion mechanism operates normally. The teach pendant supports multiple working modes, such as teaching mode, operation mode, remote mode, etc. The teach pendant is widely used in various industrial motion mechanism fields. The teach pendant realizes efficient and accurate automated production by precisely controlling the motion of the motion mechanism.

[0074] The teach pendant provides the user with an interface for directly controlling the joints of the motion mechanism or the end effector (such as a welding gun, nozzle or gripper). The user holds the teach pendant to guide the motion mechanism to move to a specific position and start generating the initial trajectory. For example, when operating the first part, the user holds the teach pendant to simulate the operating trajectory according to the process requirements, and the motion mechanism automatically generates the initial trajectory of the first part.

[0075] During the teaching process, the user can send work instructions to the motion mechanism by controlling the teach pendant, so that the motion mechanism can operate the parts in the real environment. When the motion mechanism receives the work instructions sent by the user, it can move the working position of the end effector to perform the virtual work operation corresponding to the end effector instruction.

[0076] The user guides the motion mechanism to move step by step through the teaching pendant, and records the data of the end effector of the motion mechanism at each teaching point. The teaching point data includes but is not limited to the position, posture, speed, acceleration and joint angle of each joint of the motion mechanism. These teaching point data are stored in the form of spatial coordinates and joint coordinates, and together constitute the basic data of the motion mechanism path containing position information and additional operation parameters (such as execution speed, acceleration, torque, etc.). The angles of each joint of the motion mechanism may include: mandibular joint, vertebral joint, costovertebral joint, upper limb bone joint (such as sternoclavicular joint, acromioclavicular joint, shoulder joint, elbow joint), hand joint (such as wrist metacarpal joint, metacarpal joint, metacarpophalangeal joint, interdigital joint), lower limb bone joint (such as hip joint, knee joint), foot joint (such as ankle joint, interphalangeal joint), etc.

[0077] Through the above steps, the trajectory planning of the motion mechanism can be carried out through the handheld teaching pendant, and the required operation trajectory can be efficiently generated.

[0078] S102, inputting the initial trajectory of the first part into the offline programming software for processing to generate a theoretical trajectory;

[0079] Offline programming software is mainly used to build a three-dimensional virtual environment for the entire motion mechanism working application scenario, and then perform a series of operations according to relevant requirements such as processing technology to automatically generate the motion trajectory of the motion mechanism, that is, the control instructions, and then simulate and adjust the trajectory in the software, and finally generate the motion mechanism execution program and transmit it to the motion mechanism.

[0080] In a specific implementation, the offline programming software will optimize the path again. The goal of optimization is to ensure that the trajectory meets specific processing requirements, including but not limited to the shortest path, high smoothness and minimized energy consumption. In actual operation, in order to ensure the smoothness and accuracy of the motion mechanism, it is not simply to move the motion mechanism from one teaching point to another, but the offline programming software uses an interpolation algorithm to generate a continuous motion trajectory between two teaching points. These interpolation points are inserted according to the requirements of smoothness, speed, etc. of the motion, thereby ensuring the continuity and accuracy of the motion mechanism. Specifically, the interpolation method uses key information such as the position, speed, and acceleration of the known teaching points, and through a series of calculations, estimates and fills the blank areas between these points, thereby constructing a smooth and continuous trajectory line. This process not only ensures the accuracy of the initial trajectory, but also provides a solid foundation for subsequent processing operations. In practical applications, the selection of the interpolation method and the setting of the parameters will directly affect the quality and effect of the generated initial trajectory. Therefore, we need to reasonably select the interpolation method according to the specific processing requirements and the distribution of the teaching points, and optimize the relevant parameters to achieve the best processing effect.

[0081] After the trajectory optimization is completed, the motion mechanism execution program is generated based on the initial trajectory of the first part, wherein the motion mechanism execution program is used to indicate various parameters of the motion mechanism during the operation process, including but not limited to the action sequence, speed and acceleration, so as to ensure that the motion mechanism can perform tasks accurately and efficiently;

[0082] In this embodiment, the generated motion mechanism execution program is used as a theoretical trajectory.

[0083] S103, calibrating the sensor and the motion mechanism, and calculating the rotation matrix and translation vector between the sensor and the motion mechanism;

[0084] First, the calibration tool is set up. A calibration plate with a geometric shape is placed in the working area of ​​the motion mechanism. The relative position relationship between the sensor and the motion mechanism can be determined by the sensor and the motion mechanism synchronously "observing" the calibration plate.

[0085] Next, the sensor performs the image acquisition task. It captures the image of the calibration plate and uses the visual processing algorithm to accurately identify the 3D spatial positions of the feature points on the calibration plate, and then records the 3D spatial positions of these feature points in the sensor coordinate system.

[0086] At the same time, the kinematic mechanism performs a multi-point teaching operation. It moves the end effector to multiple different positions on the calibration plate and records these positions in the kinematic mechanism coordinate system. By collecting data from multiple positions, the transformation matrix between the sensor coordinate system and the kinematic mechanism coordinate system can be calculated.

[0087] Finally, based on the feature point positions captured by the sensor and the corresponding point information recorded by the motion mechanism, the rotation matrix and translation vector between the sensor and the motion mechanism are calculated to complete the entire calibration process.

[0088] S104, using the sensor to collect the three-dimensional data of the first part, converting it into a point cloud in the sensor coordinate system, combining the rotation matrix and translation vector between the sensor and the motion mechanism, calculating the point cloud data of the first part in the motion mechanism coordinate system, and using this data as a theoretical template;

[0089] In a specific implementation manner, the surface of the first part is fully scanned by the sensor to collect its three-dimensional data, and the depth information of each point on the surface of the first part is accurately estimated by measuring the reflection of light and the principle of parallax;

[0090] Convert the depth information into a series of precise three-dimensional coordinate points, which together form a three-dimensional model data set, which represents in detail the specific position of each point on the surface of the first part in space, thereby accurately presenting the geometric shape and structural features of the first part;

[0091] During the scanning process, the sensor will take multiple shots to ensure that all parts of the complex parts can be fully captured. Then the registration algorithm is used to stitch and fuse the multiple scan results to align the point cloud data from different perspectives, and finally generate a complete and coherent 3D model, that is, the point cloud data of the first part in the motion mechanism coordinate system is obtained, which is used as a theoretical template.

[0092] S105, after the current part reaches the designated position, the sensor is used to collect the three-dimensional data of the current part, and the data is converted into a point cloud in the sensor coordinate system, and the current point cloud is calculated by combining the rotation matrix and the translation vector between the sensor and the motion mechanism, and the current point cloud is the point cloud of the current part in the motion mechanism coordinate system;

[0093] In a specific implementation manner, the sensor is used to comprehensively scan the surface of the current part, and the depth information of each point on the surface of the current part is accurately estimated by measuring the reflection of light and the principle of parallax;

[0094] The depth information collected by the sensor is converted into a series of precise three-dimensional coordinate points, which together constitute a three-dimensional model data set, which represents in detail the specific position of each point on the surface of the current part in space, thereby accurately presenting the geometric shape and structural features of the current part;

[0095] During the scanning process, the sensor takes multiple shots to ensure that all parts of complex parts are fully captured. The multiple scan results are then stitched and fused using a registration algorithm. This process ensures that point cloud data from different perspectives can be accurately aligned, ultimately generating a complete and coherent 3D model.

[0096] S106, matching the current point cloud with the theoretical template, and calculating the offset between the first part and the current part, wherein the matching process involves calculating the center of mass and the transformation matrix;

[0097] The specific implementation process includes:

[0098] 1. Preparation

[0099] Theoretical template: The theoretical point cloud P based on the kinematic mechanism coordinate system is obtained after the point cloud of the first part is converted.

[0100] Current point cloud: The current point cloud Q based on the kinematic mechanism coordinate system is obtained after the point cloud of the current part is photographed for the second time and converted;

[0101] 2. Select corresponding points:

[0102] First, we need to make sure that there are corresponding point pairs between the two point clouds, that is, a point in the source point cloud has a known corresponding point in the target point cloud. If we have a set of these corresponding point pairs (such as manually selected, or through algorithms such as nearest neighbor pairing), we can use these points to calculate the transformation matrix.

[0103] Assume that the two point clouds are theoretical point cloud P and current point cloud Q;

[0104] Theoretical point cloud P: its coordinates are P1, P2, .., Pn

[0105] Current point cloud Q: its coordinates are q1,q2,...,qn

[0106] Using the iterative closest point (ICP) algorithm, the nearest neighbor point in the theoretical point cloud P is found for each point in the current point cloud Q to form a matching point pair. This step establishes the point pair relationship P1 and Q1 by calculating the Euclidean distance between each pair of points and selecting the point with the smallest distance as the matching pair.

[0107] 3. Calculate the center of mass and transformation matrix

[0108] 1. Calculate the centroid: Calculate the centroid of the theoretical point cloud P and the current point cloud Q respectively. The centroid is defined as the average position of all points in the point cloud. Formulas (1) and (2) are as follows:

[0109]

[0110] 2. Find the change matrix:

[0111] According to the matching point pairs, the transformation matrix of the current point cloud Q relative to the theoretical point cloud P is calculated. The transformation matrix consists of the rotation matrix R and the translation vector T to describe the position change of the current point cloud Q relative to the theoretical point cloud P. By minimizing the distance between the matching point pairs, the singular value decomposition (SVD) method is used to calculate the optimal transformation matrix [R, T];

[0112] Specifically,

[0113] Each point of the two point clouds is de-centroided, that is, the centroid of each point is subtracted from its coordinates. Formulas (3) and (4) are as follows:

[0114] p' i =p i -c P (3) ;

[0115] q' i =q i -c Q (4) ;

[0116] Then, these de-centroided points are used to calculate the covariance matrix H, formula (5) is as follows:

[0117]

[0118] Next, singular value decomposition (SVD) is performed on the covariance matrix H, and formula (6) is as follows:

[0119] H=U∑V T (6);

[0120] The rotation matrix R can be calculated by the following formula (7):

[0121] R=VU T (7);

[0122] Finally, the translation vector t is the offset between the centers of mass, and formula (8) is as follows:

[0123] t=c Q -Rc P (8);

[0124] Therefore, the final transformation matrix T is:

[0125]

[0126] 4. Iterative Optimization

[0127] The current point cloud is transformed using the initially calculated rotation matrix R and translation vector T, and the nearest neighbor point to the theoretical template is recalculated, and the above steps are repeated until the transformation converges.

[0128] Through the above steps, the matching between the current point cloud and the theoretical template is completed.

[0129] After completing the point cloud matching, the offset is calculated, including:

[0130] The rotation matrix R and the translation vector T represent the offset Δ between the two point clouds respectively;

[0131] The rotation matrix R can be expressed as the rotation angle θ around a certain axis. The rotation angle and direction are extracted from the matrix R by axis-angle representation, which is defined as ΔR = R;

[0132] The translation vector T represents the displacement of the point cloud in three-dimensional space, and its length ‖T‖ is the displacement distance of the point cloud, which is defined as ΔT = T;

[0133] Finally, the offset Δ can be expressed as: Δ=[ΔR, ΔT], where ΔR is the rotation matrix and ΔT is the translation vector.

[0134] It should be noted that the pose transformation of the object photographed by the sensor is based on the sensor coordinate system, while the trajectory of the motion mechanism is relative to the motion mechanism coordinate system. Therefore, when calculating the offset, it is necessary to transform the point cloud in the sensor coordinate system to the motion mechanism coordinate system, and the final calculated offset is based on the motion mechanism coordinate system.

[0135] Through the above steps, the offset between the first part and the current part can be accurately calculated, providing accurate position information for subsequent motion mechanism operations.

[0136] S107, based on the theoretical trajectory and the offset, calculating the operation trajectory of the current part, and sending it to the motion mechanism for execution;

[0137] The specific implementation process includes:

[0138] 1. Obtain original trajectory data;

[0139] First, the theoretical trajectory is obtained, which consists of a series of key positions (positions and postures) and represents the travel path of the motion mechanism during the operation;

[0140] 2. Convert trajectory point positions;

[0141] Convert each point in the trajectory into homogeneous coordinates. Specifically, the position and attitude information is integrated into a 4×4 homogeneous transformation matrix to facilitate subsequent trajectory calculations.

[0142] 3. Construct the offset transformation matrix;

[0143] According to the trajectory offset Δ calculated previously, a corresponding transformation matrix is ​​constructed. The matrix consists of the rotation matrix R and the translation vector T, which together describe the change in posture from the first part to the current part.

[0144] 4. Calculate the pose of the new trajectory point;

[0145] The trajectory offset Δ is used to transform the homogeneous coordinate matrix of each trajectory point to obtain a new trajectory point pose. The specific calculation formula (10) is:

[0146] Pn = Δ × Po (10);

[0147] Among them, Po represents the homogeneous coordinate matrix of the original trajectory point, and Pn is the pose of the new trajectory point after applying the offset. In simple terms, the second operation trajectory of the current part is obtained by multiplying the first theoretical trajectory with the offset, that is, the operation trajectory of the current part = theoretical trajectory * offset variable.

[0148] Through this step, the operating trajectory of the current part can be accurately calculated and output to the motion mechanism to ensure that the motion mechanism can operate according to the expected path.

[0149] The method for generating and calibrating the position of the trajectory of a motion mechanism provided by an embodiment of the present disclosure first obtains and records the teaching point data generated by the guided action of the teach pendant executed by the motion mechanism, constructs the initial trajectory of the first part, and inputs it into the offline programming software to generate the theoretical trajectory. Next, the sensor and the motion mechanism are calibrated to calculate the rotation matrix and translation vector. Then, the three-dimensional data of the first part is collected by the sensor and converted into a theoretical template in combination with the rotation matrix and translation vector. After the current part is in place, the three-dimensional data of the current part is also collected and converted into the current point cloud in combination with the rotation matrix and translation vector. The offset is calculated by matching the current point cloud with the theoretical template. Finally, based on the theoretical trajectory and the offset, the operating trajectory of the current part is calculated and sent to the motion mechanism for execution. This improves the speed of trajectory generation, does not require recalibration, and can cope with different posture offsets. The trajectory can be created and adjusted intuitively, and the process can be set up quickly.

[0150] On the basis of the above embodiments, the present disclosure also provides a motion mechanism trajectory generation and position calibration device, such as Figure 2 As shown, the device comprises:

[0151] A construction module 210 is used to obtain and record teaching point data generated based on the motion mechanism and the guided action of the teaching pendant, and to construct an initial trajectory of the first part according to the teaching point data;

[0152] A generation module 220 is used to input the initial trajectory of the first part into the offline programming software for processing to generate a theoretical trajectory;

[0153] A calibration module 230, used to calibrate the sensor and the motion mechanism, and calculate the rotation matrix and translation vector between the sensor and the motion mechanism;

[0154] The first processing module 240 is used to collect the three-dimensional data of the first part by using the sensor, convert it into a point cloud in the sensor coordinate system, and calculate the theoretical template by combining the rotation matrix and translation vector between the sensor and the motion mechanism;

[0155] The second processing module 250 is used to collect the three-dimensional data of the current part again by using the sensor after the current part reaches the specified position, and convert it into a point cloud in the sensor coordinate system, and calculate the current point cloud by combining the rotation matrix and the translation vector between the sensor and the motion mechanism;

[0156] A matching module 260 is used to match the current point cloud with the theoretical template and calculate an offset;

[0157] The calculation module 270 is used to calculate the working trajectory of the current part based on the theoretical trajectory and the offset, and send it to the motion mechanism for execution.

[0158] In some embodiments of the present disclosure, the teaching point data includes position data and operation information, wherein the position data includes at least the position and posture of each joint of the motion mechanism, and the operation information includes at least the speed, acceleration and joint angle, and the teaching point data is stored in the form of spatial coordinates and joint coordinates.

[0159] In a specific embodiment, the calibration module 230 is specifically used to:

[0160] Placing a calibration plate with a known geometric shape in the working area of ​​the motion mechanism, and determining the relative position relationship between the calibration plate through synchronous observation of the sensor and the motion mechanism;

[0161] The sensor captures an image of the calibration plate, identifies and records the three-dimensional spatial positions of feature points on the calibration plate using a visual processing algorithm, and then records the three-dimensional spatial positions of these feature points in a sensor coordinate system;

[0162] While the sensor is capturing images, the motion mechanism moves its end effector to a plurality of different positions on the calibration plate and records these positions in the motion mechanism coordinate system, and calculates a transformation matrix between the sensor coordinate system and the motion mechanism coordinate system by collecting data from a plurality of positions;

[0163] Based on the positions of the feature points photographed by the sensor and the corresponding point information recorded by the motion mechanism, a rotation matrix and a translation vector between the sensor and the motion mechanism are calculated.

[0164] In a specific embodiment, the first processing module 240 is specifically used to:

[0165] Scanning the surface of the first part by the sensor to collect its three-dimensional data, and estimating the depth information of each point on the surface of the part by measuring the reflection and parallax of the light;

[0166] Converting the depth information into a series of three-dimensional coordinate points to form a three-dimensional model data set, which represents the position of each point on the surface of the first part in space, thereby presenting the geometric shape and structure of the first part;

[0167] During the scanning process, the sensor takes multiple shots, and uses a registration algorithm to stitch and fuse multiple scanning results to obtain the theoretical template, which is a theoretical point cloud of the first part in the motion mechanism coordinate system.

[0168] In a specific embodiment, the second processing module 250 is specifically used to:

[0169] Scanning the surface of the current part by the sensor to collect its three-dimensional data, and estimating the depth information of each point on the surface of the current part by measuring the reflection and parallax of the light;

[0170] The depth information collected by the sensor is converted into a series of three-dimensional coordinate points to form a three-dimensional model data set, which represents the position of each point on the surface of the current part in space, thereby presenting the geometric shape and structure of the current part;

[0171] During the scanning process, the sensor takes multiple shots, especially when scanning complex parts, and the multiple scanning results are spliced ​​and fused by using a registration algorithm to obtain a current point cloud, which is the point cloud of the current part in the motion mechanism coordinate system.

[0172] In a specific embodiment, the matching module 260 is specifically used to:

[0173] In the preparation stage, the theoretical template and the current point cloud are obtained;

[0174] Find matching point pairs between the theoretical template and the current point cloud by using an ICP algorithm;

[0175] Calculate the centroids of the theoretical template and the current point cloud respectively, and calculate the rotation matrix R and the translation vector T in the transformation matrix according to the matching point pairs, wherein the transformation matrix is ​​used to represent the change in the position and posture of the current point cloud relative to the theoretical template;

[0176] Calculate the optimal transformation matrix [R, T] through the SVD method;

[0177] Perform iterative optimization, apply the calculated transformation matrix to transform the point cloud, and recalculate the nearest neighbor point until the transformation amount converges;

[0178] According to the rotation matrix R and the translation vector T, the trajectory offset Δ between two point clouds is calculated, specifically including:

[0179] The rotation matrix R is represented by the rotation angle θ around a certain axis. The rotation angle and direction are extracted from the matrix R by axis-angle representation, which is defined as ΔR = R;

[0180] The translation vector T represents the displacement of the point cloud in three-dimensional space, and its length ‖T‖ is the displacement distance of the point cloud, which is defined as ΔT = T;

[0181] The offset Δ is expressed as: Δ=[ΔR, ΔT], where ΔR is the rotation matrix and ΔT is the translation vector.

[0182] In a specific embodiment, the calculation module 270 is specifically used to:

[0183] Obtaining the theoretical trajectory, which is composed of key positions and postures, representing the travel path of the motion mechanism during the operation process, and the position and posture include position and attitude;

[0184] Convert the position and posture of each point in the trajectory into homogeneous coordinate form, that is, integrate the position and posture information into a homogeneous transformation matrix;

[0185] According to the offset Δ, a corresponding transformation matrix is ​​constructed, which is composed of a rotation matrix R and a translation vector T, representing the change in posture from the first part to the current part;

[0186] The homogeneous coordinate matrix of each trajectory point is transformed using the offset Δ to obtain a new trajectory point posture. The operating trajectory of the current part is obtained by multiplying the theoretical trajectory by the offset.

[0187] The motion mechanism trajectory generation and position calibration device provided by the embodiment of the present disclosure improves the trajectory generation speed, does not need to be recalibrated, and can cope with different posture offsets. The trajectory can be intuitively created and adjusted, and the operation process can be quickly set.

[0188] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0189] The present application also provides a computer device. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.

[0190] The computer device includes a memory 310 and a processor 320 that are connected to each other through a system bus. It should be noted that the figure only shows a computer device with components 310-320, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0191] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.

[0192] The memory 310 includes at least one type of readable storage medium, and the readable storage medium includes a non-volatile memory or a volatile memory, for example, a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc., and the RAM may include a static RAM or a dynamic RAM. In some embodiments, the memory 310 may be an internal storage unit of a computer device, for example, a hard disk or a memory of the computer device. In other embodiments, the memory 310 may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, or a flash card (FlashCard) equipped on the computer device. Of course, the memory 310 may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory 310 is generally used to store the operating system and various application software installed on the computer device, such as the program code of the above method. In addition, the memory 310 may also be used to temporarily store various data that have been output or are to be output.

[0193] The processor 320 is generally used to perform the overall operation of the computer device. In this embodiment, the memory 310 is used to store program codes or instructions, the program code includes computer operation instructions, and the processor 320 is used to execute the program codes or instructions stored in the memory 310 or process data, such as running the program code of the above method.

[0194] In this article, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0195] Another embodiment of the present application also provides a computer-readable medium, which may be a computer-readable signal medium or a computer-readable medium. A processor in a computer reads a computer-readable program code stored in the computer-readable medium, so that the processor can execute the functional actions specified in each step or a combination of steps in the above method; and generate a device for implementing the functional actions specified in each block or a combination of blocks in the block diagram.

[0196] Computer-readable media include but are not limited to electronic, magnetic, optical, electromagnetic, infrared memory or semiconductor systems, devices or apparatuses, or any appropriate combination of the foregoing, the memory is used to store program codes or instructions, the program codes include computer operating instructions, and the processor is used to execute the program codes or instructions of the above methods stored in the memory.

[0197] For the definitions of memory and processor, please refer to the description of the aforementioned computer device embodiment and will not be repeated here.

[0198] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0199] Each functional unit or module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0200] If the integrated unit is implemented in the form of 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 application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0201] Unless the context clearly indicates otherwise, the singular form of the words used herein and in the appended claims includes the plural and vice versa. Thus, when referring to the singular, the plural form of the corresponding term is generally included. Similarly, the words "comprise" and "include" are to be interpreted as inclusive rather than exclusive. Likewise, the terms "include" and "or" should be interpreted as inclusive unless such interpretation is expressly prohibited herein. Where the term "example" is used herein, particularly when it is located after a group of terms, the "example" is merely exemplary and illustrative and should not be considered exclusive or comprehensive.

[0202] Further aspects and scopes of adaptability become apparent from the description provided herein. It should be understood that various aspects of the present application can be implemented individually or in combination with one or more other aspects. It should also be understood that the description and specific embodiments herein are intended for purposes of illustration only and are not intended to limit the scope of the present application.

[0203] Several embodiments of the present disclosure are described in detail above, but it is obvious that those skilled in the art can make various modifications and variations to the embodiments of the present disclosure without departing from the spirit and scope of the present disclosure. The protection scope of the present disclosure is defined by the attached claims.

Claims

1. A method for generating and calibrating the trajectory of a motion mechanism, characterized in that: include: Acquire and record teaching point data generated based on the motion mechanism and the guided action of the teach pendant, and construct an initial trajectory of the first part according to the teaching point data; Inputting the initial trajectory of the first part into the offline programming software for processing to generate a theoretical trajectory; Calibrate the sensor and the motion mechanism, and calculate the rotation matrix and translation vector between the sensor and the motion mechanism; The sensor is used to collect three-dimensional data of the first part, and the data is converted into a point cloud in the sensor coordinate system. The rotation matrix and translation vector between the sensor and the motion mechanism are combined to calculate a theoretical template. After the current part reaches the specified position, the sensor is used to collect the three-dimensional data of the current part, which is converted into a point cloud in the sensor coordinate system, and the current point cloud is calculated by combining the rotation matrix and translation vector between the sensor and the motion mechanism; Matching the current point cloud with the theoretical template and calculating the offset; Based on the theoretical trajectory and the offset, the operation trajectory of the current part is calculated and sent to the motion mechanism for execution.

2. The method according to claim 1, characterized in that The teaching point data includes position data and operation information, wherein the position data includes at least the position and posture of each joint of the motion mechanism, and the operation information includes at least the speed, acceleration and joint angle. The teaching point data is stored in the form of space coordinates and joint coordinates.

3. The method according to claim 1, characterized in that The step of calibrating the sensor and the motion mechanism to calculate the rotation matrix and the translation vector between the sensor and the motion mechanism comprises: Placing a calibration plate with a known geometric shape in the working area of ​​the motion mechanism, and determining the relative position relationship between the calibration plate through synchronous observation of the sensor and the motion mechanism; The sensor captures an image of the calibration plate, identifies and records the three-dimensional spatial positions of feature points on the calibration plate using a visual processing algorithm, and then records the three-dimensional spatial positions of these feature points in a sensor coordinate system; While the sensor is capturing images, the motion mechanism moves its end effector to a plurality of different positions on the calibration plate and records these positions in the motion mechanism coordinate system, and calculates a transformation matrix between the sensor coordinate system and the motion mechanism coordinate system by collecting data from a plurality of positions; Based on the positions of the feature points photographed by the sensor and the corresponding point information recorded by the motion mechanism, a rotation matrix and a translation vector between the sensor and the motion mechanism are calculated.

4. The method according to claim 1, characterized in that: The step of collecting the three-dimensional data of the first part by using the sensor, converting it into a point cloud in the sensor coordinate system, and calculating the theoretical template by combining the rotation matrix and the translation vector between the sensor and the motion mechanism includes: Scanning the surface of the first part by the sensor to collect its three-dimensional data, and estimating the depth information of each point on the surface of the part by measuring the reflection and parallax of the light; Converting the depth information into a series of three-dimensional coordinate points to form a three-dimensional model data set, which represents the position of each point on the surface of the first part in space, thereby presenting the geometric shape and structure of the first part; During the scanning process, the sensor takes multiple shots, and uses a registration algorithm to stitch and fuse multiple scanning results to obtain the theoretical template, which is a theoretical point cloud of the first part in the motion mechanism coordinate system.

5. The method according to claim 1, characterized in that After the current part reaches the specified position, the sensor is used to collect the three-dimensional data of the current part, and the data is converted into a point cloud in the sensor coordinate system, and the current point cloud is calculated by combining the rotation matrix and the translation vector between the sensor and the motion mechanism, including: Scanning the surface of the current part by the sensor to collect its three-dimensional data, and estimating the depth information of each point on the surface of the current part by measuring the reflection and parallax of the light; Convert the depth information collected by the sensor into a series of three-dimensional coordinate points to form a three-dimensional model data set, which represents the position of each point on the surface of the current part in space, thereby presenting the geometric shape and structure of the current part; During the scanning process, the sensor takes multiple shots, especially when scanning complex parts, and the multiple scanning results are spliced ​​and fused by using a registration algorithm to obtain a current point cloud, which is the point cloud of the current part in the motion mechanism coordinate system.

6. The method according to claim 1, characterized in that The step of matching the current point cloud with the theoretical template comprises: In the preparation stage, the theoretical template and the current point cloud are obtained; Find matching point pairs between the theoretical template and the current point cloud by using an ICP algorithm; Calculate the centroids of the theoretical template and the current point cloud respectively, and calculate the rotation matrix R and the translation vector T in the transformation matrix according to the matching point pair, wherein the transformation matrix is ​​used to represent the change in the position and posture of the current point cloud relative to the theoretical template; Calculate the optimal transformation matrix [R, T] through the SVD method; Perform iterative optimization, apply the calculated transformation matrix to transform the point cloud, and recalculate the nearest neighbor point until the transformation amount converges; The step of calculating the offset comprises: According to the rotation matrix R and the translation vector T, the trajectory offset Δ between two point clouds is calculated, specifically including: The rotation matrix R is represented by the rotation angle θ around a certain axis. The rotation angle and direction are extracted from the matrix R by axis-angle representation, which is defined as ΔR = R; The translation vector T represents the displacement of the point cloud in three-dimensional space, and its length ‖T‖ is the displacement distance of the point cloud, which is defined as ΔT = T; The offset Δ is expressed as: Δ=[ΔR, ΔT], where ΔR is the rotation matrix and ΔT is the translation vector.

7. The method according to claim 1, characterized in that The step of calculating the working trajectory of the current part based on the theoretical trajectory and the offset, and sending it to the motion mechanism for execution includes: Obtaining the theoretical trajectory, which is composed of key positions and postures, representing the travel path of the motion mechanism during the operation process, and the position and posture include position and attitude; Convert the position and posture of each point in the trajectory into homogeneous coordinate form, that is, integrate the position and posture information into a homogeneous transformation matrix; According to the offset Δ, a corresponding transformation matrix is ​​constructed, which is composed of a rotation matrix R and a translation vector T, representing the change in posture from the first part to the current part; The homogeneous coordinate matrix of each trajectory point is transformed using the offset Δ to obtain a new trajectory point posture. The operating trajectory of the current part is obtained by multiplying the theoretical trajectory by the offset.

8. A motion mechanism trajectory generation and position calibration device, characterized in that: include: A construction module is used to obtain and record teaching point data generated based on the motion mechanism and the guided action of the teach pendant, and to construct an initial trajectory of the first part according to the teaching point data; A generation module, used for inputting the initial trajectory of the first part into the offline programming software for operation to generate a theoretical trajectory; A calibration module, used to calibrate the sensor and the motion mechanism, and calculate the rotation matrix and translation vector between the sensor and the motion mechanism; A first processing module is used to collect three-dimensional data of the first part using the sensor, convert it into a point cloud in the sensor coordinate system, and calculate a theoretical template by combining the rotation matrix and translation vector between the sensor and the motion mechanism; The second processing module is used to collect the three-dimensional data of the current part by using the sensor after the current part reaches the specified position, convert it into a point cloud in the sensor coordinate system, and calculate the current point cloud by combining the rotation matrix and the translation vector between the sensor and the motion mechanism; A matching module, used for matching the current point cloud with the theoretical template and calculating an offset; The calculation module is used to calculate the working trajectory of the current part based on the theoretical trajectory and the offset, and send it to the motion mechanism for execution.

9. A computer device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Three-dimensional visual posture recognition method for automatic spraying of duct piece mold

    CN120318324A