A method, apparatus, system and storage medium for testing castings.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]相关技术中,单纯通过接触测量法无法快速准确的区分异型铸件的待检特征面,且在检测位置需要固定,在检测位置转变时无法实现准确测量,很难做到待检多特征的快速批量检测
[0052]本发明实施例带来了以下有益效果:本发明提供了一种铸件检测方法、装置、系统及存储介质,通过获取所述待检特征面的深度图与RGB图像确定待检特征面对应的参数信息,根据所述参数信息构建零件坐标系并确定所述待检特征面对应的空间解析方程;之后,根据所述空间解析方程确定机械臂的目标运行轨迹;之后,控制机械臂沿目标运行轨迹运行以带动所述超声检测机构对待检特征面进行检测。这样,通过构建零件坐标系并确定空间解析方程以确定全局定位基准场,基于该零件坐标系可以确定机械臂的基座所处检测基站位置对应目标运行轨迹,从而实现精准定位、进而提高了检测精度,且全过程自动化完成减小了人工劳动强度、操作难度,使得检测工作便于实施、利于进行批量检测工作。
Smart Images

Figure CN117805235B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of casting inspection technology, and in particular to a casting inspection method, apparatus, system and storage medium. Background Technology
[0002] To address the challenge of in-situ, full-volume ultrasonic testing of casting defects in irregularly shaped castings with deep and narrow cavities, existing technologies have provided laser ultrasonic and air-coupled ultrasonic testing systems. However, these technologies have not been widely adopted due to limitations such as the low photoacoustic conversion rate of pulsed laser thermoelastic excitation and significant ultrasonic attenuation at the gas-solid interface. To solve this problem, existing technologies have introduced robotic arms to significantly reduce the required testing space. However, the water immersion ultrasonic reflection method still cannot identify the multi-mode waveform conversion effects of defect echoes induced by extremely complex structures such as adjacent areas of deep and narrow cylindrical cavities. Traditional water immersion ultrasonic testing cannot achieve in-situ testing of irregularly shaped castings with deep and narrow cavities at the machining station; typically, tooling positioning structures are used to locate the irregularly shaped casting under test.
[0003] In practical applications, the following technical problems exist:
[0004] In related technologies, the contact measurement method alone cannot quickly and accurately distinguish the feature surfaces to be inspected of irregularly shaped castings. Furthermore, the inspection position needs to be fixed, and accurate measurement cannot be achieved when the inspection position changes, making it difficult to achieve rapid batch inspection of multiple features to be inspected. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a casting inspection method, apparatus, system and storage medium.
[0006] In a first aspect, embodiments of the present invention provide a casting inspection method, the method being applied to a controller corresponding to a casting inspection system. The casting inspection system further includes a robotic arm, an ultrasonic testing mechanism, and an image acquisition mechanism. The robotic arm, the ultrasonic testing mechanism, and the image acquisition mechanism are respectively connected to the controller. The image acquisition mechanism is used to acquire images of the feature surfaces to be inspected on the casting and transmit the images to the controller. The controller is used to receive the images, process the images, and control the operation of the robotic arm based on the image processing results. The end of the robotic arm is connected to the ultrasonic testing mechanism, which is used to inspect the feature surfaces to be inspected. The method includes:
[0007] Obtain the target image of the feature surface to be inspected, the target image including a depth map and an RGB image;
[0008] Based on the target image, parameter information corresponding to the feature surface to be inspected is determined, and the parameter information includes at least one of depth data and end face point cloud data;
[0009] A part coordinate system is constructed based on the parameter information, and the spatial analytical equation corresponding to the feature surface to be inspected is determined.
[0010] The target trajectory of the robotic arm is determined based on the spatial analytical equation.
[0011] The robotic arm is controlled to move along the target trajectory to drive the ultrasonic testing mechanism to detect the feature surface to be inspected.
[0012] In conjunction with the first aspect, the feature surface to be inspected includes at least one of: a deep and narrow precision-machined inner cylindrical surface and a rough-machined outer cylindrical surface.
[0013] In conjunction with the first aspect, the feature surface to be inspected is a deep and narrow precision-machined inner cylindrical surface or a rough-machined outer cylindrical surface, and the parameter information includes point cloud data and depth data of the two end faces of the deep and narrow precision-machined inner cylindrical surface; the step of determining the parameter information corresponding to the feature surface to be inspected based on the target image includes:
[0014] For each end face, identify the depth information in the depth map;
[0015] Based on the color gradient of the RGB image, extract the point cloud data under each color gradient.
[0016] In conjunction with the first aspect, the step of constructing a part coordinate system based on the parameter information and determining the spatial analytical equation corresponding to the feature surface to be inspected includes:
[0017] For each of the aforementioned end faces, edge arcs in the target image are picked out according to an edge detection algorithm;
[0018] The edge arc is fitted with an arc equation, and the spatial coordinates of the center and radius corresponding to the end face are calculated.
[0019] Based on the spatial coordinates of the center and the radius, a coordinate system for the part is constructed, and the spatial analytical equation corresponding to the feature surface to be inspected is determined.
[0020] In conjunction with the first aspect, the steps for determining the target trajectory of the robotic arm based on the spatial analytical equation include:
[0021] The ultrasonic scanning path is determined based on the spatial analytical equation.
[0022] Based on the ultrasonic scanning path, calculate the target running trajectory of the robotic arm under the current detection base station.
[0023] In conjunction with the first aspect, the controller stores a detection adjustment angle and a sampling period, wherein the detection adjustment angle is used to characterize the rotation angle of the end of the robotic arm during the sampling period;
[0024] The step of determining the ultrasound scanning path based on the spatial analytical equation includes:
[0025] The axis of the feature surface to be inspected is determined based on the spatial coordinates of the centers of the two opposing end faces;
[0026] Several points on the axis were determined as detection reference points;
[0027] For each sampling time, a detection reference point is selected along the axis as the target detection reference point;
[0028] Calculate the spatial coordinates of the target detection reference point corresponding to the detection reference point based on the spatial analytical equation;
[0029] The ultrasonic scanning path is determined based on the spatial coordinates of the target detection reference point and the current rotation angle.
[0030] In conjunction with the first aspect, the robotic arm base is located at the current detection base station;
[0031] The step of calculating the target trajectory of the robotic arm under the current detection base station based on the ultrasonic scanning path includes:
[0032] Obtain the first coordinate of a specified point in the part coordinate system and the second coordinate of the camera coordinate system;
[0033] Calculate the first transformation matrix from the part coordinate system to the camera coordinate system based on the first coordinate and the second coordinate;
[0034] Obtain the third coordinate of the specified point in the current detection base station coordinate system;
[0035] Calculate the second transformation matrix from the camera coordinate system to the current detection base station coordinate system based on the second and third coordinates;
[0036] Based on the first transformation matrix and the second transformation matrix, calculate the third transformation matrix from the part coordinate system to the current detection base station coordinate system;
[0037] Based on the ultrasonic scanning path and the third transformation matrix, the first target running trajectory of the robotic arm under the current detection base station is calculated.
[0038] In conjunction with the first aspect, the detection base station includes one current detection base station and at least one calibration detection base station;
[0039] After the step of calculating the third transformation matrix from the part coordinate system to the current detection base station coordinate system based on the first transformation matrix and the second transformation matrix, the method further includes:
[0040] For each of the calibration detection base stations, obtain the fourth coordinate of the designated point at the calibration detection base station;
[0041] Based on the first coordinate and the fourth coordinate, calculate the fourth transformation matrix from the part coordinate system to the calibration and detection base station;
[0042] Based on the third transformation matrix and the fourth transformation matrix, calculate the fifth transformation matrix from the current detection base station coordinate system to the calibrated detection base station;
[0043] Based on the first target trajectory and the fifth transformation matrix, the second trajectory of the robotic arm under the calibration detection base station is calculated.
[0044] Secondly, this application provides a casting inspection device, applied to a controller corresponding to a casting inspection system. The casting inspection system includes a robotic arm, an ultrasonic testing mechanism, and an image acquisition mechanism. The robotic arm, the ultrasonic testing mechanism, and the image acquisition mechanism are respectively connected to the controller and operated under the control of the controller. The image acquisition mechanism is used to acquire images of the feature surfaces to be inspected on the casting and transmit the images to the controller. The controller is used to receive the images, process the images, and control the operation of the robotic arm based on the image processing results. One end of the robotic arm is connected to the ultrasonic testing mechanism, which is used to inspect the feature surfaces to be inspected. The device includes:
[0045] The acquisition module is used to acquire the target image of the feature surface to be inspected, the target image including a depth map and an RGB image;
[0046] The first determining module is used to determine parameter information corresponding to the feature surface to be inspected based on the target image, wherein the parameters include at least one of depth data and end face point cloud data.
[0047] The construction module is used to construct a part coordinate system based on the parameter information and determine the spatial analytical equation corresponding to the feature surface to be inspected;
[0048] The second determining module is used to determine the target running trajectory of the robotic arm based on the spatial analytical equation;
[0049] The control module is used to control the robotic arm to run according to the target trajectory so as to drive the ultrasonic testing mechanism to detect the feature surface to be inspected.
[0050] Thirdly, this application provides a casting inspection system, including a controller, a robotic arm, an ultrasonic testing mechanism, and an image acquisition mechanism. The robotic arm, the ultrasonic testing mechanism, and the image acquisition mechanism are respectively connected to the controller and are controlled by the controller. The image acquisition mechanism is used to acquire images of the feature surfaces to be inspected of the casting and transmit the images to the controller. The controller is used to receive the images, process the images, and control the operation of the robotic arm and / or the ultrasonic testing mechanism according to the image processing results. The end of the robotic arm is connected to the ultrasonic testing mechanism, which is used to inspect the feature surfaces to be inspected.
[0051] In a fourth aspect, this application provides a storage medium storing a computer program, wherein a processor executes the computer program to implement the method described above.
[0052] The embodiments of this invention bring the following beneficial effects: This invention provides a casting inspection method, device, system, and storage medium. By acquiring the depth map and RGB image of the feature surface to be inspected, the parameter information corresponding to the feature surface is determined. Based on the parameter information, a part coordinate system is constructed, and the spatial analytical equation corresponding to the feature surface to be inspected is determined. Then, the target running trajectory of the robotic arm is determined based on the spatial analytical equation. Subsequently, the robotic arm is controlled to run along the target running trajectory to drive the ultrasonic inspection mechanism to inspect the feature surface to be inspected. In this way, by constructing a part coordinate system and determining the spatial analytical equation to determine the global positioning reference field, the target running trajectory corresponding to the detection base position of the robotic arm's base can be determined based on this part coordinate system, thereby achieving precise positioning and improving inspection accuracy. Furthermore, the fully automated process reduces manual labor intensity and operational difficulty, making the inspection work easier to implement and facilitating batch inspection.
[0053] The casting inspection method provided in this application acquires the TGB image and depth map of the feature surface to be inspected in the casting, and constructs a spatial analytical equation by combining the spatial coordinate point cloud processing method of the feature surface to be inspected. Then, the target running trajectory of the robotic arm is obtained to control the operation of the robotic arm to drive the ultrasonic testing mechanism to inspect the feature surface to be inspected, thereby improving the inspection accuracy.
[0054] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0055] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0056] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0057] Figure 1 This is a flowchart of the casting inspection method provided in Embodiment 1 of the present invention;
[0058] Figure 2 This is a schematic diagram of the structure of the irregular-shaped casting to be tested provided in Embodiment 1 of the present invention;
[0059] Figure 3 The casting inspection method provided in Embodiment 1 of the present invention is based on Figure 2 A schematic diagram of the coordinate system of the irregularly shaped casting to be inspected;
[0060] Figure 4 Based on Figure 3 The relationship model between the constructed part coordinate system and the irregular casting to be inspected;
[0061] Figure 5 Based on Figure 3 The model diagram obtained after rotating the constructed part coordinate system;
[0062] Figure 6 Based on Figure 2 A schematic diagram of the ultrasonic testing trajectory of the irregularly shaped casting to be tested;
[0063] Figure 7 Based on Figure 2 A schematic diagram of the ultrasonic testing trajectory of the irregularly shaped casting to be inspected on the feature surface S1.
[0064] Figure 8 This is a simulation diagram of the multiple detection base stations provided in Embodiment 2 of the present invention in a spatial coordinate system;
[0065] Figure 9 This is a schematic diagram showing the relationship between the multiple detection base stations and the part coordinate system provided in Embodiment 2 of the present invention;
[0066] Figure 10 This is a schematic diagram illustrating the segmentation of the target trajectory in the casting inspection method provided in Embodiment 2 of the present invention;
[0067] Figure 11 This is a schematic diagram illustrating the smoothing of the target trajectory based on the circular interpolation algorithm in the casting inspection method provided in Embodiment 2 of the present invention.
[0068] Figure 12This is a schematic diagram illustrating the trajectory point calculation of the target running trajectory based on the spatial linear interpolation method in the casting inspection method provided in Embodiment 2 of the present invention.
[0069] Figure 13 This is a schematic diagram of the casting inspection device provided in Embodiment 3 of the present invention;
[0070] Figure 14 This is a schematic diagram showing the positional relationship between the camera coordinate system, the current detection base station coordinate system, the robotic arm end effector coordinate system, and the part coordinate system in the casting inspection method provided in Embodiment 1 of the present invention.
[0071] Figure label:
[0072] 10 - Acquisition module, 20 - First determination module, 30 - Construction module, 40 - Second determination module, 50 - Control module. Detailed Implementation
[0073] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0074] To facilitate understanding of this embodiment, the technical terms used in this application will be briefly introduced below.
[0075] In computer vision systems, 3D scene information provides more possibilities for various computer vision applications such as image segmentation, object detection, and object tracking. Depth maps, as a common way of representing 3D scene information, have been widely used. The gray value of each pixel in the image can be used to characterize the distance of a point in the scene from the camera.
[0076] Methods for acquiring depth maps can be divided into two categories: passive ranging sensing and active depth sensing.
[0077] The RGB color model is an industry standard for color, which produces a variety of colors by varying the red, green, and blue color channels and superimposing them.
[0078] An RGB image is an image represented in RGB color mode.
[0079] After introducing the technical terms used in this application, the application scenarios and design concepts of the embodiments of this application will be briefly described below.
[0080] To address the challenge of in-situ full-volume ultrasonic testing of casting defects in irregularly shaped castings with deep and narrow cavities, existing technologies have provided laser ultrasonic and air-coupled ultrasonic testing systems. However, these technologies have not been widely adopted due to limitations such as the low photoacoustic conversion rate of pulsed laser thermoelastic excitation and significant ultrasonic attenuation at the gas-solid interface. To solve this technical problem, existing technologies have introduced robotic arms to greatly reduce the space requirements for testing, or used tooling positioning structures to position the irregularly shaped castings before manual ultrasonic testing. However, such testing methods are not convenient to implement. First, custom tooling is required, which is complex in structure. Second, the positioning accuracy of manual ultrasonic testing is low, and it is not suitable for testing large and complex feature surfaces. Third, quantitative control cannot be achieved, thus preventing batch testing.
[0081] Based on this, embodiments of this application provide a casting inspection method, applied to the controller corresponding to a casting inspection system, combined with... Figure 5 The controller shown includes a processor and a memory. The memory stores a computer program, and the processor executes the computer program in the memory to implement the method provided in the embodiments of this application.
[0082] The casting inspection system also includes a robotic arm, an ultrasonic testing mechanism, and an image acquisition mechanism. The robotic arm, ultrasonic testing mechanism, and image acquisition mechanism are all connected to the controller. The image acquisition mechanism is used to acquire images of the feature surfaces of the casting to be inspected and transmit the images to the controller. The controller is used to receive the images, process the images, and control the operation of the robotic arm based on the image processing results. The end of the robotic arm is connected to the ultrasonic testing mechanism, which is used to inspect the feature surfaces to be inspected.
[0083] Example 1
[0084] Combination Figure 1 As shown, the method provided in this embodiment specifically includes the following steps:
[0085] S110, the processor acquires the target image of the feature surface to be inspected, the target image includes a depth map and an RGB image.
[0086] S120, the processor determines the parameter information corresponding to the feature surface to be inspected based on the target image. The parameter information includes at least one of depth data and end face point cloud data.
[0087] S130, the processor constructs the part coordinate system based on the parameter information and determines the spatial analytical equation corresponding to the feature surface to be inspected.
[0088] S140, the processor determines the target trajectory of the robotic arm based on the spatial analytical equation.
[0089] S150, the processor controls the robotic arm to run along the target trajectory, so as to drive the ultrasonic testing mechanism to inspect the feature surface to be inspected.
[0090] The casting inspection method provided in this application determines the parameter information corresponding to the feature surface to be inspected by acquiring the TGB image and depth map of the feature surface to be inspected, constructs a part coordinate system and determines the spatial analytical equation corresponding to the feature surface to be inspected, and then determines the target running trajectory of the robotic arm. The robotic arm is controlled to run along the target running trajectory to inspect the feature surface to be inspected, thereby improving the inspection accuracy. By calculating the transformation relationship between the constructed part coordinate system and the detection base station where the robotic arm base is located, the target running trajectory of the robotic arm under the current detection base station is determined. This reduces the difficulty of positioning and the amount of manual labor, and conversion can be performed between different detection base stations, thereby achieving global accurate positioning, realizing quantitative control, improving the inspection accuracy, and making the inspection work easier to implement and conducive to batch inspection.
[0091] Specifically, in step S110, the casting is placed on the inspection table, and the feature surface of the casting to be inspected is placed within the picking field of view of the image picking mechanism. Then, the image picking mechanism picks up the target image of the feature surface to be inspected. The picking mechanism can be an industrial camera or a machine vision sensor, etc.
[0092] As one feasible approach, the image pickup mechanism can be directly facing the feature surface to be inspected; as another feasible approach, the image pickup mechanism can also be at a certain angle to the feature surface to be inspected, as long as the entire surface of the feature surface to be inspected is within the pickup field of view of the image pickup mechanism. In this embodiment, the image pickup mechanism is directly facing the feature surface to be inspected, which is more conducive to clearly and intuitively picking up the target image of the feature surface to be inspected.
[0093] In conjunction with the first aspect, the feature surface to be inspected includes at least one of a deep and narrow precision-machined inner cylindrical surface and a rough-machined outer cylindrical surface.
[0094] In step S120, depth data is extracted from the depth map, and image recognition is performed based on the RGB image to extract the end face point cloud data from the RGB image. The parameter information required to be obtained is different for different feature surfaces to be inspected.
[0095] In step S130, after obtaining the parameter information in step S120, a part coordinate system is constructed based on the parameter information and the spatial analytical equation corresponding to the feature surface to be inspected is determined. The spatial analytical equation is used to characterize the spatial position of the feature surface to be inspected in the spatial coordinate system.
[0096] In step S140, based on the spatial analytical equation, the detection path and rules can be planned, thereby determining the target running trajectory of the robotic arm.
[0097] In step S150, the robotic arm is controlled to run along the target trajectory, thereby realizing the corresponding detection of the feature surface to be inspected according to the detection path and rules planned in step S140.
[0098] In conjunction with the first aspect, the feature surfaces to be inspected include deep and narrow precision-machined inner cylindrical surfaces and / or rough-machined outer cylindrical surfaces.
[0099] In this embodiment, the feature surface to be inspected includes a deep and narrow machined inner cylindrical surface and a rough machined outer cylindrical surface, that is, the feature surface to be inspected is a cylindrical surface. The method provided in this embodiment includes the following steps:
[0100] Step S110: The processor acquires the target image of the feature surface to be inspected. The target image includes a depth map and an RGB image, specifically:
[0101] At this point, the image pickup mechanism is positioned directly over the feature surface to be inspected. When the feature surface to be inspected is a deep and narrow machined inner cylindrical surface, two image pickup mechanisms are used to pick up the two end face images of the feature surface to be inspected. When the feature surface to be inspected is a rough machined outer cylindrical surface, one image pickup mechanism can be used to pick up the end face image of the feature surface to be inspected.
[0102] Step S220, where the processor determines the parameter information corresponding to the feature surface to be inspected based on the target image, specifically includes: determining the depth information in the recognition depth map; extracting and registering the point cloud data of the end face of the feature surface to be inspected based on the color gradient of the RGB image, and cropping it to obtain the feature surface to be inspected and the point cloud data under each color gradient.
[0103] Step S130, which involves constructing the spatial analytical equation corresponding to the feature surface to be detected based on the parameter information, specifically includes:
[0104] S131, for each end face, the processor picks the edge arcs in the target image according to the edge detection algorithm.
[0105] Specifically, normals are calculated for the feature surface to be inspected and the point cloud data under each color gradient. Taking the discovery at any point on the end face as a benchmark, normal feature point cloud data that are approximately perpendicular to this discovery are deleted. Finally, the point cloud data corresponding to the end face of the feature surface to be inspected, as well as the point cloud data of the arc of the end face, are obtained.
[0106] S132, the processor fits the arc equation to the edge arc and calculates the spatial coordinates of the center and radius of the corresponding end face.
[0107] After obtaining the point cloud data of the end face arc in step S131, the control equations of the cylindrical surface and the end face arc are fitted to determine the radius corresponding to the end face and the spatial coordinates corresponding to the center of the end face, thereby realizing the spatial positioning of the feature surface to be inspected.
[0108] S133, the processor constructs the part coordinate system and determines the spatial analytical equation corresponding to the feature surface to be inspected based on the spatial coordinates of the center and the radius.
[0109] Here are some examples, combined with Figure 2 For the casting to be inspected, in step S120, the point cloud data of the deep and narrow precision-machined inner hole end faces A1 and A2 of the cross-shaped casting are extracted; the RGB images of end faces A1 and A2 are binarized. Then, in steps S230 and S240, the edge C1 and C2 of the column hole portion of the end face are extracted using an edge detection algorithm; the circular arc equations of some edges C1 and C2 are fitted, and the spatial coordinates of their center O1 and O2 are calculated respectively.
[0110] Next, in step S250, based on the spatial coordinates of the center and the radius, a coordinate system for the part is constructed, and the spatial analytical equation corresponding to the feature surface to be inspected is determined. Specifically:
[0111] Assume the spatial coordinates of the center O1 and O2 of the long, narrow, precision-machined inner hole end face of a cross-shaped casting are (x1, y1, z1), and the spatial coordinates of O2 are (x2, y2, z2). Then the direction vector j of its axis L1 can be expressed as:
[0112] j=O2-O1=(x2-x1, y2-y1, z2-z1);
[0113] Similarly, the spatial coordinates of the center O3 and O4 of the short hole end face are (x3, y3, z3), and the spatial coordinates of O2 are (x4, y4, z4). Then the direction vector i' of its axis L2 can be expressed as:
[0114] i′=O4-O3=(x4-x3, y4-y3, z4-z3);
[0115] The direction vector i' of axis L2 is translated to point O1. Assume the translation vector T' is (tx, ty, tz), where tx is the translation along the x-axis, ty is the translation along the y-axis, and tz is the translation along the z-axis. Then the translated vector i = (x⁴ - x³ + tx, y⁴ - y³ + ty, z⁴ - z³ + tz).
[0116] At this point, we define a part coordinate system with its origin at O1, the y-axis as axis L1, and the x-axis as the vector of axis l2 translated to O1. Then, the z-axis of the unique part coordinate system can be determined through the vector cross product operation (combined with...). Figure 3 (As shown).
[0117] Given: j = (x2-x1, y2-y1, z2-z1);
[0118] i=(x4-x3+tx, y4-y3+ty, z4-z3+tz).
[0119] The vector after the cross product is:
[0120]
[0121] The coordinate system of the part can be uniquely determined by vectors i, j, and k.
[0122]
[0123] like Figure 3 As shown in the figure. The relationship model between the corresponding part coordinate system and the irregular casting is shown in the figure. Figure 4 As shown.
[0124] This method can still be used to determine a unique part coordinate system even when the cross-shaped casting is placed in any position, such as... Figure 5 As shown: the cross-shaped casting is rotated 90° along its major axis and placed, and a unique part coordinate system is still obtained through coordinate transformation.
[0125] Because the cross-shaped irregular structure is relatively large and can be roughly considered as two cylinders intersecting at a cross, it is divided into four cylindrical surfaces to be inspected. Ultrasonic testing is performed on these surfaces. An external seventh axis is added to the robotic arm, allowing it to perform ultrasonic testing on each surface to be inspected. At this point, combined with... Figure 6 , Figure 7 As shown, taking the cylindrical surface S1 to be inspected as an example, assume that the coordinates of a certain center of the cylindrical surface (x... c ,y c ,z c ), circular axis direction vector (v x ,v y ,v z ), the radius of the cylinder is r1.
[0126] The spatial equation of a cylindrical surface can be expressed as:
[0127]
[0128] Where (x, y, z) are the coordinates of a point on the cylindrical surface in space. This determines the spatial analytical equation corresponding to the feature surface to be inspected.
[0129] Step S140, the step of the processor determining the target trajectory of the robotic arm based on the spatial analytical equation, includes:
[0130] S141, The processor determines the ultrasonic scanning path based on the spatial analytical equation;
[0131] S142, the processor calculates the target running trajectory of the robotic arm under the current detection base station based on the ultrasonic scanning path.
[0132] The controller stores the detection adjustment angle and sampling period. The detection adjustment angle is used to characterize the rotation angle at the end of the robotic arm during the sampling period.
[0133] Step S141 specifically includes:
[0134] S1410, the processor determines the axis of the feature surface to be inspected based on the spatial coordinates of the centers of the two opposite end faces.
[0135] S1411, the processor determines several points on the axis as detection reference points.
[0136] S1412, for each sampling time, the processor selects a detection reference point along the axis as the target detection reference point.
[0137] S1413, the processor calculates the spatial coordinates of the target detection reference point corresponding to the detection reference point according to the spatial analytical equation.
[0138] S1414, the processor determines the ultrasonic scanning path based on the spatial coordinates of the target detection reference point and the current rotation angle.
[0139] Based on the above example, step S1410 uses the obtained cross-shaped casting to rough machine the outer cylindrical surface S. out-1 The spatial equation of the end face arc is used to spatially locate its center coordinates, and then its axis L2 spatial equation is fitted using these coordinates. The L2 spatial equation can then be expressed as:
[0140] (xx c ) 2 v x +(yy c ) 2 v y +(zz c ) 2 v z =0.
[0141] Next, in step S1411, based on the method for establishing the part coordinate system described above, a coordinate system at the same position is established in the digital model, and its axis is used as the reference for selection. N is picked on its axis. i Center a circle at points spaced Δ apart:
[0142]
[0143] Where H is the height of the cylinder and Δ is the height interval.
[0144] Furthermore, based on its cylindrical equation, the corresponding picked N i Given the coordinates of the center of a circle, a point is picked at intervals of θ on the cylindrical surface as the reference point for the robotic arm to scan the surface:
[0145]
[0146] Where r1 is the radius of the cylinder.
[0147] Then, in step S1412, at each sampling time, the target is rotated by an angle θ along the axis to select a detection reference point as the current target detection reference point.
[0148] Next, step S1413 obtains the spatial coordinates of the target detection reference point at each sampling time, and fits these spatial coordinates into a circular arc to obtain the ultrasonic scanning path, as shown below. Figure 6 As shown, the ultrasound scanning path of feature surface S1 is as follows: Figure 7 As shown. Specifically:
[0149] Connecting the points along the ultrasonic scanning path allows us to fit a circular arc; this arc then moves in a circle around the cylinder's axis (y-axis) with a radius R. Assume the center N is... i The coordinates of the point are (x c y c , z c ), with an initial angle of θ start The ending angle is θ end Then the position of point P in the part coordinate system can be represented as:
[0150]
[0151] Where x(t), y(t), and z(t) represent the x, y, and z coordinates of a point on the circular path in the part's coordinate system, respectively, and t is a parameter. Then, a detection path is planned at each corresponding center of the circle using the method described above, thus obtaining the complete detection path for the cylindrical surface S1.
[0152] The robotic arm base is set at the current detection base station; step S142, which calculates the target running trajectory of the robotic arm under the current detection base station based on the ultrasonic scanning path, specifically includes:
[0153] S1420, The processor obtains the first coordinates of the specified point in the part coordinate system and the second coordinates in the camera coordinate system;
[0154] S1421, The processor calculates the first transformation matrix from the part coordinate system to the camera coordinate system based on the first coordinate and the second coordinate;
[0155] S1422, The processor obtains the third coordinate of the specified point in the current detection base station coordinate system.
[0156] S1423, the processor calculates the second transformation matrix from the camera coordinate system to the current detection base station coordinate system based on the second and third coordinates;
[0157] S1424, the processor calculates the third transformation matrix from the part coordinate system to the current detection base station coordinate system based on the first transformation matrix and the second transformation matrix;
[0158] S1425, the processor calculates the first target running trajectory of the robotic arm under the current detection base station based on the ultrasonic scanning path and the third transformation matrix.
[0159] The system obtains the different coordinates of a specified point in different coordinate systems, calculates the transformation relationship between the coordinate systems of the specified point in the two coordinate systems, thereby determining the transformation relationship between the part coordinate system and the current detection base station coordinate system where the robot arm base is located, and then converts the ultrasonic scanning path in the part coordinate system into the target running trajectory of the robot arm in the current detection base station coordinate system.
[0160] Specifically, in combination Figure 14 As shown, the process of calculating the position transformation relationship from the part coordinate system to the camera coordinate system is as follows:
[0161] Assuming point P lies in the part coordinate system, the transformation from the part coordinate system to the camera coordinate system is a rigid body transformation. Part coordinate system O cast Coordinates of point P below Transform to camera coordinate system Right now
[0162] in: R is a 4×4 homogeneous transformation matrix, implicitly representing the camera's pose relative to the part's coordinate system; t includes translations in three directions: tx, ty, and tz; R is a 3×3 orthogonal matrix containing the tilt angle around the z-axis. The pitch angle θ is the angle of rotation about the y-axis, and the yaw angle ψ is the angle of rotation about the x-axis.
[0163] Next, the position transformation relationship between the camera coordinate system and the robot arm base coordinate system (i.e., the current detection base station coordinate system) is calculated:
[0164] Assuming the coordinate system O of the part is known cast A point P on " cast Transform to "camera coordinate system O" based on camera extrinsic parameters (T1). camera "The following is P" camera Then, based on the matrix X to be determined, it can be transformed into the "robotic arm end-effector coordinate system O". end "The following is P" end Then, based on the robot arm's own parameters (T3), it is transformed into the "robot arm base coordinate system O". base "The following is P" base .Right now:
[0165] T3XT1P cast =P base ;
[0166] The robotic arm moves, and for the same point, P cast P base The coordinate values of P will not change, only P camera P end The coordinates have been transformed, meaning the above relationship can be converted to:
[0167] T′3XT′1P cast =P base ;
[0168] Where T′3 and T′1 are the known parameters of the second detection, which, after simplification, are:
[0169] T3XT1 = T′3XT′1;
[0170] After reorganization: T3′ -1 T3X=XT′1T -1 1; It can be viewed as an equation in the form AX = XB, and A = T3′ -1 T3, B = T′1T -1 1. Solving this equation will yield the value of matrix X.
[0171] Finally, based on the relationship between the camera coordinate system and the part coordinate system, and the relationship between the camera coordinate system and the current detection base station coordinate system (i.e., the aforementioned robotic arm base coordinate system), the relationship between the part coordinate system and the current detection base station coordinate system can be calculated.
[0172] Example 2
[0173] The difference between this embodiment and Embodiment 1 is that there are multiple detection base stations, combined with... Figure 8 As shown, it includes the current detection base station where the robotic arm base is currently located and at least one calibration detection base station.
[0174] The method for inspecting irregularly shaped castings provided in this application includes:
[0175] S310: For each calibration detection base station, the processor obtains the fourth coordinate of the specified point at the calibration detection base station.
[0176] S320: The processor calculates the fourth transformation matrix from the part coordinate system to the calibration and detection base station based on the first and fourth coordinates.
[0177] S330: The processor calculates the fifth transformation matrix from the current detection base station coordinate system to the calibration detection base station based on the third and fourth transformation matrices.
[0178] S340, the processor calculates the second running trajectory of the robotic arm under the calibration detection base station based on the first target running trajectory and the fifth transformation matrix.
[0179] Similarly, by calculating the coordinate transformation relationship between coordinate systems using the coordinates of a specified point at a calibration testing base station, the transformation relationship between the current testing base station and the calibration testing base station at the target position where the robotic arm is to be moved is finally determined. This allows for the calculation of the second target trajectory corresponding to the first target trajectory under the calibration testing base station. This enables the transformation between testing base stations. In practical applications, the position of the robotic arm base can be arbitrarily adjusted, automatically converting the target trajectory of the robotic arm. This eliminates the need to fix the casting to be inspected in a fixed position, facilitating ultrasonic testing and increasing testing flexibility, making the testing work easier to implement and suitable for batch testing.
[0180] In the method provided in this application, each detection base station (including the current detection base station and all calibration detection base stations) has its own independent coordinate system. In order to achieve global positioning of its multi-station detection reference, the rotation and translation matrices of the coordinate systems of each station need to be calibrated to establish the pose transformation relationship of each detection reference, thereby forming a global positioning reference field for multi-station ultrasonic testing of irregular casting robotic arms.
[0181] Combination Figure 9 As shown, the positional relationship between each detection base station and the part coordinate system is shown. Ocast is the part coordinate system, Obase-A1 is the current detection base station, and Obase-A2, Obase-A3, and Obase-A4 are the second to fourth calibration detection base stations.
[0182] At this point, the positional relationship between the part coordinate system and the coordinate systems of multiple detection base stations can be seen as a composite transformation of Obase-A1 around the z-axis of the part coordinate system and around the x and y axes to Obase-A2, then a composite transformation from Obase-A2 to Obase-A3, then to Obase-A4, and so on, to obtain the positional relationship between the nth detection base station and the part coordinate system.
[0183] Specific examples are as follows:
[0184] Trajectory point P in part coordinate system O cast The position below is C P, while Obase-A1 and the part coordinate system O cast The positional relationship between them is A1 P C Therefore, the positional relationship between trajectory point P and detection base station A1 can be expressed as:
[0185]
[0186] in: The rotation matrix represents the rotation of the part coordinate system O.cast Rotate to the same orientation as Obase-A1.
[0187]
[0188]
[0189] For the part coordinates O relative to the A1 detection base station cast Positional relationships of the system:
[0190]
[0191] Therefore, the positional relationship of trajectory point P in Obase-A2 can be expressed as:
[0192]
[0193] The positional relationship of trajectory point P in Obase-A3 can be represented as:
[0194]
[0195] The positional relationship of trajectory point P in Obase-A4 can be represented as:
[0196]
[0197] Based on the above formula, the positional relationship of trajectory point P under the nth calibrated detection base station Obase-An can be obtained as follows:
[0198]
[0199] By obtaining the coordinates of a specified point, such as point P, in various coordinate systems, the transformation relationship under different coordinate systems can be solved, and then the ultrasonic scanning path can be mapped to one of the detection base stations to obtain the target running trajectory when the base of the robotic arm is located at that detection base station.
[0200] Furthermore, based on the path planning of the aforementioned digital model, the path information for ultrasonic testing can be obtained, including the positions of the starting point, intermediate points, and ending points in the part coordinate system.
[0201] A kinematic model of the robotic arm is established. DH parameter modeling calculates the transformation matrices of each joint of the robotic arm based on the robot's kinematics, transforming the kinematics of the robotic arm into a mathematical problem. Taking the KUKA KR20 R1810 robotic arm as an example, a DH parameter table for the KUKA KR20 R1810 robotic arm is established, and the displacement relationship between the two links of the robotic arm is described using the DH method.
[0202]
[0203] Substitute the joint variables from the table above into the change matrix between adjacent links. In the expression:
[0204]
[0205] Obtain the homogeneous transformation matrix of two adjacent joints.
[0206]
[0207]
[0208]
[0209]
[0210]
[0211]
[0212] The pose transformation matrix of the end effector coordinate system of the robotic arm relative to the current detection base station coordinate system is:
[0213] in:
[0214] The final forward kinematics solution of the robotic arm is the product of the six transformation matrices between adjacent joints. Therefore, the final pose of the robotic arm can be expressed as:
[0215] in:
[0216] n x =
[0217] cosθ1[(cosθ2cosθ3-sinθ2sinθ3)(cosθ4cosθ5cosθ6-sinθ4sinθ6)-
[0218] (sinθ2cosθ3-cosθ2sinθ3)sinθ5sinθ6]+sinθ1(sinθ4cosθ5cosθ6+
[0219] cosθ4sinθ6);
[0220] n y =
[0221] sinθ1[(cosθ2cosθ3-sinθ2sinθ3)(cosθ4cosθ5cosθ6-sinθ4sinθ6)-
[0222] (sinθ2cosθ3-cosθ2sinθ3)sinθ5sinθ6]+cosθ1(sinθ4cosθ5cosθ6+
[0223] cosθ4sinθ6);
[0224] n z =-(sinθ2cosθ3-cosθ2sinθ3)(cosθ4cosθ5cosθ6-sinθ4sinθ6)-(cosθ2cosθ3--sinθ2sinθ3)sinθ5coxθ6;
[0225] o x =
[0226] cosθ1[(cosθ2cosθ3-sinθ2sinθ3)(-cosθ4cosθ5cosθ6-sinθ4cosγ6)-(sinθ2cosθ3-cosθ2sinθ3)sinθ5sinθ6]+sinθ1(cosθ4cosθ6-sinθ4cosθ5cosθ6);
[0227] a x =-cosθ1[(cosθ2 cosθ3-sinθ2 sinθ3)cosθ4sinθ5+(sinθ2 cosθ3-cosθ2sinθ3)cosθ6]-sinθ1sinθ4sinθ5;
[0228] a y =-sinθ1[(cosθ2cosθ3--sinθ2sinθ3)cosθ4sinθ5+(sinθ2cosθ3-cosθ2sinθ3)cosθ5]+cosθ1sinθ4sinθ5;
[0229] a z =(sinθ2cosθ3-cosθ2sinθ3)cosθ4sinθ5-(cosθ2cosθ3--sinθ2sinθ3)cosθ5;
[0230] p x =cosθ1[a2 cosθ2+a3(cosθ2cosθ3--sinθ2sinθ3)-d4(sinθ2 cosθ3-cosθ2sinθ3)]-d3sinθ1;
[0231] p y=sinθ1[a2cosθ2+a3(cosθ2cosθ3--sinθ2sinθ3)-d4(sinθ2 cosθ3-cosθ2sinθ3)]+d3cosθ1;
[0232] p z =-a3(cosθ2 cosθ3--sinθ2 sinθ3)-a2 sinθ2-d4(cosθ2 cosθ3--sinθ2 sinθ3).
[0233] To drive the robotic arm to the desired position, its inverse kinematics solution must be calculated. To ensure the robotic arm moves along a predetermined trajectory, joint variables must be calculated repeatedly within a short period. Suppose the robotic arm wants to move from point A to point B; without constraints, the trajectory of the robotic arm from A to B will be difficult to predict. To ensure the robotic arm moves along a specified trajectory, this path must be divided into many segments, and the robotic arm must move sequentially along these segments, calculating a new inverse kinematics solution for each segment, such as... Figure 7 As shown.
[0234] Based on the known motion trajectory, spatial circular interpolation and spatial linear interpolation are used for calculation, thus forming a series of path points under the trajectory path in the part coordinate system. Based on the pose information of the path points, the joint space variable values of each joint of the robotic arm corresponding to each path point are solved according to the inverse kinematics of the robotic arm, thereby realizing the actuation of the robotic arm joints. Since the planned path includes both straight and circular paths, they are processed separately. Specifically:
[0235] Circular interpolation algorithms can be applied to curved segments of a path, enabling robotic arms to move along a desired trajectory when precise control is required and complex curved paths are encountered. Circular interpolation algorithms can overcome vibrations and instabilities of the robotic arm on curved paths, ensuring a smooth trajectory. Assume p... o (x0, y0, z0), p1(x1, y1, z1), and p2(x2, y2, z2) are the starting point, intermediate point, and ending point of the circular arc trajectory. Connecting these three points sequentially forms the inscribed triangle of the circular arc trajectory, as shown below. Figure 10 As shown in the figure, a, b, and c are the side lengths of the inscribed triangle.
[0236] The radius of the circular arc trajectory can then be expressed as:
[0237]
[0238] Let the center of the arc be O(x, y, z), then it satisfies:
[0239]
[0240] Summarized as follows:
[0241]
[0242] Let the plane containing the arc trajectory be: Ax + By + Cz = 1;
[0243] The plane containing the arc and p0, p1, p2 can be represented as:
[0244]
[0245] The coordinates of the center of the circular arc trajectory can be expressed as:
[0246] After obtaining the coordinates of the center of the trajectory, the trajectory points of the circular arc are calculated.
[0247] Assuming there are N points on the circular arc trajectory, and the angle θ on the arc is divided into N parts, then the angle of the arc formed by the i-th trajectory point and the starting point p0 is: A schematic diagram of linear interpolation is shown below. Figure 11 As shown.
[0248] Consider trajectory point i as the end effector starting from p0 and rotating θ around an axis centered on the trajectory plane. i We obtain that, after rotating to point p2, the unit vector W in the same direction as the rotation axis can be represented as:
[0249]
[0250] The rotation matrix describing this change process can be represented as:
[0251]
[0252] Leveraging the simplicity and efficiency of linear interpolation algorithms, this algorithm can be used to quickly connect straight line segments, enabling rapid movement of a robotic arm. This is useful for tasks such as connecting different curve segments or performing linear motion. Figure 12 As shown. For linear interpolation: assuming the initial point coordinates are p1 = (x1, y1, z1) and the final point coordinates are p2 = (x2, y2, z2). The spatial linear interpolation order is:
[0253] Where: t is the motion time, t1 is the interpolation time, and kx, ky, kz are the components of the interpolation increment on each coordinate axis.
[0254] The coordinates of any point on the straight path can be represented as:
[0255]
[0256] In this embodiment, a combination of circular and linear interpolation algorithms is used to optimize the trajectory of the robotic arm's ultrasonic detection path. This combination allows the robotic arm to move quickly on straight sections and smoothly transition on curved sections, achieving a balance between speed and smoothness. The trajectory planning method combining circular and linear interpolation algorithms improves the robotic arm's motion accuracy and stability.
[0257] Example 3
[0258] A second aspect of this application provides a casting inspection device, applied to a controller corresponding to a casting inspection system. The casting inspection system includes a robotic arm, an ultrasonic inspection mechanism, and an image acquisition mechanism. Figure 13 As shown, the device includes: an acquisition module 10, a first determination module 20, a construction module 30, a second determination module 40, and a control module 50.
[0259] The acquisition module 10 is used to acquire the target image of the feature surface to be inspected. The target image includes a depth map and an RGB image.
[0260] The first determining module 20 is used to determine the parameter information corresponding to the feature surface to be inspected based on the target image. The parameters include at least one of depth data and end face point cloud data.
[0261] The construction module 30 is used to construct the part coordinate system based on the parameter information and determine the spatial analytical equations corresponding to the feature surfaces to be inspected.
[0262] The second determining module 40 is used to determine the target running trajectory of the robotic arm based on the spatial analytical equation.
[0263] The control module 50 is used to control the robotic arm to run along the target trajectory so as to drive the ultrasonic testing mechanism to test the feature surface to be inspected.
[0264] Thirdly, embodiments of this application provide a casting inspection system, including a controller, a robotic arm, an ultrasonic testing mechanism, and an image acquisition mechanism. The robotic arm, ultrasonic testing mechanism, and image acquisition mechanism are respectively connected to the controller and operate under the control of the controller. The image acquisition mechanism is used to acquire images of the feature surfaces of the casting to be inspected and transmit the images to the controller. The controller is used to receive the images, process the images, and control the operation of the robotic arm and / or the ultrasonic testing mechanism according to the image processing results. The end of the robotic arm is connected to the ultrasonic testing mechanism, which is used to inspect the feature surfaces to be inspected.
[0265] Fourthly, embodiments of this application provide a storage medium storing a computer program, which a processor executes to implement the method provided in the above embodiments.
[0266] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0267] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0268] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0269] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0270] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for inspecting castings, characterized in that, A controller is applied to a casting inspection system, the casting inspection system further including a robotic arm, an ultrasonic testing mechanism, and an image acquisition mechanism. The robotic arm, the ultrasonic testing mechanism, and the image acquisition mechanism are respectively connected to the controller. The image acquisition mechanism is used to acquire images of the feature surfaces to be inspected on the casting and transmit the images to the controller. The controller is used to receive the images, process the images, and control the operation of the robotic arm based on the image processing results. The end of the robotic arm is connected to the ultrasonic testing mechanism, which is used to inspect the feature surfaces to be inspected. The method includes: Obtain the target image of the feature surface to be inspected, the target image including a depth map and an RGB image; Based on the target image, parameter information corresponding to the feature surface to be inspected is determined, and the parameter information includes at least one of depth data and end face point cloud data; A part coordinate system is constructed based on the parameter information, and the spatial analytical equation corresponding to the feature surface to be inspected is determined. The target trajectory of the robotic arm is determined based on the spatial analytical equation. The robotic arm is controlled to move along the target trajectory to drive the ultrasonic testing mechanism to inspect the feature surface to be inspected; Wherein, the feature surface to be inspected is a deep and narrow precision-machined inner cylindrical surface or a rough-machined outer cylindrical surface, and the parameter information includes point cloud data and depth data of the two end faces of the deep and narrow precision-machined inner cylindrical surface; the step of determining the parameter information corresponding to the feature surface to be inspected based on the target image includes: For each end face, identify the depth information in the depth map; Based on the color gradient of the RGB image, extract the point cloud data under each color gradient; The step of constructing the spatial analytical equation corresponding to the feature surface to be detected based on the parameter information includes: For each of the aforementioned end faces, edge arcs in the target image are picked out according to an edge detection algorithm; The edge arc is fitted with an arc equation, and the spatial coordinates of the center and radius corresponding to the end face are calculated. Based on the spatial coordinates of the center and the radius, a coordinate system for the part is constructed, and the spatial analytical equation corresponding to the feature surface to be inspected is determined.
2. The method according to claim 1, characterized in that, The steps for determining the target trajectory of the robotic arm based on the spatial analytical equation include: The ultrasonic scanning path is determined based on the spatial analytical equation. Based on the ultrasonic scanning path, calculate the target running trajectory of the robotic arm under the current detection base station.
3. The method according to claim 2, characterized in that, The controller stores the detection adjustment angle and the sampling period. The detection adjustment angle is used to characterize the rotation angle of the end of the robotic arm during the sampling period. The step of determining the ultrasound scanning path based on the spatial analytical equation includes: The axis of the feature surface to be inspected is determined based on the spatial coordinates of the centers of the two opposing end faces; Several points on the axis were determined as detection reference points; For each sampling time, a detection reference point is selected along the axial direction as the target detection reference point; Calculate the spatial coordinates of the target detection reference point corresponding to the detection reference point based on the spatial analytical equation; The ultrasonic scanning path is determined based on the spatial coordinates of the target detection reference point and the current rotation angle.
4. The method according to claim 1, characterized in that, The robotic arm base is located at the current detection base station; The step of calculating the target trajectory of the robotic arm under the current detection base station based on the ultrasonic scanning path includes: Obtain the first coordinate of a specified point in the part coordinate system and the second coordinate of the camera coordinate system; Calculate the first transformation matrix from the part coordinate system to the camera coordinate system based on the first coordinate and the second coordinate; Obtain the third coordinate of the specified point in the current detection base station coordinate system. Calculate the second transformation matrix from the camera coordinate system to the current detection base station coordinate system based on the second and third coordinates; Based on the first transformation matrix and the second transformation matrix, calculate the third transformation matrix from the part coordinate system to the current detection base station coordinate system; Based on the ultrasonic scanning path and the third transformation matrix, the first target running trajectory of the robotic arm under the current detection base station is calculated.
5. The method according to claim 4, characterized in that, The detection base station includes one current detection base station and at least one calibration detection base station; After the step of calculating the third transformation matrix from the part coordinate system to the current detection base station coordinate system based on the first transformation matrix and the second transformation matrix, the method further includes: For each of the calibration detection base stations, obtain the fourth coordinate of the designated point at the calibration detection base station; Based on the first coordinate and the fourth coordinate, calculate the fourth transformation matrix from the part coordinate system to the calibration and detection base station; Based on the third transformation matrix and the fourth transformation matrix, calculate the fifth transformation matrix from the current detection base station coordinate system to the calibrated detection base station; Based on the first target trajectory and the fifth transformation matrix, the second trajectory of the robotic arm under the calibration detection base station is calculated.
6. A casting inspection device, characterized in that, A controller is applied to a casting inspection system, which includes a robotic arm, an ultrasonic testing mechanism, and an image acquisition mechanism. The robotic arm, ultrasonic testing mechanism, and image acquisition mechanism are each connected to the controller and operate under its control. The image acquisition mechanism acquires images of the feature surfaces to be inspected on the casting and transmits these images to the controller. The controller receives the images, processes them, and controls the robotic arm's operation based on the image processing results. One end of the robotic arm is connected to the ultrasonic testing mechanism, which is used to inspect the feature surfaces. The apparatus is configured to perform the method as described in any one of claims 1-5; the apparatus comprises: The acquisition module is used to acquire the target image of the feature surface to be inspected, the target image including a depth map and an RGB image; The first determining module is used to determine parameter information corresponding to the feature surface to be inspected based on the target image, wherein the parameters include at least one of depth data and end face point cloud data. The construction module is used to construct a part coordinate system based on the parameter information and determine the spatial analytical equation corresponding to the feature surface to be inspected; The second determining module is used to determine the target running trajectory of the robotic arm based on the spatial analytical equation; The control module is used to control the robotic arm to run according to the target trajectory so as to drive the ultrasonic testing mechanism to detect the feature surface to be inspected.
7. A casting inspection system, characterized in that, The system includes a controller, a robotic arm, an ultrasonic testing mechanism, and an image acquisition mechanism. The robotic arm, the ultrasonic testing mechanism, and the image acquisition mechanism are all connected to the controller and operate under its control. The image acquisition mechanism acquires images of the feature surfaces of the casting to be inspected and transmits these images to the controller. The controller receives the images, processes them, and controls the operation of the robotic arm and / or the ultrasonic testing mechanism based on the image processing results. The end of the robotic arm is connected to the ultrasonic testing mechanism, which is used to inspect the feature surfaces. The system is used to perform the method as described in any one of claims 1-5.
8. A storage medium, characterized in that, The storage medium stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Casting positioning method based on vision
CN111639538A
Method and device for welding circular track by robot
CN115937162A