Workpiece centering method and device, computer equipment and storage medium
By using a laser scanner in CNC machine tools in conjunction with coordinate system transformation, the workpiece can be quickly and accurately centered, solving the problems of cumbersome operation and unstable accuracy in traditional methods, and improving processing efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN SHUMA 3D TECHNOLOGY CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-05-29
AI Technical Summary
In existing CNC machining, the traditional method of workpiece centering is cumbersome, consumes a lot of machine tool processing time, and the accuracy and consistency are highly dependent on the operator's skills and experience, resulting in low processing efficiency and unstable accuracy.
The laser scanner driven by the machine tool spindle scans the workpiece according to the preset posture trajectory, obtains the point cloud of the scanned area, and determines the centering position of the workpiece by using the coordinate system transformation relationship. Combining the high precision of the laser scanner with the centering of the machine tool, fast and accurate geometric centering is achieved.
It significantly improves machine tool processing efficiency, reduces errors caused by human operation or random movement, improves processing accuracy, and avoids repeated scanning or missed areas by pre-setting position and posture trajectories, thus saving time.
Smart Images

Figure CN122099861A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of CNC machine tool technology, and in particular to a method, apparatus, computer equipment, and storage medium for centering machine tool workpieces. Background Technology
[0002] In the field of CNC machining, the initial positioning of the blank (i.e., the centering position) is the primary factor determining machining accuracy and efficiency. For a long time, the traditional methods widely relied upon by the industry, whether manually operating a mechanical centering bar or using a contact trigger probe for centering, employ a serial measurement mode of "point-to-point contact," which is cumbersome and consumes a significant amount of machine tool processing time. Summary of the Invention
[0003] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for centering machine tool workpieces that can improve the machining efficiency of machine tools, addressing the aforementioned technical problems.
[0004] A method for centering a machine tool workpiece, the method comprising:
[0005] The laser scanner is driven by the machine tool spindle to scan the workpiece to be processed according to a preset posture trajectory, thereby obtaining a point cloud of the scanned area in the scanning coordinate system; the workpiece to be processed is located within the scanned area.
[0006] The point cloud of the scanned area is extracted to obtain the point cloud of the workpiece to be processed;
[0007] The centering position of the point cloud of the workpiece to be processed is determined to obtain the centering position of the workpiece to be processed in the machine tool coordinate system; the centering position of the workpiece to be processed in the machine tool coordinate system is obtained by transforming from the scanning coordinate system according to the coordinate system transformation relationship.
[0008] A machine tool workpiece centering device, the device being used to implement the steps in the various method embodiments, the device comprising:
[0009] The point cloud acquisition module is used to drive the laser scanner to scan the workpiece to be processed according to a preset pose trajectory via the machine tool spindle, thereby obtaining the point cloud of the scanned area in the scanning coordinate system; the workpiece to be processed is located within the scanned area.
[0010] The point cloud extraction module is used to extract the point cloud of the scanned area to obtain the point cloud of the workpiece to be processed;
[0011] The centering position determination module is used to determine the centering position of the point cloud of the workpiece to be processed, so as to obtain the centering position of the workpiece to be processed in the machine tool coordinate system; the centering position of the workpiece to be processed in the machine tool coordinate system is obtained by transforming from the scanning coordinate system according to the coordinate system transformation relationship.
[0012] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of an embodiment of a method for centering machine tool workpieces.
[0013] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of an embodiment of a method for centering machine tool workpieces.
[0014] The aforementioned machine tool workpiece centering method, apparatus, computer equipment, and storage medium, through the machine tool spindle driving a laser scanner to scan the workpiece to be processed according to a preset pose trajectory, thereby obtaining the point cloud of the workpiece. Based on coordinate transformation relationships, the centering position in the scanning coordinate system is converted to the machine tool coordinate system. This combination of the high precision of the laser scanner and machine tool centering enables rapid and accurate acquisition of the complete three-dimensional shape of the workpiece, thereby calculating a more accurate and reliable geometric centering position. The entire centering process does not require repeated tool setting measurements, significantly improving machine tool processing efficiency. Furthermore, by using a preset pose trajectory, the optimal path can be planned in advance, avoiding repeated scanning or missed areas, saving time. The scanning path and posture are repeatable and predictable, reducing errors caused by human operation or random movement, and improving processing accuracy. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a diagram illustrating the application environment of a machine tool workpiece centering method in one embodiment;
[0017] Figure 2 This is a flowchart illustrating a machine tool workpiece centering method in one embodiment;
[0018] Figure 3 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0019] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0021] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly. The connection can be a direct connection or an indirect connection.
[0022] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0023] It is understood that the term "connection" in the following embodiments should be understood as "electrical connection," "communication connection," etc., if the connected circuits, modules, units, etc., have electrical signal or data transmission with each other.
[0024] It is understood that the "data acquisition" operation in the embodiments of this application includes, but is not limited to, the following implementation methods: directly reading data pre-stored in the device; data received from external devices; or indirect acquisition methods after data collection, conversion and processing.
[0025] The machine tool workpiece centering method provided in this application can be applied to, for example... Figure 1 In the application environment. Figure 1This diagram illustrates the application environment of a machine tool workpiece centering method in one embodiment. It includes a machine tool 100, a laser scanner 200, and a workpiece 300 to be processed, which is placed on a worktable. The laser scanner 200 is rigidly mounted on the spindle 120 of the machine tool 100 or at a fixed position beside the spindle 120, thereby ensuring the accuracy of the relative movement between the laser scanner 200 and the worktable. Preferably, the machine tool 100 can be connected to the laser scanner 200 to acquire point clouds, which are then displayed on the machine tool 100's display screen 110. Optionally, the laser scanner 200 and the machine tool 100 can be connected via other computer equipment to determine the centering position. The worktable can be the machine tool 100's worktable or a regular desktop, etc., and is not limited thereto. The laser scanner 200 acquires the three-dimensional coordinate data of the object's surface by emitting a laser beam and receiving its reflected light. The method in this embodiment is described using computer equipment such as a personal computer, laptop computer, CNC machine, or CNC system.
[0026] In one embodiment, such as Figure 2 The diagram shown is a flowchart of a machine tool workpiece centering method in one embodiment, including the following steps:
[0027] Step 202: The laser scanner is driven by the machine tool spindle to scan the workpiece to be processed according to the preset pose trajectory, and the point cloud of the scanning area in the scanning coordinate system is obtained; the workpiece to be processed is located in the scanning area.
[0028] The workpiece to be processed can be a processed workpiece or an unprocessed blank workpiece. The scanning coordinate system is a three-dimensional coordinate system established with the optical center of the laser scanner or its internal sensor as the origin. The initial coordinates of the point cloud data acquired by the scanner are all based on this scanning coordinate system.
[0029] A scanned area point cloud is a collection of three-dimensional data points acquired by a laser scanner, containing the surface of the workpiece to be processed and a local area of the worktable on which it is placed.
[0030] The preset pose trajectory refers to the pre-planned path and posture sequence of the laser scanner driven by the machine tool spindle. The pose includes position and orientation (i.e., rotation angle), ensuring that the scanner can completely cover the workpiece and part of the worktable area from multiple angles.
[0031] Specifically, the laser scanner is pre-installed on the machine tool spindle. The machine tool's CNC system pre-stores the laser scanner's movement path and ensures that the scanner lens is always roughly aligned with the workpiece surface. During the scanning process, the laser scanner's posture can change or remain unchanged. The machine tool starts the scanning program, and the laser scanner continuously emits laser light and simultaneously acquires and records the point cloud coordinates in the scanning coordinate system during its movement. After the laser scanner completes the scan, it obtains a three-dimensional point cloud dataset containing the workpiece surface and part of the worktable surface, i.e., the point cloud of the scanned area. Scanning with a fixed preset pose trajectory means that the scanning path and posture are repeatable and predictable, reducing errors caused by human operation or random movement; it also allows for pre-planning of the optimal path, avoiding repeated scanning or missed areas, saving time.
[0032] Step 204: Extract the point cloud of the scanned area to obtain the point cloud of the workpiece to be processed.
[0033] Among them, the point cloud of the workpiece to be processed refers to the set of three-dimensional data points that are separated from the point cloud of the scanned area and belong only to the surface of the workpiece itself.
[0034] Specifically, after obtaining the point cloud of the scanned area, the computer device can remove background points, i.e., worktable points, using algorithms. Optionally, since the workpiece is usually higher than the worktable plane, a Z-axis (height direction) threshold can be set to retain points higher than this threshold. Optionally, the computer device can fit the worktable plane, then calculate the distance from each point to that plane, and extract points whose distance is greater than a set tolerance (i.e., points on the workpiece). Optionally, the computer device uses a spatial clustering algorithm to distinguish the spatially densely connected workpiece point cloud from the scanned area point cloud.
[0035] Step 206: Determine the centering position of the point cloud of the workpiece to be processed, so as to obtain the centering position of the workpiece to be processed in the machine tool coordinate system; the centering position of the workpiece to be processed in the machine tool coordinate system is obtained by transforming from the scanning coordinate system according to the coordinate system transformation relationship.
[0036] The coordinate system transformation relationship refers to the transformation matrix from the scanning coordinate system to the machine tool coordinate system. It contains rotation and translation information.
[0037] The center position is the initial position of a unified coordinate system for machine tools and computer equipment. It is generally selected from characteristic points of the workpiece, such as the center of the top surface, corner points, center of a circle, center of a sphere, etc.
[0038] Specifically, computer equipment can employ the same or different strategies for centering different types of workpieces. For example, if the workpiece is a sphere, the center can be determined by fitting the point cloud of the workpiece. If the workpiece is a cone or pyramid, the center can be determined by the height value.
[0039] Optionally, the computer device can convert the point cloud of the scanned area in the scanning coordinate system to the machine tool coordinate system, and then extract the point cloud of the scanned area to obtain the point cloud of the workpiece to be processed. Alternatively, the computer device can obtain the center position of the workpiece to be processed in the scanning coordinate system, and then convert the center position to the machine tool coordinate system.
[0040] In this embodiment, the laser scanner driven by the machine tool spindle scans the workpiece to be processed according to a preset pose trajectory, thereby obtaining the point cloud of the workpiece. According to the coordinate transformation relationship, the centering position in the scanning coordinate system is transformed to the machine tool coordinate system. By combining the high precision of the laser scanner with the centering of the machine tool, the complete three-dimensional shape of the workpiece can be obtained quickly and accurately, thereby calculating a more accurate and reliable geometric centering position. The entire centering process does not require repeated tool setting and measurement by the machine tool, which significantly improves the processing efficiency of the machine tool. Furthermore, by using the preset pose trajectory, the optimal path can be planned in advance, avoiding repeated scanning or missed areas, saving time, and making the scanning path and posture repeatable and predictable, reducing the errors caused by human operation or random movement, and improving the centering accuracy.
[0041] In one embodiment, before scanning the workpiece to be processed according to a preset pose trajectory by driving the laser scanner through the machine tool spindle to obtain the point cloud of the scanned area in the scanning coordinate system, the method further includes:
[0042] The laser scanner is driven by the machine tool spindle to scan the calibration object according to the preset posture trajectory, and the scanning calibration point cloud in the scanning coordinate system is obtained.
[0043] The calibration object is probed by the machine tool to obtain at least three detection calibration points in the machine tool coordinate system;
[0044] The coordinate system transformation relationship from the scanning coordinate system to the machine tool coordinate system is determined based on the scanning calibration point cloud and the detection calibration points.
[0045] The calibration object is the object used for three-dimensional calibration. This can be a calibration block such as a precision-machined cube, a stepped block, a calibration plate with markers, or a sphere; no specific limitations are specified here.
[0046] The scanning calibration point cloud is a three-dimensional point cloud data containing the surface of the calibration object, located in the scanning coordinate system. The detection calibration point is the location of the point on the calibration object that is probed in the machine tool coordinate system.
[0047] Specifically, during the calibration process, the computer equipment controls the machine tool spindle to drive the laser scanner to scan the calibration object according to a preset pose trajectory, obtaining a scanned calibration point cloud containing the calibration object in the scanning coordinate system. The calibration object may have calibration points (or feature points, etc.), and the computer acquires the point cloud data of these calibration points. Preferably, the calibration points are not coplanar. The machine tool probe is controlled to detect the calibration points on the calibration object, obtaining the detected calibration points in the machine tool coordinate system. Then, based on the calibration point data in the scanned calibration point cloud and the detected calibration points, the coordinate system transformation relationship from the scanning coordinate system to the machine tool coordinate system can be determined. This coordinate system transformation relationship is the coordinate system transformation relationship corresponding to the machine tool. In the actual machining process, the computer equipment controls the machine tool spindle to drive the laser scanner to scan the workpiece to be machined according to the preset pose trajectory.
[0048] In this embodiment, the laser scanner stitches together frame-by-frame point clouds using an algorithm during the scanning process to form a 3D point cloud map. However, if the laser scanner's scanning trajectory is different, it may introduce errors in the point cloud positions. Furthermore, the coordinate transformation relationship between the point clouds obtained under different scanning pose trajectories and the coordinate system calculated from the machine tool's detection points may also differ. This embodiment unifies the preset pose trajectory during calibration with that used in actual operation, eliminating systematic errors caused by inconsistencies between the calibration and operating states, and improving the accuracy of workpiece centering on the machine tool.
[0049] In one embodiment, the calibration object includes at least three calibration spheres; determining the coordinate system transformation relationship from the scanning coordinate system to the machine tool coordinate system based on the scanned calibration point cloud and the probed calibration points includes:
[0050] The scanning calibration point cloud is extracted and processed to obtain the point cloud clusters of each calibration sphere;
[0051] The reference calibration point positions of each calibration sphere in the scanning coordinate system are determined based on the point cloud clusters of the calibration spheres; the reference calibration point positions of each calibration sphere in the scanning coordinate system are not coplanar;
[0052] The reference calibration point positions of each calibration ball in the machine tool coordinate system are determined based on the detection calibration points; the reference calibration point positions of each calibration ball in the machine tool coordinate system are not coplanar;
[0053] The coordinate system transformation relationship from the scanning coordinate system to the machine tool coordinate system is determined based on the positions of at least three reference calibration points in the scanning coordinate system and at least three reference calibration points in the machine tool coordinate system.
[0054] The calibration sphere can be a high-precision sphere. The reference calibration point is the base point used for coordinate system alignment. For a sphere, the reference calibration point can be either a vertex or the center of the sphere. The vertex is selected as the point with the highest altitude in the point cloud cluster. The reference calibration points are not coplanar.
[0055] Point cloud clusters are point cloud data belonging to the same calibration sphere, separated from the overall scan calibration point cloud using an algorithm. The coordinate system transformation relationship is the transformation relationship from the scan coordinate system to the machine tool coordinate system, specifically the transformation matrix, including rotation and translation matrices.
[0056] Specifically, taking the reference calibration point as the center of the sphere as an example, since each sphere is spatially separated, a spatial distance-based clustering algorithm (such as Euclidean clustering) can be used to automatically identify and separate the point sets belonging to each independent sphere, thus obtaining multiple point cloud clusters, each corresponding to a calibration sphere. A spatial spherical fitting algorithm is used to fit the center position of each calibration sphere in the machine tool coordinate system based on the point cloud clusters. A machine tool probe is used to probe each calibration sphere. Typically, at least four points are probed on the surface of each sphere. For each sphere, the computer uses the machine tool coordinates of the detected surface points and the same spatial spherical fitting algorithm to calculate the center coordinates of the sphere in the machine tool coordinate system. At this point, two sets of points with a one-to-one correspondence are established. Since at least three non-coplanar points are used, the rotation and translation matrices can be uniquely determined.
[0057] In this embodiment, calibration is performed using at least three calibration balls, and the reference calibration points are not collinear, providing sufficient spatial constraints, reducing calibration errors, and resulting in higher robustness and accuracy.
[0058] In one embodiment, the workpiece to be processed is clamped on a fixture; the point cloud of the scanned area is extracted to obtain the point cloud of the workpiece to be processed, including:
[0059] The point cloud of the scanned area is filtered and the point cloud below the fixture plane of the scanned area is segmented to obtain the point cloud of the workpiece to be processed.
[0060] In point cloud processing, filtering refers to the use of algorithms to remove noise, outliers, or invalid points from the data, thereby improving the quality of the point cloud and facilitating subsequent processing. Common filtering methods include statistical filtering and radius filtering.
[0061] Fixture plane: This refers to the key plane on the fixture used for positioning and supporting the workpiece. Examples include the jaw plane of a flat-jaw vise, the reference surface of a precision angle iron, and the end face of a three-jaw chuck. After clamping, the workpiece rests on this plane.
[0062] Specifically, after acquiring the raw scan data, the computer equipment performs preprocessing. Because laser scanning can be affected by ambient light, reflections, dust, or scanner noise, the raw point cloud will contain some discrete noise points that are significantly deviated from the object's surface. By filtering out these noise points, the filtered point cloud retains the true surface data of the main structures such as the fixture and workpiece, removing floating noise points and making subsequent segmentation steps more accurate and stable. The computer equipment then removes the point cloud outside the fixture plane of the scanned area. These points belong to the fixture body, the worktable surface, or components clamped below the plane, rather than the workpiece to be processed, ultimately obtaining the point cloud of the workpiece to be processed.
[0063] In this embodiment, the point cloud of the scanned area is filtered and the point cloud below the fixture plane of the scanned area is segmented to obtain the point cloud of the workpiece to be processed. The process logic of the plane segmentation after filtering is clear, the computational complexity is low, and it is easy to process in real time or quickly on an industrial computer. The entire extraction process does not require manual intervention or setting complex thresholds, realizing fully automatic extraction from mixed point cloud to workpiece point cloud, which greatly improves the overall efficiency of the segmentation process.
[0064] In one embodiment, extracting the point cloud of the scanned area to obtain the point cloud of the workpiece to be processed includes:
[0065] The laser scanner driven by the machine tool spindle scans the worktable without a workpiece to be processed according to the preset posture trajectory, and obtains the worktable point cloud in the scanning coordinate system.
[0066] Based on the differences in spatial geometric relationships between the point cloud of the scanned area and the point cloud of the worktable, the point cloud of the workpiece to be processed is extracted from the point cloud of the scanned area.
[0067] The worktable point cloud refers to the three-dimensional coordinate set of the worktable that does not contain the workpiece to be processed. The scanned area point cloud contains both the worktable and the workpiece to be processed.
[0068] Specifically, the computer device can traverse each point in the scanned area point cloud and determine the minimum distance from that point to a point in the worktable point cloud. When there is a point whose minimum distance exceeds a distance threshold, that point is a point on the workpiece to be processed, thus obtaining the point cloud of the workpiece to be processed. Optionally, the computer device can construct a spatial index data structure (such as a KD-Tree, octree, etc.) based on the worktable point cloud. For each point in the scanned area point cloud, a nearest neighbor search is performed using this spatial index data structure to obtain the minimum distance from that point to a point in the worktable point cloud. Optionally, the computer device can perform point cloud registration between the scanned area point cloud and the worktable point cloud to obtain a rigid body transformation matrix; apply this rigid body transformation matrix to each point in the scanned area point cloud to perform coordinate transformation; determine the residual distance from each transformed point to the worktable point cloud; and determine points whose residual distance is greater than a distance threshold as points on the workpiece to be processed.
[0069] In this embodiment, the point clouds obtained by scanning the worktable without the workpiece to be processed according to the preset pose trajectory and scanning the worktable with the workpiece to be processed according to the preset pose trajectory are formed in the same scanning coordinate system and the same pose trajectory, and therefore have strong comparability; and by using the spatial geometric difference between the point cloud of the scanning area and the point cloud of the worktable, the point cloud of the workpiece to be processed can be accurately extracted from the point cloud of the scanning area.
[0070] In one embodiment, determining the centering position of the point cloud of the workpiece to be processed includes: determining the minimum bounding cube of the workpiece to be processed; and determining the centering position of the minimum bounding cube.
[0071] The shape of the workpiece to be processed is not limited; it can be a common rectangular blank, a cylindrical blank, or an irregularly shaped blank. A rectangular blank refers to raw material with a regular rectangular outline, such as square or sheet metal. Its ideal geometric shape is a cuboid. Irregularly shaped blanks generally refer to blanks with complex, irregular, or non-simple cuboid shapes.
[0072] The minimum circumscribed cube is a cube (i.e., a cuboid) whose sides are parallel to the X, Y, and Z axes of the machine tool coordinate system (or the axes of the scan coordinate system, which are transformed to be parallel to the machine tool axes) and can completely contain all points of the rectangular blank point cloud. The six faces of this cube are tangent to the extreme points of the point cloud in the X, Y, and Z directions, respectively.
[0073] Specifically, principal component analysis (PCA) is used to determine the main spatial orientation of the point cloud of the workpiece to be processed. Then, the extreme values of the point cloud in each principal axis direction are calculated, thereby quickly fitting the minimum bounding cube. The computer equipment can use the center of the top face of the minimum bounding cube as the centering position of the workpiece to be processed, or any corner point of the top face as the centering position, or the center of the workpiece to be processed as the centering position, etc., without limitation.
[0074] In this embodiment, it is difficult to find the centering position of the irregular blank in the traditional mechanical centering method even through detection. However, the laser scanner can quickly obtain the complete three-dimensional point cloud of the workpiece by scanning the irregular blank. It is not limited by shape and determines the minimum bounding cube of the point cloud of the workpiece to be processed, thereby determining the centering position of the minimum bounding cube, which can achieve high-precision centering.
[0075] In one embodiment, determining the centering position of the workpiece to be processed includes: when the workpiece to be processed is a cylindrical blank, determining a reference feature of the point cloud of the cylindrical blank; and determining the centering position of the point cloud of the workpiece to be processed based on the reference feature.
[0076] The reference features can be end face circles, cylindrical axes, pre-made reference holes, etc.
[0077] Specifically, the computer equipment can perform type identification of the workpiece to be processed. Multiple regions are sampled on the point cloud to determine the surface normal vector and curvature of each region. For a matrix blank, its surface is mainly composed of large-area planes with local curvature close to zero, and the normal vector directions are concentrated in a few directions (e.g., 6 directions). For a cylindrical blank, its surface is mainly composed of cylindrical surfaces with a large principal curvature in one direction (along the circumference) and zero principal curvature in another direction (along the axis), and the normal vectors are distributed around the axis. If identified as a cylindrical blank, Random Sample Consensus (RANSAC) is used to identify and fit a mathematical model of the cylinder from the point cloud. By identifying the circular surface and fitting the axial direction of the cylinder, the intersection of the cylinder's axial direction and the circular surface is the center point of the circular surface, which can be used as the centering position. Alternatively, the center point of the circular surface can be fitted as the centering position. Or, a pre-made reference hole of the cylindrical blank can be determined, and this hole can be used as the centering position of the workpiece to be processed.
[0078] In this embodiment, when the workpiece to be processed is a cylindrical blank, the reference features of the point cloud of the cylindrical blank are determined, and the centering position of the point cloud of the workpiece to be processed is determined according to the reference features. This can automatically realize the centering of the machine tool workpiece and improve the processing efficiency of the machine tool.
[0079] In one embodiment, in the field of CNC machining, the initial positioning (centering) of the blank is the primary factor determining machining accuracy and efficiency. Traditional methods, widely relied upon by the industry for a long time, whether manually operated mechanical centering rods or using contact-type trigger probes, have fundamental and insurmountable drawbacks. From an efficiency perspective, these methods are essentially a "point-to-point contact" serial measurement mode, cumbersome to operate and complex in path planning, resulting in a significant amount of auxiliary time being consumed by the machine tool's valuable machining time, severely restricting the production cycle of automated production lines. From a process adaptability perspective, physical contact measurement methods pose a risk of surface damage to soft, easily deformable, or high-temperature blanks, and the measurement force itself may introduce errors, limiting its application range. More importantly, the accuracy and consistency of traditional methods are highly dependent on the operator's skills and experience; random errors caused by human factors make it difficult to guarantee the repeatability accuracy of batch processing, becoming a potential hidden danger affecting product quality stability.
[0080] Against this backdrop, 3D laser scanning technology, with its unique advantages of non-contact, high-speed, and high-density acquisition of 3D data of object surfaces, provides a new technological path to overcome the aforementioned bottlenecks. This technology can instantly capture the overall contour point cloud of a workpiece, theoretically revolutionizing the measurement method from "point-by-point detection" to "global perception," making rapid and automated centering possible. However, how to reliably integrate this advanced sensing technology into the harsh machine tool processing environment and transform it into a stable, accurate, and easy-to-use industrial solution remains a core challenge to be overcome.
[0081] This embodiment was developed to completely solve this engineering challenge. Its core significance lies in the creative deep integration of laser scanning technology and machine tool motion control, forming a complete solution. This embodiment proposes an automatic centering method and system for machine tool blanks, belonging to the field of CNC machine tool processing and online measurement technology, and is particularly suitable for intelligent manufacturing scenarios that require rapid and highly repeatable initial positioning of blanks.
[0082] First, the system is initialized and calibrated to establish a fixed transformation relationship from the scanning coordinate system to the machine tool coordinate system. Multiple high-precision calibration spheres are arranged on the machine tool table. The spindle is controlled to drive a fixedly mounted laser scanner, moving along a preset fixed spatial trajectory to scan the calibration spheres and obtain their coordinates in the scanner coordinate system. Simultaneously, a contact probe is used to obtain the precise coordinates of the corresponding calibration spheres in the machine tool coordinate system. Based on the correspondence between the two sets of coordinates, a unique homogeneous transformation matrix is calculated.
[0083] Then, the blank is automatically centered. After the blank is placed on the worktable, the machine tool spindle is controlled to strictly reproduce the aforementioned fixed trajectory again, and the scanner is driven to perform a global scan of the blank. Using the transformation matrix obtained by calibration, the three-dimensional model of the blank in the machine tool coordinate system is obtained, and feature recognition and geometric fitting are performed on it to obtain the machine tool coordinates of the blank's center point. This coordinate is automatically set as the origin of the workpiece coordinate system of the CNC system, thus completing the centering.
[0084] This process, through "fixed trajectory" constraints, deeply couples non-contact laser scanning technology with the machine tool motion system, realizing the transformation from complex dynamic calibration to simple static parameter application, thereby ensuring high efficiency, high precision and extremely high repeatability of the centering process.
[0085] The core implementation process of this embodiment follows a paradigm of "one-time calibration, permanent application, and one-click centering", which is specifically divided into two logically rigorous stages that are executed sequentially.
[0086] Step 1: System initialization and calibration.
[0087] This stage aims to establish a stable and accurate coordinate transformation benchmark between the laser scanning measurement system and the machine tool CNC system, laying the foundation for all subsequent automated measurements. The core of this stage is to obtain a fixed and invariant homogeneous transformation matrix, thereby achieving a rigid association between the scanner coordinate system and the machine tool coordinate system that is "calibrated once and remains effective for a long time".
[0088] (1) Equipment installation: The 3D laser scanner is rigidly installed in a fixed position next to the spindle of the machine tool, thereby ensuring the accuracy of the relative movement between the laser scanner and the worktable.
[0089] (2) Reference arrangement: Install no less than three non-collinear high-precision calibration balls on the machine tool worktable. The relative positions of the calibration balls should form a spatial triangle as large as possible to improve the numerical stability of subsequent coordinate calculations.
[0090] (3) Fixed trajectory calibration scanning: In the CNC system, a fixed spatial scanning trajectory is pre-programmed and stored. This trajectory is defined by a series of discrete machine tool coordinate points (X, Y, Z). The design principle is to ensure that the scanner's field of view completely covers the worktable area throughout the entire trajectory movement, and that only the linear axis moves, without any rotation of the rotary axis. The calibration program is executed to control the machine tool to move strictly according to the preset, fixed spatial trajectory, driving the scanner to complete the scanning of the calibration ball.
[0091] (4) Dual coordinate system data acquisition and processing:
[0092] a) Scan Coordinate System Data Extraction: The acquired scan point cloud is first subjected to noise reduction and segmentation processing to separate the point cloud clusters of each calibration sphere. Subsequently, the least squares spherical fitting algorithm is used for each point cloud cluster to accurately calculate the three-dimensional coordinates pi(Xsi,Ysi,Zsi) (i=1,2,..n) of the center of the calibration sphere in the current scanner coordinate system.
[0093] b) Machine coordinate system reference acquisition: After scanning is completed, a contact-triggered probe can be used to sequentially and accurately detect the highest point and multiple side points of each calibration sphere in a single-point trigger mode. The least squares spherical fitting algorithm is used to automatically calculate and record the precise coordinates qi(Xmi, Ymi, Zmi) (i=1,2,..n) of the center of each calibration sphere in the machine coordinate system. These coordinates serve as the "ground truth value" of the calibration sphere.
[0094] (5) Accurate solution and verification of the transformation matrix: Using the coordinates of the three-dimensional point set of the calibration sphere in the two coordinate systems, a unique and optimal homogeneous transformation matrix can be calculated. This matrix permanently defines the mapping relationship from the scanner's local coordinate system to the machine tool's global coordinate system.
[0095] The method for calculating this homogeneous transformation matrix is as follows:
[0096] Solving for this homogeneous transformation matrix essentially involves finding an orthogonal rotation matrix R (a 3×3 orthogonal matrix, det(A)=1) and a translation vector t (3×1) that minimizes the overall error between the transformed scan coordinates and the machine coordinates. That is, minimizing the following objective function:
[0097]
[0098] Pi is the coordinate of the center of the i-th calibration sphere in the scanning coordinate system, i = 1, 2, ..., n (n >= 3). qi is the coordinate of the center of the i-th calibration sphere in the machine tool coordinate system, which corresponds one-to-one with pi.
[0099] The solution steps are as follows:
[0100] Step 1: Calculate the centroids of the two point sets:
[0101]
[0102] μ p It is the average centroid of the calibration sphere in the scanning coordinate system. μ q It is the average centroid of the calibration sphere in the machine tool coordinate system.
[0103] Step 2: Decentralize the point set:
[0104]
[0105] p i ' is the decentralized coordinate of the i-th point in the scan coordinate system; q i ' is the decentralized coordinate of the i-th point in the machine tool coordinate system.
[0106] Step 3: Calculate the 3×3 covariance matrix H
[0107]
[0108] Step 4: Perform singular value decomposition on matrix H:
[0109]
[0110] Where U and V are 3×3 orthogonal matrices.
[0111] Σ is a diagonal matrix composed of singular values.
[0112] Step 5: Calculate the rotation matrix R:
[0113]
[0114] Important check: To ensure that the result is a pure rotation (rather than one involving reflection), the value of det(R) needs to be checked.
[0115] If det(R) = 1, then R is the desired value.
[0116] If det(R) = -1, then invert the third column of matrix V to obtain the corrected V', and then recalculate.
[0117] Step 6: Calculate the translation vector t:
[0118]
[0119] The formula means the centroid of the machine tool coordinate system minus the centroid of the rotated scan coordinate system.
[0120] Step 7: Construct a 4×4 homogeneous transformation matrix T:
[0121]
[0122] After obtaining the coordinate transformation matrix T, for any point p in the scanning coordinate system, its coordinates q in the machine tool coordinate system are:
[0123]
[0124] Step 2: Automated sorting of raw blanks.
[0125] This stage utilizes the coordinate transformation matrix T determined in the first stage to achieve rapid and automatic positioning of any placed blank. The entire process is highly automated, perfectly combining the global and high-efficiency advantages of non-contact 3D scanning with the precision and determinism of the machine tool motion system.
[0126] (1) Blank clamping: Place the blank (rectangular or cylindrical) to be processed on the worktable.
[0127] (2) Trigger automatic scanning: Start the centering program, and the machine tool spindle accurately reproduces the fixed scanning trajectory of the calibration stage. The scanner scans the blank in all directions along the trajectory.
[0128] (3) Point cloud stitching and coordinate unification: The blank point cloud obtained by the system scanning coordinate system can be uniformly transformed to the machine tool coordinate system using the fixed transformation matrix T obtained in the first stage, thereby obtaining the three-dimensional point cloud model of the blank in the machine tool coordinate system.
[0129] (4) Feature-based intelligent recognition and central computing:
[0130] a) Filter and segment the point cloud to separate the raw main body.
[0131] b) For a rectangular blank: Principal component analysis (PCA) is used to determine the main spatial orientation of the point cloud, and then the extreme values (maximum and minimum values) of the point cloud in each principal axis direction are calculated to quickly fit the minimum bounding cube (AABB) of the blank. The center of the top face of this cube is the coordinate of the blank center point (X_c, Y_c, Z_c).
[0132] c) For cylindrical blanks: Robust fitting algorithms such as Random Sample Consensus (RANSAC) are used to identify and fit a mathematical model of the cylinder from the point cloud. This model can accurately output the axial direction vector, radius, and a point on the axis of the cylinder. Combining the boundary of the point cloud in the axial direction with the fitted end face point cloud, the center of the end face is obtained and determined as the center point.
[0133] (5) Automatic coordinate system setting: The calculated center point coordinates of the blank (already located in the machine tool coordinate system) are automatically set as the origin of the current workpiece coordinate system of the CNC system to complete the centering.
[0134] This embodiment not only leverages the inherent advantages of laser scanning but also ensures high repeatability and long-term stability of measurement results through innovative system calibration and fixed-track scanning methods, thereby transforming theoretical advantages into practical value. It achieves a leap from "minute-level" to "second-level" blank centering, greatly unleashing the machining potential of machine tools; its objective and consistent measurement logic completely eliminates human error, providing a reliable quality benchmark for mass production; and its broad adaptability to materials and working conditions expands the processing capabilities of CNC machine tools. Therefore, this embodiment is not merely an optimization of a single process but also a key technology driving the upgrade of machine tools from "execution equipment" to an integrated intelligent unit of "perception-decision-execution," which is of significant value in enhancing the overall competitiveness of the manufacturing industry.
[0135] In one embodiment, a method for centering a machine tool workpiece includes the following steps:
[0136] Step (a1): Control the machine tool spindle to drive the laser scanner to scan the calibration object according to the preset pose trajectory, and obtain the scanning calibration point cloud in the scanning coordinate system.
[0137] Step (a2): Control the machine tool probe to detect the calibration object and obtain at least three detection calibration points in the machine tool coordinate system.
[0138] Step (a3) involves extracting the scanning calibration point cloud to obtain the point cloud clusters of each calibration sphere.
[0139] Step (a4): Determine the reference calibration point positions of each calibration sphere in the scanning coordinate system based on the point cloud clusters of the calibration spheres. The reference calibration point positions in the scanning coordinate system are not coplanar.
[0140] Step (a5): Determine the reference calibration point positions of each calibration ball in the machine tool coordinate system based on the detection calibration points. The reference calibration point positions in the machine tool coordinate system are not coplanar.
[0141] Step (a6): Determine the coordinate system transformation relationship from the scanning coordinate system to the machine tool coordinate system based on the positions of at least three reference calibration points in the scanning coordinate system and at least three reference calibration points in the machine tool coordinate system.
[0142] Step (a7): The laser scanner is driven by the machine tool spindle to scan the workpiece to be processed according to the preset pose trajectory, and the point cloud of the scanning area in the scanning coordinate system is obtained; the workpiece to be processed is located in the scanning area.
[0143] Step (a8) involves filtering the point cloud of the scanned area and segmenting the point cloud below the fixture plane of the scanned area to obtain the point cloud of the workpiece to be processed.
[0144] Step (a9): Determine the minimum bounding cube of the rectangular blank point cloud; the workpiece to be processed includes irregularly shaped blanks.
[0145] Step (a10) determines the centering position of the smallest circumscribed cube to obtain the centering position of the rectangular blank in the machine tool coordinate system. This centering position is obtained by transforming from the scanning coordinate system according to the coordinate system transformation relationship.
[0146] Step (a11): When the workpiece to be processed is a cylindrical blank, determine the reference features of the point cloud of the cylindrical blank.
[0147] Step (a12): Determine the centering position of the workpiece to be processed based on the reference features to obtain the centering position of the cylindrical blank in the machine tool coordinate system; this centering position is obtained by transforming from the scanning coordinate system according to the coordinate system transformation relationship.
[0148] In this embodiment, the laser scanner driven by the machine tool spindle scans the workpiece to be processed according to a preset pose trajectory, thereby obtaining the point cloud of the workpiece. According to the coordinate system transformation relationship, the centering position in the scanning coordinate system is transformed to the machine tool coordinate system. By combining the high precision of the laser scanner with the centering of the machine tool, the complete three-dimensional shape of the workpiece can be obtained quickly and accurately, thereby calculating a more accurate and reliable geometric centering position. The entire centering process does not require repeated tool setting and measurement by the machine tool, which significantly improves the processing efficiency of the machine tool. Furthermore, by using the preset pose trajectory, the optimal path can be planned in advance, avoiding repeated scanning or missed areas, saving time, and making the scanning path and posture repeatable and predictable, reducing the errors caused by human operation or random movement.
[0149] It should be understood that, although the above Figure 2In the flowchart, the steps are shown sequentially according to the arrows, and the steps (a1) to (a12) are shown sequentially according to their numbers. However, these steps are not necessarily executed in the order indicated by the arrows or numbers. Unless explicitly stated herein, there is no strict order requirement for the execution of these steps; they can be executed in other orders. Figure 2 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.
[0150] In one embodiment, a machine tool workpiece centering device is provided. This device can be a software module, a hardware module, or a combination of both as part of a computer device. Specifically, the device includes a point cloud acquisition module, a point cloud extraction module, and a centering position determination module, wherein:
[0151] The point cloud acquisition module is used to drive the laser scanner to scan the workpiece to be processed according to a preset pose trajectory via the machine tool spindle, and obtain the point cloud of the scanned area in the scanning coordinate system; the workpiece to be processed is located within the scanned area.
[0152] The point cloud extraction module is used to extract the point cloud of the scanned area to obtain the point cloud of the workpiece to be processed;
[0153] The centering position determination module is used to determine the centering position of the point cloud of the workpiece to be processed, so as to obtain the centering position of the workpiece to be processed in the machine tool coordinate system. The centering position of the workpiece to be processed in the machine tool coordinate system is obtained by transforming it from the scanning coordinate system according to the coordinate system transformation relationship.
[0154] In one embodiment, the machine tool workpiece centering method further includes a calibration module, which is used for:
[0155] The machine tool spindle is controlled to drive the laser scanner to scan the calibration object according to the preset posture trajectory, and the scanning calibration point cloud in the scanning coordinate system is obtained;
[0156] The probe of the machine tool is controlled to detect the calibration object and obtain at least three detection calibration points in the machine tool coordinate system;
[0157] The coordinate system transformation relationship from the scanning coordinate system to the machine tool coordinate system is determined based on the scanning calibration point cloud and the detection calibration points.
[0158] In one embodiment, the calibration object includes at least three calibration balls; the calibration module is used for:
[0159] The scanning calibration point cloud is extracted and processed to obtain the point cloud clusters of each calibration sphere;
[0160] The reference calibration point positions of each calibration sphere in the scanning coordinate system are determined based on the point cloud clusters of the calibration spheres; the reference calibration point positions of each calibration sphere in the scanning coordinate system are not coplanar;
[0161] The reference calibration point positions of each calibration ball in the machine tool coordinate system are determined based on the detection calibration points; the reference calibration point positions of each calibration ball in the machine tool coordinate system are not coplanar;
[0162] The coordinate system transformation relationship from the scanning coordinate system to the machine tool coordinate system is determined based on the positions of at least three reference calibration points in the scanning coordinate system and at least three reference calibration points in the machine tool coordinate system.
[0163] In one embodiment, the workpiece to be processed is clamped on a fixture; the point cloud extraction module is used for:
[0164] The point cloud of the scanned area is filtered and the point cloud below the fixture plane of the scanned area is segmented to obtain the point cloud of the workpiece to be processed.
[0165] In one embodiment, the centering position determination module is used for:
[0166] When the workpiece to be processed is a rectangular blank, determine the minimum bounding cube of the point cloud of the rectangular blank;
[0167] Determine the center position of the smallest circumscribed cube.
[0168] In one embodiment, the centering position determination module is used for:
[0169] When the workpiece to be processed is a cylindrical blank, determine the reference features of the point cloud of the cylindrical blank;
[0170] The centering position of the workpiece to be processed is determined based on the reference features.
[0171] Specific limitations regarding the machine tool workpiece centering device can be found in the limitations of the machine tool workpiece centering method described above, and will not be repeated here. Each module in the aforementioned machine tool workpiece centering device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0172] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 3As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a machine tool workpiece centering method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad located on the computer device casing, or an external keyboard, touchpad, or mouse, etc. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0173] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0174] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method embodiments.
[0175] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method embodiments.
[0176] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the above-described method embodiments.
[0177] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0178] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for centering a machine tool workpiece, characterized in that, The method includes: The laser scanner is driven by the machine tool spindle to scan the workpiece to be processed according to a preset posture trajectory, thereby obtaining a point cloud of the scanned area in the scanning coordinate system; the workpiece to be processed is located within the scanned area. The point cloud of the scanned area is extracted to obtain the point cloud of the workpiece to be processed; The centering position of the point cloud of the workpiece to be processed is determined to obtain the centering position of the workpiece to be processed in the machine tool coordinate system; the centering position of the workpiece to be processed in the machine tool coordinate system is obtained by transforming from the scanning coordinate system according to the coordinate system transformation relationship.
2. The method according to claim 1, characterized in that, Before the step of scanning the workpiece according to a preset pose trajectory by driving a laser scanner through a machine tool spindle to obtain a point cloud of the scanned area in the scanning coordinate system, the method further includes: The machine tool spindle drives the laser scanner to scan the calibration object according to the preset pose trajectory, thereby obtaining the scanning calibration point cloud in the scanning coordinate system. The calibration object is detected by the probe of the machine tool to obtain at least three detection calibration points in the machine tool coordinate system; The coordinate system transformation relationship from the scanning coordinate system to the machine tool coordinate system is determined based on the scanning calibration point cloud and the detection calibration points.
3. The method according to claim 2, characterized in that, The calibration object includes at least three calibration spheres; determining the coordinate system transformation relationship from the scanning coordinate system to the machine tool coordinate system based on the scanning calibration point cloud and the detection calibration points includes: The scanning calibration point cloud is extracted to obtain point cloud clusters for each calibration sphere; The reference calibration point positions of each calibration sphere in the scanning coordinate system are determined based on the point cloud clusters of the calibration spheres; the reference calibration point positions of each calibration sphere in the scanning coordinate system are not coplanar; The reference calibration point positions of each calibration ball in the machine tool coordinate system are determined based on the detection calibration points; the reference calibration point positions of each calibration ball in the machine tool coordinate system are not coplanar; The coordinate system transformation relationship from the scanning coordinate system to the machine tool coordinate system is determined based on the positions of at least three reference calibration points in the scanning coordinate system and at least three reference calibration points in the machine tool coordinate system.
4. The method according to claim 1, characterized in that, The workpiece to be processed is clamped on a fixture; the step of extracting the point cloud of the scanned area to obtain the point cloud of the workpiece to be processed includes: The point cloud of the scanned area is filtered and the point cloud below the fixture plane of the scanned area is segmented to obtain the point cloud of the workpiece to be processed.
5. The method according to claim 1, characterized in that, The step of extracting the point cloud of the scanned area to obtain the point cloud of the workpiece to be processed includes: The machine tool spindle drives the laser scanner to scan the worktable without the workpiece to be processed according to the preset pose trajectory, thereby obtaining the worktable point cloud in the scanning coordinate system; Based on the spatial geometric relationship differences between the point cloud of the scanned area and the point cloud of the worktable, the point cloud of the workpiece to be processed is extracted from the point cloud of the scanned area.
6. The method according to claim 1, characterized in that, Determining the centering position of the point cloud of the workpiece to be processed includes: Determine the minimum bounding cube of the point cloud of the workpiece to be processed; the workpiece to be processed includes an irregularly shaped blank; Determine the center position of the smallest circumscribed cube.
7. The method according to claim 1, characterized in that, Determining the centering position of the point cloud of the workpiece to be processed includes: When the workpiece to be processed is a cylindrical blank, the reference features of the point cloud of the cylindrical blank are determined. The centering position of the point cloud of the workpiece to be processed is determined based on the reference features.
8. A machine tool workpiece centering device, characterized in that, The apparatus is used to implement the method according to any one of claims 1 to 7, the apparatus comprising: The point cloud acquisition module is used to drive the laser scanner to scan the workpiece to be processed according to a preset pose trajectory via the machine tool spindle, thereby obtaining the point cloud of the scanned area in the scanning coordinate system; the workpiece to be processed is located within the scanned area. The point cloud extraction module is used to extract the point cloud of the scanned area to obtain the point cloud of the workpiece to be processed; The centering position determination module is used to determine the centering position of the point cloud of the workpiece to be processed, so as to obtain the centering position of the workpiece to be processed in the machine tool coordinate system; the centering position of the workpiece to be processed in the machine tool coordinate system is obtained by transforming from the scanning coordinate system according to the coordinate system transformation relationship.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.