Rail weld grinding track compensation method, device, medium and product
By constructing a reference straight line and coordinate system transformation, a precise grinding trajectory compensation method is generated, which solves the problem of insufficient grinding accuracy of rail welds, achieves high-precision and stable grinding results, and adapts to changes in rail tilt and wear.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI RAILNU MASCH CORP
- Filing Date
- 2026-01-29
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, the accuracy of rail weld grinding trajectory compensation is insufficient, resulting in substandard grinding and an inability to effectively eliminate welding deformation and restore the rail profile.
By constructing a reference straight line and calculating the vertical distance, the position of the weld center point in the robot base coordinate system is determined. Combined with coordinate system transformation and calibration matrix, an accurate grinding trajectory compensation method is generated to eliminate the interference of rail tilt on the measurement and adjust the posture of the grinding tool in real time.
It achieves high-precision grinding of inclined rails, ensuring that the grinding trajectory accurately matches the actual direction of the weld, improving grinding accuracy and stability, adapting to tool wear and rail surface unevenness, and ensuring consistent processing quality over long-term operation.
Smart Images

Figure CN122125681A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine control technology, specifically to a method, equipment, medium, and product for compensating the grinding trajectory of rail welds. Background Technology
[0002] Seamless rails are a crucial component of high-speed railway networks, and the smoothness of their welded joints directly affects the safety and comfort of train operation. Rail weld grinding is a critical process for ensuring track smoothness. Automated grinding systems typically utilize laser profilometers to collect point cloud data of the weld surface, combined with robot kinematic models, to make real-time corrections to the grinding trajectory, eliminating welding deformation and restoring the rail profile.
[0003] In existing technologies, a calibration matrix is typically used to convert the point cloud data collected by the profilometer to the robot base coordinate system in order to unify path planning. When determining the reference for weld grinding, existing systems generally adopt the "vertex positioning method," which involves directly retrieving the point with the largest Z-axis (height direction) value in the point cloud data in the converted coordinate system, defining it as the weld center, and using this point as a reference to calculate the positional deviation of the actual weld relative to the theoretical weld, thereby generating a compensated grinding trajectory.
[0004] However, actual rails often have lateral tilt due to laying or welding, causing the highest point of their cross-section to shift geometrically relative to the actual weld center. If this offset point is used as a reference, the subsequently calculated position and attitude deviations will be distorted, causing the compensation trajectory generated based on this deviation to deviate from the actual path, resulting in substandard grinding accuracy. Summary of the Invention
[0005] This application provides a method, equipment, medium, and product for compensating the grinding trajectory of rail welds, in order to solve the technical problem of insufficient accuracy in grinding trajectory compensation in the prior art.
[0006] Firstly, this application provides a method for compensating the grinding trajectory of rail welds, including:
[0007] The top of the rail is scanned using a laser profilometer to obtain point cloud data of the rail top profile, including the weld area, arranged in the scanning order.
[0008] A reference straight line is constructed based on the first and last track top contour coordinate points in the track top contour point cloud data. The vertical distance from each track top contour coordinate point in the track top contour point cloud data to the reference straight line is calculated. The position coordinates of the weld center point in the robot base coordinate system are determined according to the distribution characteristics of the vertical distance.
[0009] The laser profilometer scans the rail section profile at a first preset distance to the left and a second preset distance to the right of the weld center position to obtain the actual weld pose point cloud data in the profilometer coordinate system.
[0010] The actual weld pose point cloud data is transformed from the profilometer coordinate system to the robot end effector coordinate system using the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system and the base transformation matrix from the robot end effector coordinate system to the robot base coordinate system.
[0011] Based on the converted actual weld pose point cloud data, the actual position deviation and attitude deviation of the actual weld relative to the standard weld are calculated, and the preset grinding trajectory is compensated and corrected according to the position deviation and attitude deviation to generate the grinding execution trajectory.
[0012] Optionally, the step of constructing a reference straight line based on the first and last rail top contour coordinate points in the rail top contour point cloud data, calculating the vertical distance from each rail top contour coordinate point in the rail top contour point cloud data to the reference straight line, and determining the position coordinates of the weld center point in the robot base coordinate system according to the distribution characteristics of the vertical distance, specifically includes:
[0013] Remove the data within a preset length at the beginning and the data within a preset length at the end of the rail top contour point cloud data to obtain valid rail top contour point cloud data.
[0014] A reference straight line is constructed based on the first and last rail top contour coordinate points in the rail top contour point cloud data.
[0015] Calculate the vertical distance from each coordinate point in the effective orbital top profile point cloud data to the reference line, wherein the vertical distance located on the side of the reference line in the convex direction is recorded as a positive value;
[0016] The coordinate points of each rail top profile are sorted in descending order of vertical distance, and the first preset number of rail top profile coordinate points are determined as the set of weld protrusions.
[0017] Calculate the median of the horizontal coordinates of all the rail top profile coordinate points in the weld protrusion set, and determine the rail top profile coordinate point corresponding to the median as the weld center point.
[0018] Optionally, before transforming the actual weld pose point cloud data from the profilometer coordinate system to the robot base coordinate system using the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system and the base transformation matrix from the robot end effector coordinate system to the robot base coordinate system, the method further includes:
[0019] The laser profilometer is controlled to change to multiple different poses, and the coordinate data of the center of the calibration ball corresponding to the different poses of the laser profilometer are collected, as well as the base transformation matrix from the robot end coordinate system to the robot base coordinate system corresponding to the different poses of the laser profilometer. The reference coordinate system of the center of the ball coordinate data is the profilometer coordinate system.
[0020] Based on the sphere center coordinate data and the base transformation matrix, a calibration equation is established that includes the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system. The calibration equation is then solved to obtain the calibration transformation matrix.
[0021] Optionally, the step of establishing a calibration equation containing the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system based on the sphere center coordinate data and the base transformation matrix specifically includes:
[0022] Establish calibration equations that include the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system:
[0023] ;
[0024] Where pi represents the coordinates of the sphere's center during the i-th acquisition, pi = [xi, yi, zi, 1]T, and p0 represents the coordinates of the calibration sphere in the calibration sphere coordinate system. B is the transformation matrix from the calibration spherical coordinate system to the robot base coordinate system. R B For the rotation matrix components, t B Let X be the translation vector component and A be the calibration transformation matrix. i Let be the base transformation matrix during the i-th acquisition. , For rotation matrix components, These are the translation vector components.
[0025] Optionally, solving the calibration equation to obtain the calibration transformation matrix specifically includes:
[0026] Based on the calibration equation, the objective function is constructed using the least squares method:
[0027] ;
[0028] Among them, R X and t X These are the rotation matrix and translation vector in the calibration transformation matrix, respectively;
[0029] Under the condition of satisfying the preset constraints, the objective function is solved by the singular value decomposition algorithm to obtain the rotation matrix R in the calibration transformation matrix. XTranslation vector t X The calibration transformation matrix is obtained, wherein the preset constraint condition is: *RX = I and det(RX) = 1, where I is the identity matrix.
[0030] Optionally, the process of generating the final robot grinding execution trajectory further includes:
[0031] Obtain the initial radius and current radius of the polishing blade;
[0032] Calculate the difference between the initial radius and the current radius to obtain the radius loss value of the polishing flap wheel;
[0033] The radius loss value is converted into a compensation vector along the radial direction of the flap wheel;
[0034] The grinding execution trajectory is obtained, and the grinding execution trajectory is compensated using the compensation vector to obtain the final grinding execution trajectory.
[0035] Optionally, after generating the grinding execution trajectory, the method further includes:
[0036] When using the aforementioned grinding execution trajectory for grinding, real-time force data of the grinding flap wheel during grinding is collected, and the force data is decomposed into normal force and tangential force.
[0037] The actual contact angle between the grinding flap wheel and the weld surface is calculated based on the ratio of the normal force to the tangential force. When the contact angle deviates from the preset range, the angle compensation amount is calculated.
[0038] The angle compensation is superimposed on the grinding execution trajectory to adjust the grinding posture of the grinding flap wheel.
[0039] Secondly, embodiments of this application provide a compensation device for the grinding trajectory of rail welds. The compensation device for the grinding trajectory of rail welds includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the compensation device for the grinding trajectory of rail welds to perform the method described in the first aspect and any possible implementation thereof.
[0040] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a rail weld grinding trajectory compensation device, cause the rail weld grinding trajectory compensation device to perform the method described in the first aspect and any possible implementation thereof.
[0041] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a rail weld grinding trajectory compensation device, cause the rail weld grinding trajectory compensation device to perform the method described in the first aspect and any possible implementation thereof.
[0042] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0043] 1. By adopting the above technical solution, a reference straight line is constructed using the first and last points of the rail top contour point cloud, and the vertical distance is calculated, establishing a relative measurement reference that changes with the rail's attitude. This method uses relative geometric features to determine the weld center, eliminating the interference of the rail's lateral tilt on height information and ensuring that the positioning point is the true geometric protrusion center rather than the highest point in space affected by the tilt. Combined with coordinate system transformation, the data is unified to the robot base coordinate system, ensuring that the calculated position and attitude deviations accurately reflect the weld deformation relative to the standard profile. The compensation trajectory generated accordingly can accurately fit the actual weld direction, achieving high-precision grinding for tilted rails.
[0044] 2. By adopting the above technical solution, the interference of edge scanning noise is eliminated by removing the data from the beginning and end. By constructing a reference straight line and calculating the vertical distance, weld identification is transformed into a geometric protrusion determination relative to the rail surface, no longer relying on absolute coordinate values. Further sorting by vertical distance and selecting a set of protrusions locks in the effective weld area; the center point is determined using the horizontal and transverse coordinate values of each rail top contour coordinate point, and statistical features are used to avoid single-point misjudgments caused by local burrs or measurement fluctuations. This processing logic ensures that even with uneven rail surface roughness, the center coordinates representing the true weld apex can still be stably located.
[0045] 3. By adopting the above technical solution, calibration equations are constructed and solved using multi-pose scanning data to accurately calculate the rigid body transformation matrix connecting the profilometer coordinate system and the robot end effector coordinate system. This step eliminates the geometric mapping error between the sensor mounting and the robotic arm end effector. During subsequent coordinate transformations, this calibration transformation matrix ensures strict mathematical consistency between the visually perceived geometric information and the robot's motion space, enabling the robot to execute the trajectory coordinates based on point cloud planning without distortion, thus guaranteeing the accuracy of visual measurement data at the physical execution level.
[0046] 4. By adopting the above technical solution, the difference between the initial radius and the current radius of the polishing flap wheel is calculated, quantifying the physical wear of the tool. This wear value is converted into a radial compensation vector, enabling the robot system to automatically superimpose the feed displacement. This mechanism allows the polishing action to dynamically adapt to the reduction in tool size, ensuring that the contact depth between the polishing tool and the weld surface remains constant throughout the entire lifespan of the flap wheel diameter variation. This avoids insufficient polishing due to wear and guarantees consistent processing quality under long-term continuous operation.
[0047] 5. By adopting the above technical solution, the actual contact angle between the grinding tool and the weld surface is calculated using the real-time collected ratio of normal and tangential forces. When a deviation of the contact angle from the preset range is detected, the angle compensation is calculated and added to the trajectory, achieving closed-loop correction of the robot's end-effector posture. This strategy can overcome posture deviations caused by local irregularities on the rail surface, ensuring that the grinding tool always acts on the weld surface at the optimal contact angle, thereby guaranteeing grinding stability. Attached Figure Description
[0048] Figure 1 This is a flowchart illustrating a method for compensating the grinding trajectory of rail welds in an embodiment of this application.
[0049] Figure 2 This is a schematic diagram of the calibration method scenario in the embodiments of this application;
[0050] Figure 3 This is a schematic diagram of a physical device structure of a rail weld grinding trajectory compensation device in the embodiments of this application. Detailed Implementation
[0051] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0052] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0053] In the description of the embodiments of this application, the term "multiple" means two or more. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first," "second," or "third" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized. It should be noted that all data collection in this scheme is conducted after obtaining user consent.
[0054] This application provides a method for compensating the grinding trajectory of rail welds, referring to... Figure 1 , Figure 1 This is a flowchart illustrating a method for compensating the grinding trajectory of rail welds according to an embodiment of this application. The method includes:
[0055] Step S101: Scan the top of the rail using a laser profilometer to obtain rail top profile point cloud data containing the weld area arranged in the scanning order.
[0056] The rail top refers to the uppermost horizontal or slightly curved surface of the rail head, which is the load-bearing surface where the train wheels directly contact the rail, such as the top surface of a 60kg / m rail or the tread surface of a UIC60 rail; the weld area refers to the joint where two rails connect and the surrounding area affected by the welding thermal cycle, such as the weld joint formed by flash contact welding or the raised joint formed by aluminothermic welding; the rail top profile point cloud data refers to the data set collected by a laser profilometer that expresses the geometry of the rail top surface in the form of discrete coordinate points. This data usually contains spatial coordinate information (X, Y, Z).
[0057] This step is typically performed during the perception phase before the robot begins grinding operations, and is used to digitally acquire the original shape of the workpiece. Specifically, the robot moves a laser profilometer mounted at its end along the longitudinal direction of the rail. The laser profilometer projects laser lines onto the rail surface and continuously acquires images of the deformation of the laser lines on the rail surface using internal photosensitive elements. The system stitches or arranges the profilometer data from each frame according to the chronological or spatial order of acquisition, forming point cloud data covering the entire weld and its preceding and following extensions. This data not only contains geometric protrusion information of the weld itself, but also information on the straightness of the rail surface and possible surface defects, forming the basic raw dataset for subsequent calculations.
[0058] Step S102: Construct a reference straight line based on the first and last track top contour coordinate points in the track top contour point cloud data; calculate the vertical distance from each track top contour coordinate point in the track top contour point cloud data to the reference straight line; and determine the position coordinates of the weld center point in the robot base coordinate system based on the distribution characteristics of the vertical distance.
[0059] Among them, the reference line refers to the mathematical line connecting two specific endpoints in the dataset, serving as a reference zero line for measuring the relative height of other data points, such as the spatial line segment connecting the scanning start point A (x1, y1, z1) and the end point B (x2, y2, z2); the vertical distance refers to the length of the perpendicular segment projected from a point in space onto the reference line, representing the local relative height of that point relative to the reference datum, such as the Euclidean distance from point P to line AB; the distribution characteristics refer to the attributes of data points in terms of numerical magnitude, spatial arrangement, or statistical regularity, such as the peak position of the values, the position of the axis of symmetry of the numerical distribution, and the variance variation of the data; the weld center point refers to the highest point, midpoint, or centroid of the weld protrusion structure in geometry, representing the positioning datum of the weld in the longitudinal direction of the rail, such as the vertex coordinates of the weld arch curve; the robot base coordinate system refers to a fixed rectangular coordinate system with the robot mounting base as the origin, which is the absolute reference system describing the robot's motion.
[0060] Specifically, this step aims to quickly locate the weld seam on the robot's motion path. The system first connects the first and last points of the scan data to construct a relative baseline and calculates the vertical distance from all points to this line. This is equivalent to mathematically flattening potentially tilted rail data, thus using the numerical convexity of the vertical distance to identify the weld seam center, eliminating the interference of the overall rail tilt on the determination of the highest point. When determining the weld seam center coordinates, the system is based on the preset conditions of physical installation, namely, that the scanning path of the laser profilometer remains basically parallel to the longitudinal axis (e.g., the X-axis) of the robot's base coordinate system. Therefore, the system directly maps the identified weld seam center point's position in the scan sequence to the longitudinal coordinate value in the robot's base coordinate system. Although a rigorous full-degree-of-freedom coordinate system matrix transformation has not yet been performed, and there may be slight angular deviations between the sensor coordinate system and the base coordinate system, the error generated by this direct mapping based on the parallelism assumption is entirely within acceptable limits, given the relatively lenient accuracy requirements for weld seam center positioning (typically only millimeter-level). Based on this, the system can quickly obtain the longitudinal coordinates of the weld center during the robot's motion stroke, without the need for complex attitude calculations in this initial positioning stage.
[0061] Step S103: Scan the rail section profile at the first preset distance to the left and the second preset distance to the right of the weld center position using the laser profilometer to obtain the actual weld pose point cloud data in the profilometer coordinate system.
[0062] Among them, the first preset distance and the second preset distance refer to the longitudinal offset relative to the center point of the weld, which are set in the system parameters and used to determine the sampling position of the feature section. For example, the center of the weld is offset to the left by 50 mm and to the right by 50 mm. The rail cross-section profile refers to the two-dimensional cross-sectional shape of the rail in the direction perpendicular to the longitudinal extension, including the profile lines of the rail top and the side of the rail head, such as the cross-sectional shape of a standard rail. The profiler coordinate system refers to a local three-dimensional coordinate system established with the optical center or mechanical center of the sensor itself as the origin. All original measurement data are initially defined in this coordinate system. The actual weld pose point cloud data refers to the set of sampling points used to describe the actual position and attitude of the rail at the weld in space. For example, it includes two sets of high-precision profile data containing the complete cross-sectional shape of the front and rear sides of the weld.
[0063] Specifically, this step is performed after the weld center position is roughly located, with the aim of obtaining detailed data reflecting the local attitude of the rail. Based on the center coordinates determined in the previous step, the robot controls the laser profilometer to move to specific positions before and after the weld (e.g., 50mm before and after the weld). At these two positions, the laser profilometer performs static or dynamic scans to acquire complete cross-sectional data including the rail top and rail head sides. These two positions are chosen because they are typically located at the edge of the weld heat-affected zone or in the base material area, and their cross-sectional shape is less affected by the irregular protrusions of the weld itself, thus better representing the overall installation attitude of the rail (such as tilt and pitch angles). The data acquired at this point directly reflects the relative geometric relationship between the sensor and the rail surface, without any coordinate transformation, and is purely observation data from the sensor's local perspective.
[0064] Step S104: Using the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system and the base transformation matrix from the robot end effector coordinate system to the robot base coordinate system, the actual weld pose point cloud data is transformed from the profilometer coordinate system to the robot base coordinate system.
[0065] Among them, the calibration transformation matrix refers to the matrix describing the relative position and attitude relationship between the laser profilometer and the robot end effector, which is usually obtained through hand-eye calibration; the robot end effector coordinate system refers to the moving coordinate system with the robot end effector as the origin, which changes with the robot's movement; the base transformation matrix refers to the homogeneous matrix describing the real-time pose relationship between the robot end effector and the robot's fixed base, which is obtained by solving the robot's forward kinematics; the robot base coordinate system refers to the robot's global fixed reference system, and the coordinate system with the robot base as the origin is the final reference standard for all motion commands.
[0066] Specifically, this step is a coordinate system component in data processing, designed to map visually perceived data to the robot's physical execution space. The system utilizes matrix multiplication to construct a coordinate transformation chain: First, a calibration transformation matrix is used to map the point cloud data (laser profilometer coordinate system) acquired by the laser profilometer to the robot's end effector coordinate system. Then, the base transformation matrix is calculated using the robot's current pose data, mapping the acquired data to the robot base (robot base coordinate system). Through this series of mathematical operations, the actual weld pose point cloud data obtained in step S103 from the local perspective is transformed to the robot base coordinate system for comparison with the standard weld in the robot base coordinate system. This ensures strict consistency between the geometric information seen by the vision system and the coordinate space of the robot's motion control system, eliminating the influence of sensor installation position and the robot's current posture on the measurement results.
[0067] Step S105: Calculate the actual position deviation and attitude deviation of the actual weld relative to the standard weld based on the converted actual weld pose point cloud data, and compensate and correct the preset grinding trajectory according to the position deviation and attitude deviation to generate the grinding execution trajectory.
[0068] Among them, actual position deviation refers to the difference between the measured rail weld position and the theoretical standard model in three-dimensional spatial coordinates, such as X-axis deviation +2mm and Y-axis deviation -1.5mm; attitude deviation refers to the difference in rotation angle between the measured rail spatial orientation and the theoretical standard orientation, such as a lateral tilt angle deviation of 1.2 degrees around the X-axis; preset grinding trajectory refers to the grinding path code pre-compiled based on an ideal, unbiased rail model, such as a G-code sequence written for a horizontally placed standard UIC60 rail; grinding execution trajectory refers to the actual motion path finally sent to the robot controller for execution after algorithm correction, such as a new coordinate point sequence including offset and rotation transformation.
[0069] Specifically, this step is the core decision-making and generation stage of the entire compensation method. The system registers and compares the actual rail point cloud data transformed into the base coordinate system with the standard rail mathematical model in the database. Using spatial geometric algorithms (such as least squares fitting or ICP algorithm), the rigid body transformation parameters of the actual rail relative to its theoretical position are calculated, namely the translation vector (representing positional deviation) and the rotation matrix (representing attitude deviation). Subsequently, the system applies these rigid body transformation parameters inversely to the preset standard grinding trajectory. For example, if the actual rail is detected to have translated 5mm to the right and tilted 1 degree to the left, the system will correspondingly translate and rotate all path points in the preset trajectory to the right. The resulting grinding execution trajectory perfectly matches the actual rail weld surface, which may be skewed or have installation errors, ensuring that the grinding tool always contacts the workpiece at the correct depth and angle, achieving high-precision contour machining.
[0070] The following is a more detailed description of the process of the method provided in this implementation.
[0071] Optionally, steps S10201-S10205 are more specific steps than step S102.
[0072] Step S10201: Remove the data within a preset length at the beginning of the rail top profile point cloud data and the data within a preset length at the end of the rail top profile point cloud data to obtain valid rail top profile point cloud data.
[0073] The preset length at the beginning refers to the distance or number of points that need to be truncated and discarded at the start of the data sequence, such as the first 50 mm of data or the first 100 scan lines of the scan trajectory; the preset length at the end refers to the distance or number of points that need to be truncated and discarded at the end of the data sequence, such as the last 30 mm of data of the scan trajectory; the effective orbital top contour point cloud data refers to the data subset that remains after truncation, is located in the middle section, and has stable quality, such as the middle 800 mm of point cloud data after removing the acceleration and deceleration section data.
[0074] This step is typically performed during the preprocessing stage after the raw data acquisition is complete, with the aim of purifying the data source. Specifically, due to potential acceleration and deceleration vibrations during robot scanning startup and shutdown, or edge scattering noise generated by the laser profilometer at edge entry and exit points, the data at the beginning and end often exhibit significant measurement errors or instability. Based on pre-set parameters (such as the physical distance along the track longitudinal direction or the number of indices), the system directly removes specific segments from the beginning and end of the original point cloud array from memory. This operation preserves data from stable regions during the scanning process, constructing a clean dataset and preventing edge noise from interfering with subsequent extraction and calculation of weld features.
[0075] Step S10202: Construct a reference straight line based on the first and last track top contour coordinate points in the track top contour point cloud data;
[0076] The first track top contour coordinate point refers to the starting data point with an index value of zero in the original scan sequence, such as coordinate point A (x0, y0, z0) recorded at the start of the scan; the last track top contour coordinate point refers to the ending data point with the largest index value in the original scan sequence, such as coordinate point B (xn, yn, zn) recorded at the end of the scan; the reference straight line refers to the mathematical line formed by connecting the two endpoints mentioned above in three-dimensional space, which serves as a relative reference axis for subsequently measuring changes in height, such as the equation of a straight line passing through points A and B.
[0077] This step is executed immediately after acquiring the raw data and aims to establish a relative geometric reference system. Specifically, the system reads the first and last coordinates of the original rail top profile point cloud data and establishes a virtual straight line connecting these two points in mathematical space. This straight line simulates the macroscopic orientation of the rail surface. Regardless of whether the rail is placed horizontally, tilted, or has some installation distortion in actual physical space, this line attached to the scanning endpoints of the rail reflects the overall attitude of the rail. By constructing this reference straight line, the system transforms the subsequent weld identification problem from height judgment in an absolute coordinate system to judgment of local protrusions relative to the rail surface, laying a geometric foundation for eliminating measurement errors caused by workpiece tilt.
[0078] Step S10203: Calculate the vertical distance from each coordinate point in the effective orbital top profile point cloud data to the reference line, wherein the vertical distance located on the side of the convex direction of the reference line is recorded as a positive value.
[0079] Each coordinate point refers to any three-dimensional spatial point contained in the filtered valid dataset, such as the i-th point P in the valid point set. i Vertical distance refers to the length of the perpendicular segment projected from a spatial point onto a reference line, representing the local height of that point relative to the reference datum, such as point P. i Euclidean distance d to line AB i The direction of the bulge refers to the expected bulge direction of the rail top relative to the reference line, usually referring to the upward direction along the rail normal, such as the positive direction of the Z-axis; a positive value means assigning a positive sign to the distance value located on this direction side, used to distinguish between depressions and bulges, for example, the height of the weld bulge above the reference line is recorded as +1.5mm.
[0080] This step is the core geometric feature extraction process. Specifically, the system iterates through every point in the effective rail top profile point cloud data, using the point-to-line distance formula to calculate the vertical deviation of each point relative to the reference line constructed in step S10202. To distinguish between weld seams (protrusions) and potential pits or collapses, the system defines a sign rule, focusing only on or positively marking distance values located above the reference line. This calculation process mathematically achieves "de-trending" or "flattening" of the data, ensuring that the calculated vertical distance directly represents the local undulation of each point on the rail surface relative to the overall orientation, thus clearly separating the geometry of the weld seam from the inclined rail background.
[0081] Step S10204: Sort the rail top contour coordinate points in descending order of vertical distance, and determine the first preset number of rail top contour coordinate points as the weld protrusion set.
[0082] Among them, the preset quantity refers to the number or proportion of sample points defined in the system parameters for statistical analysis, such as the top 100 points with the largest values or the top 5% of points; the weld protrusion set refers to a subset composed of the original coordinate points corresponding to the selected high-value distance points, representing the geometric position of the highest part of the weld area, such as a list of coordinate points including the weld arch and its surrounding area.
[0083] This step is performed after the distance calculation is completed, and its purpose is to pinpoint the peak region of the weld. Specifically, the system sorts all the vertical distance values calculated in the previous step in descending order. Since the weld is the highest protrusion on the rail surface, its corresponding vertical distance value must be at the beginning of the sorted sequence. To avoid misjudgments caused by single-point measurement noise (such as isolated high points caused by spatter), the system does not directly select the maximum value, but instead extracts the first few points with the largest values after sorting (i.e., a preset number) to form a set. This set of weld protrusions covers the apex of the weld and its adjacent high point region, statistically locking in the effective range of the weld and eliminating interference from straight rail surface data and low-amplitude noise.
[0084] Furthermore, the determination of the preset number primarily follows the principle of "matching physical size with data density." The system engineer first calculates the longitudinal resolution of the scan. For example, when the laser profilometer's acquisition frequency is set to 400Hz and the robot's moving speed is set to 40mm / s, the longitudinal resolution is 10 points / mm. Then, based on welding process standards (such as flash welding or gas pressure welding), the geometric features of the weld top are determined, and a physical length that covers the highest point of the weld while excluding the influence of the slopes on both sides is selected as the sampling target, typically a length of 2mm to 5mm. Finally, this physical length is multiplied by the longitudinal resolution of the scan to obtain the final preset number. For example, if a 4mm length range at the top of the weld is selected as the analysis object, and the resolution is 10 points / mm, the preset number is determined to be 40 points; if the resolution is 20 points / mm, the preset number is adjusted to 80 points. This deterministic logic ensures that the selected point set has a statistically sufficient sample size to resist single-point noise (such as splashes and reflections), while being spatially convergent enough to the top of the weld, avoiding deviations in the calculated center point position due to including too many low-height points on the sides.
[0085] Step S10205: Calculate the median of the horizontal and lateral coordinate values of all the rail top profile coordinate points in the weld protrusion set, and determine the rail top profile coordinate point corresponding to the median as the weld center point;
[0086] The horizontal coordinate value refers to the position value of the rail top profile coordinate point along the extension direction of the rail length. This value reflects the sequential position or distance of the scanning point in the scanning sequence. For example, if the Y-axis is parallel to the rail direction, it is the Y-axis coordinate data of that point; or it represents the horizontal coordinate value along the direction of travel in the two-dimensional profile diagram.
[0087] This step is performed after the system has successfully separated the weld area data from the overall scan data, and before calculating the specific six-dimensional pose matrix. Specifically, the system first extracts the horizontal coordinate values of each rail top contour point in the weld protrusion set, constructing a one-dimensional coordinate value sequence. Then, the system uses a sorting algorithm to arrange this coordinate value sequence in ascending or descending order. After sorting, the system uses the value in the middle of the sequence as the median. If the sequence length is odd, the exact middle value is selected; if it is even, the average of the two middle values or one of them is usually selected. After calculating the median, the system performs a reverse search in the original weld protrusion set to find the complete rail top contour coordinate point (containing X, Y, and Z three-dimensional information) originally corresponding to the median value. Finally, the system marks and stores this specific rail top contour coordinate point as the weld center point. This process utilizes the characteristic that the median is not affected by extreme values, eliminating the interference of spatter noise or scanning anomalies that may exist at the weld edge on the center positioning accuracy, ensuring that the positioning point is located at the geometric center of the weld topology.
[0088] Optional, see reference Figure 2 , Figure 2 As shown in the schematic diagram of the calibration method scenario, this solution can also execute steps S106-S107 to obtain the calibration transformation matrix;
[0089] Step S106: Control the laser profilometer to change multiple different poses, collect the center coordinate data of the calibration ball corresponding to the different poses of the laser profilometer, and the base transformation matrix from the robot end coordinate system to the robot base coordinate system corresponding to the different poses of the laser profilometer. The reference coordinate system of the center coordinate data is the profilometer coordinate system.
[0090] Among them, the calibration ball refers to a standard spherical tool with a high-precision geometric surface and a known diameter, which is fixedly installed on the grinding platform and remains absolutely stationary relative to the robot base, such as a precision-machined matte ceramic standard ball; multiple different poses refer to a series of positions and posture combinations that the robot carrying the line laser profilometer reaches in space, satisfying specific spatial distribution constraints. The number of these combinations is not less than 20, and each group of poses contains significant positional changes (translation amount not less than 50 mm) and rotational changes (rotation angle not less than 20 degrees). At the same time, the pose distribution covers the robot's workspace and avoids coplanar or collinear situations; the ball center coordinate data refers to the three-dimensional coordinate value of the geometric center of the calibration ball in the line laser profilometer coordinate system, which is calculated by a fitting algorithm after obtaining point cloud data by scanning the surface of the calibration ball with the line laser profilometer; the base transformation matrix refers to the homogeneous matrix output by the robot controller, which describes the spatial position and posture of the robot's end effector coordinate system relative to the robot's base coordinate system.
[0091] This step is typically performed during the initial system calibration or maintenance calibration phase to acquire raw data samples needed to solve for hand-eye relationships. For example, the system first ensures that the calibration ball is firmly fixed on the grinding platform with no relative movement between it and the robot base. Then, the robot is controlled to move the line laser profilometer sequentially to multiple preset or randomly generated target positions. During the movement, the system strictly controls the diversity of poses, ensuring that the robot's end effector translation distance exceeds 50 mm and the rotation angle exceeds 20 degrees between adjacent acquisitions, and that all acquisition points are not limited to a single plane or straight line to prevent degeneracy or singularities during mathematical solutions. In each static pose, the system records the base transformation matrix of the current robot end effector and triggers the line laser profilometer to scan the calibration ball, acquiring high-density point cloud data of the ball's surface. By performing spherical fitting on this point cloud data, the precise coordinates of the ball's center in the sensor's own coordinate system are extracted. This process is repeated until a sufficient number (no less than 20 sets) of "robot pose - sensor ball center observation" data pairs are acquired, providing sufficient geometric constraints for subsequent algorithm convergence.
[0092] Step S107: Based on the sphere center coordinate data and the base transformation matrix, establish a calibration equation that includes the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system, solve the calibration equation, and obtain the calibration transformation matrix.
[0093] Among them, the calibration transformation matrix refers to the unknown parameter to be solved, which describes the rotation and translation relationship between the origin of the line laser profilometer coordinate system and the origin of the robot end effector coordinate system. It is a mathematical bridge connecting the vision sensor and the robot body. The calibration equation is a mathematical equation established based on the closed-loop principle of rigid body kinematics. This equation constrains the relative geometric relationship between the robot base, the robot end effector, the line laser profilometer, and the fixed calibration sphere. The objective function is an optimization formula constructed using the least squares method to suppress the influence of measurement noise on the calculation results. It is used to quantify the overall deviation between the calculated sphere center position and the theoretical fixed position. The preset constraint conditions are the restrictions imposed during the mathematical solution process to ensure that the calculated rotation matrix satisfies orthogonality and has a determinant of 1.
[0094] This step is the core of the calibration process, aiming to determine the fixed installation relationship between the sensor and the robot end effector. Specifically, since the calibration ball is fixed on the grinding platform, its absolute physical position in the robot base coordinate system is unique and constant. The system uses this physical invariant to establish a mathematical model: the coordinates of the ball's center, calculated through the coordinate transformation chain from the robot base coordinate system through the robot end effector coordinate system and the line laser profilometer coordinate system to the center of the calibration ball, should theoretically be equal to the fixed coordinates of the calibration ball in the base system. The system substitutes all the pose data (base transformation matrix) and observation data (ball center coordinate data) collected in step S106 into this mathematical model to construct a set of calibration equations containing the calibration transformation matrix to be determined. To eliminate random errors in the data acquisition process, the system constructs a least-squares objective function and, under the preset constraint of satisfying the orthogonality of the rotation matrix, uses numerical optimization algorithms such as singular value decomposition to iteratively solve the objective function. The final calculated calibration transformation matrix can accurately convert the visual data collected by the line laser profilometer to the robot end effector coordinate system, and then unify it to the robot base coordinate system, thus achieving precise visual guidance.
[0095] Specifically, the calibration equations for this scheme are as follows:
[0096] ;
[0097] Where, p i Let p be the coordinates of the sphere's center during the i-th acquisition, where p i =[x i, y i, z i, 1] T p0 is the coordinate of the calibration sphere in the calibration sphere coordinate system. B is the transformation matrix from the calibration spherical coordinate system to the robot base coordinate system. R B For the rotation matrix components, t BLet X be the translation vector component and A be the calibration transformation matrix. i Let be the base transformation matrix during the i-th acquisition. , For rotation matrix components, These are the translation vector components.
[0098] The calibration equations are then expanded into rotation and translation components:
[0099] ;
[0100] Among them, R X and t X These are the rotation matrix and translation vector in the calibration transformation matrix, respectively.
[0101] Considering the robot's positioning error and the profilometer's measurement error, the system of equations does not have an exact solution. Therefore, the problem of solving the system of equations is transformed into solving a least-squares problem to obtain better stability.
[0102] The objective function is as follows:
[0103] ;
[0104] Under the condition of satisfying the preset constraints, the objective function is solved by the singular value decomposition algorithm to obtain the rotation matrix R in the calibration transformation matrix. X Translation vector t X The calibration transformation matrix is obtained, wherein the preset constraint condition is: *R X =I and det(R) X )=1, where I is the identity matrix.
[0105] Optionally, when all noise reduction strategies have been executed, this scheme may also execute steps S108-S111;
[0106] Step S108: Obtain the initial radius and current radius of the polishing impeller;
[0107] Among them, the grinding flap wheel refers to a flexible grinding tool installed at the end of a robot, consisting of multiple layers of sandpaper blades arranged radially around a central axis, such as an alumina flap wheel with a diameter of 200 mm or a zirconium corundum flap wheel with a diameter of 300 mm; the initial radius refers to the geometric radius value of the grinding flap wheel before it is put into use or in a brand new state, such as the 100 mm radius indicated in the product specifications; the current radius refers to the real-time measured value of the grinding flap wheel after a certain period of grinding operation, due to abrasive wear and blade consumption, resulting in a reduction in size, such as a radius of 95.2 mm measured by online scanning using a laser displacement sensor, or a radius of 98.1 mm obtained by contact measurement using a tool setter.
[0108] This step typically occurs before the robot starts a new grinding task, or during periodic checks between continuous grinding operations. Specifically, the system first needs to determine a reference baseline. For the initial radius, the system can directly read the factory standard value from a pre-stored tool parameter database, or require the operator to input the measured value through a human-machine interface when changing to a new tool. For the current radius, the system controls the robot to move the grinding flap to a dedicated inspection station. At the inspection station, the system uses a high-precision non-contact laser sensor to scan the edge of the rotating or stationary grinding flap, acquiring its contour information and calculating the distance from the center of rotation to the edge; or it controls the robot to move at low speed towards a contact tool setting sensor, recording the position coordinates at the trigger signal, and using kinematic inverse calculation to determine the current actual radius of the grinding flap. This step ensures that the system has a real-time understanding of the tool's physical dimensions, providing a data foundation for subsequent wear compensation.
[0109] Step S109: Calculate the difference between the initial radius and the current radius to obtain the radius loss value of the polishing flap wheel;
[0110] The initial radius refers to the radius data of the polishing flap wheel in its brand-new state obtained in the previous steps, such as 150 mm; the current radius refers to the radius data of the polishing flap wheel at the current moment obtained through actual measurement in the previous steps, such as 142 mm; the difference refers to the result of algebraic subtraction of two values, such as 8 mm; the radius loss value refers to the specific physical quantity used to quantify the reduction in size of the polishing flap wheel due to wear. This value directly reflects the degree of tool wear, such as a calculated wear amount of 8 mm or 0.5 mm.
[0111] This step follows immediately after the radius data acquisition step, and the arithmetic operation is performed by the system's central processing unit. Specifically, the system retrieves the initial radius value from memory and the currently measured radius value, and performs a subtraction operation, subtracting the current radius from the initial radius. Since the polishing flap wheel is a consumable tool during operation, its diameter irreversibly decreases with increasing grinding time; therefore, this difference is usually a positive number. This calculated radius loss value is not just a number; it represents a scalar measure of the additional distance the robot's end flange needs to move closer to the workpiece surface to maintain constant polishing pressure or a constant contact position. For example, if the initial radius is 100 mm and the current radius is 90 mm, the radius loss value is 10 mm. This means that if the robot continues along the original path, the tool surface will be suspended or the pressure insufficient, and this value must be processed through subsequent steps.
[0112] Step S110: Convert the radius loss value into a compensation vector along the radial direction of the flap wheel;
[0113] Among them, the radius loss value refers to the scalar value of the reduction in the size of the polishing flap wheel calculated in the previous step, such as a length value of 5 mm; the transformation refers to the process of mapping scalar data into directed line segments in geometric space, such as constructing the 5 mm scalar as a vector [0, 5, 0] in the tool coordinate system; the radial direction along the flap wheel refers to the direction along the rotation radius of the polishing flap wheel, that is, the direction perpendicular to the working surface from the rotation center, such as the negative Y-axis direction or the positive Z-axis direction in the tool coordinate system; the compensation vector refers to a three-dimensional array used to correct the robot's motion path, containing direction and modulus information.
[0114] This step occurs before the path planning algorithm generates the final instructions and belongs to the data processing stage. Specifically, since the radius loss value only represents a reduction in length, while the robot's movement takes place in three-dimensional space, this value must be given directionality. The system determines the geometric direction of wear based on the mounting method of the polishing flap wheel at the robot's end effector and the contact posture during polishing. Typically, polishing is performed using the wheel rim, so wear occurs radially. The system constructs a vector based on the tool coordinate system (TCP), whose direction is set to point towards the normal to the workpiece surface or the radial direction of the tool, and whose magnitude is set to the calculated radius loss value. For example, if the polishing point is located in the Z-axis direction of the tool coordinate system, and the wear causes the contact point to retract by 3 mm, the system generates a compensation vector with a length of 3 mm along the positive Z-axis direction (pointing towards the workpiece). This process converts the one-dimensional wear scalar into a geometric vector in three-dimensional space that can be used for coordinate operations.
[0115] Step S111: Obtain the polishing execution trajectory, and use the compensation vector to compensate the polishing execution trajectory to obtain the final polishing execution trajectory;
[0116] This step is the final stage of the closed-loop control of the grinding process, executed before the command is sent to the robot controller. Specifically, the system first reads the pre-planned original grinding execution trajectory from the CNC program or offline programming software. This trajectory is typically generated assuming the grinding flap wheel is in an ideal initial radius state. Subsequently, the system traverses each path point in the trajectory, superimposing the compensation vector generated in step S110 onto the coordinate data of the original path point. Geometrically, this is equivalent to shifting the entire grinding trajectory radially towards the workpiece surface along the flap wheel by a distance equal to the wear amount. For example, if the coordinates of a point on the original trajectory are (500, 200, 100) and the compensation vector is (0, 0, -5) (assuming the negative Z-axis direction is closer to the workpiece), then the calculated new coordinates are (500, 200, 95). In this way, the system generates the final grinding execution trajectory, ensuring that even when the diameter of the grinding flap wheel decreases, its actual working surface can still accurately contact the workpiece surface and maintain the preset indentation, thereby guaranteeing the consistency of grinding quality.
[0117] Optionally, this solution may also execute steps S112-S114.
[0118] Step S112: When using the grinding execution trajectory for grinding, collect the real-time force data of the grinding flap wheel during grinding, and decompose the force data into normal force and tangential force.
[0119] Among them, real-time force data refers to the raw mechanical signals acquired at high frequencies (such as 1000Hz) by a six-dimensional force / torque sensor installed between the robot's end effector and the grinding spindle, such as the force vector [F] in the sensor coordinate system. x F y F z ] and torque vector [T x T y T z Normal force refers to the component of force perpendicular to the grinding contact surface and pointing inwards towards the workpiece. It usually represents the clamping force applied by the robot, such as a pressure of 20 Newtons. Tangential force refers to the component of force parallel to the grinding contact surface and opposite to the direction of the linear velocity of the grinding impeller. It is mainly composed of grinding resistance and friction, such as a resistance of 5 Newtons.
[0120] This step is integral to the entire grinding process and forms the data acquisition foundation for achieving force-position hybrid control or adaptive adjustment. Specifically, when the robot drives the grinding flap to contact the workpiece surface along the grinding trajectory and perform grinding, the six-dimensional force sensor at the end effector senses the interaction force in real time. The system first reads the raw force data in the sensor coordinate system and, combined with the robot's current kinematic forward orientation data, transforms the raw force data to the workpiece coordinate system or the tool contact point coordinate system using a coordinate transformation matrix. Subsequently, the system uses a geometric projection algorithm to orthogonally decompose the force vector based on the tangent and normal directions of the current trajectory point. For example, the system projects the total force vector onto the contact point normal vector to obtain the normal force, used to monitor grinding depth or pressure; simultaneously, it projects the total force vector onto the feed direction or cutting linear velocity direction to obtain the tangential force, used to evaluate the cutting load. This process decouples the complex spatial mechanical state into two components with clear physical meaning, providing a basis for subsequent attitude analysis.
[0121] Step S113: Calculate the actual contact angle between the grinding flap wheel and the weld surface based on the ratio of the normal force to the tangential force. When the contact angle deviates from the preset range, calculate the angle compensation amount.
[0122] The ratio of normal force to tangential force refers to the dimensionless value obtained by dividing the two mechanical components obtained from the decomposition of the previous steps. For example, the friction coefficient obtained by dividing the tangential force by the normal force is approximately 0.3. The grinding tool refers to the grinding flap wheel that is performing the operation. The weld surface refers to the target object of the grinding operation, which usually has irregular curved surface features, such as the annular weld at the pipe joint. The actual contact angle refers to the angle between the rotation axis of the grinding tool and the normal vector of the workpiece surface, or the angle between the tool feed direction and the texture direction, such as a measured 15-degree tilt angle. The preset range refers to the optimal operating angle range allowed by the process specification, such as 18 degrees to 22 degrees. The angle compensation amount refers to the rotation angle value required to correct the deviation, such as rotation around the X-axis +2 degrees.
[0123] This step, executed by the system control algorithm in each control cycle, aims to monitor and correct abnormalities in the grinding posture. Specifically, for the flexible grinding flap wheel, its force characteristics and contact angle have a non-linear mapping relationship. When the grinding flap wheel presses against the weld surface at different angles, the number of blades involved in cutting, the shape of the contact area, and the grinding resistance coefficient all change, resulting in a specific change in the ratio of normal force to tangential force. The system pre-stores a feature model or lookup table of "force ratio - contact angle," which is calibrated through a large amount of experimental data. For example, in offline mode, the robot is controlled to contact the rail at different preset angles, and the ratio of normal force to tangential force at each angle is recorded to build a mapping relationship library. The system substitutes the real-time calculated ratio of normal force to tangential force into this model to solve for the current actual contact angle. Subsequently, the system compares this actual contact angle with the preset range in memory. If the actual contact angle exceeds the preset range (for example, the calculated result is 10 degrees, while the required range is 15-20 degrees), the system calculates the difference between the two and generates an angle compensation amount to correct the attitude based on the PID control algorithm or fuzzy control strategy. This compensation amount is a vector data containing the rotation amplitude around the spatial axis.
[0124] Step S114: The angle compensation amount is superimposed on the grinding execution trajectory to adjust the grinding posture of the grinding flap wheel.
[0125] Among them, the angle compensation amount refers to the rotation matrix or Euler angle increment calculated in the preceding steps to correct the deviation, such as the Euler angle increment; the grinding execution trajectory refers to the command flow that the robot is following according to its planned motion, which includes a series of target pose points; the grinding posture refers to the orientation of the grinding flap in three-dimensional space, which is usually described by the rotation part of the end coordinate system.
[0126] This step is the execution stage for achieving closed-loop feedback control, directly altering the robot's physical motion behavior. Specifically, before generating the interpolation command for the next moment, the system captures the target posture data from the original grinding execution trajectory. The system converts the angle compensation amount generated in step S113 into a corresponding rotation transformation matrix, and multiplies this transformation matrix on the left or right of the posture matrix of the original trajectory point, or directly adds the Euler angle deviation value to the Euler angle parameter of the original trajectory point. For example, if the original trajectory requires the robot to remain vertical (0-degree tilt) at a certain point, but the force control algorithm calculates that a 5-degree compensation is needed to adapt to changes in weld morphology, the system will modify the posture command at that point to a 5-degree tilt in real time. Through this dynamic superposition method, the robot can adjust the contact posture of the grinding flap wheel relative to the weld surface online, ensuring that the grinding tool always cuts at the optimal angle, thereby avoiding overcutting (damage to the base material) or undercutting (failure to remove weld excess height) caused by incorrect posture.
[0127] The following describes the compensation device for the rail weld grinding trajectory in the embodiments of this invention from the perspective of hardware processing. Please refer to [link / reference needed]. Figure 3 This is a schematic diagram of a physical device structure for a rail weld grinding trajectory compensation device in the embodiments of this application.
[0128] It should be noted that, Figure 3 The structure of the compensation device for the rail weld grinding trajectory shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0129] like Figure 3 As shown, the rail weld grinding trajectory compensation device includes a CPU 301, which can perform various appropriate actions and processes according to a program stored in the read-only memory ROM 302 or a program loaded from the storage section 308 into the random access memory RAM 303, such as executing the methods described in the above embodiments. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An I / O interface 305 is also connected to the bus 304.
[0130] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.
[0131] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by CPU 301, it performs the various functions defined in the present invention.
[0132] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.
[0134] Specifically, the rail weld grinding trajectory compensation device in this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the rail weld grinding trajectory compensation method provided in the above embodiment.
[0135] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the rail weld grinding trajectory compensation device described in the above embodiments; or it may exist independently and not assembled into the rail weld grinding trajectory compensation device. The storage medium carries one or more computer programs, which, when executed by a processor of the rail weld grinding trajectory compensation device, cause the rail weld grinding trajectory compensation device to implement the rail weld grinding trajectory compensation method provided in the above embodiments.
[0136] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for compensating the grinding trajectory of rail welds, characterized in that, The method includes: The top of the rail is scanned using a laser profilometer to obtain point cloud data of the rail top profile, including the weld area, arranged in the scanning order. A reference straight line is constructed based on the first and last track top contour coordinate points in the track top contour point cloud data. The vertical distance from each track top contour coordinate point in the track top contour point cloud data to the reference straight line is calculated. The position coordinates of the weld center point in the robot base coordinate system are determined according to the distribution characteristics of the vertical distance. The laser profilometer scans the rail section profile at a first preset distance to the left and a second preset distance to the right of the weld center position to obtain the actual weld pose point cloud data in the profilometer coordinate system. The actual weld pose point cloud data is transformed from the profilometer coordinate system to the robot end effector coordinate system using the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system and the base transformation matrix from the robot end effector coordinate system to the robot base coordinate system. Based on the converted actual weld pose point cloud data, the actual position deviation and attitude deviation of the actual weld relative to the standard weld are calculated, and the preset grinding trajectory is compensated and corrected according to the position deviation and attitude deviation to generate the grinding execution trajectory.
2. The method according to claim 1, characterized in that, The process of constructing a reference straight line based on the first and last rail top contour coordinate points in the rail top contour point cloud data, calculating the vertical distance from each rail top contour coordinate point in the rail top contour point cloud data to the reference straight line, and determining the position coordinates of the weld center point in the robot base coordinate system based on the distribution characteristics of the vertical distances, specifically includes: Remove the data within a preset length at the beginning and the data within a preset length at the end of the rail top contour point cloud data to obtain valid rail top contour point cloud data. A reference straight line is constructed based on the first and last rail top contour coordinate points in the rail top contour point cloud data. Calculate the vertical distance from each coordinate point in the effective orbital top profile point cloud data to the reference line, wherein the vertical distance located on the side of the reference line in the convex direction is recorded as a positive value; The coordinate points of each rail top profile are sorted in descending order of vertical distance, and the first preset number of rail top profile coordinate points are determined as the set of weld protrusions. Calculate the median of the horizontal coordinates of all the rail top profile coordinate points in the weld protrusion set, and determine the rail top profile coordinate point corresponding to the median as the weld center point.
3. The method according to claim 1, characterized in that, Before transforming the actual weld pose point cloud data from the profilometer coordinate system to the robot base coordinate system using the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system and the base transformation matrix from the robot end effector coordinate system to the robot base coordinate system, the method further includes: The laser profilometer is controlled to change to multiple different poses, and the coordinate data of the center of the calibration ball corresponding to the different poses of the laser profilometer are collected, as well as the base transformation matrix from the robot end coordinate system to the robot base coordinate system corresponding to the different poses of the laser profilometer. The reference coordinate system of the center of the ball coordinate data is the profilometer coordinate system. Based on the sphere center coordinate data and the base transformation matrix, a calibration equation is established that includes the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system. The calibration equation is then solved to obtain the calibration transformation matrix.
4. The method according to claim 3, characterized in that, The calibration equation, which establishes a calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system based on the sphere center coordinate data and the base transformation matrix, specifically includes: Establish calibration equations that include the calibration transformation matrix from the profilometer coordinate system to the robot end effector coordinate system: ; Where, p i Let p be the coordinates of the sphere's center during the i-th acquisition, where p i =[x i, y i, z i, 1] T p0 is the coordinate of the calibration sphere in the calibration sphere coordinate system. B is the transformation matrix from the calibration spherical coordinate system to the robot base coordinate system. R B For the rotation matrix components, t B Let X be the translation vector component and A be the calibration transformation matrix. i Let be the base transformation matrix during the i-th acquisition. , For rotation matrix components, These are the translation vector components.
5. The method according to claim 4, characterized in that, Solving the calibration equation to obtain the calibration transformation matrix specifically includes: Based on the calibration equation, the objective function is constructed using the least squares method: ; Among them, R X and t X These are the rotation matrix and translation vector in the calibration transformation matrix, respectively; Under the condition of satisfying the preset constraints, the objective function is solved by the singular value decomposition algorithm to obtain the rotation matrix R in the calibration transformation matrix. X Translation vector t X The calibration transformation matrix is obtained, wherein the preset constraint condition is: *R X =I and det(R) X )=1, where I is the identity matrix.
6. The method according to claim 1, characterized in that, The process of generating the final robot polishing trajectory then includes: Obtain the initial radius and current radius of the polishing blade; Calculate the difference between the initial radius and the current radius to obtain the radius loss value of the polishing flap wheel; The radius loss value is converted into a compensation vector along the radial direction of the flap wheel; The grinding execution trajectory is obtained, and the grinding execution trajectory is compensated using the compensation vector to obtain the final grinding execution trajectory.
7. The method according to claim 1, characterized in that, After generating the polishing execution trajectory, the method further includes: When using the aforementioned grinding execution trajectory for grinding, real-time force data of the grinding flap wheel during grinding is collected, and the force data is decomposed into normal force and tangential force. The actual contact angle between the grinding flap wheel and the weld surface is calculated based on the ratio of the normal force to the tangential force. When the contact angle deviates from the preset range, the angle compensation amount is calculated. The angle compensation is superimposed on the grinding execution trajectory to adjust the grinding posture of the grinding flap wheel.
8. A compensation device for the grinding trajectory of rail welds, characterized in that, The rail weld grinding trajectory compensation device includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the rail weld grinding trajectory compensation device to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on the compensation device for the rail weld grinding trajectory, the compensation device for the rail weld grinding trajectory performs the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on the rail weld grinding trajectory compensation device, the rail weld grinding trajectory compensation device performs the method as described in any one of claims 1-7.