Control method, device and equipment of casting outer surface scanning system and storage medium
By using a dual-robotic arm collaborative control process, the problems of data loss and long inspection time in the inspection of large-size castings have been solved, realizing efficient integrated inspection of castings and improving production efficiency.
Patent Information
- Application Number
- CN202512000341.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-02-10
AI Technical Summary
Existing laser scanning inspection methods are prone to data loss when processing large-sized castings, and lack an integrated online inspection method for ultra-large castings, resulting in increased inspection time and difficulty in meeting the needs of efficient production.
The system employs a dual-arm collaborative control process. By constructing system constraints and collaborative task modeling parameters, it generates the desired trajectory of the two arms' end effectors in the global coordinate system. The actual end effector pose is calculated through collaborative forward kinematics, and errors and collision risks are corrected in real time. Collision inverse kinematics is then performed, and joint angle smoothing is handled to ensure the synchronization and safety of the collaborative motion of the robotic arms.
It effectively reduces blind spots in casting inspection, lowers data loss rate, shortens inspection cycle, and improves casting production efficiency.
Smart Images

Figure CN121492044A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of casting detection, in particular to a control method, device and equipment of a casting outer surface scanning system and a storage medium. BACKGROUND
[0002] In the manufacturing and detection scene of casting vehicle floor, with the rapid development of industrial automation technology, the related detection equipment and technology are also constantly improving. The current laser scanning detection method adopts a fixed laser scanner to collect three-dimensional data on the surface of the object to be detected. Although this technology can provide high-precision point cloud data and is suitable for complex-shaped castings, when processing large-size castings, data loss caused by surface reflection or light obstruction is prone to occur, and traditional laser scanning requires multiple movements of the scanner, and there is no integrated operation mode for online detection of super-large-size castings, which increases the overall detection time and makes it difficult to meet the demand for efficient production. SUMMARY
[0003] The purpose of the present application is to provide a control method, device and equipment of a casting outer surface scanning system and a storage medium, which can at least reduce the detection blind area of castings, especially large-size castings, reduce the data loss rate, shorten the casting detection period, and improve the casting production efficiency.
[0004] In order to solve the above technical problems, in a first aspect, the present application provides a control method of a casting outer surface scanning system, the casting outer surface scanning system at least comprising a double-robot-arm subsystem for visual detection, the double-robot-arm subsystem at least comprising a first robot arm and a second robot arm; the control method of the casting outer surface scanning system at least comprising a double-robot-arm cooperative control process.
[0005] The double-robot-arm cooperative control process at least comprises:
[0006] S1, constructing system constraint conditions of the double-robot-arm subsystem, determining cooperative task modeling parameters according to task requirements of the double-robot-arm subsystem, and generating a double-arm end effector desired trajectory in a global coordinate system;
[0007] S2, real-time collecting current joint angles of the first robot arm and the second robot arm, calculating actual end poses of each robot arm at least through cooperative forward kinematics, and determining cooperative constraint conditions at least according to the double-arm end effector desired trajectory in the calculation process of the actual end poses;
[0008] S3, calculating a cooperative error of the double-robot-arm subsystem, and triggering cooperative correction at least when a module of the cooperative error is greater than an error allowable threshold in the system constraint conditions;
[0009] S4, calculating a real-time minimum distance between each link of each robot arm, and judging whether the dual-robot arm subsystem has a collision risk according to the real-time minimum distance and a safe collision distance threshold in the cooperative task modeling parameter;
[0010] S5, performing cooperative inverse kinematics solving, taking the current joint angle as an initial value, and iteratively solving an optimized joint angle meeting the system constraint condition by using an improved Newton-Raphson method, and then performing joint angle smooth transition processing based on the optimized joint angle and the current joint angle to reduce cooperative out-of-step or impact caused by joint mutation;
[0011] S6, repeatedly performing steps S2 to S5 until the system task ends.
[0012] Optionally, the casting outer surface scanning system further comprises at least an X-ray detection single-robot arm subsystem, the single-robot arm subsystem comprising at least a third robot arm; and the control method of the casting outer surface scanning system further comprises a single-robot arm control process for controlling the third robot arm;
[0013] The single-robot arm control process comprises at least:
[0014] S7, dividing a work path of the third robot arm, screening path key points, and formulating control constraint conditions and key point threshold conditions;
[0015] S8, establishing a to-be-solved quintic polynomial according to boundary conditions of any two adjacent path key points on the work path, and solving the quintic polynomial coefficients of each degree of freedom;
[0016] S9, taking any quintic polynomial coefficient into the corresponding to-be-solved quintic polynomial to obtain a solved quintic polynomial, and deriving a velocity curve and an acceleration curve from the solved quintic polynomial, and then performing verification on the velocity curve and the acceleration curve through the control constraint conditions;
[0017] S10, when the velocity curve and / or the acceleration curve fail to pass the verification, adjusting a time interval of the corresponding two adjacent path key points, and re-solving the quintic polynomial coefficients until the system meets the constraint.
[0018] Optionally, the system constraint conditions comprise at least the error allowable threshold, and joint angle limits, joint speed limits, and joint acceleration limits of the first robot arm and the second robot arm.
[0019] Optionally, the collaborative task modeling parameters include at least the safe collision distance threshold, the expected relative homogeneous transformation matrix of the dual robotic arm end effectors, the expected relative velocity threshold of the dual robotic arm end effectors, and the expected relative acceleration threshold of the dual robotic arm end effectors.
[0020] Optionally, during the iterative solution of the optimized joint angle, the iteration termination condition is configured to at least be that the magnitude of the cooperative error is not greater than the error allowable threshold and the real-time minimum distance is not greater than the safe collision distance threshold.
[0021] Optionally, the joint angle smoothing process is achieved at least by using the cubic B-spline interpolation method.
[0022] Optionally, the working path of the third robotic arm is divided into at least a safety zone, a transition section, and a working zone;
[0023] The control constraints include at least the maximum end effector speed of the robotic arm, the maximum acceleration of the robotic arm, and the maximum jerk of the robotic arm.
[0024] Based on the same concept, in a second aspect, the present invention also provides a control device for a casting outer surface scanning system, for executing the control method of the casting outer surface scanning system described in any one of the first aspects;
[0025] The control device of the casting outer surface scanning system includes at least a dual robotic arm collaborative control module.
[0026] The dual-robotic arm collaborative control module is used to perform at least the following steps:
[0027] S1. Construct the system constraints of the dual-arm subsystem, determine the collaborative task modeling parameters according to the task requirements of the dual-arm subsystem, and generate the expected trajectory of the dual arm ends in the global coordinate system.
[0028] S2. Real-time acquisition of the current joint angles of the first robotic arm and the second robotic arm, so as to calculate the actual end pose of each robotic arm at least through cooperative positive kinematics, and in the process of calculating the actual end pose, at least based on the expected trajectory of the end of both arms, determine the cooperative constraint conditions.
[0029] S3. Calculate the cooperative error of the dual robotic arm subsystem, and trigger cooperative correction at least when the magnitude of the cooperative error is greater than the error allowable threshold in the system constraints.
[0030] S4. Calculate the real-time minimum distance between each link under each robotic arm, and determine whether there is a collision risk in the dual robotic arm subsystem based on the real-time minimum distance and the safe collision distance threshold in the collaborative task modeling parameters;
[0031] S5. Perform cooperative inverse kinematics solution. Using the current joint angle as the initial value, substitute the improved Newton-Raphson method to iteratively solve for the optimized joint joint angle that satisfies the system constraints. Then, perform joint angle smoothing transition processing based on the optimized joint joint angle and the current joint angle to reduce cooperative step loss or shock caused by joint abrupt changes.
[0032] S6. Repeat steps S2 to S5 until the system task ends.
[0033] Based on the same concept, in a third aspect, the present invention also provides an electronic device, including a memory and a processor, the memory storing a computer program executable on the processor, wherein the processor, when executing the program, implements the steps of the control method for the casting outer surface scanning system according to any one of the first aspects.
[0034] Based on the same concept, in a fourth aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the control method for the casting outer surface scanning system according to any one of the first aspects.
[0035] The technical solution provided in this invention includes the following steps: First, constructing system constraints for a dual-arm visual inspection subsystem; determining collaborative task modeling parameters based on the task requirements of the dual-arm subsystem; and generating the desired end-effector trajectories of the two arms in a global coordinate system. Second, real-time acquisition of the current joint angles of the first and second arms to calculate the actual end-effector pose of each arm at least through collaborative positive kinematics, and determining collaborative constraints at least based on the desired end-effector trajectories of the two arms during the calculation of the actual end-effector pose. Third, calculating the collaborative error of the dual-arm subsystem, ensuring that the magnitude of the collaborative error is greater than that specified in the system constraints. When the error tolerance threshold is reached, collaborative correction is triggered. The fourth step involves calculating the real-time minimum distance between links under each robotic arm and determining whether the dual-robotic arm subsystem faces collision risk based on the real-time minimum distance and the safe collision distance threshold in the collaborative task modeling parameters. The fifth step involves performing collaborative inverse kinematics solving, using the current joint angle as the initial value and iteratively solving the optimized joint joint angle that satisfies the system constraints using the improved Newton-Raphson method. Then, based on the optimized joint joint angle and the current joint angle, joint angle smoothing processing is performed to reduce collaborative asynchrony or impact caused by sudden joint changes. Finally, steps two through five are repeated until the system task ends. Therefore, this embodiment of the invention, by configuring a dual-robotic arm subsystem, can at least reduce the detection blind zone of castings, especially large-sized castings, reduce data loss rate, shorten the casting inspection cycle, and improve casting production efficiency. Attached Figure Description
[0036] Figure 1This is a flowchart of a control method for a casting outer surface scanning system provided in an embodiment of the present invention;
[0037] Figure 2 This is a flowchart of another control method for a casting outer surface scanning system provided in an embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram of the structure of a control device for a casting outer surface scanning system provided in an embodiment of the present invention;
[0039] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0041] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “said,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.
[0042] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0043] It should be understood that although the terms first, second, third, etc., may be used in the embodiments of this application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, first may also be referred to as second without departing from the scope of the embodiments of this application, and similarly, second may also be referred to as first.
[0044] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”
[0045] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device that includes said element.
[0046] It should be noted that any symbols and / or numbers present in the specification that are not marked in the accompanying drawings are not reference numerals.
[0047] Figure 1 This is a flowchart of a control method for a casting outer surface scanning system provided in an embodiment of the present invention. This embodiment is at least applicable to the manufacturing and inspection of large-size castings. The control method of the casting outer surface scanning system can be, but is not limited to, executed by the control device of the casting outer surface scanning system in this embodiment of the present invention. This execution entity can be implemented in software and / or hardware. Furthermore, the aforementioned casting outer surface scanning system includes at least a dual-robotic arm subsystem for visual inspection, which includes at least a first robotic arm and a second robotic arm; the control method of the casting outer surface scanning system includes at least a dual-robotic arm collaborative control process. Figure 1 As shown, the collaborative control process of the two robotic arms includes at least the following steps:
[0048] S1. Construct the system constraints of the dual-arm subsystem, determine the collaborative task modeling parameters according to the task requirements of the dual-arm subsystem, and generate the expected trajectory of the dual arm end effectors in the global coordinate system.
[0049] Prior to step S1, the dual-arm collaborative control process may also include the calibration and establishment of a collaborative coordinate system, which may include the aforementioned global coordinate system.
[0050] Specifically, a three-level coordinate system can be established according to the right-hand rule:
[0051] 1. Global cooperative coordinate system {G} (with the midpoint of the line connecting the centers of the two arm bases as the origin, the X-axis along the direction of the line, and the Z-axis perpendicular to the worktable surface);
[0052] 2. The base coordinate systems {B1} and {B2} and the link coordinate systems {L1} and {L2} of the two robotic arms (i.e., the first robotic arm and the second robotic arm mentioned above);
[0053] 3. The coordinate systems of the two end tools are {T1} and {T2} (with the center point of the probe as the origin).
[0054] The transformation matrices T1 and T2 between {G} and {B1} and {B2} can be measured using a laser tracker to ensure that the coordinate system calibration error is no greater than ±0.003mm.
[0055] In addition, system constraints and collaborative task modeling parameters can include multiple sub-parameters.
[0056] In one specific implementation, the system constraints may optionally include at least an error allowable threshold, joint angle limits, joint speed limits, and joint acceleration limits for the first robotic arm, and joint angle limits, joint speed limits, and joint acceleration limits for the second robotic arm.
[0057] In another specific implementation, optionally, the collaborative task modeling parameters include at least a safe collision distance threshold, the expected relative homogeneous transformation matrix of the dual robotic arm end effectors, the expected relative velocity threshold of the dual robotic arm end effectors, and the expected relative acceleration threshold of the dual robotic arm end effectors.
[0058] Furthermore, a laser tracker can be used to measure the extended DH parameters of the two robotic arms separately. Combined with zero-position calibration of the joint encoder, a single-arm DH parameter table (corresponding to the aforementioned transformation matrix) T1(θ1,α1,a1,d1) and T2(θ2,α2,a2,d2) can be established. Through end-effector docking experiments, the relative poses of the two arm ends under different postures can be measured, and the initial value of ΔT can be determined by fitting. The motion space of the two arms can be simulated using the Monte Carlo method to optimize and determine the optimal value of d, ensuring that the parameter error is no greater than ±0.005mm.
[0059] Understandably, α represents the angle between the axis of the i-th joint and the axis of the (i+1)-th joint of the robotic arm, measured by rotation around axis A; a represents the shortest distance between the axis of the i-th joint and the axis of the (i+1)-th joint of the robotic arm in a plane perpendicular to the axis of the i-th joint; d represents the distance from the origin of the i-th link coordinate system of the robotic arm along the axis of the i-th joint to the origin of the (i+1)-th link coordinate system; θ represents the rotation angle of the i-th link coordinate system of the robotic arm about the axis of the i-th joint relative to the (i-1)-th link coordinate system (rotation joints are variables, translation joints are constants); ΔT represents the expected relative homogeneous transformation matrix of the dual robotic arm end effectors (including the relative position vector P and the relative attitude matrix R), characterizing the cooperative attitude requirements; Δv and Δa represent the expected relative velocity threshold and the expected relative acceleration threshold of the dual robotic arm end effectors, respectively, to ensure motion synchronization; d safe The safe collision distance threshold between the two arms can be 0.05~0.1mm (the specific value can be adaptively adjusted according to the size of the robotic arm); the error allowable threshold ε can be, for example, 0.008mm~0.012mm.
[0060] S2. Real-time acquisition of the current joint angles of the first and second robotic arms, to calculate the actual end pose of each robotic arm at least through cooperative positive kinematics, and to determine cooperative constraint conditions at least based on the expected trajectory of the end of both arms during the calculation of the actual end pose.
[0061] Specifically, the collaborative constraints can be defined as follows:
[0062] T G-T2 =T G-T1 ×ΔT 12 ;
[0063] In the above formula, T G-T2 T represents the desired end effector trajectory of the second robotic arm; G-T1 This represents the desired end effector trajectory of the first robotic arm; ΔT 12 This represents the expected relative homogeneous transformation matrix (4×4 matrix, fixed value, which can be determined by task requirements) of the first robotic arm end effector relative to the second robotic arm end effector, including the expected relative positions of the two arm end effectors (P). 12 ) and desired relative posture (R) 12 That is, the poses of the two arm ends in the global coordinate system must satisfy the preset relative relationship.
[0064] In another specific implementation, the cooperative positive kinematics calculation process can be specifically defined as establishing a cooperative mapping relationship between the end poses of the two arms and their respective joint angles by multiplying the homogeneous transformation matrices together.
[0065] The homogeneous transformation matrix of the single-arm end effector in the global coordinate system is:
[0066] ;
[0067] In the above formula, j takes the value 1 or 2, corresponding to the first robotic arm and the second robotic arm, respectively; T G-Tj T represents the homogeneous transformation matrix (4×4 matrix) of the end-effector coordinate system {Tj} of the j-th robotic arm relative to the global cooperative coordinate system {G}, containing the end-effector's position and orientation information in the global coordinate system; G-Bj Let {Bj} be the homogeneous transformation matrix (4×4 matrix) of the base coordinate system {Bj} of the j-th robotic arm relative to the global cooperative coordinate system {G}. It can be obtained by the laser tracker and is a fixed constant (unchanged after the coordinate system is calibrated). Let A represent the product of homogeneous link transformation matrices from joint 1 to joint n of the j-th robotic arm (where n is the number of joints), which is a function of the joint angles (changing with joint movement); i,j Let represent the homogeneous transformation matrix (4×4 matrix) of the i-th link of the j-th robotic arm relative to the (i-1)-th link, i.e., the DH transformation matrix, which describes the pose transfer of a single link.
[0068] More specifically, the DH transformation matrix can be as follows:
[0069] .
[0070] S3. Calculate the cooperative error of the dual robotic arm subsystem, and trigger cooperative correction at least when the magnitude of the cooperative error is greater than the error allowable threshold in the system constraints.
[0071] Among them, the coordination error can include position error, attitude error and speed coordination error; the coordination error can characterize the difference between the current position, attitude and speed of the two robotic arms and the desired position, attitude and speed.
[0072] S4. Calculate the real-time minimum distance between each link under each robotic arm, and determine whether there is a collision risk in the dual robotic arm subsystem based on the real-time minimum distance and the safe collision distance threshold in the collaborative task modeling parameters.
[0073] S5. Perform cooperative inverse kinematics solution. Using the current joint angle as the initial value, substitute the improved Newton-Raphson method to iteratively solve for the optimized joint joint angle that satisfies the system constraints. Then, based on the optimized joint joint angle and the current joint angle, perform joint angle smooth transition processing to reduce cooperative step loss or shock caused by joint mutation.
[0074] The solution process for cooperative inverse kinematics can be specifically described as follows:
[0075] 1. Preliminary solution using analytical method: based on the collaborative constraint condition T G-T2 =T G-T1 ×ΔT 12The inverse kinematics problem of the two arms is solved in a coupled manner. First, the initial joint angle θ1 of the first robotic arm is solved using the single-arm analytical method (satisfying the desired pose of the first robotic arm's end effector). Then, the desired pose of the second robotic arm's end effector is derived based on the cooperative constraints, and the initial joint angle θ2 of the second robotic arm is solved using the single-arm analytical method, resulting in the initial joint angle vector θ.
[0076] .
[0077] 2. Improved Newton-Raphson method optimization: Introduce a cooperative error vector e, optimize the joint angles to reduce cooperative bias, and the iterative formula is as follows:
[0078] θ k+1 =θ k +J k+ +e k +Δθ col ;
[0079] In the above formula, θ k θ k+1 J represents the joint joint angle vector for the k-th and (k+1)-th iterations, respectively; k+ J represents the joint Jacobian matrix of the k-th iteration. k The pseudo-reversal; e k Let represent the cooperative error vector of the k-th iteration.
[0080] More specifically,
[0081] ;
[0082] In the above formula, J1 and J2 are the Jacobian matrices of the first and second robotic arms, respectively, which describe the mapping between joint angle changes and end-effector pose changes.
[0083] ;
[0084] In the above formula, e pos e represents the position error. ori Indicates attitude error, e sync This indicates the speed coordination error.
[0085] 3. Collision Avoidance Constraint Correction: An improved artificial potential field method is introduced, treating the other robotic arm as a dynamic obstacle, and constructing a cooperative potential field function U=U att +U rep In the formula, U represents the gravitational potential field of the target cooperative pose: U att =0.5×K att ×‖e‖ 2 K att‖e‖ represents the gravitational coefficient (adjusting the traction strength), and ‖e‖ represents the magnitude of the cooperative error vector (that is, the magnitude of the cooperative error below; the larger the error, the stronger the gravitational force, and the more the traction joint angle is corrected towards the target).
[0086] U rep Represents the repulsive potential field between the two arms: U rep =0.5×K rep ×(1 / d min,12 -1 / d safe ) 2 d min,12 <d safe .
[0087] In the above formula, K rep This represents the repulsion coefficient, which is a settable and adjustable parameter used to control the "strength" of the repulsion force; d min,12 This indicates the real-time minimum distance (in mm) between the links of the two arms.
[0088] The core indicator of collision avoidance detection is that the spatial position of all links in both arms can be measured in real time using a laser tracker, and the shortest distance between any two links can be calculated (it is necessary to traverse all links in both arms to ensure that no collision risk is missed).
[0089] In another specific implementation, optionally, during the iterative solution of optimizing the joint joint angle, the iteration termination condition is configured to at least be that the magnitude of the cooperative error is not greater than the error allowable threshold and the real-time minimum distance is not greater than the safe collision distance threshold.
[0090] In yet another specific implementation, the joint angle smoothing process can optionally be achieved at least by using the cubic B-spline interpolation method.
[0091] More specifically, the joint angle smoothing process includes at least the following steps:
[0092] 1. Determine the start and end reference points for interpolation.
[0093] For each joint of the two robotic arms, two core reference values are extracted as the start and end boundaries of the interpolation:
[0094] (1) Initial value: The joint angle of the original path that the robotic arm is currently executing;
[0095] (2) Termination value: The optimal target joint angle obtained after solving the cooperative inverse kinematics and correcting for collision avoidance;
[0096] All joints of the dual robotic arms are interpolated independently, but the transition time of the interpolation is completely synchronized to ensure that the two arms move in coordination without misalignment.
[0097] 2. Set the interpolation time parameters and divide the interpolation interval.
[0098] Set the total transition time: t = 0.2s to 0.5s can be selected as needed;
[0099] Divide the time step: Using the real-time control cycle of the robotic arm controller, 1ms, as the smallest unit, divide the total transition time into several consecutive time nodes;
[0100] 3. Generate a continuous sequence of joint angles using cubic B-spline interpolation.
[0101] By substituting the start and end joint angles and transition time into the standard polynomial formula of cubic B-spline interpolation, the real-time value of the joint angle at each time point is calculated, ultimately resulting in a continuous and smoothly changing sequence of joint angle values.
[0102] The core constraint of this polynomial is that the angular velocity at the start and end points is 0. That is, when the robotic arm starts transitioning, the speed starts smoothly and stops smoothly when the transition is completed, perfectly connecting the uniform motion before and after the correction, without any sense of abruptness.
[0103] 4. The two robotic arms synchronously send out interpolation trajectories to achieve a smooth transition.
[0104] The joint angle sequences of all joints of the two robotic arms are synchronously and equally sent to the corresponding joint servo motors. The motors execute the angle values in the sequence in sequence, thus completing the smooth transition from the original path joint angle to the corrected joint angle. After the transition is completed, the robotic arm directly connects to the corrected planned path and continues to move without any breaks or impacts.
[0105] Furthermore, a collaborative task path can be generated through trajectory planning, controlling two robotic arms to move along the planned path. A laser tracker is used to simultaneously measure the actual pose of the end effectors of both arms and the real-time positions of each link. The actual collaborative errors (pose collaboration error, velocity collaboration error) are compared with the model's calculated values, simultaneously verifying the d... safe ≥d min,12 If the requirements are not met, iteratively correct the DH parameters and ΔT until the cooperative pose error is ≤ ±0.01mm, the velocity cooperative error is ≤ ±0.005mm / s, and no collision occurs.
[0106] S6. Repeat steps S2 to S5 until the system task ends.
[0107] Step S6 can monitor coordination errors and collision risks in real time throughout the process, ensuring that the two arms move in coordination and without collision.
[0108] Therefore, the robotic arm linkage control method in this embodiment adopts a framework of "cooperative coordinate system modeling + distributed cooperative control + dynamic collision avoidance optimization". It defines cooperative constraint parameters by extending the DH parameter method, and combines an improved cooperative inverse kinematics algorithm with a real-time collision detection model to achieve cooperative motion and collision-free operation of the two robotic arms. The core logic is to establish a global cooperative coordinate system to associate the motion relationship between the two arms, correct joint angles through cooperative error feedback, and introduce an improved artificial potential field to avoid collisions, ensuring that the two arms are in synchronized pose, matched speed, and have controllable safe distance when performing tasks. Core parameters for cooperative planning are defined to describe the relative attitude, positional relationship, and cooperative constraints between the links of the two arms and between the arms themselves. A joint homogeneous transformation matrix chain from the global cooperative coordinate system to the end effectors (including probes) of the two robotic arms is established.
[0109] The technical solution provided in this embodiment includes the following steps: First, constructing system constraints for a dual-arm visual inspection subsystem, determining collaborative task modeling parameters based on the task requirements of the dual-arm subsystem, and generating the desired end-effector trajectories of the two arms in a global coordinate system; Second, acquiring the current joint angles of the first and second arms in real time to calculate the actual end-effector pose of each arm at least through collaborative positive kinematics, and determining collaborative constraints at least based on the desired end-effector trajectories of the two arms during the calculation of the actual end-effector pose; Third, calculating the collaborative error of the dual-arm subsystem, ensuring that the magnitude of the collaborative error is greater than the error in the system constraints. When the allowable threshold is reached, collaborative correction is triggered; fourth, the real-time minimum distance between each link under each robotic arm is calculated, and the collision distance threshold in the collaborative task modeling parameters is used to determine whether there is a collision risk in the dual robotic arm subsystem; fifth, collaborative inverse kinematics is performed, using the current joint angle as the initial value, and the improved Newton-Raphson method is used to iteratively solve for the optimized joint joint angle that satisfies the system constraints. Then, based on the optimized joint joint angle and the current joint angle, joint angle smoothing processing is performed to reduce collaborative asynchrony or impact caused by joint mutations; finally, steps two through five are repeated until the system task ends. Therefore, this embodiment, by configuring a dual robotic arm subsystem, can at least reduce the detection blind zone of castings, especially large-sized castings, reduce data loss rate, shorten the casting inspection cycle, and improve casting production efficiency.
[0110] It should be noted that, based on the above embodiments or implementation methods, the casting outer surface scanning system further includes at least a single robotic arm subsystem for X-ray inspection, and the single robotic arm subsystem includes at least a third robotic arm; the control method of the casting outer surface scanning system further includes at least a single robotic arm control process for controlling the third robotic arm. Figure 2 This is a flowchart of a control method for a casting outer surface scanning system provided in an embodiment of the present invention. See also... Figure 2 The single robotic arm control process includes at least the following steps:
[0111] S7. Divide the working path of the third robotic arm, select key points of the path, and formulate control constraints and key point threshold conditions.
[0112] The control constraints and key point threshold conditions can include multiple sub-conditions.
[0113] In another specific implementation, optionally, the working path of the third robotic arm is divided into at least a safety zone, a transition zone, and a working zone; the control constraints include at least the maximum end effector speed of the robotic arm, the maximum acceleration of the robotic arm, and the maximum jerk of the robotic arm.
[0114] More specifically, the work path can be divided into "safe zone → transition section → work area → transition section → safe zone"; the key points in the work area are to ensure alignment accuracy with a spacing of ≤5mm, and the key points in the safe zone are to improve efficiency with a spacing of ≤20mm; a speed threshold is set for each key point: v_k≤0.3m / s for key points in the safe zone, ≤0.1m / s for key points in the work area, and the speed of key points in the transition section decreases / increases linearly.
[0115] Furthermore, the control constraints can be specified as follows:
[0116] 1. Maximum end velocity v in the safe zone max ≤0.3m / s, the maximum end velocity in the work area shall not exceed 0.1m / s;
[0117] 2. Maximum acceleration a max ≤0.5m / sA 2 Maximum jerk j max ≤5m / sA 3 ;
[0118] 3. Trajectory continuity: Third-order continuity of position, velocity, and acceleration.
[0119] S8. Based on the boundary conditions of any two adjacent key points on the work path, establish the fifth-degree polynomial to be solved, and solve the coefficients of the fifth-degree polynomial for each degree of freedom.
[0120] Among them, for two adjacent key points P on the path k (x k ,y k ,z k ,α k ,β k ,γ k (t=t) k ) and P k+1 (x k+1 ,y k+1 ,z k+1 ,α k+1 ,β k+1 ,γk+1 (t=t) k+1 Each degree of freedom includes position x, y, z, and orientation α, β, γ.
[0121] Independently construct a 5th degree polynomial:
[0122] s(t) = a0 + a1t + a2tA 2 +a3tA 3 +a4tA 4 +a5tA 5 ;
[0123] In the above formula, s(t) represents the motion variable of a certain degree of freedom, and the coefficients a0~a5 can be solved by boundary conditions.
[0124] S9. Substitute the coefficients of any fifth-degree polynomial into the corresponding fifth-degree polynomial to be solved to obtain the solved fifth-degree polynomial. Then, differentiate the solved fifth-degree polynomial to obtain the velocity curve and acceleration curve. Finally, verify the velocity curve and acceleration curve by controlling the constraints.
[0125] S10. When the velocity curve and / or acceleration curve fails the verification, adjust the time interval between the two adjacent key points of the path and re-solve the coefficients of the fifth-order polynomial until the system satisfies the constraints.
[0126] Wherein, the time interval Δt=t k+1 -t k .
[0127] Therefore, this embodiment can reduce the blind spots in the detection of castings, especially large castings, by configuring a dual-robotic arm subsystem, thereby reducing data loss rate, shortening the casting inspection cycle, and improving casting production efficiency. Furthermore, this embodiment can also prioritize the alignment accuracy of the X-ray detector by modeling based on DH parameters and using fifth-order polynomial interpolation for speed control, and by dividing the work area / transition section / safety zone.
[0128] Figure 3 This is a schematic diagram of the control device for a casting outer surface scanning system provided in an embodiment of the present invention. This embodiment is at least applicable to the manufacturing and inspection of large-size castings. The control device for this casting outer surface scanning system can be implemented using software and / or hardware. Figure 3 As shown, the control device of the casting outer surface scanning system is used to execute the control method of the casting outer surface scanning system in any of the foregoing embodiments or implementations. The control device of the casting outer surface scanning system includes at least a dual robotic arm collaborative control module 110.
[0129] The dual-arm collaborative control module 110 is used to perform at least the following steps:
[0130] S1. Construct the system constraints of the dual-arm subsystem, determine the collaborative task modeling parameters according to the task requirements of the dual-arm subsystem, and generate the expected trajectory of the dual arm end in the global coordinate system.
[0131] S2. Real-time acquisition of the current joint angles of the first and second robotic arms, so as to calculate the actual end pose of each robotic arm at least through cooperative positive kinematics, and determine the cooperative constraint conditions at least based on the expected trajectory of the end of both arms during the calculation of the actual end pose.
[0132] S3. Calculate the cooperative error of the dual robotic arm subsystem, and trigger cooperative correction at least when the magnitude of the cooperative error is greater than the error allowable threshold in the system constraints.
[0133] S4. Calculate the real-time minimum distance between each link under each robotic arm, and determine whether there is a collision risk in the dual robotic arm subsystem based on the real-time minimum distance and the safe collision distance threshold in the collaborative task modeling parameters.
[0134] S5. Perform cooperative inverse kinematics solution. Using the current joint angle as the initial value, substitute the improved Newton-Raphson method to iteratively solve the optimized joint joint angle that satisfies the system constraints. Then, based on the optimized joint joint angle and the current joint angle, perform joint angle smooth transition processing to reduce cooperative step loss or shock caused by joint mutation.
[0135] S6. Repeat steps S2 to S5 until the system task ends.
[0136] Optionally, the control device of the casting outer surface scanning system includes at least a single robotic arm control module 120;
[0137] The single robotic arm control module 120 is used to perform at least the following steps:
[0138] S7. Divide the working path of the third robotic arm, select key points of the path, and formulate control constraints and key point threshold conditions.
[0139] S8. Based on the boundary conditions of any two adjacent key points on the work path, establish the fifth-degree polynomial to be solved, and solve the coefficients of the fifth-degree polynomial for each degree of freedom.
[0140] S9. Substitute the coefficients of any fifth-degree polynomial into the corresponding fifth-degree polynomial to be solved to obtain the solved fifth-degree polynomial. Then, differentiate the solved fifth-degree polynomial to obtain the velocity curve and acceleration curve. Finally, verify the velocity curve and acceleration curve by controlling the constraint conditions.
[0141] S10. When the velocity curve and / or acceleration curve fails the verification, adjust the time interval between the two adjacent key points of the path and re-solve the coefficients of the fifth-order polynomial until the system satisfies the constraints.
[0142] Optionally, the system constraints include at least an error allowable threshold, joint angle limits, joint speed limits, and joint acceleration limits for the first robotic arm, and joint angle limits, joint speed limits, and joint acceleration limits for the second robotic arm.
[0143] Optionally, the collaborative task modeling parameters include at least a safe collision distance threshold, the expected relative homogeneous transformation matrix of the dual robotic arm end effectors, the expected relative velocity threshold of the dual robotic arm end effectors, and the expected relative acceleration threshold of the dual robotic arm end effectors.
[0144] Optionally, during the iterative solution of optimizing the joint angle, the iteration termination condition is configured to at least be that the magnitude of the cooperative error is not greater than the error allowable threshold and the real-time minimum distance is not greater than the safe collision distance threshold.
[0145] Optionally, the joint angle smoothing process can be achieved at least by using the cubic B-spline interpolation method.
[0146] Optionally, the working path of the third robotic arm is divided into at least a safety zone, a transition zone, and a working zone;
[0147] The control constraints include at least the maximum end effector speed of the robotic arm, the maximum acceleration of the robotic arm, and the maximum jerk of the robotic arm.
[0148] The technical solution provided in this embodiment includes the following steps: First, the system constraints of a dual-manipulator subsystem for visual inspection are constructed through a dual-manipulator collaborative control module. Collaborative task modeling parameters are determined based on the task requirements of the dual-manipulator subsystem, and the desired end-effector trajectories of the two arms in the global coordinate system are generated. Second, the current joint angles of the first and second manipulators are collected in real time through the dual-manipulator collaborative control module to calculate the actual end-effector pose of each arm at least through collaborative positive kinematics. During the calculation of the actual end-effector pose, collaborative constraints are determined at least based on the desired end-effector trajectories of the two arms. Third, the collaborative error of the dual-manipulator subsystem is calculated through the dual-manipulator collaborative control module, and the magnitude of the collaborative error is at least greater than the error in the system constraints. When the allowable threshold is reached, collaborative correction is triggered; in the fourth step, the real-time minimum distance between each link under each robotic arm is calculated by the dual-arm collaborative control module, and the collision distance threshold in the collaborative task modeling parameters is used to determine whether there is a collision risk in the dual-arm subsystem; in the fifth step, the collaborative inverse kinematics solution is executed by the dual-arm collaborative control module, using the current joint angle as the initial value, and the improved Newton-Raphson method is used to iteratively solve for the optimized joint joint angle that satisfies the system constraints, and then joint angle smoothing processing is performed based on the optimized joint joint angle and the current joint angle to reduce collaborative step loss or impact caused by joint abrupt changes; finally, the second to fifth steps are repeated by the dual-arm collaborative control module until the system task ends. It can be seen that this embodiment, by configuring a dual-arm subsystem, can at least reduce the detection blind zone of castings, especially large-sized castings, reduce the data loss rate, shorten the casting detection cycle, and improve the casting production efficiency.
[0149] This embodiment provides an electronic device. Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. See also: Figure 4The electronic device 1000 includes a processor 1001 and a memory 1002. The memory 1002 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 1001, the steps in the control method of the casting outer surface scanning system described above are performed. Through the above technical solution, the processor 1001 and the memory 1002 are interconnected and communicate with each other via a communication bus and / or other forms of connection mechanisms (not shown). The memory 1002 stores a computer program executable by the processor. When the electronic device 1000 is running, the processor 1001 executes the computer program to perform the control method of the casting outer surface scanning system in any optional implementation of the above embodiments, to achieve at least the following functions: First, constructing system constraints for a dual-arm subsystem for visual inspection, determining collaborative task modeling parameters according to the task requirements of the dual-arm subsystem, and generating the desired trajectory of the dual-arm end effector in a global coordinate system; Second, acquiring the current joint angles of the first and second arms in real time, to calculate the actual end effector pose of each arm at least through collaborative positive kinematics, and determining the actual end effector pose in the actual end effector position. In the posture calculation process, at least the cooperative constraints are determined based on the expected trajectories of the two arm ends. In the third step, the cooperative error of the dual-arm subsystem is calculated, and cooperative correction is triggered at least when the magnitude of the cooperative error is greater than the error allowable threshold in the system constraints. In the fourth step, the real-time minimum distance between each link under each arm is calculated, and the presence of collision risk in the dual-arm subsystem is determined based on the real-time minimum distance and the safe collision distance threshold in the cooperative task modeling parameters. In the fifth step, cooperative inverse kinematics is solved. The current joint angle is used as the initial value, and the improved Newton-Raphson method is used to iteratively solve for the optimized joint joint angle that satisfies the system constraints. Then, joint angle smoothing is performed based on the optimized joint joint angle and the current joint angle to reduce cooperative step loss or impact caused by joint abrupt changes. Finally, steps two through five are repeated until the system task ends.
[0150] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a control method for a casting outer surface scanning system as provided in all embodiments of this application: First, constructing system constraints for a dual-arm visual inspection subsystem, determining collaborative task modeling parameters based on the task requirements of the dual-arm subsystem, and generating the desired end-effector trajectory of the two arms in a global coordinate system; Second, real-time acquisition of the current joint angles of the first and second arms to calculate the actual end-effector pose of each arm at least through collaborative positive kinematics, and determining collaborative constraints at least based on the desired end-effector trajectory during the calculation of the actual end-effector pose; Third, calculating the dual-arm subsystem... The system calculates the coordination error and triggers coordination correction when the magnitude of the coordination error is greater than the error allowable threshold in the system constraints. The fourth step is to calculate the real-time minimum distance between each link under each robotic arm and determine whether there is a collision risk in the dual robotic arm subsystem based on the real-time minimum distance and the safe collision distance threshold in the coordination task modeling parameters. The fifth step is to perform coordination inverse kinematics solution, using the current joint angle as the initial value and iteratively solving the optimized joint joint angle that satisfies the system constraints using the improved Newton-Raphson method. Then, based on the optimized joint joint angle and the current joint angle, joint angle smoothing transition processing is performed to reduce coordination loss of synchronization or impact caused by joint abrupt changes. Finally, the second to fifth steps are repeated until the system task ends.
[0151] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0152] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0153] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0154] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. 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 or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A control method for a casting outer surface scanning system, characterized in that, The casting outer surface scanning system includes at least a dual robotic arm subsystem for visual inspection, and the dual robotic arm subsystem includes at least a first robotic arm and a second robotic arm; the control method of the casting outer surface scanning system includes at least a dual robotic arm collaborative control process. The dual-robotic arm collaborative control process includes at least the following: S1. Construct the system constraints of the dual-arm subsystem, determine the collaborative task modeling parameters according to the task requirements of the dual-arm subsystem, and generate the expected trajectory of the dual arm ends in the global coordinate system. S2. Real-time acquisition of the current joint angles of the first robotic arm and the second robotic arm, so as to calculate the actual end pose of each robotic arm at least through cooperative positive kinematics, and in the process of calculating the actual end pose, at least based on the expected trajectory of the end of both arms, determine the cooperative constraint conditions. S3. Calculate the cooperative error of the dual robotic arm subsystem, and trigger cooperative correction at least when the magnitude of the cooperative error is greater than the error allowable threshold in the system constraints. S4. Calculate the real-time minimum distance between each link under each robotic arm, and determine whether there is a collision risk in the dual robotic arm subsystem based on the real-time minimum distance and the safe collision distance threshold in the collaborative task modeling parameters; S5. Perform cooperative inverse kinematics solution. Using the current joint angle as the initial value, substitute the improved Newton-Raphson method to iteratively solve for the optimized joint joint angle that satisfies the system constraints. Then, perform joint angle smoothing transition processing based on the optimized joint joint angle and the current joint angle to reduce cooperative step loss or shock caused by joint abrupt changes. S6. Repeat steps S2 to S5 until the system task ends.
2. The control method of the casting outer surface scanning system according to claim 1, characterized in that, The casting outer surface scanning system further includes at least a single robotic arm subsystem for X-ray inspection, and the single robotic arm subsystem includes at least a third robotic arm; the control method of the casting outer surface scanning system further includes at least a single robotic arm control process for controlling the third robotic arm; The single robotic arm control process includes at least the following: S7. Divide the working path of the third robotic arm, screen the key points of the path, and formulate control constraints and key point threshold conditions. S8. Based on the boundary conditions of any two adjacent key points on the work path, establish a fifth-degree polynomial to be solved, and solve for the coefficients of the fifth-degree polynomial for each degree of freedom. S9. Substitute any of the coefficients of the fifth-degree polynomial into the corresponding fifth-degree polynomial to be solved to obtain the solved fifth-degree polynomial, and differentiate the solved fifth-degree polynomial to obtain the velocity curve and acceleration curve. Then, perform verification on the velocity curve and acceleration curve through the control constraint conditions. S10. When the velocity curve and / or the acceleration curve fails the verification, adjust the time interval between the two adjacent key points of the path, and re-solve the coefficients of the fifth-order polynomial until the system satisfies the constraints.
3. The control method of the casting outer surface scanning system according to claim 1, characterized in that, The system constraints include at least the error allowable threshold, and the joint angle limit, joint speed limit, and joint acceleration limit of the first robotic arm, as well as the joint angle limit, joint speed limit, and joint acceleration limit of the second robotic arm.
4. The control method of the casting outer surface scanning system according to claim 1, characterized in that, The collaborative task modeling parameters include at least the safe collision distance threshold, the expected relative homogeneous transformation matrix of the dual robotic arm end effectors, the expected relative velocity threshold of the dual robotic arm end effectors, and the expected relative acceleration threshold of the dual robotic arm end effectors.
5. The control method of the casting outer surface scanning system according to claim 1, characterized in that, During the iterative solution of the optimized joint angle, the iteration termination condition is configured to at least be that the magnitude of the cooperative error is not greater than the error allowable threshold and the real-time minimum distance is not greater than the safe collision distance threshold.
6. The control method of the casting outer surface scanning system according to claim 1, characterized in that, The joint angle smoothing process is achieved at least by using the cubic B-spline interpolation method.
7. The control method of the casting outer surface scanning system according to claim 2, characterized in that, The working path of the third robotic arm is divided into at least a safety zone, a transition zone, and a working zone; The control constraints include at least the maximum end-effector velocity, maximum acceleration, and maximum jerk of the robotic arm.
8. A control device for a casting outer surface scanning system, characterized in that, A control method for performing the casting outer surface scanning system according to any one of claims 1-7; The control device of the casting outer surface scanning system includes at least a dual robotic arm collaborative control module. The dual-robotic arm collaborative control module is used to perform at least the following steps: S1. Construct the system constraints of the dual-arm subsystem, determine the collaborative task modeling parameters according to the task requirements of the dual-arm subsystem, and generate the expected trajectory of the dual arm ends in the global coordinate system. S2. Real-time acquisition of the current joint angles of the first robotic arm and the second robotic arm, so as to calculate the actual end pose of each robotic arm at least through cooperative positive kinematics, and in the process of calculating the actual end pose, at least based on the expected trajectory of the end of both arms, determine the cooperative constraint conditions. S3. Calculate the cooperative error of the dual robotic arm subsystem, and trigger cooperative correction at least when the magnitude of the cooperative error is greater than the error allowable threshold in the system constraints. S4. Calculate the real-time minimum distance between each link under each robotic arm, and determine whether there is a collision risk in the dual robotic arm subsystem based on the real-time minimum distance and the safe collision distance threshold in the collaborative task modeling parameters; S5. Perform cooperative inverse kinematics solution. Using the current joint angle as the initial value, substitute the improved Newton-Raphson method to iteratively solve for the optimized joint joint angle that satisfies the system constraints. Then, perform joint angle smoothing transition processing based on the optimized joint joint angle and the current joint angle to reduce cooperative step loss or shock caused by joint abrupt changes. S6. Repeat steps S2 to S5 until the system task ends.
9. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the control method of the casting outer surface scanning system 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 computer program is executed by the processor, it implements the steps in the control method of the casting outer surface scanning system according to any one of claims 1 to 7.