A Laser Ranging Calibration Method, System and Application Based on a Laser Sensor
Through high-precision laser sensors and singular value decomposition technology, combined with Rodrigue's rotation formula and least squares method, the adaptability problem of traditional laser ranging calibration methods on complex surfaces is solved, and the parallelism of the robotic arm and high-precision ranging are achieved, which improves the construction quality and consistency of the wall scraping equipment.
Patent Information
- Application Number
- CN202411332074.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-09-24
AI Technical Summary
Traditional laser ranging calibration methods based on laser sensors are difficult to adapt to complex curved surfaces, and the robotic arm posture cannot be adjusted accurately in real time, resulting in uneven scraping and inconsistent quality on the wall.
The wall space coordinate data is obtained through multiple sets of high-precision long-travel laser sensors, singular value decomposition plane fitting, virtual plane normal vectors are obtained, and the rotation matrix is generated by combining Rodrigue's rotation formula to monitor the attitude and pressure of the robotic arm in real time, dynamic adjustment is performed, ranging errors are eliminated, and the distance measurement model parameters are generated by fitting using the least squares method.
Improve the wall detection accuracy, ensure that the robotic arm is parallel to the wall, reduce construction errors, achieve uniform scraping and high-precision distance measurement, and improve construction quality and consistency.
Smart Images

Figure CN119087411B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of laser sensing, and in particular, to a laser ranging calibration method, system and application based on a laser sensor. Background Art
[0002] In the fields of construction engineering and decoration, wall plastering operation is a common and important task. Traditional wall plastering that relies on manual operation is time-consuming and laborious, and is easily affected by factors such as the experience of operators and manual operation errors, resulting in inconsistent wall flatness and quality. A laser sensor is a sensor device that uses laser technology for ranging, detection and imaging. It is widely used in industrial automation, robotics, construction engineering, surveying and mapping, environmental monitoring and other fields. The core working principle of a laser sensor is to calculate the distance, angle or other geometric features of a target object or surface by emitting a laser beam and receiving its reflected signal.
[0003] In this context, a laser ranging calibration method based on a laser sensor has emerged to solve the key problems faced by automated wall plastering equipment during operation. However, traditional laser ranging calibration methods based on laser sensors often have the following problems: actual walls often have local irregularities such as concavities, convexities, inclinations or curvatures, and it is difficult for traditional equipment to accurately adapt to these complex surfaces; it is difficult for the equipment to adjust the posture of the robotic arm in real time and accurately, and it is impossible to maintain uniform contact and pressure distribution with the wall. Summary of the Invention
[0004] Based on this, it is necessary for the present invention to provide a laser ranging calibration method, system and application based on a laser sensor to solve at least one of the above technical problems.
[0005] To achieve the above object, a laser ranging calibration method based on a laser sensor, which is applied to a wall plastering device, includes the following steps:
[0006] Step S1: Obtain a spatial coordinate data set of multiple points on the wall through multiple groups of high-precision long-stroke laser sensors; perform plane fitting based on singular value decomposition on the wall according to the spatial coordinate data set, so as to obtain a virtual plane and its normal vector data;
[0007] Step S2: Obtain the robotic arm normal vector data of the current plane of the robotic arm of the wall plastering device; perform normalization processing on the robotic arm normal vector data and the virtual plane and its normal vector data, calculate the rotation axis and rotation angle between the two, and generate rotation matrix data using the Rodrigues rotation formula;
[0008] Step S3: Adjust the angle of the robotic arm so that its working surface is parallel to the wall according to the rotation matrix data, and monitor the posture and pressure of the robotic arm in real time to obtain posture-pressure feedback data; use the sub-region processing strategy to dynamically adjust the posture of the robotic arm based on the complex surface according to the posture-pressure feedback data, so as to obtain the equal-force parallel state data;
[0009] Step S4: Use the laser sensor on the adjusted robotic arm to perform multi-point scanning and ranging according to the equal-force parallel state data, so as to obtain laser ranging calibration data; perform accuracy verification processing on the laser ranging calibration data to obtain the ranging error distribution map;
[0010] Step S5: Eliminate the abnormal points from the ranging error distribution map according to the preset error threshold, and perform ranging result fitting based on the least squares method to generate ranging model parameter data, so as to realize the ranging and calibration of the wall scraping equipment.
[0011] The present invention collects the spatial coordinate data of multiple points on the wall surface through multiple groups of high-precision long-stroke laser sensors, and performs plane fitting by singular value decomposition based on these data, which can accurately capture the approximate plane structure of the wall surface. This fitting method helps to eliminate the irregularities caused by local roughness or measurement noise on the wall surface, making the fitted virtual plane smoother and more realistic, and providing an accurate geometric reference for the subsequent adjustment of the robotic arm. Such processing significantly improves the accuracy of wall surface detection and avoids the deviation caused by inaccurate planes in subsequent operations. By obtaining the normal vector of the virtual plane of the wall surface and the current normal vector of the robotic arm, and normalizing the two, it is ensured that consistency can still be maintained at different scales. Subsequently, the rotation axis and rotation angle between the two are calculated, and the rotation matrix data for attitude adjustment is generated. This process ensures that the working surface of the robotic arm is parallel to the wall surface through precise mathematical calculations, thereby avoiding uneven scraping or scratching of the wall surface caused by angle mismatch, and significantly improving the operation accuracy of the device. By real-time monitoring the attitude and pressure data of the robotic arm, the contact situation between the robotic arm and the wall surface can be dynamically tracked. Combining with the regional processing strategy for complex curved surfaces, the robotic arm is finely adjusted according to the real-time feedback data to ensure that the robotic arm always maintains a uniform force application and a posture parallel to the wall surface during operation. This dynamic adjustment mechanism can not only adapt to complex situations such as uneven wall surfaces and curvature changes, but also avoid problems such as excessive or too small local force, and ultimately ensure the quality and consistency of the scraping operation. After the attitude of the robotic arm is adjusted, the laser sensor performs multi-point scanning and ranging according to the equal force parallel state data, so as to obtain accurate ranging calibration data. Through these calibration data, a ranging error distribution map can be generated to visually display the ranging errors at different positions. This analysis can not only verify the accuracy of laser ranging, but also provide a reliable basis for subsequent error correction, ensuring that the device can perform accurate measurement and scraping under various wall surface conditions. According to the ranging error distribution map, the abnormal points exceeding the preset error threshold are removed to ensure the accuracy of the ranging data. Subsequently, the least squares method is used to fit the remaining data to generate accurate ranging model parameters. This process can minimize the ranging error to the greatest extent and improve the overall ranging accuracy and reliability by removing and fitting the abnormal data. Finally, these ranging model parameters not only provide an efficient ranging and calibration scheme for the device, but also further optimize the working performance of the device, making it adaptable to more complex wall surface environments.
[0012] The present invention also provides a laser ranging calibration system based on a laser sensor for performing the above-mentioned laser ranging calibration method based on a laser sensor. The laser ranging calibration system based on a laser sensor includes:
[0013] A spatial coordinate acquisition module, which is used to obtain a spatial coordinate data set of multiple points on the wall surface through multiple groups of high-precision long-stroke laser sensors; perform plane fitting based on singular value decomposition on the wall surface according to the spatial coordinate data set, so as to obtain the virtual plane and its normal vector data;
[0014] A robotic arm attitude correction module, which is used to obtain the robotic arm normal vector data of the current plane of the wall scraping device; perform normalization processing on the robotic arm normal vector data and the virtual plane and its normal vector data, calculate the rotation axis and rotation angle between the two, and generate rotation matrix data using the Rodrigues rotation formula;
[0015] An attitude adjustment and feedback module, which is used to adjust the angle of the robotic arm so that the working surface is parallel to the wall surface according to the rotation matrix data, and monitor the attitude and pressure of the robotic arm in real time, so as to obtain attitude pressure feedback data; use a sub-region processing strategy to perform dynamic adjustment of the robotic arm's attitude based on the complex surface according to the attitude pressure feedback data, so as to obtain uniform force parallel state data;
[0016] A laser ranging calibration module, which is used to perform multi-point scanning ranging according to the uniform force parallel state data by using the laser sensor on the adjusted robotic arm, so as to obtain laser ranging calibration data; perform accuracy verification processing on the laser ranging calibration data, so as to obtain a ranging error distribution map;
[0017] An error correction and model generation module, which is used to remove abnormal points from the ranging error distribution map according to a preset error threshold, and perform ranging result fitting based on the least squares method, so as to generate ranging model parameter data to achieve ranging and calibration of the wall scraping device.
[0018] The present invention ensures the accuracy of spatial coordinate data through a high-precision laser sensor, can capture detailed information of each point on the wall surface, and reduces the influence caused by measurement errors. By performing singular value decomposition on the spatial coordinate data for plane fitting, a virtual plane model of the wall surface can be accurately established, providing accurate normal vector data, which lays a foundation for subsequent manipulator attitude correction and ranging calibration. Through data processing of the manipulator normal vector and the virtual plane normal vector, it is ensured that the working surface of the manipulator is parallel to the wall surface. The generated rotation matrix data enables the manipulator to perform precise angle adjustment, improving the construction accuracy; by calculating the rotation axis and rotation angle, the attitude of the manipulator can be effectively corrected to align it with the virtual plane, reducing construction errors and improving the accuracy of the overall operation. By real-time monitoring the attitude and pressure of the manipulator, data on the working state can be obtained immediately, ensuring uniform contact pressure between the manipulator and the wall surface, and improving the stability of the construction effect; through the sub-region processing strategy and dynamic adjustment, local optimization can be performed for complex wall surfaces, enabling the working state of the manipulator to remain consistent in different regions, and improving the uniformity and quality of construction. The adjusted laser sensor can perform high-precision multi-point scanning to ensure the accuracy of ranging data. The accuracy verification and the generation of error distribution maps help to identify and correct potential ranging errors, improving the overall accuracy of the system; through accuracy verification processing, it can be ensured that the calibration of the laser ranging system meets actual requirements, making the ranging ability of the wall plastering equipment more reliable. Eliminating abnormal points that cannot be corrected can effectively improve the overall quality of ranging data and reduce errors caused by abnormal data; by fitting the ranging results using the least squares method, accurate ranging model parameters can be generated, providing precise ranging and calibration functions for the wall plastering equipment, and ensuring that the construction effect meets the expected standards. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments read in conjunction with the accompanying drawings:
[0020] Figure 1 It is a schematic flowchart of the steps of the laser ranging calibration method based on a laser sensor according to the present invention;
[0021] Figure 2 For Figure 1 a detailed flowchart of the steps of step S1 in
[0022] Figure 3 For Figure 1 a detailed flowchart of the steps of step S2 in DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] The technical method of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those skilled in the art within the scope of the present invention without creative work belong to the scope of protection of the present invention.
[0024] In addition, the accompanying drawings are only schematic diagrams of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor methods and / or microcontroller methods.
[0025] It should be understood that although terms such as "first" and "second" may be used here to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, the first unit can be called the second unit, and similarly the second unit can be called the first unit. The term "and / or" used here includes any and all combinations of one or more of the listed related items.
[0026] To achieve the above object, please refer to Figures 1 to 3 , the present invention provides a laser ranging calibration method based on a laser sensor, which is applied to a wall scraping device. The method includes the following steps:
[0027] Step S1: Obtain a spatial coordinate data set of multiple points on the wall through multiple groups of high-precision long-stroke laser sensors; perform plane fitting based on singular value decomposition on the wall according to the spatial coordinate data set to obtain a virtual plane and its normal vector data;
[0028] Step S2: Obtain the normal vector data of the current plane of the robotic arm of the wall scraping device; perform normalization processing on the normal vector data of the robotic arm and the virtual plane and its normal vector data, calculate the rotation axis and rotation angle between the two, and generate rotation matrix data using the Rodrigues rotation formula;
[0029] Step S3: Adjust the angle of the robotic arm so that the working surface is parallel to the wall according to the rotation matrix data, and real-time monitor the posture and pressure of the robotic arm to obtain posture pressure feedback data; use a sub-region processing strategy to dynamically adjust the posture of the robotic arm based on complex surfaces according to the posture pressure feedback data to obtain evenly distributed and parallel state data;
[0030] Step S4: Use the laser sensor on the adjusted robotic arm to perform multi-point scanning and ranging according to the equal-force parallel state data, so as to obtain laser ranging calibration data; perform accuracy verification processing on the laser ranging calibration data to obtain a ranging error distribution map.
[0031] Step S5: Remove outliers from the ranging error distribution map according to a preset error threshold, and perform ranging result fitting based on the least squares method to generate ranging model parameter data, so as to realize ranging and calibration of the wall plastering device.
[0032] In the embodiment of the present invention, with reference to Figure 1 As described above, it is a schematic diagram of the step flow of a laser ranging calibration method based on a laser sensor according to the present invention. In this example, the laser ranging calibration method based on a laser sensor includes the following steps:
[0033] Step S1: Obtain a spatial coordinate data set of multiple points on the wall through multiple groups of high-precision long-stroke laser sensors; perform plane fitting on the wall based on the spatial coordinate data set by singular value decomposition to obtain a virtual plane and its normal vector data.
[0034] In the embodiment of the present invention, the wall is scanned by multiple groups of high-precision long-stroke laser sensors to obtain a spatial coordinate data set of multiple points on the wall. Each laser sensor can provide the three-dimensional coordinates of the points, forming a comprehensive spatial data set. Next, use data analysis tools (such as MATLAB or the NumPy library in Python) to perform singular value decomposition (SVD) on the spatial coordinate data to determine the best-fitting plane of the wall. Singular value decomposition decomposes the spatial coordinate data into a set of eigenvalues and eigenvectors, and determines the normal vector of the plane through these eigenvectors. Finally, based on these normal vector data, a virtual plane model is generated to provide the necessary plane reference data for the subsequent steps.
[0035] Step S2: Obtain the robotic arm normal vector data of the current plane of the robotic arm of the wall plastering device; perform normalization processing on the robotic arm normal vector data and the virtual plane and its normal vector data, calculate the rotation axis and rotation angle between the two, and generate rotation matrix data using the Rodrigues rotation formula.
[0036] In the embodiment of the present invention, on the robotic arm of the wall plastering device, an in-built sensor or an Inertial Measurement Unit (IMU) is used to obtain the normal vector data of the robotic arm on the current plane. Then, data processing software (such as MATLAB) is used to normalize the normal vector data of the robotic arm and the normal vector data of the virtual plane. The normalization process includes normalizing the length of the normal vector to 1 for comparison. Next, the rotation axis and rotation angle between the two are calculated. Through the dot product and cross product operations of the normal vectors, the rotation matrix data is generated using the Rodrigues rotation formula, which is widely used in calculating the rotation angle and axis. The generation of the rotation matrix can be achieved using relevant functions in the SciPy library of Python to ensure the precise adjustment of the robotic arm's posture.
[0037] Step S3: According to the rotation matrix data, adjust the angle of the robotic arm so that its working surface is parallel to the wall, and monitor the posture and pressure of the robotic arm in real time to obtain the posture-pressure feedback data; use the sub-region processing strategy to dynamically adjust the posture of the robotic arm based on the posture-pressure feedback data for complex surfaces, so as to obtain the equal-force parallel state data;
[0038] In the embodiment of the present invention, the generated rotation matrix data is used to adjust the angle of the robotic arm through the motion control system of the robotic arm, so that its working surface is parallel to the wall. The posture and pressure data of the robotic arm are monitored in real time, and real-time feedback data is collected using posture sensors and force sensors. The data is processed through the control system to calculate the posture-pressure feedback data of the robotic arm. According to these data, the sub-region processing strategy is applied, dividing the wall into multiple grid sub-regions, and performing local analysis on each region. Algorithms (such as locally weighted regression or smoothing) are used to dynamically adjust the posture of the robotic arm to ensure an equal-force parallel state on complex surfaces.
[0039] Step S4: Use the laser sensor on the adjusted robotic arm to perform multi-point scanning and ranging according to the equal-force parallel state data to obtain the laser ranging calibration data; perform accuracy verification processing on the laser ranging calibration data to obtain the ranging error distribution map;
[0040] In the embodiment of the present invention, after the robotic arm is adjusted to the equal-force parallel state, the laser sensor on it is used to perform multi-point scanning and ranging of the wall. Each ranging is based on the adjusted equal-force parallel state data to ensure the accuracy of the data. The ranging data is recorded and transmitted to the data processing system for accuracy verification. The accuracy verification includes statistical analysis and error analysis to generate the ranging error distribution map. These data are processed through analysis tools (such as the statistical toolbox of MATLAB) to obtain a detailed error distribution map, providing basic data for subsequent error correction.
[0041] Step S5: Remove the outlier points from the ranging error distribution map according to the preset error threshold, and perform fitting of the ranging results based on the least squares method, so as to generate ranging model parameter data to achieve ranging and calibration of the wall plastering device.
[0042] In the embodiment of the present invention, according to the ranging error distribution map obtained in step S4, the outlier points are first removed. In this process, the preset error threshold is used to identify and exclude the outlier data points exceeding the threshold, and algorithms (such as RANSAC) are used to process the error data. Then, the least squares method is used to fit the ranging data after removing the outlier points to generate the final ranging model parameter data. The least squares method can be implemented through data analysis tools (such as the Scikit-learn library in Python), and its purpose is to optimize the parameters of the model to minimize the fitting error. Finally, the generated ranging model parameter data will be used to achieve accurate ranging and calibration of the wall plastering device, improving the accuracy of construction.
[0043] The present invention collects the spatial coordinate data of multiple points on the wall surface through multiple groups of high-precision long-stroke laser sensors, and performs plane fitting by singular value decomposition based on these data, which can accurately capture the approximate plane structure of the wall surface. This fitting method helps to eliminate the irregularities caused by local roughness or measurement noise on the wall surface, making the fitted virtual plane smoother and more realistic, and providing an accurate geometric reference for the subsequent adjustment of the robotic arm. Such processing significantly improves the accuracy of wall surface detection and avoids the deviation caused by inaccurate plane in subsequent operations. By obtaining the normal vector of the virtual plane of the wall surface and the current normal vector of the robotic arm, both are normalized to ensure consistency can still be maintained at different scales. Subsequently, the rotation axis and rotation angle between the two are calculated, and the rotation matrix data for attitude adjustment is generated. This process ensures that the working surface of the robotic arm is parallel to the wall surface through precise mathematical calculations, thus avoiding uneven scraping or scratching of the wall surface caused by angle mismatch, and significantly improving the operation accuracy of the device. Real-time monitoring of the attitude and pressure data of the robotic arm can dynamically track the contact situation between the robotic arm and the wall surface. Combining with the sub-region processing strategy for complex curved surfaces, the robotic arm is finely adjusted according to the real-time feedback data to ensure that the robotic arm always maintains uniform force application and a posture parallel to the wall surface during operation. This dynamic adjustment mechanism can not only adapt to complex situations such as uneven wall surfaces and curvature changes, but also avoid problems such as excessive or insufficient local force, and ultimately ensure the quality and consistency of the scraping operation. After the attitude of the robotic arm is adjusted, the laser sensor performs multi-point scanning and ranging according to the equal force parallel state data, so as to obtain accurate ranging calibration data. Through these calibration data, a ranging error distribution map can be generated to visually display the ranging errors at different positions. This analysis can not only verify the accuracy of laser ranging, but also provide a reliable basis for subsequent error correction to ensure that the device can perform accurate measurement and scraping under various wall surface conditions. According to the ranging error distribution map, the abnormal points exceeding the preset error threshold are removed to ensure the accuracy of the ranging data. Subsequently, the least squares method is used to fit the remaining data to generate accurate ranging model parameters. This process can minimize the ranging error and improve the overall ranging accuracy and reliability by removing and fitting abnormal data. Finally, these ranging model parameters not only provide an efficient ranging and calibration scheme for the device, but also further optimize the working performance of the device to make it adapt to more complex wall surface environments.
[0044] Preferably, step S1 includes the following steps:
[0045] Step S11: Perform sensor self-calibration processing on multiple pre-deployed high-precision long-stroke laser sensors based on laser power and reception sensitivity, so as to obtain sensor parameter calibration data;
[0046] Step S12: Use multiple groups of high-precision long-stroke laser sensors to perform grid-based multi-point scanning on the wall according to the sensor parameter calibration data, so as to obtain an original spatial coordinate data set;
[0047] Step S13: Use the moving average filtering algorithm to smooth the original spatial coordinate data set, so as to obtain a smoothed spatial coordinate data set;
[0048] Step S14: Establish a global coordinate system based on the original spatial coordinate data set, and transform the smoothed spatial coordinate data set into the global coordinate system to obtain a spatial coordinate data set in a unified coordinate system;
[0049] Step S15: Perform plane fitting on the wall based on the spatial coordinate data set using singular value decomposition, so as to obtain the virtual plane and its normal vector data.
[0050] As an embodiment of the present invention, refer to Figure 2 shown, for Figure 1 the detailed step flow diagram of Step S1 in
[0051] Step S11: Perform sensor self-calibration processing on multiple groups of pre-deployed high-precision long-stroke laser sensors based on laser power and receiving sensitivity, so as to obtain sensor parameter calibration data;
[0052] In the embodiment of the present invention, self-calibration processing is performed on multiple groups of pre-deployed high-precision long-stroke laser sensors to ensure their performance and data accuracy. During the self-calibration process, laser power and receiving sensitivity are used as the calibration basis, and calibration is performed through a standardized test target and known distances. The laser sensor measures the laser power and received signal at different distances, and uses a dedicated calibration software (such as the calibration toolbox in LabVIEW or MATLAB) to calculate the sensor parameter calibration data. These data include laser power attenuation and receiving sensitivity adjustment coefficients, ensuring that the sensor can accurately measure the spatial coordinates of the wall in actual applications.
[0053] Step S12: Use multiple groups of high-precision long-stroke laser sensors to perform grid-based multi-point scanning on the wall according to the sensor parameter calibration data, so as to obtain an original spatial coordinate data set;
[0054] After the sensor self-calibration is completed in the embodiments of the present invention, the calibrated laser sensor is used to perform grid-based multi-point scanning on the wall. The specific operations include setting the grid parameters for the laser sensor to scan, such as the grid density and the scanning area, and collecting spatial points of the system through the laser scanner. During data collection, the laser sensor divides the wall into multiple grid areas and performs multi-point measurements within each grid area to obtain the original spatial coordinate data set. The collected data is recorded and stored using data processing tools (such as the Data Acquisition Toolbox of MATLAB or the PySerial library of Python) to generate a preliminary original spatial coordinate data set.
[0055] Step S13: Use the moving average filtering algorithm to smooth the original spatial coordinate data set, thereby obtaining a smoothed spatial coordinate data set;
[0056] The embodiments of the present invention smooth the original spatial coordinate data set to reduce noise and improve data quality. The moving average filtering algorithm is used, which smooths the data by calculating the sliding average value of the data points. During specific implementation, an appropriate window size is selected to slide and calculate the average value of each data point. The filtering process can be implemented through the filter function in MATLAB (such as filter or smoothdata) or the uniform_filter1d function in the SciPy library of Python. After the moving average filtering process, the obtained smoothed spatial coordinate data set will more accurately reflect the actual spatial characteristics of the wall.
[0057] Step S14: Establish a global coordinate system based on the original spatial coordinate data set and transform the smoothed spatial coordinate data set into the global coordinate system to obtain a spatial coordinate data set in a unified coordinate system;
[0058] The embodiments of the present invention establish a global coordinate system and transform the smoothed spatial coordinate data set into this coordinate system. First, the origin and axes of the global coordinate system are defined, and then the smoothed spatial coordinate data set is transformed into the global coordinate system using translation and rotation transformations. A transformation matrix can be used for coordinate transformation. In specific operations, a mathematical software (such as MATLAB or the NumPy library of Python) is used to calculate the coordinate transformation matrix and apply it to the smoothed data set. The transformed data set will be presented in the form of a spatial coordinate data set in a unified coordinate system, providing a standardized data basis for subsequent data processing and analysis.
[0059] Step S15: Perform plane fitting on the wall based on the spatial coordinate data set using singular value decomposition to obtain the virtual plane and its normal vector data.
[0060] The embodiments of the present invention perform wall plane fitting based on a spatial coordinate data set in a global coordinate system. The singular value decomposition (SVD) algorithm is used to perform plane fitting on the spatial coordinate data. First, a matrix containing spatial coordinate points is constructed, and the singular value decomposition algorithm (such as the svd function in MATLAB or the numpy.linalg.svd function in Python) is applied to decompose the matrix. Through SVD, the principal components are extracted, and the best-fitting plane of the wall and its normal vector are calculated. The fitted virtual plane model and its normal vector data will be used in subsequent robotic arm calibration and ranging calibration steps to ensure the accuracy and reliability of the plane model.
[0061] Through self - calibration processing of multiple pre - deployed high - precision long - stroke laser sensors based on laser power and reception sensitivity, the present invention can ensure the consistency and accuracy of each sensor during actual operation. Since environmental factors (such as temperature and humidity) may affect the performance of the sensors, through self - calibration, these external influences can be corrected to ensure that the measurement accuracy of each sensor is in the best state. The calibrated sensor parameters provide a basis for subsequent high - precision spatial coordinate measurement, greatly reducing measurement errors and improving the reliability and consistency of the entire system. Using the calibrated sensors for grid - based multi - point scanning can obtain the original spatial coordinate data sets of multiple points on the wall. The grid - scanning method ensures that all areas on the wall are evenly covered and can capture the complex geometric shapes on the wall surface. This multi - point acquisition method provides rich measurement data, which helps to accurately construct the three - dimensional model of the wall and lays a solid foundation for subsequent data processing and fitting work. By using the moving average filtering algorithm to smooth the original spatial coordinate data sets, the noise and outliers that may exist during the measurement process can be effectively removed. The filtered data set is smoother, retaining the overall structural characteristics of the wall while reducing the jitter caused by sensor errors or local irregularities of the wall. The smoothed data set provides a more reliable input for subsequent geometric analysis and model construction, improving the accuracy of fitting and modeling. By establishing a global coordinate system based on the original spatial coordinate data sets and converting the smoothed data set into this global coordinate system, it is ensured that all spatial coordinate data are processed under a unified reference framework. The establishment of the global coordinate system not only solves the relative position problem between individual sensors but also unifies the data from different measurement areas, making the data more comparable and consistent. This transformation provides a unified spatial reference for the overall geometric analysis of the wall, making subsequent plane fitting and wall modeling more accurate. Under the unified coordinate system, using singular value decomposition (SVD) to perform plane fitting on the wall can extract the main plane of the wall and its normal vector data. The singular value decomposition algorithm is very efficient in processing high - dimensional data and can accurately fit the overall plane of the wall. Especially for complex and irregular wall structures, this algorithm can eliminate the influence of local anomalies on the overall plane. This fitting result provides the overall geometric characteristics and direction information of the wall, providing an accurate reference for equipment attitude adjustment, wall construction, and other operations.
[0062] Preferably, step S15 includes the following steps:
[0063] Step S151: Detect and screen out abnormal coordinates from the spatial coordinate data sets according to a preset outlier detection threshold to obtain a spatial coordinate data cleaning set; and construct a covariance matrix based on the spatial coordinate data cleaning set and perform singular value decomposition on the covariance matrix to obtain wall spatial feature data, where the wall spatial feature data includes eigenvalues and eigenvectors;
[0064] In the embodiment of the present invention, the spatial coordinate dataset is subjected to abnormal coordinate detection according to a preset outlier detection threshold, and statistical methods (such as Z-score or box plot analysis) are used to identify and filter out abnormal data points. This process can be implemented by the isoutlier function in MATLAB or the scipy.stats.zscore function in Python. The cleaned set of spatial coordinate data obtained after filtering will not contain abnormal data. Then, a covariance matrix is constructed using the cleaned dataset, and the covariance between each pair of coordinate points is calculated. The construction and calculation of the covariance matrix can be completed by the cov function in MATLAB or the np.cov function in the NumPy library of Python. Singular value decomposition (SVD) is performed on the covariance matrix to obtain the wall space feature data, including eigenvalues and eigenvectors. The SVD operation can be completed using the svd function in MATLAB or the numpy.linalg.svd function in Python, and these eigenvalues and eigenvectors will be used for plane fitting of the wall surface.
[0065] Step S152: Extract the eigenvector corresponding to the minimum eigenvalue according to the magnitude relationship of the eigenvalues in the wall space feature data, and use it as the normal vector of the virtual plane, thereby obtaining the initial normal vector data;
[0066] After obtaining the wall space feature data, the embodiment of the present invention extracts the eigenvector corresponding to the minimum eigenvalue according to the magnitude relationship of the eigenvalues. The sorting and selection of eigenvalues can be implemented by the sort function in MATLAB or the numpy.argsort function in Python. The eigenvector corresponding to the minimum eigenvalue will be used as the normal vector of the virtual plane. The extraction of this normal vector can be achieved through the svd result in MATLAB or the SVD output in Python. The obtained initial normal vector data will provide the necessary direction information for plane fitting and lay the foundation for the subsequent calculation of the plane equation.
[0067] Step S153: Calculate the intercept term of the virtual plane according to the initial normal vector data and the cleaned set of spatial coordinate data, thereby obtaining the plane equation parameter data;
[0068] The embodiment of the present invention calculates the intercept term of the virtual plane based on the initial normal vector data and the cleaned set of spatial coordinate data. First, substitute the initial normal vector and the points in the cleaned set of spatial coordinate data into the general form of the plane equation ax + by + cz = d to calculate the intercept term d. This process includes multiplying the components of the normal vector by the coordinate values of the data points and summing them, and the method can be implemented using the dot function in MATLAB or the numpy.dot function in Python. This will generate the complete parameter data of the plane equation, which is used to describe the position and direction of the virtual plane.
[0069] Step S154: Based on the plane equation parameter data, calculate the distance from the points in the spatial coordinate dataset to the virtual plane, so as to obtain the fitting error data;
[0070] In the embodiment of the present invention, the plane equation parameter data is used to calculate the distance from the points in the spatial coordinate dataset to the virtual plane. According to the plane equation formula, the perpendicular distance from each data point to the plane is calculated, and the formula is This calculation can be implemented through vectorized operations in MATLAB or the NumPy library in Python. The obtained fitting error data represents the deviation of each point from the virtual plane, providing basic data for subsequent error analysis.
[0071] Step S155: Calculate and analyze the root mean square error and the maximum deviation of the fitting error data, so as to obtain the fitting quality evaluation index data;
[0072] In the embodiment of the present invention, the root mean square error (RMSE) and the maximum deviation of the fitting error data are calculated and analyzed. The root mean square error is obtained by calculating the square root of the mean of the sum of the squares of all errors, and the formula is The maximum deviation is the maximum value among all errors. These calculations can be completed through the sqrt and mean functions in MATLAB or the np.sqrt and np.mean functions in the NumPy library of Python. The generated fitting quality evaluation index data will be used to evaluate the accuracy of the virtual plane fitting and determine whether further adjustment is required.
[0073] Step S156: If the fitting quality evaluation index meets the preset threshold, output the virtual plane of the wall surface and its normal vector data; if not, return to Step S151, adjust the outlier detection threshold, and re - execute Steps S151 to S156.
[0074] In the embodiment of the present invention, according to the fitting quality evaluation index data obtained in Step S155, it is checked whether it meets the preset threshold. If the fitting quality index meets the requirements, the virtual plane of the wall surface and its normal vector data are output. If the requirements are not met, return to Step S151, adjust the outlier detection threshold, and re - execute Steps S151 to S156. This process involves iterative optimization, using data analysis tools (such as the loop control structure in MATLAB or the while loop in Python) to adjust the threshold and re - process the data until the fitting quality meets the standard.
[0075] The present invention screens abnormal coordinates from a spatial coordinate data set through a preset outlier detection threshold, which can effectively eliminate the noise or error data that may appear during the measurement process, ensuring the accuracy and reliability of the data set. The screened data set (spatial coordinate data cleaning set) is further used to construct a covariance matrix, through which the overall distribution characteristics of the wall data can be captured. The singular value decomposition of the covariance matrix can effectively extract the spatial feature data of the wall, including eigenvalues and eigenvectors, reflecting the geometric and structural characteristics of the wall. This step ensures that the wall feature data used in subsequent calculations has a high-quality geometric description, improving the accuracy of subsequent fitting calculations. According to the magnitude relationship of the eigenvalues in the wall spatial feature data, the eigenvector corresponding to the minimum eigenvalue is extracted as the normal vector of the virtual plane. The eigenvector corresponding to the minimum eigenvalue represents the normal direction of the wall data on the main plane in space. This extraction process effectively identifies the directionality of the wall main plane, ensuring the calculation accuracy of the normal vector. By extracting the initial normal vector, the system can provide an accurate direction reference for the subsequent calculation of the plane equation, thus ensuring the matching degree between the virtual plane and the actual shape of the wall. Based on the initial normal vector and the spatial coordinate data cleaning set, the intercept term of the virtual plane is calculated, that is, the complete parameters of the plane equation. The calculation of the intercept term enables the virtual plane to not only have the correct normal vector direction but also match the overall position of the wall, thereby obtaining the complete plane equation parameters. The construction of the plane equation lays the foundation for calculating the distance between each point and the plane in subsequent calculations, making the wall model more accurate and able to correctly reflect the position and angle characteristics of the wall. Based on the plane equation parameters, the distance from each point in the spatial coordinate data set to the virtual plane is calculated, thereby obtaining the fitting error data. This process evaluates the deviation degree between the true shape of the wall and the fitting plane by comparing each measurement point with the fitting plane. Through this step, the accuracy and representativeness of the fitting plane can be judged, directly reflecting the matching degree of the fitting plane to the wall geometric structure. This error calculation process provides an important basis for subsequent quality assessment. By calculating and analyzing the root mean square error (RMSE) and the maximum deviation of the fitting error data, the accuracy of the fitting plane can be comprehensively evaluated. The root mean square error reflects the distribution of the overall error during the fitting process, while the maximum deviation reflects the most extreme error point. These two indicators provide a quantitative standard for the fitting quality, enabling an intuitive judgment of the accuracy and reliability of the current plane fitting. This analysis process can help the system determine whether further optimization or adjustment is needed to ensure the accuracy of the wall virtual plane model. According to the results of the fitting quality assessment, if both the root mean square error and the maximum deviation meet the preset accuracy threshold, it can be confirmed that the data of the current virtual plane and normal vector are accurate enough, and the final wall plane model is output. If the threshold is not met, the system will return to step S151, readjust the outlier detection threshold, and repeat the steps of data screening, fitting calculation, etc.This cyclic feedback mechanism ensures that the system has the ability of adaptive optimization, and can continuously improve the model accuracy during the data fitting process until it meets the set accuracy standard. Finally, it ensures that the wall surface plane fitting reaches the highest quality and adapts to various complex wall conditions.
[0076] Preferably, step S2 includes the following steps:
[0077] Step S21: Collect the spatial coordinates of the current working surface of the robotic arm through multiple groups of laser sensors and inertial measurement units on the robotic arm, and convert them into the robotic arm spatial coordinate data in the local coordinate system of the robotic arm;
[0078] Step S22: Perform a plane fitting of the working surface based on singular value decomposition according to the robotic arm spatial coordinate data, and calculate the initial normal vector of the current working plane of the robotic arm, so as to obtain the robotic arm initial normal vector data;
[0079] Step S23: Normalize the robotic arm initial normal vector data, and calculate the included angle and rotation axis with the virtual plane and its normal vector data, so as to obtain the normal vector rotation axis data;
[0080] Step S24: Make a preliminary adjustment to the robotic arm according to the normal vector rotation axis data, and re-measure the posture of the adjusted robotic arm to obtain the corrected robotic arm normal vector data;
[0081] Step S25: Perform a comparison process based on the rotation axis and rotation angle between the robotic arm normal vector data and the virtual plane and its normal vector data, and generate rotation matrix data using the Rodrigues rotation formula.
[0082] As an embodiment of the present invention, refer to Figure 3 shown, for Figure 1 the detailed step flow diagram of step S2 in
[0083] Step S21: Collect the spatial coordinates of the current working surface of the robotic arm through multiple groups of laser sensors and inertial measurement units on the robotic arm, and convert them into the robotic arm spatial coordinate data in the local coordinate system of the robotic arm;
[0084] In the embodiments of the present invention, multiple groups of laser sensors and inertial measurement units (IMUs) on the robotic arm are utilized to collect the spatial coordinates of the current working surface of the robotic arm. The laser sensors are used to obtain the spatial coordinate data of multiple points on the working surface, while the IMU provides the pose data of the robotic arm. After the data collection is completed, by converting the spatial coordinates measured by the laser sensors into the local coordinate system of the robotic arm, it is ensured that the coordinate data is consistent with the actual working position and orientation of the robotic arm. In specific operations, the laser sensors can read data through the control system, and the output data of the IMU is obtained through the serial port or CAN bus interface. These data can be converted and sorted through data processing tools (such as the numpy or pandas libraries) in the MATLAB or Python programming environment to generate the spatial coordinate data in the local coordinate system of the robotic arm.
[0085] Step S22: Perform plane fitting of the working surface based on singular value decomposition according to the robotic arm spatial coordinate data, and calculate the initial normal vector of the current working plane of the robotic arm, so as to obtain the robotic arm initial normal vector data;
[0086] In the embodiments of the present invention, according to the spatial coordinate data in the local coordinate system of the robotic arm, the singular value decomposition (SVD) method is used to perform plane fitting on the working surface. First, a matrix containing the spatial coordinate data is constructed, and then SVD is applied to this matrix to obtain eigenvalues and eigenvectors. The eigenvalues reflect the main variation directions of the data, and the eigenvector corresponding to the smallest eigenvalue represents the normal vector of the plane. This process can be completed using the svd function in MATLAB or the numpy.linalg.svd function in Python. The obtained initial normal vector data of the robotic arm working plane will be used for the next step of pose correction and adjustment.
[0087] Step S23: Normalize the robotic arm initial normal vector data, and calculate the angle and rotation axis with the virtual plane and its normal vector data, so as to obtain the normal vector rotation axis data;
[0088] In the embodiments of the present invention, the robotic arm initial normal vector data is normalized to ensure that the normal vector has a unit length. This step can be implemented using the norm function in MATLAB or the numpy.linalg.norm function in Python. Then, the normalized robotic arm normal vector data is compared with the virtual plane and its normal vector data, and the angle and rotation axis between the two are calculated. The angle calculation is completed through the dot product of vectors, and the rotation axis is determined through the cross product of vectors. The relevant calculations can use the dot and cross functions in MATLAB or the numpy.dot and numpy.cross functions in Python. These calculation results will generate the normal vector rotation axis data, providing a basis for the pose adjustment of the robotic arm.
[0089] Step S24: Preliminarily adjust the robotic arm according to the normal vector rotation axis data, re-measure the posture of the adjusted robotic arm, and obtain the corrected robotic arm normal vector data;
[0090] In the embodiment of the present invention, the robotic arm is preliminarily adjusted according to the normal vector rotation axis data to make its working surface parallel to the wall surface. Adjusting the posture of the robotic arm can be completed by the control system executing corresponding motion instructions. After adjustment, use a laser sensor and an IMU to re-measure the posture of the robotic arm and obtain the corrected robotic arm normal vector data. The data during the adjustment process can be recorded by the real-time control system and transmitted to a data processing platform (such as MATLAB or Python) to compare the normal vector data before and after adjustment, evaluate the adjustment effect, and make necessary further corrections.
[0091] Step S25: Compare and process the robotic arm normal vector data with the virtual plane and its normal vector data based on the rotation axis and the rotation angle, and generate rotation matrix data using the Rodrigues rotation formula.
[0092] In the embodiment of the present invention, the corrected robotic arm normal vector data is compared with the virtual plane and its normal vector data to generate rotation matrix data. First, a rotation matrix is constructed according to the normal vector rotation axis and the rotation angle through the Rodrigues rotation formula. The rotation angle is calculated by the included angle of the normal vectors, and the rotation axis is calculated by the cross product. Use the rodrigues function in MATLAB or the scipy.spatial.transform.Rotation module in Python to generate the rotation matrix. The rotation matrix data will be used for further posture adjustment and optimization to ensure that the working plane of the robotic arm is completely parallel to the target wall surface.
[0093] The present invention uses multiple groups of laser sensors and inertial measurement units (IMUs) on the robotic arm to collect the spatial coordinates of the current working surface of the robotic arm in real time and convert them into data in the local coordinate system of the robotic arm. This process ensures the accurate tracking of the position information of the working surface of the robotic arm. The position information provided by the inertial measurement unit can compensate for the offsets that may occur during different postures or operations of the robotic arm, ensuring the accuracy and real-time nature of the measurement data; this step provides the basis for subsequent plane fitting and posture adjustment, ensuring the operation accuracy of the robotic arm in a dynamic environment. By performing plane fitting based on singular value decomposition (SVD) on the spatial coordinate data of the working surface of the robotic arm, the principal plane of the current working surface can be accurately obtained, and the initial normal vector data of the robotic arm can be obtained through plane fitting. This process helps to quickly analyze the geometric characteristics of the working surface of the robotic arm, ensuring that the geometric relationship between the posture of the robotic arm and its current working environment is accurately described. The extraction of the initial normal vector provides the necessary geometric reference for subsequent posture adjustment, making the adjustment process more efficient. Normalize the initial normal vector data of the robotic arm to ensure the consistency of the normal vector at different scales. Subsequently, by comparing with the normal vector of the virtual plane and calculating the included angle and rotation axis between the two, the direction and angle that the robotic arm needs to be adjusted can be accurately determined. The normalization of the normal vector and the calculation process of the rotation axis ensure that the robotic arm can quickly find the correct posture parallel to the wall surface without losing accuracy, avoiding unnecessary complex calculations, thereby improving the efficiency of posture adjustment. According to the normal vector rotation axis data obtained in the previous step, perform a preliminary posture adjustment on the robotic arm and correct the normal vector data of the robotic arm through re-measurement. This process ensures that the posture of the robotic arm can quickly approach the parallel state of the virtual plane of the wall surface through real-time feedback adjustment. Through multiple measurements and adjustments, the system can gradually optimize the posture of the robotic arm, improve the accuracy of posture adjustment, ensure that the robotic arm can maintain a consistent posture with the wall surface during operation, and avoid uneven scraping or excessive errors. Compare the corrected normal vector data of the robotic arm with the normal vector data of the virtual plane in terms of the rotation axis and angle, and further generate rotation matrix data using the Rodrigues rotation formula. This step provides a directional reference for further optimizing the posture of the robotic arm through precise mathematical calculations, ensuring that the robotic arm can be completely parallel to the wall surface during operation. The generation of the rotation matrix can not only accurately adjust the posture of the robotic arm but also provide a highly accurate mathematical tool for posture control in subsequent operations, greatly improving the operation performance and stability of the robotic arm in a complex environment.
[0094] Preferably, step S25 includes the following steps:
[0095] Step S251: Calculate the dot product of the robotic arm normal vector data and the virtual plane and its normal vector data to obtain the cosine value of the included angle between the two vectors;
[0096] In the embodiment of the present invention, the dot product calculation is performed on the normal vector data of the robotic arm and the virtual plane and its normal vector data. In the specific operation, first, the two sets of normal vector data are normalized into unit vectors to eliminate the influence of the length on the calculation result. Then, the cosine value between the two unit vectors is calculated using the dot product formula. In MATLAB, the dot function can be used to calculate the dot product, and in Python, the numpy.dot function can be used. The calculation result provides the cosine value of the angle between the two normal vectors, which is further used to calculate the rotation angle.
[0097] Step S252: Calculate the angle between the two normal vectors using the cosine value of the angle between the two vectors, so as to obtain the rotation angle data;
[0098] In the embodiment of the present invention, the cosine value of the angle obtained in step S251 is used to calculate the angle between the two normal vectors; first, the cosine value of the angle is converted into an angle value through the inverse cosine function (acos). In MATLAB, the acos function can be used, while in Python, the numpy.arccos function can complete this step. The rotation angle data will provide the necessary information for the subsequent construction of the rotation matrix to ensure that the rotation matrix can correctly represent the relative rotation between the two normal vectors.
[0099] Step S253: Perform a cross product calculation on the normal vector data of the robotic arm and the virtual plane and its normal vector data to obtain the rotation axis vector;
[0100] In the embodiment of the present invention, a cross product calculation is performed on the normal vector data of the robotic arm and the virtual plane and its normal vector data to determine the rotation axis vector. The cross product calculation can be completed by the cross function in MATLAB or the numpy.cross function in Python. The cross product result provides the direction of the rotation axis, which is perpendicular to the plane where the two normal vectors are located. The rotation axis vector is a key parameter for constructing the rotation matrix to ensure that the rotation matrix can accurately represent the rotation axis and the rotation angle.
[0101] Step S254: Use the Rodrigues rotation formula to construct a rotation matrix based on the rotation angle data and the unit rotation axis vector, so as to obtain the initial rotation matrix data;
[0102] In the embodiment of the present invention, according to the rotation angle data in step S252 and the unit rotation axis vector in step S253, the Rodrigues rotation formula is used to construct the rotation matrix. The Rodrigues rotation formula (R = I + sin(θ)K + (1 - cos(θ))K 2)It can be implemented through a custom function in MATLAB or the rotation matrix can be constructed using the scipy.spatial.transform.Rotation module in Python. The rotation matrix data calculated by the formula will provide the initial rotation matrix, which serves as the basis for adjusting the posture of the robotic arm.
[0103] Step S255: Numerically optimize the initial rotation matrix data to minimize the error between the normal vector data of the robotic arm after rotation and the virtual plane and its normal vector data, thereby obtaining the rotation matrix data.
[0104] In the embodiment of the present invention, numerical optimization is used to minimize the error between the normal vector data of the robotic arm after rotation and the normal vector data of the virtual plane. An optimization algorithm such as the Levenberg-Marquardt algorithm is used for optimization through the scipy.optimize.least_squares() function. This algorithm adjusts the rotation matrix parameters to minimize the error of the normal vector after rotation. The optimization process requires defining an error function that calculates the gap between the normal vector after rotation and the target normal vector. After optimization, the adjusted rotation matrix data is obtained.
[0105] By calculating the dot product of the normal vector of the robotic arm and the normal vector of the virtual plane, the present invention can directly obtain the cosine value of the included angle between the two vectors. The dot product operation is a fast and concise way to calculate the directional relationship between two vectors, and the cosine value reflects the relative directionality between them. The calculation of this step can quickly evaluate the angular difference between the current posture of the robotic arm and the virtual plane, providing preliminary angular information and laying a foundation for subsequent posture adjustment. The acquisition of the cosine value of the included angle enables the system to more effectively judge the posture gap between the robotic arm and the wall surface, which helps to optimize the adjustment direction. Based on the cosine value, the included angle between the normal vector of the robotic arm and the normal vector of the virtual plane is further calculated. This angular data directly reflects the deviation degree between the posture of the robotic arm and the wall surface plane. Through accurate angular calculation, the system can obtain the specific rotation angle that the robotic arm needs to adjust, providing an accurate angular reference for posture adjustment; this process ensures the accuracy of the rotation angle, avoiding excessive or insufficient rotation that may occur during posture adjustment, so that the robotic arm can more accurately align with the wall surface. By calculating the cross product of the normal vector of the robotic arm and the normal vector of the virtual plane, the rotation axis vector between them can be obtained. The cross product calculation can accurately determine the axis around which the robotic arm needs to rotate for adjustment, and this rotation axis vector provides a directional basis for the system's posture adjustment. The result of the cross product not only indicates the rotation direction but also ensures that there will be no misjudgment or misalignment during the rotation process, helping the robotic arm to accurately adjust to a posture parallel to the wall surface. According to the rotation angle data and the unit rotation axis vector, the initial rotation matrix is constructed using the Rodrigues rotation formula. This formula can quickly generate a three-dimensional rotation matrix through the rotation angle and the rotation axis, ensuring that the robotic arm can adjust its posture along the correct axis and angle. The construction of the initial rotation matrix provides a mathematical basis for subsequent posture adjustment, ensuring that the adjustment process of the robotic arm is both fast and accurate. The Rodrigues rotation formula is efficient and accurate in dealing with rotation operations, enabling the robotic arm to accurately respond to the geometric characteristics of the wall surface. By numerically optimizing the initial rotation matrix with the goal of minimizing the error between the normal vector of the robotic arm after rotation and the normal vector of the virtual plane, the rotation matrix is further optimized. This optimization process ensures that the accuracy of the robotic arm's posture adjustment reaches the optimal state, making the normal vector of the robotic arm after rotation completely consistent with or minimizing the error from the normal vector of the virtual plane. The optimized rotation matrix provides high-precision parameters for the final posture adjustment, ensuring that the posture control of the robotic arm during wall construction is more stable and accurate, greatly improving the quality and reliability of the operation.
[0106] Preferably, step S3 includes the following steps:
[0107] Step S31: Calculate the target posture of the robotic arm according to the rotation matrix data, and perform posture adjustment based on the robotic arm's working surface being parallel to the wall surface through the robotic arm's motion control system, so as to obtain the initial adjustment posture data;
[0108] In an embodiment of the present invention, the target pose of the robotic arm is calculated through rotation matrix data. First, the rotation matrix data is used to adjust the pose of the robotic arm to ensure that its working surface is parallel to the wall surface. The target pose data is input through the motion control system of the robotic arm, and the system adjusts the joint angles of the robotic arm according to this data. In a specific implementation, the control software of the robotic arm (such as ROS or a dedicated robotic arm control platform) can be used to apply the rotation matrix and perform the pose adjustment operation. After the adjustment is completed, the pose sensor of the robotic arm feeds back the initial adjustment pose data, providing a basis for subsequent pose correction.
[0109] Step S32: The force sensor on the end effector of the robotic arm is used to monitor the contact pressure between the robotic arm and the wall in real time according to the initial adjustment pose data, and the current pose of the robotic arm is monitored through the pose sensor, so as to obtain the pose-pressure feedback data;
[0110] In an embodiment of the present invention, the force sensor on the end effector of the robotic arm is used to monitor the contact pressure between the robotic arm and the wall in real time. The force sensor provides real-time pressure data, and the current pose of the robotic arm is recorded through the pose sensor of the robotic arm. These data are transmitted through the feedback channel of the robotic arm control system and processed by data analysis software (such as the Pandas library in MATLAB or Python). The pose-pressure feedback data includes pressure values and pose information, which are used for subsequent local pressure analysis.
[0111] Step S33: The wall area is divided into multiple grid sub-areas by using a sub-area processing strategy, and local analysis is performed on the pose-pressure feedback data of each sub-area, so as to obtain local pressure distribution data;
[0112] In an embodiment of the present invention, a sub-area processing strategy is used to divide the wall area into multiple grid sub-areas for local analysis. The pose-pressure feedback data of each sub-area is analyzed through software tools (such as the Scikit-learn library in Python) to generate local pressure distribution data. These data help to understand the pressure situation in each area and provide a basis for pose parameter adjustment. In a specific implementation, data visualization tools (such as Matplotlib) can be used to draw the pressure distribution map of each sub-area for easy analysis and adjustment.
[0113] Step S34: Pose parameter adjustment processing is performed according to the local pressure distribution data, so as to obtain pose adjustment instruction data;
[0114] In the embodiment of the present invention, attitude parameter adjustment processing is performed according to local pressure distribution data. The attitude parameters are adjusted using an optimization algorithm (such as the gradient descent algorithm or the least squares method) to optimize the overall pressure distribution. The optimization process can be implemented using the scipy.optimize module in the SciPy library in Python. Attitude adjustment instruction data is generated according to the optimization result, and these instruction data will be used for further adjustment of the robotic arm to ensure uniform pressure distribution.
[0115] Step S35: Perform local refinement adjustment on the robotic arm based on dynamic adaptation to complex surfaces according to the attitude adjustment instruction data, so as to obtain real-time attitude pressure data;
[0116] In the embodiment of the present invention, local refinement adjustment of the robotic arm based on dynamic adaptation to complex surfaces is performed according to the attitude adjustment instruction data. The adjustment instructions are applied to the robotic arm through the control system to implement local refinement adjustment. The attitude and pressure data of the robotic arm are monitored in real time to ensure that the adjusted attitude meets the requirements. The dynamic adjustment can be realized by using the real-time control software and sensor feedback system of the robotic arm to obtain and update the attitude pressure data in real time.
[0117] Step S36: Calculate the pressure uniformity of each sub-region according to the real-time attitude pressure data, so as to obtain the uniform force parallel state data.
[0118] In the embodiment of the present invention, the pressure uniformity of each sub-region is calculated using the real-time attitude pressure data. By analyzing the pressure data of each sub-region, the pressure uniformity index is calculated. In specific implementation, statistical analysis libraries in Python (such as NumPy or Pandas) can be used to calculate the uniformity and generate the uniform force parallel state data. These data are used to verify whether the adjustment of the robotic arm has successfully achieved uniform pressure distribution, ensuring the quality and effect of wall treatment.
[0119] The present invention calculates the target posture of the robotic arm based on the rotation matrix data to ensure that the working surface of the robotic arm is parallel to the wall surface. This process performs posture adjustment through the motion control system of the robotic arm to ensure that the robotic arm initially reaches the required posture position. The acquisition of the initial adjustment posture data enables the robotic arm to quickly adapt to the geometric shape of the wall surface, improving work efficiency. The effect of this step is that through the precise control of the rotation matrix, the robotic arm can quickly achieve a parallel state with the wall surface, ensuring high-precision basic posture adjustment during the scraping process. The force sensor on the end effector of the robotic arm is used to monitor the contact pressure between the robotic arm and the wall surface in real time, and at the same time, the current posture of the robotic arm is monitored through the posture sensor, enabling the timely acquisition of posture pressure feedback data. This monitoring process ensures that during the operation, the system can immediately perceive the actual contact situation between the robotic arm and the wall surface, especially the contact pressure. By monitoring the pressure and posture, the system can make timely adjustments when the robotic arm exerts excessive pressure or deviates from the posture, thus avoiding operation errors. The effect of this step is that through the real-time feedback mechanism, the robotic arm can flexibly adjust under different environmental conditions, ensuring uniform pressure distribution and protecting the working surface. By dividing the wall surface into multiple grid sub-regions through the sub-region processing strategy and performing local analysis on the posture pressure feedback data of each sub-region, the pressure distribution of each region can be understood in detail. This local analysis helps to identify the working differences of the robotic arm in different regions, such as the situation where the pressure is too high or too low in some regions. The acquisition of the local pressure distribution data provides targeted reference for subsequent posture adjustment, ensuring more uniform pressure in each sub-region. The effect of this strategy is that it can accurately adjust the operation of the robotic arm in different regions, improve the overall uniformity, and avoid excessive force application or uneven scraping in local areas. According to the local pressure distribution data, the system can perform targeted posture parameter adjustment and generate corresponding posture adjustment instruction data. Through this process, the system can quickly respond to the local uneven pressure situation and dynamically adjust the posture of the robotic arm to ensure that the robotic arm can adapt to the complex geometric shape of the wall surface. The effect of the posture parameter adjustment process is that it can perform precise fine-tuning according to the actual working state, ensuring that the robotic arm can continuously operate in the optimal state and further improving the accuracy and precision of the operation. According to the posture adjustment instruction data, the robotic arm can achieve dynamic adaptive adjustment of complex curved surfaces and perform refined adjustment in each sub-region to ensure that the posture and pressure in each region reach the ideal state. This local refined adjustment can respond in real time to the complex geometric changes of the working surface, ensuring that the robotic arm has good adaptability to complex curved surfaces. The acquisition and processing of real-time posture pressure data enable the system to continuously optimize the operation state of the robotic arm. The effect of this step is that the robotic arm can achieve highly flexible dynamic adjustment, have high adaptability when dealing with complex wall surfaces, and avoid operation errors caused by irregular curved surfaces.By calculating the pressure uniformity of the real-time attitude pressure data of each sub-region, the system can determine whether the operation of the robotic arm in different regions is balanced, ensuring the overall operation quality. The equal-force parallel state data can reflect the pressure consistency of each region of the wall surface, enabling the system to further optimize the attitude of the robotic arm to ensure consistent and flat scraping effects. The effect of this step is that through the feedback of the equal-force parallel state data, the system can adjust the robotic arm to reach the optimal working state, ensuring uniform and smooth scraping operations on the entire wall surface and effectively improving the construction quality.
[0120] Preferably, step S4 includes the following steps:
[0121] Step S41: Calibrate the initial scanning position of the laser sensor on the adjusted robotic arm based on the equal-force parallel state data, and use the laser sensor to perform grid-based multi-point scanning and ranging based on the calibrated reference plane to obtain the original laser ranging data;
[0122] In the embodiment of the present invention, the initial scanning position of the laser sensor on the adjusted robotic arm is calibrated based on the equal-force parallel state data; First, set the laser sensor to the calibration mode, and then adjust the position of the sensor according to the equal-force parallel state data to ensure accurate scanning of the wall surface. Then, use the laser sensor to perform grid-based multi-point scanning and ranging to generate the original laser ranging data. Precise scanning and data acquisition can be achieved using the control software of the laser sensor (such as the SDK or API provided by the manufacturer). The grid-based scanning method ensures comprehensive coverage of the wall surface, thus obtaining comprehensive ranging data.
[0123] Step S42: Perform preliminary filtering and outlier removal processing on the original laser ranging data to obtain preprocessed ranging data;
[0124] In the embodiment of the present invention, preliminary filtering and outlier removal processing are performed on the original laser ranging data. First, apply a moving average filter or a median filter to smooth the data and remove noise. Subsequently, use statistical methods (such as the Z-score method) to detect and remove outliers. Data processing can be performed using the Scikit-learn library in Python, and the sklearn.preprocessing module is used for filtering and outlier processing. The processed data is the preprocessed ranging data for subsequent calibration processing.
[0125] Step S43: Fuse the preprocessed ranging data with the real-time attitude pressure data and transform it into the global coordinate system to obtain the spatial coordinate data for calibration;
[0126] In the embodiments of the present invention, the preprocessed ranging data and real-time attitude and pressure data are fused and then transformed into the global coordinate system. First, the preprocessed ranging data and real-time attitude and pressure data are synchronized, and the data of both are combined through a data fusion algorithm (such as a Kalman filter). Then, the fused data is transformed into the global coordinate system, usually completed through a coordinate transformation matrix. Data fusion and transformation can be implemented using MATLAB or the NumPy library in Python, and finally, spatial coordinate data for calibration is obtained, providing a basis for calibration data.
[0127] Step S44: Obtain the known calibration point data on the wall; calculate the initial ranging error for the calibration spatial coordinate data and the known calibration point data, thereby obtaining the initial ranging error data.
[0128] In the embodiments of the present invention, the known calibration point data on the wall is obtained, and the initial ranging error of the calibration spatial coordinate data is calculated. The calibration point data can be obtained from the pre-calibrated positions on the wall to ensure its accuracy. Then, the error between the calibration spatial coordinate data and the known calibration point data is calculated, usually using the Euclidean distance. The error calculation can be processed through the scipy.spatial.distance module in the SciPy library of Python, thereby obtaining the initial ranging error data, providing a basis for the next sensor compensation.
[0129] Step S45: Adjust the internal parameters of the laser sensor according to the initial ranging error data, thereby generating sensor compensation parameters.
[0130] In the embodiments of the present invention, the internal parameters of the laser sensor are adjusted according to the initial ranging error data. Using the least squares method or other optimization algorithms (such as non-linear least squares method), the compensation parameters of the sensor are calculated according to the initial ranging error data. Specifically, the scipy.optimize module in the SciPy library of Python can be used to perform parameter optimization. The generated sensor compensation parameters will be used to adjust the ranging accuracy of the sensor, thereby improving the accuracy of the ranging results.
[0131] Step S46: Correct the calibration spatial coordinate data according to the sensor compensation parameters, thereby obtaining the laser ranging calibration data.
[0132] In the embodiments of the present invention, the calibration spatial coordinate data is corrected according to the generated sensor compensation parameters. The ranging data is corrected using the compensation parameters, and the spatial coordinate data is adjusted through a correction formula (such as a linear or non-linear correction model). The correction process can be performed using the NumPy library in Python for matrix operations and data adjustment. The finally obtained laser ranging calibration data is used to improve the ranging accuracy and ensure the accuracy of the laser ranging results.
[0133] Step S47: Perform accuracy verification processing on the laser ranging calibration data to obtain a ranging error distribution map.
[0134] In the embodiment of the present invention, accuracy verification processing is performed on the laser ranging calibration data to obtain a ranging error distribution map; first, by comparing the calibration data with the ranging results of known calibration points, the ranging error is calculated. Then, an error distribution map is generated using the error data, and the error distribution map is plotted through a data visualization tool (such as the Matplotlib library in Python). The accuracy verification processing helps to identify the ranging error distribution after calibration, thereby ensuring the accuracy and reliability of the laser ranging system.
[0135] Based on the data in the equal-force parallel state, the present invention calibrates the initial scanning position of the laser sensor on the robotic arm. After ensuring its parallelism with the wall, grid-based multi-point scanning and ranging are performed. This step helps improve the accuracy of the laser sensor, ensures the consistency of the reference plane during each scan, and thus obtains high-precision original ranging data. Grid-based scanning not only increases the coverage area but also ensures the consistency of measurement results in different regions. The effect of this step is to minimize the errors in laser ranging through precise scanning calibration, ensuring the reliability of subsequent data processing. Filter the original laser ranging data to remove noise and interference, and at the same time use an outlier rejection algorithm to eliminate the discrete data that may appear during the measurement process. This processing ensures the effectiveness and consistency of the subsequent data. The process of filtering and rejecting outliers reduces systematic errors, ensuring that the data set is more accurate; its effect is to improve the quality of the ranging data by effectively removing bad data, laying a good foundation for subsequent ranging calibration and analysis. Fuse the preprocessed ranging data with real-time attitude and pressure data, and transform it into the global coordinate system to generate spatial coordinate data for calibration. The fusion of attitude and pressure data can compensate for the ranging errors caused by the change of the robotic arm's attitude. Transforming into the global coordinate system can ensure that the data has a unified reference framework for further processing; the effect of this step is to effectively reduce the ranging errors caused by the change of the robotic arm's attitude, improving the overall consistency and reliability of the measurement data. By obtaining the known calibration point data on the wall, calculate the initial ranging error between the spatial coordinate data for calibration and the calibration points. This error calculation helps the system quickly locate the deviation in ranging, providing a basis for subsequent compensation. The calibration points, as known reference objects, ensure the accuracy of the ranging error calculation. Its effect is to provide reliable data information for the adjustment of the internal parameters of the sensor through precise error calculation, improving the accuracy of the entire ranging system. According to the initial ranging error data, adjust the internal parameters of the laser sensor to generate compensation parameters for the sensor. This step can effectively correct the internal system errors of the sensor, ensuring more accurate subsequent ranging. By optimizing the performance of the sensor, the accuracy of laser ranging can be significantly improved. The effect of this step is that through systematic parameter adjustment, the sensor can adaptively change in a complex measurement environment, providing higher-precision ranging results. Use the compensation parameters of the sensor to correct the spatial coordinate data for calibration to generate precise laser ranging calibration data. This process ensures that the ranging data is more matched with the actual measurement environment after compensation, reducing systematic errors. The corrected data can reflect the true geometric characteristics of the wall. The effect of this step is that through the application of compensation parameters, the laser ranging data is made more accurate, ensuring the accuracy of subsequent data analysis and construction control. Finally, through the accuracy verification of the laser ranging calibration data, a ranging error distribution map is generated. This verification process can show the accuracy of the laser ranging system in different regions and identify potential errors.The ranging error distribution map provides a strong reference basis for subsequent construction adjustments. The effect of this step is that through precise accuracy verification, the system can evaluate the overall ranging accuracy and optimize it according to the error distribution to ensure the consistency and high precision of the final construction effect.
[0136] Preferably, step S47 includes the following steps:
[0137] Step S471: Calculate the Euclidean distance between the points in the initial ranging error data and the corresponding calibration points according to the laser ranging calibration data, so as to obtain the point-to-point error data;
[0138] In the embodiment of the present invention, the actual coordinates of each measurement point are extracted from the laser ranging calibration data and compared with the known calibration point data. By calculating the Euclidean distance between these points, the point-to-point error data is obtained. Specifically, the scipy.spatial.distance.euclidean function in the SciPy library in Python can be used to calculate the Euclidean distance. The point-to-point error data obtained in this step provides the basic data for subsequent error analysis.
[0139] Step S472: Calculate the root mean square error, maximum error, minimum error, and standard deviation of the error of the point-to-point error data, and map them to the wall coordinate system, so as to generate a two-dimensional error distribution matrix;
[0140] In the embodiment of the present invention, the root mean square error (RMSE), maximum error, minimum error, and standard deviation of the error are calculated using the NumPy library in Python. Subsequently, by mapping these error data according to the coordinate positions of the wall, a two-dimensional error distribution matrix is generated using Matplotlib or similar data visualization tools. This matrix is used to detail the error distribution on the wall.
[0141] Step S473: Use the interpolation algorithm to convert the two-dimensional error distribution matrix into a continuous error distribution surface;
[0142] In the embodiment of the present invention, an appropriate interpolation algorithm is first selected, such as spline interpolation or Kriging interpolation, which is implemented through the scipy.interpolate module in the SciPy library of Python. Taking the two-dimensional error distribution matrix as the input, the interpolation algorithm is applied to generate a continuous error distribution surface. This surface can provide more delicate and continuous error distribution information, which helps to deeply understand the change of errors on the entire wall.
[0143] Step S474: Perform visual color coding on the error distribution surface and identify systematic error patterns, so as to obtain a preliminary error distribution map;
[0144] The embodiment of the present invention uses Matplotlib or other visualization tools to color-code the error distribution surface, maps the error range with the color level, and generates an error distribution map. Then, the systematic error pattern is identified through visual analysis or an automated pattern recognition algorithm (such as a clustering algorithm in machine learning), thereby obtaining a preliminary error distribution map. This step helps identify the error distribution pattern and possible error sources on the wall.
[0145] Step S475: Identify the areas with drastic error changes based on the local error gradient on the preliminary error distribution map, perform high-density repeated measurements on the areas, and update the errors of the corresponding areas, thereby obtaining a ranging error distribution map.
[0146] The embodiment of the present invention identifies the areas where the error changes dramatically by calculating the local error gradient in the error distribution map. Then, these areas are repeatedly measured with high density to obtain more accurate error data. The NumPy and Matplotlib libraries in Python are used to calculate the error gradient and process the high-density measurement data. Finally, the error data of these areas are updated to generate a final ranging error distribution map, thereby providing more accurate ranging error information for further analysis and adjustment.
[0147] The present invention calculates the Euclidean distance between each point in the initial ranging error and the corresponding calibration point through laser ranging calibration data, thereby obtaining point-to-point error data. This method of directly calculating the error can accurately identify the difference between the measuring point and the calibration point, thereby clarifying the accuracy of the ranging system. The effect of this step is that the error of each measuring point can be clearly quantified, providing an accurate reference for subsequent data analysis and correction. The point-to-point error data is statistically calculated for the root mean square error (RMSE), maximum error, minimum error and error standard deviation, and these error values are mapped to the wall coordinate system to generate a two-dimensional error distribution matrix. These statistical values provide a detailed description of the overall error, which can help the system to fully understand the characteristics and distribution of the ranging error. The generated two-dimensional error distribution matrix can reflect the error size at different positions on the wall, which is helpful for more accurate error correction. Its effect is that through error statistics, the accuracy of laser ranging can be systematically evaluated, and a basis for further error correction and optimization is provided. The two-dimensional error distribution matrix is converted into a continuous error distribution surface using an interpolation algorithm, thereby smoothing the discrete ranging error information into a continuous surface model. This process can more intuitively display the spatial distribution characteristics of the error on the wall, especially in some areas where the error is large, interpolation can help the system better identify and process. The effect is that by generating a continuous error surface, the system can more clearly show the changing trend of the ranging error, thereby effectively optimizing the laser ranging system. The error distribution surface is visualized by color coding, and the overall error distribution is analyzed using a systematic error pattern recognition algorithm. Color-coded visualization can help quickly identify areas with large errors, while error pattern recognition helps to find systematic error sources, such as fixed errors of sensors or environmental interference. The effect of this step is that through visualization and pattern recognition, potential problems in the measurement system can be quickly identified, providing a basis for subsequent corrections. Based on the error distribution map, areas with drastic error changes are identified, and areas with sudden error changes are found by calculating local error gradients. These areas may have large measurement deviations, so the system will perform high-density repeated measurements on them and update the error data of these areas to ensure that the final error distribution map is more accurate. The effect of this step is that it can perform more accurate detection and calibration of key areas, improve the overall measurement accuracy, ensure that the final distance measurement error distribution map can truly reflect the error situation of the wall, and provide high-precision data support for further construction.
[0148] Preferably, step S5 comprises the following steps:
[0149] Step S51: identifying the error peak point of the ranging error distribution graph, and performing abnormal data points exceeding the threshold range according to a preset error threshold, thereby obtaining error abnormal data points;
[0150] The embodiment of the present invention uses a data analysis tool (such as Python's NumPy library) to perform peak detection on the error distribution graph, and identifies the error peak point by calculating the local maximum value of the error value. Then, an error threshold is set, and points whose errors exceed this threshold are marked as abnormal data points. The numpy.where function can be used to implement threshold screening to obtain error abnormal data points, which will be used for further abnormal analysis and processing.
[0151] Step S52: performing local spatial analysis on the error abnormal data points based on isolated abnormal points or abnormal areas, and obtaining isolated abnormal point data and abnormal area data respectively;
[0152] The embodiment of the present invention uses a spatial clustering algorithm (such as DBSCAN or K-means) to classify abnormal data points into isolated points and clustered areas. The DBSCAN algorithm is particularly suitable for detecting isolated abnormal points and dense areas because it can find groups of abnormal points of any shape. By using Python's sklearn.cluster.DBSCAN module, these classifications can be performed and isolated abnormal point data and clustered abnormal area data can be generated to provide basic data for subsequent corrections.
[0153] Step S53: correcting the isolated abnormal point data by the interpolation method based on spatial proximity, thereby obtaining an interpolation correction data set; performing root cause analysis on the abnormal area data, and performing secondary collection of the ranging data of the area, thereby obtaining a regional resampled data set;
[0154] The embodiment of the present invention corrects the interpolation method based on spatial proximity for the isolated outlier data. An interpolation algorithm (such as nearest neighbor interpolation or spline interpolation) is selected to correct the data around the isolated outlier to obtain a more accurate interpolation corrected data set. The interpolation function in the scipy.interpolate module of Python can be used for the operation. At the same time, the root cause analysis of the data in the abnormal area is performed. By analyzing the characteristics and environmental impact of these areas, it may be necessary to collect the ranging data of the area again, and use high-density measurement technology to obtain a regional resampled data set. These operations provide the necessary information for correcting and updating the abnormal data.
[0155] Step S54: removing abnormal points that cannot be corrected according to the interpolation correction data set and the regional resampling data set, thereby generating an optimized ranging data set;
[0156] In the embodiments of the present invention, the interpolation correction data set is combined with the regional resampling data set, and the data operation functions in the pandas library of Python are used to screen and eliminate abnormal points. The abnormal points that cannot be corrected are identified by comparing with the correction data. An optimized ranging data set is generated, and data cleaning and optimization can be performed through the array operation functions of the numpy library to ensure the accuracy and consistency of the final data set for use in the fitting of the subsequent ranging model.
[0157] Step S55: Perform ranging result fitting based on the least squares method on the optimized ranging data set, so as to generate ranging model parameter data to achieve ranging and calibration of the wall plastering device.
[0158] In the embodiments of the present invention, the least squares method is used to fit the optimized ranging data set. This can be achieved through the curve_fit function in the scipy.optimize module of Python for linear or nonlinear fitting. The least squares method fits the data points to the best model curve and calculates the model parameters. During the fitting process, the independent variable and the dependent variable of the ranging data set need to be input, and the model parameters are adjusted through the optimization algorithm to achieve accurate ranging and calibration of the wall plastering device. The finally generated ranging model parameter data will be used in actual ranging applications to ensure the high precision and stability of the device.
[0159] The present invention identifies the peak point of the error in the distance measurement error distribution diagram, and screens out the abnormal data points exceeding the threshold value according to the preset error threshold value. This process helps to quickly locate the extreme situation of the distance measurement error and identify the possible error source. The extraction of abnormal data points enables the system to focus on the area or point with the largest error, which is convenient for targeted analysis and correction. Its effect is that through accurate identification of abnormal data points, the problem area in the system can be quickly found, providing a basis for focusing on the subsequent processing steps. The identified abnormal data points are subjected to local spatial analysis based on isolated abnormal points or abnormal areas in pieces, so as to obtain isolated abnormal point data and abnormal area data in pieces respectively. This analysis process can identify single abnormal points and regional errors, and help the system distinguish different types of distance measurement errors. Isolated abnormal points may be caused by single point failures, while abnormal areas in pieces may indicate more extensive systemic problems. The effect of this step is that through the classification analysis of abnormal data, the system can adopt different correction strategies to improve the effectiveness and pertinence of overall data processing. The interpolation method based on spatial proximity is used to correct the data of isolated outliers to obtain an interpolation correction data set; the root cause analysis is performed on the data of the abnormal area, and the distance measurement data of the area is collected again to generate a regional resampling data set. The interpolation correction of isolated outliers fills the error by using the data of neighboring points, thereby improving the continuity of local data; and the resampling of the area can reacquire the actual distance measurement data of the area and correct the error in a larger range. The effect of this step is to optimize the accuracy of the data set and ensure the overall reliability of the distance measurement results through targeted processing of outliers and areas. According to the interpolation correction data set and the regional resampling data set, the outliers that cannot be corrected are eliminated to generate an optimized distance measurement data set. This process ensures that the final data set contains only effectively corrected distance measurement data, thereby improving the accuracy and consistency of the overall data. Eliminating outliers that cannot be corrected can reduce the error in the distance measurement results and improve the accuracy of the final calibration. The effect of this step is to ensure the high accuracy of the distance measurement system by optimizing the data set, so that the wall scraping equipment can be constructed and calibrated more accurately. The optimized distance measurement data set is fitted based on the least squares method to generate the distance measurement model parameter data. This process uses the least squares method to fit the distance measurement data into a mathematical model, which can effectively reduce the overall error and generate a reliable distance measurement model. The application of the least squares method ensures the best fitting state of the distance measurement results and provides high-precision distance measurement and calibration capabilities for wall scraping equipment; the effect of this step is to generate the final distance measurement model through precise fitting, ensuring the efficiency and accuracy of the distance measurement and calibration functions of the wall scraping equipment.
[0160] The present invention also provides a laser ranging calibration system based on a laser sensor, which is used to execute the above-mentioned laser ranging calibration method based on a laser sensor. The laser ranging calibration system based on a laser sensor comprises:
[0161] A spatial coordinate acquisition module, which is used to obtain a spatial coordinate data set of multiple points on the wall surface through multiple groups of high-precision long-stroke laser sensors; perform plane fitting based on singular value decomposition on the wall surface according to the spatial coordinate data set, so as to obtain a virtual plane and its normal vector data;
[0162] A robotic arm attitude correction module, which is used to obtain the robotic arm normal vector data of the current plane of the wall scraping device; perform normalization processing on the robotic arm normal vector data and the virtual plane and its normal vector data, calculate the rotation axis and rotation angle between the two, and generate rotation matrix data using the Rodrigues rotation formula;
[0163] An attitude adjustment and feedback module, which is used to adjust the angle of the robotic arm so that the working surface is parallel to the wall surface according to the rotation matrix data, and monitor the attitude and pressure of the robotic arm in real time, so as to obtain attitude pressure feedback data; use a sub-region processing strategy to perform dynamic adjustment of the robotic arm attitude based on the attitude pressure feedback data, so as to obtain uniform force parallel state data;
[0164] A laser ranging calibration module, which is used to perform multi-point scanning ranging according to the uniform force parallel state data by using the laser sensor on the adjusted robotic arm, so as to obtain laser ranging calibration data; perform accuracy verification processing on the laser ranging calibration data, so as to obtain a ranging error distribution map;
[0165] An error correction and model generation module, which is used to remove abnormal points from the ranging error distribution map according to a preset error threshold, and perform ranging result fitting based on the least squares method, so as to generate ranging model parameter data to realize the ranging and calibration of the wall scraping device.
[0166] The present invention ensures the accuracy of spatial coordinate data through a high-precision laser sensor, can capture detailed information of each point on the wall surface, and reduces the impact caused by measurement errors. By performing plane fitting on the spatial coordinate data through singular value decomposition, a virtual plane model of the wall surface can be accurately established, providing accurate normal vector data, which lays a foundation for subsequent manipulator attitude correction and ranging calibration. Through data processing of the manipulator normal vector and the virtual plane normal vector, it is ensured that the working surface of the manipulator is parallel to the wall surface. The generated rotation matrix data enables the manipulator to perform precise angle adjustment, improving the construction accuracy; by calculating the rotation axis and rotation angle, the attitude of the manipulator can be effectively corrected to align it with the virtual plane, reducing construction errors and improving the accuracy of the overall operation. By real-time monitoring the attitude and pressure of the manipulator, the data of the working state can be obtained immediately, ensuring that the contact pressure between the manipulator and the wall surface is uniform, and improving the stability of the construction effect; through the regional processing strategy and dynamic adjustment, local optimization can be carried out for complex wall surfaces, enabling the working state of the manipulator to be consistent in different regions, and improving the uniformity and quality of construction. The adjusted laser sensor can perform high-precision multi-point scanning to ensure the accuracy of ranging data. The accuracy verification and the generation of error distribution maps help to identify and correct potential ranging errors, improving the overall accuracy of the system; through accuracy verification processing, it can be ensured that the calibration of the laser ranging system meets the actual requirements, making the ranging ability of the wall plastering equipment more reliable. Eliminating the abnormal points that cannot be corrected can effectively improve the overall quality of ranging data and reduce the errors caused by abnormal data; by fitting the ranging results through the least squares method, accurate ranging model parameters can be generated, providing the precise ranging and calibration functions of the wall plastering equipment, and ensuring that the construction effect meets the expected standards.
[0167] Therefore, from any perspective, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the application documents are intended to be encompassed within the present invention.
[0168] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A laser ranging calibration method based on a laser sensor, applied to a wall scraping device, characterized in that, It includes the following steps: Step S1: Obtain the spatial coordinate datasets of multiple points on the wall surface through multiple groups of high-precision long-stroke laser sensors; Perform plane fitting based on singular value decomposition on the wall surface according to the spatial coordinate datasets, so as to obtain the virtual plane and its normal vector data; among them, step S1 includes: Step S11: Perform sensor self-calibration processing on the pre-deployed multiple groups of high-precision long-stroke laser sensors based on laser power and receiving sensitivity, so as to obtain sensor parameter calibration data; Step S12: Perform grid multi-point scanning on the wall surface through multiple groups of high-precision long-stroke laser sensors according to the sensor parameter calibration data, so as to obtain the original spatial coordinate datasets; Step S13: Use the moving average filtering algorithm to smooth the original spatial coordinate datasets, so as to obtain the smoothed spatial coordinate datasets; Step S14: Establish a global coordinate system according to the original spatial coordinate datasets, and convert the smoothed spatial coordinate datasets into the global coordinate system to obtain the spatial coordinate datasets under the unified coordinate system; Step S15: Perform plane fitting based on singular value decomposition on the wall surface according to the spatial coordinate datasets, so as to obtain the virtual plane and its normal vector data; among them, step S15 includes: Step S151: Detect and screen abnormal coordinates in the spatial coordinate datasets according to the preset outlier detection threshold to obtain the spatial coordinate data cleaning set; construct a covariance matrix according to the spatial coordinate data cleaning set, and perform singular value decomposition on the covariance matrix to obtain the wall surface spatial feature data, where the wall surface spatial feature data includes eigenvalues and eigenvectors; Step S152: Extract the eigenvector corresponding to the minimum eigenvalue according to the magnitude relationship of the eigenvalues in the wall surface spatial feature data and use it as the normal vector of the virtual plane to obtain the initial normal vector data; Step S153: Calculate the intercept term of the virtual plane according to the initial normal vector data and the spatial coordinate data cleaning set to obtain the plane equation parameter data; Step S154: Calculate the distance from the points in the spatial coordinate datasets to the virtual plane based on the plane equation parameter data to obtain the fitting error data; Step S155: Calculate and analyze the root mean square error and maximum deviation of the fitting error data to obtain the fitting quality evaluation index data; Step S156: If the fitting quality evaluation index meets the preset threshold, output the virtual plane and its normal vector data of the wall surface; if not, return to step S151, adjust the outlier detection threshold, and re-execute steps S151 to S156; Step S2: Obtain the mechanical arm normal vector data of the current plane of the wall scraping device; perform normalization processing on the mechanical arm normal vector data and the virtual plane and its normal vector data, calculate the rotation axis and rotation angle between the two, and generate rotation matrix data using the Rodrigues rotation formula; Step S3: Adjust the angle of the robotic arm so that its working surface is parallel to the wall according to the rotation matrix data, and monitor the posture and pressure of the robotic arm in real time to obtain posture-pressure feedback data; use the sub-region processing strategy to dynamically adjust the posture of the robotic arm based on the posture-pressure feedback data for complex surfaces, so as to obtain equal-force parallel state data; among them, step S3 includes: Step S31: Calculate the target posture of the robotic arm according to the rotation matrix data, and adjust the posture of the robotic arm so that its working surface is parallel to the wall through the motion control system of the robotic arm, so as to obtain initial adjusted posture data; Step S32: Use the force sensor on the end effector of the robotic arm to monitor the contact pressure between the robotic arm and the wall in real time according to the initial adjusted posture data, and monitor the current posture of the robotic arm through the posture sensor, so as to obtain posture-pressure feedback data; Step S33: Use the sub-region processing strategy to divide the wall area into multiple grid sub-regions, and perform local analysis on the posture-pressure feedback data of each sub-region to obtain local pressure distribution data; Step S34: Adjust the posture parameters according to the local pressure distribution data to obtain posture adjustment instruction data; Step S35: Perform local fine adjustment on the robotic arm based on the dynamic adaptation of complex surfaces according to the posture adjustment instruction data to obtain real-time posture-pressure data; Step S36: Calculate the pressure uniformity of each sub-region according to the real-time posture-pressure data to obtain equal-force parallel state data; Step S4: Use the laser sensor on the adjusted robotic arm to perform multi-point scanning and ranging according to the equal-force parallel state data to obtain laser ranging calibration data; perform accuracy verification processing on the laser ranging calibration data to obtain a ranging error distribution map; Step S5: Remove the abnormal points from the ranging error distribution map according to the preset error threshold, and perform fitting of the ranging results based on the least squares method to generate ranging model parameter data, so as to realize the ranging and calibration of the wall scraping device.
2. The laser ranging calibration method based on a laser sensor according to claim 1, characterized in that Step S2 includes the following steps: Step S21: Collect the spatial coordinates of the current working surface of the robotic arm through multiple groups of laser sensors and inertial measurement units on the robotic arm, and convert them into robotic arm spatial coordinate data in the local coordinate system of the robotic arm; Step S22: Perform plane fitting of the working surface based on singular value decomposition according to the robotic arm spatial coordinate data, and calculate the initial normal vector of the current working plane of the robotic arm to obtain robotic arm initial normal vector data; Step S23: Normalize the robotic arm initial normal vector data, and calculate the angle and rotation axis with the virtual plane and its normal vector data to obtain normal vector rotation axis data; Step S24: Make a preliminary adjustment to the robotic arm according to the normal vector rotation axis data, and re-measure the posture of the adjusted robotic arm to obtain corrected robotic arm normal vector data; Step S25: Compare the robotic arm normal vector data with the virtual plane and its normal vector data based on the rotation axis and rotation angle, and generate rotation matrix data using the Rodrigues rotation formula.
3. The laser ranging calibration method based on a laser sensor according to claim 2, wherein Step S25 includes the following steps: Step S251: performing dot product calculation on the normal vector data of the robot arm and the virtual plane and its normal vector data, thereby obtaining the cosine value of the angle between the two vectors; Step S252: Calculate the angle between the two normal vectors using the cosine value of the angle between the two vectors, thereby obtaining rotation angle data; Step S253: performing cross product calculation on the normal vector data of the robot arm and the virtual plane and its normal vector data to obtain a rotation axis vector; Step S254: constructing a rotation matrix according to the rotation angle data and the unit rotation axis vector using the Rodriguez rotation formula, thereby obtaining initial rotation matrix data; Step S255: numerically optimizing the initial rotation matrix data to minimize the error between the normal vector data of the rotated manipulator and the virtual plane and its normal vector data, thereby obtaining the rotation matrix data.
4. The laser ranging calibration method based on a laser sensor according to claim 3, wherein Step S4 includes the following steps: Step S41: calibrating the initial scanning position of the laser sensor on the adjusted robot arm based on the uniform parallel state data, and using the laser sensor to perform grid multi-point scanning distance measurement based on the calibrated reference plane, thereby obtaining original laser distance measurement data; Step S42: performing preliminary filtering and outlier elimination processing on the original laser ranging data, thereby obtaining preprocessed ranging data; Step S43: fusing the pre-processed distance measurement data with the real-time attitude pressure data, and converting them into a global coordinate system, thereby obtaining calibration space coordinate data; Step S44: obtaining known calibration point data on the wall; performing initial distance measurement error calculation on the calibration space coordinate data and the known calibration point data, thereby obtaining initial distance measurement error data; Step S45: adjusting the internal parameters of the laser sensor according to the initial ranging error data, thereby generating sensor compensation parameters; Step S46: Correcting the calibration space coordinate data according to the sensor compensation parameters to obtain laser ranging calibration data; Step S47: Perform accuracy verification processing on the laser ranging calibration data to obtain a ranging error distribution map.
5. The laser ranging calibration method based on a laser sensor according to claim 4, wherein Step S47 includes the following steps: Step S471: calculating the Euclidean distance between the point in the initial ranging error data and the corresponding calibration point according to the laser ranging calibration data, thereby obtaining point-to-point error data; Step S472: Calculate the root mean square error, maximum error, minimum error and error standard deviation of the point-to-point error data, and map them to the wall coordinate system, thereby generating a two-dimensional error distribution matrix; Step S473: using an interpolation algorithm to convert the two-dimensional error distribution matrix into a continuous error distribution surface; Step S474: Visualizing the error distribution surface with color coding and performing systematic error pattern recognition to obtain a preliminary error distribution map; Step S475: Identify the areas with drastic error changes based on the local error gradient on the preliminary error distribution map, perform high-density repeated measurements on the areas, and update the errors of the corresponding areas, thereby obtaining a ranging error distribution map.
6. The laser ranging calibration method based on a laser sensor according to claim 5, wherein Step S5 includes the following steps: Step S51: Identify the error peak points in the ranging error distribution map, and obtain the abnormal data points beyond the threshold range according to a preset error threshold, so as to obtain the error abnormal data points; Step S52: Perform local spatial analysis on the error abnormal data points based on isolated abnormal points or contiguous abnormal regions to obtain isolated abnormal point data and contiguous abnormal region data respectively; Step S53: Correct the isolated abnormal point data by using an interpolation method based on spatial proximity to obtain an interpolation correction data set; perform root cause analysis on the contiguous abnormal region data and conduct secondary acquisition of the ranging data in this region to obtain a regional resampling data set; Step S54: Eliminate the abnormal points that cannot be corrected according to the interpolation correction data set and the regional resampling data set to generate an optimized ranging data set; Step S55: Fit the ranging results of the optimized ranging data set based on the least squares method to generate ranging model parameter data, so as to achieve ranging and calibration of the wall scraping device.
7. A laser ranging calibration system based on a laser sensor, characterized in that, For implementing the laser ranging calibration method based on a laser sensor as described in claim 1, the laser ranging calibration system based on a laser sensor includes: A spatial coordinate acquisition module, configured to obtain a spatial coordinate data set of multiple points on the wall through multiple groups of high-precision long-stroke laser sensors; perform plane fitting on the wall based on singular value decomposition according to the spatial coordinate data set to obtain a virtual plane and its normal vector data; A robotic arm attitude correction module, configured to obtain the robotic arm normal vector data of the current plane of the wall scraping device; perform normalization processing on the robotic arm normal vector data and the virtual plane and its normal vector data, calculate the rotation axis and rotation angle between the two, and generate rotation matrix data by using the Rodrigues rotation formula; An attitude adjustment and feedback module, configured to adjust the angle of the robotic arm to be parallel to the wall surface according to the rotation matrix data, and monitor the attitude and pressure of the robotic arm in real time to obtain attitude pressure feedback data; use a sub-region processing strategy to dynamically adjust the attitude of the robotic arm based on complex surfaces according to the attitude pressure feedback data to obtain uniform force parallel state data; A laser ranging calibration module, configured to perform multi-point scanning ranging according to the uniform force parallel state data by using the laser sensor on the adjusted robotic arm to obtain laser ranging calibration data; perform accuracy verification processing on the laser ranging calibration data to obtain a ranging error distribution map; An error correction and model generation module, configured to eliminate abnormal points from the ranging error distribution map according to a preset error threshold, and perform ranging result fitting based on the least squares method to generate ranging model parameter data, so as to achieve ranging and calibration of the wall scraping device.
Citation Information
Patent Citations
Wall surface trowelling machine and working method of trowelling machine
CN110439232A
Roller coating method for finishing operation by combining automatic spray gun and roller of robot
CN111255199A
Exterior wall putty scraping method and device based on mechanical arm
CN114541676A