Hub spraying mechanical arm pose control system based on spatial interpolation algorithm
Patent Information
- Application Number
- CN202611033608.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2046-07-13
AI Technical Summary
Existing wheel hub painting robotic arms suffer from problems such as redundant path points, untimely adjustment of spray gun posture, posture lag, and motion impact when handling complex concave and convex structures, which affect the stability of painting quality and the uniformity of film thickness.
A wheel hub painting robotic arm pose control system based on spatial interpolation algorithm is adopted. Through modules such as point cloud registration, connectivity tracking, pose interpolation exponent generation, spatial interpolation and spray gun posture sequence extraction, a continuous sampling point sequence and accurate surface normal vector are generated to achieve adaptive interpolation and posture smoothing, and generate an executable joint motion sequence.
It improves the coating quality and production efficiency of complex wheel hub surfaces, is suitable for automated coating operations of different wheel hub models, avoids the execution deviation and sudden posture changes of the robotic arm caused by inconsistent coordinates, and ensures the uniformity of film thickness and the continuity of joint movement.
Smart Images

Figure CN122539413B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotic arm control technology, and more specifically, to a posture control system for a wheel hub painting robotic arm based on a spatial interpolation algorithm. Background Technology
[0002] With the development of the automotive industry, wheel hubs, as important exterior and functional components of automobiles, directly affect the overall appearance and corrosion resistance of the vehicle through the quality of their surface coating. Currently, automated coating equipment is widely used to replace manual coating for automotive wheel hubs, improving production efficiency and consistency in coating quality. As the core equipment of automated coating, the robotic arm can complete the coating of complex curved surfaces according to a preset trajectory and is widely used in the wheel hub manufacturing industry.
[0003] Existing robotic arms for wheel hub painting typically generate painting trajectories using either teach-in programming or offline programming. Teach-in programming involves manually operating the robotic arm to record its pose point by point, generating the painting path; this is suitable for simple curved surfaces or small-batch production. Offline programming, on the other hand, is based on a 3D model of the wheel hub, planning the painting trajectory in computer software and then importing it into the robotic arm controller for execution. Trajectory planning usually employs an evenly spaced sampling method, generating uniformly distributed path points on the wheel hub surface, and setting a fixed spray gun posture and movement speed for each path point. The robotic arm controller generates continuous motion commands based on these path points, driving the spray gun to complete the painting operation.
[0004] However, existing technologies have limitations when dealing with wheel hub surfaces with complex concave-convex structures. Due to the various geometric features on the wheel hub surface, such as spokes, rim grooves, bolt holes, and decorative grooves, the degree of curvature and the rate of normal change vary significantly in different areas. Using uniform spacing sampling and a fixed speed may result in redundant path points in gently curving areas, increasing computational load and motion time. In areas with transitions between concave and convex surfaces, the relatively large path point spacing may lead to untimely adjustment of the spray gun's attitude, resulting in target distance deviation and spray pattern distortion, affecting film thickness uniformity. Furthermore, areas with rapid normal changes place high demands on the dynamic performance of the robotic arm; improper speed settings can easily cause attitude lag and motion impact, reducing the stability of the coating quality. Summary of the Invention
[0005] This invention provides a posture control system for a wheel hub painting robotic arm based on a spatial interpolation algorithm, which solves the technical problems mentioned in the background.
[0006] This invention provides a posture control system for a wheel hub painting robotic arm based on a spatial interpolation algorithm, comprising: The point cloud registration module is used to perform 3D scanning and coordinate registration on the surface of the wheel hub to be sprayed, and obtain the registration point cloud data, rotation reference and the area to be sprayed. The connectivity tracking module is used to perform connectivity tracking and layered sampling on the registered point cloud data, the rotation reference and the area to be sprayed, and generate surface sampling points and surface normal vectors. The pose interpolation index generation module is used to calculate the offset reference point based on the surface sampling point and the surface normal vector. It combines the offset reference point and the surface normal vector to obtain the chord drop deviation value, rotation density value and path curvature value in sequence. The chord drop deviation value, rotation density value and path curvature value are then fused into the pose interpolation index. The spatial interpolation module is used to refine spatial interpolation and plan end velocity using surface sampling points, surface normal vectors and pose interpolation exponents, and outputs offset control points, control point normals and target velocity values. The spray gun attitude sequence extraction module is used to construct the spray direction and tangential reference with the offset control point and the control point normal, and perform a smooth transformation by combining the spray direction and tangential reference to extract the spray gun attitude sequence. The joint angle inverse solution module is used to perform joint angle inverse solution and timing binding of the offset control point, target velocity value and spray gun posture sequence to obtain joint pose sequence, control timestamp and spraying trigger flag. The pose control command output module is used to perform periodic resampling and format encapsulation of joint pose sequences, control timestamps and spraying trigger flags, and finally output pose control commands to drive the robotic arm to perform spraying.
[0007] The beneficial effects of this invention are as follows: By acquiring accurate wheel hub geometric data and a unified coordinate reference through 3D scanning and coordinate registration, this invention provides a reliable geometric basis for subsequent pose calculations, avoiding robotic arm execution deviations caused by coordinate inconsistencies. By generating continuous sampling point sequences and accurate surface normal vectors through connected tracing and hierarchical sampling, the quality of the sampling data is guaranteed, avoiding normal estimation errors caused by orifices, broken edges, or voids. By fusing chord drop deviation values, rotation density values, and path curvature values to generate a pose interpolation index, this invention comprehensively reflects the spatial interpolation load in different areas of the wheel hub, providing a control basis for adaptive interpolation. By simultaneously controlling the interpolation node density and end-effector velocity through the pose interpolation index, fine interpolation and speed adaptation can be achieved in high-load areas, allowing the robotic arm sufficient time to complete posture adjustments and improving the spraying quality in uneven transition areas. By using quaternion smoothing interpolation to achieve continuous transitions in the spray gun posture, this invention avoids spray pattern distortion caused by abrupt posture changes, ensuring film thickness uniformity. By generating executable joint motion sequences through inverse kinematics solving and time-series binding, the continuity of joint motion and the accuracy of spraying triggering are guaranteed. By generating standardized control commands through periodic resampling and format encapsulation, the versatility and reliability of the system can be improved. This invention helps to improve the painting quality and production efficiency of complex wheel hub surfaces and is suitable for automated painting operations of different wheel hub models. Attached Figure Description
[0008] Figure 1 This is a schematic diagram of the pose control system for the wheel hub painting robotic arm based on the spatial interpolation algorithm of the present invention. Figure 2 This is a schematic diagram of the wheel hub painting system deployment of the present invention; Figure 3 This is a schematic diagram of the hand-eye calibration of the scanning device of the present invention; Figure 4 This is a schematic diagram of the wheel hub rotation spraying position relationship of the present invention. Detailed Implementation
[0009] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0010] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" indicate that the element or object preceding the term encompasses the elements or objects listed following the term and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0011] like Figures 1-4 As shown, the pose control system for the wheel hub painting robotic arm based on the spatial interpolation algorithm includes: The point cloud registration module is used to perform 3D scanning and coordinate registration on the surface of the wheel hub to be sprayed, and obtain the registration point cloud data, rotation reference and the area to be sprayed. The connectivity tracking module is used to perform connectivity tracking and layered sampling on the registered point cloud data, the rotation reference and the area to be sprayed, and generate surface sampling points and surface normal vectors. The pose interpolation index generation module is used to calculate the offset reference point based on the surface sampling point and the surface normal vector. It combines the offset reference point and the surface normal vector to obtain the chord drop deviation value, rotation density value and path curvature value in sequence. The chord drop deviation value, rotation density value and path curvature value are then fused into the pose interpolation index. The spatial interpolation module is used to refine spatial interpolation and plan end velocity using surface sampling points, surface normal vectors and pose interpolation exponents, and outputs offset control points, control point normals and target velocity values. The spray gun attitude sequence extraction module is used to construct the spray direction and tangential reference with the offset control point and the control point normal, and perform a smooth transformation by combining the spray direction and tangential reference to extract the spray gun attitude sequence. The joint angle inverse solution module is used to perform joint angle inverse solution and timing binding of the offset control point, target velocity value and spray gun posture sequence to obtain joint pose sequence, control timestamp and spraying trigger flag. The pose control command output module is used to perform periodic resampling and format encapsulation of joint pose sequences, control timestamps and spraying trigger flags, and finally output pose control commands to drive the robotic arm to perform spraying.
[0012] In one embodiment of the present invention, the point cloud registration module is configured to perform the following steps: Step S101: Scan the surface to be sprayed while the wheel hub is fixed, and delete the fixture points, turntable points, background plane points and outliers. The scanning range includes the outer edge of the wheel rim, the surface of the wheel spokes, the root of the wheel spokes, the chamfer around the bolt holes and the bottom of the groove. Step S102: Determine the workpiece coordinate system of the hub using the hub center hole, the rim circumferential boundary and the axis of the fixing device, and then map it to the robot arm base coordinate system through calibration rigid body transformation; The registration point cloud data is a set of three-dimensional coordinate points of the wheel hub surface to be sprayed after coordinate transformation, with the unit uniformly in meters, representing the geometric shape of the wheel hub surface to be sprayed in the robot arm's base coordinate system.
[0013] Step S103: Using the direction of the fixed device axis in the robot arm base coordinate system as the rotation reference, the area to be sprayed is separated according to the point cloud connectivity, surface orientation and the reach angle of the spray gun, wherein the registration residual is less than the preset pose resolution value.
[0014] The rotation reference is the direction of the fixed device axis in the robot arm's base coordinate system, which serves as the reference axis for the layered sampling of the hub surface.
[0015] The area to be sprayed is the wheel hub surface area that needs to be sprayed, separated based on point cloud connectivity, surface orientation, and spray gun reach angle, representing the effective range of the wheel hub surface that needs to be sprayed.
[0016] The registration residual is the coordinate error after the scanned point cloud is mapped from the workpiece coordinate system to the robot arm base coordinate system, and it characterizes the accuracy level of the coordinate registration process.
[0017] The preset pose resolution value is the pose input resolution allowed by the robotic arm controller. The preferred value is 0.001 meters, and the range is from 0.0005 meters to 0.002 meters. It is determined according to the actual accuracy level of the robotic arm controller, and the registration residual is less than this value.
[0018] Furthermore, the specific operation for determining the hub workpiece coordinate system using the hub center hole, the rim circumferential boundary, and the fixing device axis is as follows: First, extract the inner boundary point set of the hub center hole from the scanned point cloud, and obtain the axial direction and center position of the center hole through cylindrical fitting; then extract the circumferential point set of the outer edge of the rim, and obtain the normal and center coordinates of the plane where the rim is located through circular fitting; next, take the axial direction of the fixing device as the initial reference, and perform consistency verification by combining the center hole axis and the rim plane normal, and take the weighted average direction of the three as the Z-axis direction of the workpiece coordinate system; then, with the rim center as the origin, select the center of a bolt hole in the rim plane as the X-axis direction reference to establish a right-handed coordinate system; finally, translate the origin of this coordinate system to the intersection of the hub center hole end face and the axis, and complete the establishment of the hub workpiece coordinate system.
[0019] Furthermore, the calibration rigid body transformation refers to the rotational and translational transformation from the workpiece coordinate system to the robot arm's base coordinate system. The method used is hand-eye calibration, where the 3D scanning equipment is fixedly installed at the end of the painting robot arm or in a fixed position within the painting booth, using a standard calibration ball or calibration plate as a reference. First, at least ten different pose points are selected within the robot arm's workspace. At each pose point, the joint angles of the robot arm's end effector and the measurement data of the calibration object by the scanning equipment are simultaneously recorded. Then, the pose of the end flange at each pose point in the base coordinate system is calculated using the robot arm's forward kinematics. Next, based on multiple measurements of the calibration object by the scanning equipment, the relative transformation between the scanning equipment coordinate system and the robot arm's end flange coordinate system is solved. Finally, combining the transformation from the robot arm's base coordinate system to the end flange and the transformation from the flange to the scanning equipment, the transformation relationship from the scanning equipment coordinate system to the robot arm's base coordinate system is derived. During the mapping calculation, the transformation is completed by left-multiplying the coordinates of each scanning point by a rotation matrix and then adding a translation vector.
[0020] Furthermore, connectivity is determined using a region growing algorithm. Starting from a seed point on the front of the wheel hub, the algorithm expands to surrounding neighboring points. Points are considered connected when the distance between two adjacent points is less than a preset threshold and the angle between their normal vectors is less than a preset angle. Surface orientation is determined based on the angle between the surface normal vector and the front direction of the robotic arm; points with an angle less than 90 degrees are considered the front side that can be sprayed. The spray gun reachability is determined based on the angle between the surface normal vector and the spray gun axis; points with an angle less than 60 degrees are considered reachable by the spray gun. The specific separation process is as follows: First, the point cloud is segmented into multiple connected regions through connectivity analysis, and the largest front connected region is retained as a candidate region. Then, the surface orientation is determined for each candidate region, and points on the back and side facades whose orientations do not meet the requirements are eliminated. Next, the reachability angle of the remaining points is verified, considering the spray gun installation angle and the reachable workspace of the robotic arm, eliminating the bottom of deep grooves or inner corner areas. Finally, the points that pass all three determinations are combined into a sprayable area.
[0021] Furthermore, the preset pose resolution value is determined based on three main factors: the interpolation cycle and position resolution of the robotic arm controller, the measurement accuracy of the 3D scanning equipment, and the position accuracy requirements of the spraying process. The maximum value among these three factors is selected to ensure that the accuracy of the registered point cloud can be effectively recognized by the robotic arm controller and meets the requirements of the spraying process; the value range is from 0.0005 meters to 0.002 meters.
[0022] It should be noted that coordinate registration is the process of transforming the scanned point cloud from the scanner coordinate system or workpiece coordinate system to the robot arm's base coordinate system. This involves a complete rigid body transformation, including rotation, translation, and scale unification, requiring accurate transformation parameters obtained through calibration. This embodiment obtains accurate wheel hub geometry data and establishes a unified coordinate reference through 3D scanning and coordinate registration, providing a foundation for all subsequent pose calculations and robot arm control. By limiting the scanning range and registration residual requirements, the integrity of the point cloud data and the uniformity of the coordinate system are ensured, avoiding errors in subsequent interpolation load calculations and robot arm execution deviations caused by coordinate inconsistencies, thus providing a reliable geometric basis for the entire pose control system.
[0023] In one embodiment of the present invention, the connectivity tracing module is configured to perform the following steps: Step S201: Using the rotation reference as a reference, perform polar layering and radial connectivity tracing on the area to be sprayed to obtain the sampling line; The sampling line is a path line that extends continuously along the spokes, rim grooves and transition chamfers. It is the basis for generating the spray trajectory and represents the path of the spray gun moving on the surface of the hub.
[0024] Step S202: Sort the intersection lines of the sampling lines and the registered point cloud data according to the arc length, and generate surface sampling points according to the constraint that the distance between adjacent surface sampling points is greater than or equal to the minimum chord length threshold. Specifically, the minimum chord length threshold is the maximum value between the scanning space resolution and the minimum interpolation resolution of the robotic arm controller. The surface sampling points are discrete geometric points extracted from the intersection of the sampling line and the point cloud. The distance between adjacent points is not less than the minimum chord length threshold, representing the discrete geometric nodes on the hub surface used for subsequent calculations.
[0025] The minimum chord length threshold is the larger of the scanning spatial resolution and the minimum interpolation resolution of the robotic arm controller, preferably 0.002 meters, with a range of 0.001 meters to 0.005 meters. The larger of the scanning device spatial resolution and the robotic arm controller minimum interpolation step size is used to limit the minimum spacing between sampling points.
[0026] Step S203: Establish a normal neighborhood for the surface sampling points within the same local surface patch, calculate the initial normal using the least squares tangent plane, and then unify the normal sign according to the spray gun side direction to obtain the surface normal vector; When the sampling line passes through the orifice or edge, it maintains an independent sequence on both sides of the orifice or edge, and does not cross the void, bolt hole boundary, spoke edge or groove wall break edge for normal fitting.
[0027] The surface normal vector is a unit direction vector perpendicular to the local tangent plane at a certain sampling point on the hub surface. It is defined to point towards the side where the spray gun is located, and it represents the orientation of the hub surface at that point.
[0028] The normal neighborhood is a set of local points used to calculate the surface normal vector. It contains only points within the same local surface patch and represents the range of neighboring points participating in the fitting of the local tangent plane.
[0029] Furthermore, polar layering divides the hub space into multiple polar planes at fixed angular intervals, with the rotation reference as the axis. The preferred angular interval is 2 degrees, ranging from 1 to 5 degrees. Each polar plane intersects with the hub point cloud to form a set of intersection line segments. Radial connectivity tracing refers to tracing connectivity along these intersection line segments within each polar plane, either from the outer edge of the hub towards the center or from the center towards the outer edge. In practice, a two-dimensional coordinate system is first established within the polar plane, and the three-dimensional point cloud is projected onto this plane. Then, intersection points are searched in order of radial distance. When consecutive intersection line segments are encountered, they are recorded as a connected segment. When bolt holes or decorative grooves cause the intersection line to be interrupted, the segments before and after the interruption are recorded as independent connected trajectories. Regarding parameter settings, the angular interval of polar layering is adjusted according to the complexity of the hub surface details. The distance threshold for radial connectivity tracing is set to 1.5 times the minimum chord length threshold; adjacent points less than this threshold are considered connected.
[0030] Furthermore, the intersection lines of the sampling lines and the registered point cloud data are sorted by arc length as follows: First, in the polar plane corresponding to each sampling line, all discrete points intersecting with the point cloud are collected; then, the outer edge of the rim with the largest radial distance is selected as the starting point; next, starting from the starting point, the point closest to the current point and less than twice the minimum chord length threshold is searched among the remaining points and marked as the next point; the above search process is repeated until all points are sorted; after sorting, the spatial distance between two adjacent points is calculated and accumulated to obtain the cumulative arc length corresponding to each point; if there are branches in the intersection line, each branch is sorted independently and the arc length is calculated separately.
[0031] Furthermore, the initial normal direction is calculated using the least squares tangent plane as follows: First, a normal neighborhood is established for each surface sampling point. The size of the neighborhood is adjusted according to the point cloud density, typically selecting 20 to 50 nearest neighbors. Then, the coordinates of all points within the neighborhood are subtracted from the coordinates of the current sampling point to obtain a relative coordinate vector. Next, a third-order covariance matrix is constructed, with its elements obtained by summing the products of the components of the relative coordinate vector. Eigenvalue decomposition is performed on the covariance matrix to obtain three eigenvalues and three corresponding eigenvectors. The eigenvector corresponding to the smallest eigenvalue is the normal direction of the local tangent plane. Since the normal direction obtained from eigenvalue decomposition has positive or negative uncertainty, a unified orientation processing is required subsequently.
[0032] Furthermore, the orifice determination employs a geometric boundary detection method. If more than 30% of the points in the normal neighborhood of a sampling point fall on the other side of the tangent plane of that point, the point is determined to be located at an orifice or cavity boundary. The edge determination uses a curvature threshold method. If the discrete curvature at a sampling point is greater than a preset threshold, the point is determined to be located at an edge. The preset curvature threshold is preferably 5 per meter, with a range of 2 to 10 per meter. For locations determined to be orifices or edges, the sampling line is broken at that point, forming independent sampling sequences on both sides. Each independent sequence after the break is processed independently, without sharing neighborhood points across boundaries.
[0033] It should be noted that the local normal is the tangent plane normal obtained by statistical fitting of local neighborhood points, and its accuracy depends on the selection range of neighborhood points and the fitting method. This embodiment generates a continuous and effective sequence of sampling points and accurate surface normal vectors through connected tracing and hierarchical sampling, providing continuous geometric input for the subsequent calculation of the pose interpolation index; continuous sampling lines are generated through piriform hierarchical and radial connected tracing, and cross-boundary fitting of normals is prohibited, ensuring the continuity of sampling points and the accuracy of normal vectors, avoiding interpolation index calculation errors caused by holes, broken edges, or voids, and providing high-quality geometric data for subsequent adaptive interpolation.
[0034] In one embodiment of the present invention, the pose interpolation index generation module is configured to perform the following steps: Step S301, indexing three consecutive surface sampling points and surface normal vectors of the same sampling line, and setting the pose interpolation indexes of the first endpoint and the last endpoint as the pose interpolation indexes of adjacent interior points respectively. Specifically, the formula for calculating the pose interpolation exponential replication value of the start and end points is as follows: ; in, This represents the pose interpolation index of the first surface sampling point. This represents the pose interpolation index of the second surface sampling point. Indicates the first The pose interpolation index of each surface sampling point. Indicates the first The pose interpolation index of each surface sampling point. Indicates the total number of sampling points; The total number of sampling points is the number of surface sampling points on the same sampling line, representing the degree of discretization of a single sampling line.
[0035] Step S302: Calculate the offset reference point based on the surface sampling point, target distance, and surface normal vector; then calculate the chord drop deviation value based on the offset reference point, the midpoint of adjacent offset reference points, and surface normal vector. Specifically, the formula for calculating the offset reference point is as follows: ; in, Indicates the first One bias reference point Indicates the first Each surface sampling point Indicates the target distance. Indicates the first The surface normal vector of each surface sampling point; Specifically, the formula for calculating the chord drop deviation value is as follows: ; in, Indicates the first The chord drop deviation value of each surface sampling point Indicates the first One bias reference point Indicates the first One bias reference point Indicates the first One bias reference point Indicates the first The surface normal vector of each surface sampling point Indicates the target distance. Represents the dot product of vectors; The offset reference point is the point obtained by moving the surface sampling point along the surface normal vector to the target distance, and it represents the coordinates of the spray gun center point at the ideal normal offset position.
[0036] The chord drop deviation value is the degree of deviation of the standard offset point from the normalized normal of the midpoint of the adjacent offset point, which characterizes the possible error of the spray gun target distance in the middle of the interpolation.
[0037] The target distance is the designed target distance from the spray gun to the surface of the wheel hub. The preferred value is 0.15 meters, and the range is from 0.1 meters to 0.3 meters. It is determined according to the spray gun model and the requirements of the spraying process. All normal offset operations are based on this distance.
[0038] Step S303: Scale the angle between the normal vectors of adjacent surfaces according to the chord length of the adjacent surface sampling points and the minimum chord length threshold to obtain the rotation density value; Specifically, the formula for calculating the rotational density value is as follows: ; in, Indicates the first Rotational density values of each surface sampling point Indicates the target distance. Indicates the first The surface normal vector of each surface sampling point Indicates the first The surface normal vector of each surface sampling point Indicates the first Each surface sampling point Indicates the first Each surface sampling point This represents the minimum chord length threshold. This means restricting the result of the dot product to between a preset lower limit and a preset upper limit. The preset lower limit is specifically... The preset upper limit is specifically as follows: , Represents the inverse cosine function. Represents the Euclidean norm; The rotation density value is the normal rotation rate scaled by the target distance, which characterizes the effect of the normal change per unit path length on the attitude load of the robotic arm.
[0039] Step S304: Calculate the path curvature value based on the cross product norm of three consecutive surface sampling points, the length of adjacent point segments, and the minimum chord length threshold; Specifically, the formula for calculating the path curvature value is as follows: ; in, Indicates the first The path curvature value of each surface sampling point. Indicates the first Each surface sampling point express Each surface sampling point Indicates the first Each surface sampling point This represents the minimum chord length threshold. Represents the cross product of vectors. Represents the Euclidean norm; The path curvature value is the degree of path bending calculated from three consecutive sampling points, and it characterizes the local bending intensity of the spraying path at the hub groove, edge, and chamfer.
[0040] Step S305: The chord drop deviation value, rotation density value, and the product of target distance and path curvature value are fused by square root to obtain the pose interpolation index, wherein the target distance and the minimum chord length threshold are both greater than the preset zero value. Specifically, the formula for calculating the pose interpolation index is as follows: ; in, Indicates the first The pose interpolation index of each surface sampling point. Indicates the first The chord drop deviation value of each surface sampling point Indicates the first Rotational density values of each surface sampling point Indicates the target distance. Indicates the first The path curvature value of each surface sampling point, with a preset zero value specifically as follows: .
[0041] The pose interpolation index is a dimensionless parameter obtained by combining the chord descent deviation value, rotation density value, and path curvature value, and is used to control the density of subsequent interpolation nodes and the end velocity.
[0042] Furthermore, the specific method for indexing three consecutive surface sampling points and surface normal vectors of the same sampling line is as follows: First, an independent index array is established for each sampling line, with array indices numbered sequentially starting from 1; each element in the array stores the three-dimensional coordinates, surface normal vector, and cumulative arc length of the corresponding sampling point; the first and last endpoints do not participate in the calculation of the intermediate points of the three-point group, but are only used as endpoints of adjacent three-point groups. Specifically, starting from the point with index 2 and ending at the point with index 1 less than the total number of sampling points, the current point, its preceding point, and its following point are sequentially grouped into a continuous three-point group; the pose interpolation index of each three-point group corresponds to the calculation of the pose interpolation index of an interior point; the pose interpolation index of the first and last endpoints is copied from the values of their adjacent interior points.
[0043] Furthermore, the specific operation of scaling the angle between adjacent surface normal vectors according to the chord length of adjacent surface sampling points and the minimum chord length threshold is as follows: First, calculate the angle between the surface normal vectors of the two sampling points before and after the current point. The angle is obtained by taking the inverse cosine of the dot product of the two vectors. To avoid numerical calculation errors causing the dot product value to exceed the effective range, the dot product result needs to be restricted to a closed interval between -1 and +1. Then, calculate the spatial straight-line distance between the two sampling points before and after the current point as an approximation of the chord length. Next, multiply the target distance by the normal angle, and then divide by the sum of the chord length and the minimum chord length threshold to obtain the rotation density value. The purpose of adding the minimum chord length threshold to the denominator is to prevent numerical instability caused by an excessively small chord length.
[0044] Furthermore, three consecutive surface sampling points can determine a unique circumcircle, and the reciprocal of the radius of this circumcircle is the curvature at the location of the three points. In the specific calculation, first, two adjacent edge vectors are constructed: one pointing from the first point to the second point, and the other pointing from the second point to the third point. Then, the cross product of these two edge vectors is calculated. The magnitude of the cross product is equal to the product of the lengths of the two edge vectors multiplied by the sine of the included angle. Next, twice the magnitude of the cross product is divided by the product of the three edge lengths to obtain the discrete curvature value. Adding the cube of the minimum chord length threshold to the denominator ensures numerical stability when the distance between adjacent points is extremely small.
[0045] Furthermore, the three characteristic parameters reflect the load of spatial interpolation from different perspectives: the chord descent deviation reflects the error of position interpolation in the normal direction, the rotation density reflects the severity of attitude change, and the path curvature reflects the curvature of the trajectory itself. Although these three parameters have different physical origins, they have all undergone dimensionless processing and can be compared and fused at the same scale. The square root fusion method is used instead of nonlinear weighted summation because the square root does not require preset empirical weights. When a certain parameter increases significantly, its squared term will dominate the fusion result, enabling the pose interpolation exponent to sensitively capture anomalies in a single dimension.
[0046] It should be noted that the pose interpolation index is a dimensionless control parameter that integrates three independent physical sources: normal offset chord descent, normal rotation density, and path curvature. A higher value indicates a higher overall load on the spatial interpolation at that location, affecting the spray gun target distance, attitude continuity, and the robotic arm's dynamic execution capability. This embodiment transforms the geometric anomalies of the wheel hub's concave-convex transition into pose interpolation loads that the painting robotic arm can directly use. By fusing three independent geometric features to generate the pose interpolation index, there is no need to preset empirical weights for different wheel hub styles. This comprehensively and accurately reflects the interpolation load in different regions of the wheel hub, providing a reliable control basis for subsequent adaptive spatial interpolation and speed planning.
[0047] In one embodiment of the present invention, the spatial interpolation module is configured to perform the following steps: Step S401: Determine the basic interpolation spacing based on the target distance, spray half angle and spray overlap rate, wherein the spray half angle is greater than a preset zero value and less than a preset half angle limit, and the spray overlap rate is greater than a preset zero value and less than a preset overlap rate limit. Specifically, the formula for calculating the basic interpolation spacing is as follows: ; in, Indicates the basic interpolation spacing. Indicates the target distance. Indicates the half-angle of the spray pattern. This indicates the overlap rate of the spray pattern, with a preset zero value specifically being... The preset half-width limit is specifically as follows: The preset overlap rate limit is specifically as follows: ; The basic interpolation spacing is the initial interpolation point spacing determined based on the spraying process requirements, and is calculated from the target distance, spray width half angle, and spray width overlap rate.
[0048] The spray width half-angle is the half-cone angle of the effective spray width of the spray gun. The preferred value is 15 degrees, and the value range is from 10 degrees to 30 degrees, which is determined based on the actual spray width measurement of the spray gun.
[0049] The overlap rate is the percentage of overlap between adjacent spray patterns, preferably 0.3, with a range of 0.2 to 0.5, determined based on the film thickness uniformity requirements.
[0050] Step S402: Determine the number of interpolation sub-segments based on the point segment length of adjacent surface sampling points, the basic interpolation spacing, and the pose interpolation index of adjacent endpoints; Specifically, the formula for calculating the number of interpolated segments is as follows: ; in, Indicates the first Number of interpolation sub-segments of the segment sampling line Indicates the first Each surface sampling point Indicates the first Each surface sampling point Indicates the basic interpolation spacing. Indicates the first The pose interpolation index of each surface sampling point. Indicates the first The pose interpolation index of each surface sampling point. Indicates rounding up. This indicates taking the maximum value. The number of interpolation segments is the number of segments into which the path between two adjacent original sampling points is divided, and it is determined by the path length, the basic interpolation spacing, and the pose interpolation exponent.
[0051] Step S403: Perform spatial interpolation densification according to the number of interpolation segments, use arc length interpolation to obtain the position of the intermediate surface, and use unit spherical linear interpolation and normalization to obtain the control point normal. The control point normal is the surface normal vector at the midpoint after encryption, obtained by linear interpolation of a unit sphere, and represents the surface orientation at the encryption point.
[0052] Step S404: Offset the position of the intermediate surface along the normal of the control point according to the target distance to obtain the offset control point; The offset control point is the spray gun center reference point obtained by moving the target distance along the control point normal after the densification of the midpoint, which represents the position of the spray gun center point in space.
[0053] Step S405: Limit the base velocity according to the pose interpolation index and linearly transition between adjacent endpoint velocities to obtain the target velocity value; Specifically, the formula for calculating the target velocity value is as follows: ; in, Indicates the first The target velocity value of each surface sampling point. Indicates the base speed. Indicates the first The pose interpolation index of each surface sampling point. This indicates the minimum speed allowed by both the robotic arm and the painting process. This indicates the maximum speed allowed by both the robotic arm and the painting process. This means that the calculated speed value is limited to between the minimum and maximum speed.
[0054] The target speed value is the end-effector movement speed corresponding to each bias control point, which is obtained by limiting the base speed using the pose interpolation index.
[0055] The base speed is the calibrated standard speed of the spray gun when spraying on a flat surface. The preferred value is 0.3 meters per second, and the range is from 0.1 meters per second to 0.5 meters per second, which is determined according to the characteristics of the coating and the film thickness requirements.
[0056] The minimum speed is the lowest end-effector movement speed allowed by both the robotic arm and the spraying process. The preferred value is 0.05 meters per second, and the range is from 0.02 meters per second to 0.1 meters per second, determined based on the low-speed stability of the robotic arm and the requirements for spraying quality.
[0057] The maximum speed is the highest end-effector movement speed allowed by both the robotic arm and the spraying process. The preferred value is 0.5 meters per second, and the range is from 0.3 meters per second to 1 meter per second, determined according to the dynamic performance of the robotic arm and the requirements for spraying quality.
[0058] Furthermore, the specific operation of obtaining the intermediate surface position using arc length interpolation is as follows: First, determine the number of intermediate points to be inserted based on the number of interpolation segments, i.e., the number of segments minus one intermediate point; then, divide the adjacent two original sampling points proportionally according to the cumulative arc length; in specific calculations, first calculate the total arc length between the two endpoints, then divide the total arc length by the number of segments to obtain the arc length increment of each segment; then, starting from the first endpoint, accumulate the arc lengths of the segments sequentially to obtain the target arc length value corresponding to each intermediate point; finally, in the ordered point sequence of the original sampling line, find the three-dimensional coordinates of the corresponding target arc length position through linear interpolation, which is the intermediate surface position.
[0059] Furthermore, the specific process of obtaining the control point normal through unit spherical linear interpolation and normalization is as follows: Unit spherical linear interpolation refers to a method of smoothly interpolating two unit vectors on a unit sphere. In practice, firstly, the angle between the two endpoint normal vectors is calculated by multiplying by the dot product and taking the inverse cosine. Then, two weight coefficients are calculated based on the interpolation parameters, corresponding to the weights of the two endpoint vectors respectively. The interpolation parameters change from 0 to 1, corresponding to the transition from the first endpoint normal to the second endpoint normal. Next, the two endpoint normals are multiplied by their respective weight coefficients and then added together to obtain the interpolated vector. Finally, the interpolated vector is divided by its own magnitude to complete the normalization, thus obtaining the control point normal of unit length.
[0060] Furthermore, the specific operation for obtaining the offset control point by offsetting the intermediate surface position along the control point normal with respect to the target distance is as follows: First, confirm the three-dimensional coordinates of the intermediate surface position and the corresponding unit vector of the control point normal; then multiply the control point normal by the target distance value to obtain the offset displacement vector; next, add the offset displacement vector to the coordinate vector of the intermediate surface position to obtain the spatial coordinates of the offset control point. The offset direction always points along the control point normal towards the side where the spray gun is located, that is, in the same direction as the surface normal.
[0061] Furthermore, the specific method for obtaining the target velocity value through a linear transition between adjacent endpoint velocities is as follows: First, calculate the target velocity value at each of the two adjacent original sampling points by dividing the base velocity by 1 and adding the sum of the pose interpolation exponent, then limiting it to between the minimum and maximum velocities; then, for each intermediate offset control point between the two endpoints, perform linear interpolation on the velocities of the two endpoints based on the arc length ratio between the two points. The weight of the linear interpolation is determined by the arc length position of the intermediate point; the velocity of the first endpoint has a larger weight if it is closer to the first endpoint, and the velocity of the second endpoint has a larger weight if it is closer to the second endpoint. This method ensures a smooth transition of velocity between adjacent sampling points without abrupt velocity changes.
[0062] It should be noted that spatial interpolation is the process of generating continuous or denser intermediate pose points between discrete path points. This includes not only connecting position points but also the synchronous generation of spray gun attitude, speed, and timing. In this embodiment, the original sampling lines are adaptively densified based on the pose interpolation index, and the end-effector speed is planned synchronously, resulting in shorter interpolation segments and lower speeds in high-load areas. By simultaneously controlling the interpolation node density and end-effector speed through the pose interpolation index, refined interpolation and speed adaptation in high-load areas are achieved. This allows the robotic arm sufficient time to complete attitude adjustments in areas with rapid normal changes, avoiding attitude lag and target distance deviation caused by excessive speed, thereby improving the coating quality in the concave-convex transition area of the wheel hub.
[0063] In one embodiment of the present invention, the spray gun attitude sequence extraction module is configured to perform the following steps: Step S501, constructing the spray direction in the opposite direction of the control point normal, and obtaining the tangential reference based on the direction of the adjacent offset control point; The spray direction is the direction of the spray axis in the spray gun tool coordinate system, which is defined as the opposite direction of the control point normal, and represents the direction of the paint spray from the spray gun.
[0064] The tangential reference is the unit tangential vector of the bias control point along the sampling line, which is obtained by normalizing the directions of adjacent bias control points and represents the forward direction of the sampling line at that point.
[0065] Step S502: Normalize the projection of the tangential reference onto the plane perpendicular to the spray direction to obtain the spray gun lateral axis, and construct the spray gun attitude matrix from the spray direction, the spray gun lateral axis and the cross product axis. Specifically, the formula for calculating the spray gun attitude matrix is as follows: ; in, Indicates the first The injection direction of each offset control point. Indicates the first Control point normals of each bias control point Indicates the first Each bias control point is a tangential reference along the sampling line. Indicates the first The spray gun's lateral axis has one offset control point. Indicates the first The cross product axis of the bias control points Indicates the first The spray gun attitude matrix with one offset control point. Represents the dot product of vectors. Represents the cross product of vectors. Represents the Euclidean norm; The horizontal axis of the spray gun is a direction vector obtained by normalizing the projection of the tangential reference onto a plane perpendicular to the spray direction, which represents the rotational orientation of the spray gun around the spray axis.
[0066] The cross product axis is the direction vector obtained by cross product of the spray direction and the spray gun's lateral axis. Together with the former two, it forms an orthogonal coordinate system and represents the third axis of the spray gun's attitude.
[0067] The spray gun attitude matrix is a third-order orthogonal matrix composed of the spray gun's horizontal axis, cross product axis, and spray direction, used to represent the spray gun's attitude in space.
[0068] Step S503: Perform orthogonal normalization on the spray gun attitude matrix and convert it into a unit quaternion; Unit quaternions are a mathematical representation used to express three-dimensional orientation rotation, which can avoid singularities and jumps in Euler angles under certain orientations.
[0069] Step S504: Perform hemispherical processing on consecutive unit quaternions within the same sampling line, and use cumulative cubic quaternion spline smoothing transformation; Step S505: Extract the spray gun attitude sequence according to the order index of the offset control points. When a sampling line endpoint lacks a single-sided adjacent point, the direction of the only adjacent segment is used as the tangential reference.
[0070] The spray gun attitude sequence is a set of continuous spray gun attitudes arranged in order of offset control points, representing the change process of spray gun attitudes along the entire sampling line.
[0071] Furthermore, the specific calculation process for normalizing the projection of the tangential reference onto the plane perpendicular to the spray direction to obtain the lateral axis of the spray gun is as follows: First, calculate the dot product of the tangential reference and the spray direction to obtain the projected length of the tangential reference in the spray direction; then multiply the spray direction by this projected length to obtain the projected vector of the tangential reference in the spray direction; next, subtract this projected vector from the tangential reference to obtain the projected vector of the tangential reference in the plane perpendicular to the spray direction; finally, divide the projected vector by its own magnitude to complete the normalization, obtaining the lateral axis of the spray gun per unit length. Since the tangential reference belongs to the surface tangency and the spray direction is the opposite direction of the surface normal, the two are perpendicular, therefore the magnitude of the projected vector will not be zero.
[0072] Furthermore, the specific method for performing orthogonal normalization on the spray gun attitude matrix is as follows: Due to potential numerical errors during the calculation process, the directly constructed attitude matrix may not be completely orthogonal, requiring orthogonal normalization correction. A commonly used method is to employ the Gram-Schmidt orthogonalization process. The specific steps are as follows: First, normalize the column vector of the spray direction to obtain the first set of orthogonal bases; then, subtract the projection of the spray gun's transverse axis column vector onto the spray direction and normalize it again to obtain the second set of orthogonal bases; next, subtract the projections of the cross product axis column vectors onto the first two sets of orthogonal bases and normalize them again to obtain the third set of orthogonal bases; finally, combine the three sets of orthogonal bases column by column to obtain the orthogonally normalized attitude matrix.
[0073] Furthermore, the specific steps for converting the spray gun attitude matrix into a unit quaternion are as follows: First, extract candidate values for the four quaternion components from the attitude matrix; specifically, calculate the matrix trace, which is the sum of the diagonal elements, and select different calculation formulas based on the sign of the trace to improve numerical stability; when the trace is positive, first calculate the candidate values for the real part of the quaternion, and then calculate the candidate values for the three imaginary parts in sequence; when the trace is negative, select the component corresponding to the largest diagonal element as the starting calculation component, and then derive the remaining components; finally, divide all four components by the modulus of the quaternion to complete the normalization and obtain the unit quaternion.
[0074] Furthermore, the criteria and procedures for determining whether consecutive unit quaternions are in the same hemisphere are as follows: Unit quaternions possess a characteristic that a quaternion and its negative counterpart represent the same rotation. Therefore, in a continuous sequence of quaternions, two adjacent quaternions may reside on different hemispheres of the unit hypersphere. Although the rotations they represent are continuous, direct interpolation will result in a detour. The criterion is to calculate the dot product of two adjacent quaternions, i.e., multiplying the corresponding components and then summing them. If the dot product is negative, it indicates that the two quaternions are in different hemispheres and require correction. The procedure is to simultaneously negate all components of the subsequent quaternion, placing it in the same hemisphere as the preceding quaternion.
[0075] Furthermore, the specific implementation process of the cumulative form cubic quaternion spline smooth transformation is as follows: The cubic quaternion spline is a smooth interpolation curve constructed in quaternion space, which can ensure the continuity of the first derivative of attitude, i.e., angular velocity. The cumulative form implementation method is to first construct an auxiliary quaternion at each control point to control the tangent direction of the spline; then, between every two adjacent control points, a cubic spline curve is constructed using two endpoint quaternions and two auxiliary quaternions. In specific interpolation, for any parameter value within the interval, four quaternions are combined through the coefficients of a cubic polynomial, and then normalized to obtain the interpolation result.
[0076] It should be noted that this embodiment constructs a spray gun posture that meets the requirements of the spraying process, and achieves a continuous and smooth transition of posture through quaternion interpolation. The clearly defined spray gun posture construction rules ensure that the spray gun's spray direction is always aligned with the normal to the wheel hub surface. Quaternion smooth interpolation avoids abrupt posture changes, maintaining the designed shape of the spray pattern projection. This effectively solves the problems of spray pattern distortion and uneven film thickness caused by posture jumps in the concave-convex transition area of the wheel hub.
[0077] In one embodiment of the present invention, the joint angle inverse kinematics module is configured to perform the following steps: Step S601: Solve the inverse solution of all feasible joint angles of the robotic arm based on the offset control points and the spray gun attitude sequence; Inverse kinematics is the process of determining the angles of each joint of the robotic arm based on the desired position and orientation of the spray gun tip.
[0078] Step S602: Select the solution with the smallest difference between the joint vector and the previous control point from the feasible inverse joint angle solutions to generate a joint pose sequence. The joint pose sequence is a set of angles of the robotic arm's joints arranged in chronological order, representing the angular state of each joint at different times.
[0079] Step S603: Generate strictly increasing control timestamps based on the distance between adjacent offset control points and the minimum value of adjacent target velocity values; Specifically, the formula for calculating the control timestamp is as follows: ; in, Indicates the first Control timestamps for each bias control point Indicates the first Control timestamps for each bias control point Indicates the first One bias control point Indicates the first One bias control point Indicates the first The target velocity value at each bias control point. Indicates the first The target velocity value at each bias control point. This indicates taking the minimum value. Represents the Euclidean norm; Step S604: Bind the spraying trigger flag to the joint pose sequence and control timestamp. The spraying trigger flag is turned on within the trajectory segment corresponding to the area to be sprayed, and turned off when crossing the hole, crossing the boundary and the empty travel segment. The spraying trigger flag is a switch quantity synchronized with the pose and timestamp, used to determine whether the spray gun starts spraying in a certain trajectory segment.
[0080] Step S605: Generate a non-spraying transition section between adjacent sampling lines with the spraying trigger flag turned off.
[0081] The non-spraying transition section is the movement trajectory segment between two adjacent spraying sampling lines. Within this segment, the spraying trigger flag is in the off state, representing the trajectory of the robotic arm's idle travel.
[0082] Furthermore, the specific method for solving all feasible joint angles of the robotic arm based on the offset control points and the spray gun attitude sequence is as follows: Inverse kinematics solution is the process of calculating the joint angles given the position and attitude of the end effector; for a six-axis serial robotic arm, there are usually multiple sets of inverse solutions. Specific solution methods are divided into two categories: analytical methods and numerical methods. Analytical methods directly obtain analytical expressions for the joint angles based on the structural parameters of the robotic arm through geometric relationships or algebraic derivation, offering fast solution speed and the ability to obtain all closed-form solutions. Numerical methods gradually approximate the target pose through iterative optimization, suitable for robotic arms with complex structures and no analytical solutions. This embodiment preferably uses the analytical method. First, the DH parameter model of the robotic arm is established to determine the length, offset, and torsion angle of each link; then, based on the end effector pose matrix, the wrist position and each joint angle are solved sequentially. During the solution process, it is necessary to check whether the joint angles are within the physical limits of the robotic arm; solutions exceeding the limits are discarded.
[0083] Furthermore, the criterion for selecting the solution with the smallest difference between the joint vector of the previous control point and the feasible inverse joint angle solutions is as follows: For all feasible inverse solutions of the current offset control point, calculate the difference between the joint angle vector of each inverse solution and the joint angle vector of the previous control point; the difference is calculated by taking the square root of the sum of the squares of the differences of each joint angle, i.e., the Euclidean distance; then select the inverse solution with the smallest Euclidean distance as the joint pose of the current control point. The purpose of this selection strategy is to ensure the continuity of joint movement and avoid large jumps between adjacent control points; for the first control point, the inverse solution that is closest to the initial zero position or the current actual position of the robotic arm is usually selected.
[0084] Furthermore, when generating strictly increasing control timestamps, the spatial distance between the current control point and the previous control point is first calculated. Then, the smaller of the target velocity values corresponding to the two control points is taken as the motion velocity of that trajectory segment. Next, the spatial distance is divided by the motion velocity to obtain the motion time of that trajectory segment. Finally, the timestamp of the previous control point is added to the motion time of that segment to obtain the timestamp of the current control point. Since the spatial distance and the motion velocity are always positive, the timestamps are strictly increasing.
[0085] Furthermore, the non-spraying transition segment refers to the idle travel trajectory of the robotic arm after completing the spraying of one sampling line and moving to the starting point of the next sampling line. The generation method typically employs a smooth transition command built into the robotic arm controller, such as an arc transition or spline transition. In practice, the end point of the current sampling line and the starting point of the next sampling line are first determined; then, a smooth transition trajectory is planned between these two points, with the spraying trigger flag remaining off during the transition. The smooth transition command is used by sending the parameters of the transition trajectory to the robotic arm controller, which automatically generates a smooth joint motion sequence. The transition speed can be set higher than the spraying speed to improve production efficiency, but it must not exceed the maximum allowable speed of the robotic arm.
[0086] It should be noted that inverse kinematics is the process of determining the angles of each joint of the robotic arm based on the desired position and posture of the spray gun end effector. This involves multiple constraints such as solution selection, joint limitations, and singular configurations. This embodiment converts the end effector pose and velocity into executable joint timing sequences for the robotic arm and binds the spraying trigger to the trajectory. By selecting the inverse solution with the minimum joint vector difference, the continuity and smoothness of joint motion are ensured. Strict timestamp generation rules ensure the stability of the robotic arm's motion speed. Binding the spraying trigger flag to the trajectory avoids accidental spraying in non-spraying areas, improving spraying accuracy and efficiency.
[0087] In one embodiment of the present invention, the pose control command output module is configured to perform the following steps: Step S701, periodically resample the joint pose sequence, control timestamp and spraying trigger flag according to the control cycle to obtain an equal-period command sequence; The isochronous instruction sequence is a control instruction sequence obtained by resampling according to the fixed execution cycle of the robotic arm controller, representing the set of instructions that the robotic arm controller needs to execute in each cycle.
[0088] The control cycle is the fixed execution cycle of the robotic arm controller, which is the time base for generating periodic instructions. The preferred value is 0.004 seconds, and the value range is from 0.002 seconds to 0.016 seconds, which is determined according to the hardware performance of the robotic arm controller and the spraying accuracy requirements.
[0089] Step S702: Remove duplicate timestamps and perform monotonic timing checks and single-cycle incremental checks on adjacent joint commands; The single-cycle increment is the maximum allowable change in joint displacement, end effector displacement, and attitude angle within a single cycle of the robotic arm controller. It is determined based on the maximum speed and maximum acceleration of each joint of the robotic arm, and the single-cycle increment limit is different for different joints.
[0090] Step S703: Write the spraying trigger flag into the same time base as the joint pose sequence, wherein the same control timestamp corresponds to a set of joint poses and a spraying trigger flag. Step S704: Encapsulate the periodic instruction sequence according to the controller data format and output the pose control instruction. The spraying trigger flag is only activated within the trajectory segment corresponding to the area to be sprayed.
[0091] Furthermore, periodic resampling is the process of converting discrete commands with non-uniform time intervals into commands with uniform time intervals: First, the resampling time sequence is determined, starting from the initial moment, taking one time point every control cycle until the total duration of the entire trajectory is covered; then, for each resampling time point, its two adjacent time points are found in the original control timestamp sequence; next, based on the positional ratio of the resampling time point between the two adjacent time points, the joint angle is linearly interpolated to obtain the joint angle value at the resampling moment. For the spraying trigger flag, a hold method is adopted, that is, the trigger flag state of the segment within which the resampling moment falls is used.
[0092] Furthermore, the monotonic timing check verifies whether the resampled timestamps are strictly increasing and whether the interval is exactly equal to the control period. The check criterion is that the difference between two adjacent timestamps deviates from the control period by no more than one millionth of a second. If timestamp duplication or reversal is found, the duplicate points are removed and the time series is corrected. The single-cycle increment check verifies whether the angle change of each joint between two adjacent commands is within the allowable range. The check criterion is that the angle change of each joint does not exceed the single-cycle increment limit of that joint. The single-cycle increment limit is obtained by multiplying the maximum speed of the joint by the control period. If the angle change of a joint exceeds the limit, the velocity of that segment of the trajectory needs to be replanned to reduce the motion speed to meet the increment constraint.
[0093] Furthermore, the specific operation of writing the spraying trigger flag to the same time base as the joint pose sequence is as follows: First, confirm whether the time series of the spraying trigger flag is consistent with the time series of the joint pose; if both are generated based on the same original control points, then the time base is consistent; if there is a difference, then the state of the spraying trigger flag needs to be converted to the time axis of the joint pose. In specific operation, traverse each resampling time point and determine whether the trajectory segment corresponding to that time belongs to the area to be sprayed; if it belongs to the area to be sprayed, the spraying trigger flag is set to on; otherwise, it is set to off. The judgment basis is the number and segment attribute of the original sampling line. The trigger flag of the sampling line segment corresponding to the area to be sprayed is on, and the trigger flags of the transition segment and the empty travel segment are off.
[0094] Furthermore, the robotic arm controller can adopt different data formats, such as text instruction format, which uses a text file with one instruction per line, and the instructions include fields such as position, speed, and IO status; or binary format, which uses data packets of fixed byte length, with each field defined by byte offset and bit width, resulting in higher transmission efficiency; encapsulation requirements typically include a file header containing metadata such as version number, total number of instructions, and control cycle; the field order and byte length of each instruction must strictly conform to the controller specification; the joint angle unit must be consistent with the controller setting; and the IO control fields must be correctly mapped to the corresponding output ports of the spray valve.
[0095] It should be noted that periodic resampling is the process of converting non-uniform time interval joint commands into fixed time interval commands required by the controller, which requires simultaneous consideration of position continuity, speed constraints, and I / O synchronization. This embodiment converts discrete joint timing sequences into a sequence of periodic commands that the robotic arm controller can directly execute, and performs necessary validity checks. By converting non-uniform joint timing sequences into periodic commands that the controller can recognize, and by employing a rigorous verification mechanism, the timing correctness and execution security of the control commands are ensured. Standardized format encapsulation allows the commands to be directly recognized and executed by different models of painting robotic arm controllers, improving the system's versatility and reliability.
[0096] like Figure 2 As shown, this system can be deployed in the painting production line of an automotive wheel manufacturing company, serving as the upper-level control software or offline programming system for a painting robot arm. In actual deployment, the 3D scanning equipment is first installed in a suitable location within the painting booth. It can be fixedly installed on the top or side wall of the painting booth, or installed at the end of the painting robot arm. A line laser scanner or structured light scanner is preferred to meet the measurement accuracy requirements of the wheel hub surface. Then, through a hand-eye calibration process, the transformation relationship between the scanning equipment coordinate system and the robot arm's base coordinate system is established. The calibration process uses a standard calibration ball or calibration plate as a reference to ensure that the calibration accuracy meets the requirements of the painting process.
[0097] Specifically, such as Figure 3 As shown, a 3D scanning device is installed at the end of a painting robotic arm. The robotic arm drives the scanning device to face a standard calibration plate and calibration ball for measurement. The calibration plate and calibration ball are positioned within the robotic arm's reachable workspace, close to the area where the wheel hub rotating fixture is located, ensuring that the calibration space corresponds to the actual painting work space. The system collects measurement data of the calibration object from multiple different poses using the robotic arm, and combines this with the pose of the robotic arm's end effector to establish a transformation relationship between the scanning device's coordinate system and the robotic arm's base coordinate system. After calibration, the wheel hub point cloud obtained by scanning can be transformed into the robotic arm's base coordinate system, providing a unified coordinate basis for subsequent identification of the area to be painted, normal calculation, offset control point generation, and robotic arm pose solving.
[0098] When the system is running, the wheel hub to be painted is first installed on the fixing device, which is usually a rotating clamp that can clamp the center hole of the wheel hub and ensure that the wheel hub axis coincides with the rotation reference. Then, a 3D scan is started to acquire the point cloud data of the surface of the wheel hub to be painted. After the scan is completed, the system automatically executes all the module operations of the system and finally generates a pose control command that can be directly executed.
[0099] The final output is a pose control instruction file that the robotic arm controller can directly recognize. This file contains a sequence of joint angle instructions with equal cycles, control timestamps, and spraying trigger flags. Taking a common six-axis spraying robotic arm as an example, the control cycle is 4 milliseconds, and a single instruction contains the angle values of the six joints, the speed multiplier, and the spraying valve control signal. For a five-spoke passenger car wheel hub with a diameter of 450 mm, a complete spraying instruction typically contains thousands to tens of thousands of cycle instructions, with a total spraying time of approximately tens of seconds to several minutes. The instruction file can be transmitted to the robotic arm controller via Ethernet or a universal serial interface. The controller executes each instruction sequentially according to a fixed cycle, driving the robotic arm to complete the spraying operation on the wheel hub surface.
[0100] Specifically, such as Figure 4 As shown, the wheel hub is fixed to a rotating fixture through a central hole. The rotating fixture drives the wheel hub to rotate around its axis, allowing the surface of the wheel hub to be sprayed to continuously enter the spray gun's working area. The spray gun is mounted at the end of the spraying robotic arm and maintains a preset target distance from the wheel hub surface. The fan-shaped spray pattern from the spray gun covers a portion of the wheel hub surface. Adjacent spray trajectories maintain a certain overlap to improve film thickness uniformity. The system determines the spatial position and orientation of the spray gun based on the wheel hub surface sampling points, surface normal vectors, and pose interpolation results, ensuring that the spray direction matches the orientation of the wheel hub surface. When the wheel hub surface has spokes, grooves, or uneven transition areas, the robotic arm adjusts the spray gun's position, orientation, and speed according to the generated pose control commands, thereby completing continuous and stable wheel hub surface spraying.
[0101] The system also supports parameter configuration, allowing operators to adjust process parameters such as target distance, spray width half angle, spray width overlap rate, and base speed according to different wheel hub models and coating characteristics to obtain the best spraying effect. In addition, the system can save configuration parameters and trajectory templates for different wheel hub models, which can be directly called when changing products, shortening the changeover preparation time.
[0102] The content of this embodiment has been described above, but this embodiment is not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of this embodiment, all of which are within the protection scope of this embodiment.
Claims
1. A posture control system for a wheel hub painting robotic arm based on a spatial interpolation algorithm, characterized in that, include: The point cloud registration module performs 3D scanning and coordinate registration on the surface of the wheel hub to be sprayed, and obtains the registration point cloud data, rotation reference and the area to be sprayed. The connectivity tracing module performs connectivity tracing and layered sampling on the registered point cloud data, the rotation reference, and the area to be sprayed, generating surface sampling points and surface normal vectors; the specific steps are as follows: Using a rotational reference, polar layering and radial connectivity tracing are performed on the area to be sprayed to obtain sampling lines; The intersection lines of the sampling lines and the registered point cloud data are sorted by arc length, and surface sampling points are generated according to the constraint that the distance between adjacent surface sampling points is greater than or equal to the minimum chord length threshold. A normal neighborhood is established for the sampling points on the surface within the same local surface patch. The initial normal is calculated using the least squares tangent plane. Then, the normal sign is unified according to the spray gun side direction to obtain the surface normal vector. When the sampling line passes through the orifice or edge, it maintains an independent sequence on both sides of the orifice or edge, and does not cross the cavity, bolt hole boundary, spoke edge or groove wall break edge for normal fitting. The pose interpolation index generation module calculates the offset reference point based on the surface sampling points and surface normal vectors. It then combines the offset reference point and surface normal vectors to sequentially derive the chord drop deviation value, rotation density value, and path curvature value. Finally, it merges these values into the pose interpolation index. The specific steps are as follows: Index the three consecutive surface sampling points and surface normal vectors of the same sampling line, and set the pose interpolation indexes of the first and last endpoints as the pose interpolation indexes of the adjacent interior points respectively. The offset reference point is calculated based on the surface sampling point, target distance, and surface normal vector. Then, the chord drop deviation value is calculated based on the offset reference point, the midpoint of adjacent offset reference points, and surface normal vector. The angle between the normal vectors of adjacent surfaces is scaled according to the chord length of the sampling points of adjacent surfaces and the minimum chord length threshold to obtain the rotation density value; The path curvature value is calculated based on the cross product norm of three consecutive surface sampling points, the length of adjacent point segments, and the minimum chord length threshold. The pose interpolation index is obtained by merging the square root of the product of the chord drop deviation value, the rotation density value, and the product of the target distance and the path curvature value. The target distance and the minimum chord length threshold are both greater than the preset zero value. The spatial interpolation module uses surface sampling points, surface normal vectors and pose interpolation exponents to perform spatial interpolation refinement and end-effector velocity planning, and outputs offset control points, control point normals and target velocity values; The spray gun attitude sequence extraction module constructs the spray direction and tangential reference using the offset control point and the control point normal, and performs a smooth transformation by combining the spray direction and tangential reference to extract the spray gun attitude sequence. The joint angle inverse solution module performs joint angle inverse solution and timing binding on the offset control point, target velocity value and spray gun posture sequence to obtain joint pose sequence, control timestamp and spraying trigger flag. The pose control command output module performs periodic resampling and format encapsulation on the joint pose sequence, control timestamp, and spraying trigger flag, and finally outputs pose control commands to drive the robotic arm to perform spraying.
2. The posture control system for the wheel hub painting robotic arm based on spatial interpolation algorithm according to claim 1, characterized in that, Scan the surface to be sprayed while the wheel hub is fixed, and delete fixture points, turntable points, background plane points and outliers; The coordinate system of the hub workpiece is determined by the center hole of the hub, the circumferential boundary of the rim and the axis of the fixing device, and then mapped to the base coordinate system of the robot arm through the calibration rigid body transformation; Using the direction of the fixed device axis in the robot arm's base coordinate system as the rotation reference, the area to be sprayed is separated based on the point cloud connectivity, surface orientation, and the reachability angle of the spray gun. The registration residual is less than the preset pose resolution value.
3. The posture control system for the wheel hub painting robotic arm based on spatial interpolation algorithm according to claim 1, characterized in that, The basic interpolation interval is determined based on the target distance, spray amplitude half angle, and spray amplitude overlap rate. The spray amplitude half angle is greater than a preset zero value and less than a preset half angle limit, and the spray amplitude overlap rate is greater than a preset zero value and less than a preset overlap rate limit. The number of interpolation sub-segments is determined based on the point segment length of adjacent surface sampling points, the basic interpolation spacing, and the pose interpolation index of adjacent endpoints.
4. The wheel hub painting robotic arm posture control system based on spatial interpolation algorithm according to claim 3, characterized in that, Spatial interpolation is densified according to the number of interpolation segments. The position of the intermediate surface is obtained by interpolation of arc length, and the control point normal is obtained by linear interpolation of unit sphere and normalization. The position of the intermediate surface is offset along the normal of the control point according to the target distance to obtain the offset control point; The base velocity is limited based on the pose interpolation index, and the target velocity value is obtained by linearly transitioning between adjacent endpoint velocities.
5. The posture control system for a wheel hub painting robotic arm based on spatial interpolation algorithm according to claim 1, characterized in that, The injection direction is constructed in the opposite direction of the control point normal, and the tangential reference is obtained based on the direction of the adjacent offset control point. The tangential reference is projected onto a plane perpendicular to the spray direction and normalized to obtain the lateral axis of the spray gun. The spray gun attitude matrix is then constructed from the spray direction, the lateral axis of the spray gun, and the cross product axis.
6. The posture control system for the wheel hub painting robotic arm based on spatial interpolation algorithm according to claim 5, characterized in that, Perform orthogonal normalization on the spray gun attitude matrix and convert it into a unit quaternion; For consecutive unit quaternions within the same sampling line, perform hemispherical processing and use cumulative cubic quaternion spline smoothing transformation; The spray gun attitude sequence is extracted by indexing the offset control points in sequence. When a sampling line endpoint lacks a single-sided adjacent point, the direction of the only adjacent segment is used as the tangential reference.
7. The posture control system for the wheel hub painting robotic arm based on spatial interpolation algorithm according to claim 1, characterized in that, The inverse solution of all feasible joint angles of the robotic arm is obtained based on the offset control points and the spray gun attitude sequence. Select the solution with the smallest difference from the joint vector of the previous control point from the feasible inverse joint angle solutions to generate a joint pose sequence. A strictly incremental control timestamp is generated based on the distance between adjacent offset control points and the minimum value of the velocity values of adjacent targets. The spraying trigger flag is bound to the joint pose sequence and control timestamp. The spraying trigger flag is turned on within the corresponding trajectory segment of the area to be sprayed, and turned off when crossing the orifice, crossing the boundary, and during the empty travel segment. A non-spraying transition section with the spraying trigger flag turned off is generated between adjacent sampling lines.
8. The posture control system for the wheel hub painting robotic arm based on spatial interpolation algorithm according to claim 1, characterized in that, According to the control cycle, the joint pose sequence, control timestamps and spraying trigger flags are periodically resampled to obtain an equal-cycle command sequence; duplicate timestamps are removed, and monotonic timing checks and single-cycle incremental checks are performed on adjacent joint commands. Write the spraying trigger flag to the same time base as the joint pose sequence, where the same control timestamp corresponds to a set of joint poses and a spraying trigger flag; According to the controller data format, the periodic instruction sequence is encapsulated and the pose control instruction is output. Among them, the spraying trigger flag is only turned on within the trajectory segment corresponding to the area to be sprayed.
Citation Information
Patent Citations
Industrial mechanical arm spraying track automatic generation method applied to automobile spraying
CN119188725A
Spray gun trajectory planning method for spraying robot
WO2024145986A1
