Robot automatic leveling method, controller, robot and storage medium
By acquiring the geometric features of the construction surface through a point cloud acquisition device, extracting the reference plane, and adjusting the robot's pose, the problem of low leveling accuracy in complex scenarios is solved, enabling high-precision parallel operation on the construction surface.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies have low accuracy in automatic leveling of robots in complex work scenarios, making it difficult to meet the precise parallel requirements of high-altitude or large-scale planar construction operations.
The three-dimensional geometric features of the target construction surface are acquired by a point cloud acquisition device, the reference plane is extracted, and the robot's pose is adjusted based on the spatial angle deviation to achieve closed-loop pose control and ensure that the working surface is parallel to the reference plane.
It achieves high-precision leveling in complex environments, adapts to construction scenarios with arbitrary tilt and unevenness, and improves construction quality and safety.
Smart Images

Figure CN121733554A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of robot control, in particular to a robot automatic leveling method, a controller, a robot and a storage medium. BACKGROUND
[0002] In high-altitude or large-area construction operations such as building spraying, plastering, and facade detection, maintaining the precise parallel relationship between the working tool (such as a spray gun or a plastering board) and the target construction surface (such as a wall or a ceiling) is the core prerequisite for ensuring construction quality, material utilization rate, and work safety. The traditional method mainly relies on manual experience and visual inspection and manual adjustment, which is low in efficiency and difficult to guarantee accuracy, and poses a threat to the safety of the operator in dangerous environments such as high altitudes.
[0003] With the development of automation technology, some high-altitude robot-assisted leveling schemes have emerged. One type of scheme is based on an inclination sensor, which measures the inclination angle of the robot platform itself to level; however, this type of scheme takes the direction of gravity as the absolute reference, and can only achieve the level or fixed angle of inclination of the platform itself, and cannot meet the needs of complex operation scenarios. Another type of scheme attempts to introduce a vision sensor to assist in positioning by recognizing wall features; however, the vision scheme is severely affected by lighting conditions, weather, target surface texture, and light reflection characteristics, and its reliability drops sharply in backlight, at night, or in smooth surface construction scenarios, making it difficult to meet the requirements of all-weather and multi-environment industrial-level robustness.
[0004] Therefore, the robot automatic leveling method used in the prior art has the problem of low leveling accuracy in complex operation scenarios. SUMMARY
[0005] The purpose of the embodiments of the present application is to provide a robot automatic leveling method, a controller, a robot and a storage medium to solve the problem of low leveling accuracy in complex operation scenarios of the robot automatic leveling method used in the prior art.
[0006] To achieve the above-mentioned purpose, the first aspect of the present application provides a robot automatic leveling method, the robot comprising a body, a working mechanism and a point cloud acquisition device, the working mechanism being used for performing plane construction work, the point cloud acquisition device being arranged on the body towards the working surface of the working mechanism, the method comprising: acquiring a current frame point cloud containing a target construction surface collected by the point cloud acquisition device; performing plane feature extraction on the current frame point cloud to extract a reference plane where the target construction surface is located; determining a spatial angle deviation between the working surface of the working mechanism and the reference plane; based on the spatial angle deviation, adjusting the pose of the robot until the working surface is parallel to the reference plane.
[0007] In the embodiment of the present application, the plane feature extraction is performed on the current frame point cloud to extract the reference plane where the target construction surface is located, comprising: Based on a preset plane fitting algorithm, a plurality of candidate planes are extracted from the current frame point cloud, and the number of point clouds in the candidate plane is greater than a preset point cloud number threshold; For each candidate plane, a plane model of the candidate plane is determined, and the number of inlier sample points contained in the candidate plane is determined based on a preset inlier distance threshold, and the inlier sample point is a point in the current frame point cloud whose distance from the plane model is less than the preset inlier distance threshold; Among the plurality of candidate planes, the candidate plane with the largest number of inliers is determined as the reference plane.
[0008] In the embodiment of the present application, the plane feature extraction is performed on the current frame point cloud to extract the reference plane where the target construction surface is located, comprising: Based on a preset plane fitting algorithm, a plurality of candidate planes are extracted from the current frame point cloud; The spatial position feature of each candidate plane is determined, and the spatial position feature includes at least one of the plane azimuth angle, the plane height, the plane normal vector and the relative distance from the robot; Among the plurality of candidate planes, the candidate plane whose spatial position feature satisfies a preset spatial position prior condition is determined as the reference plane.
[0009] In the embodiment of the present application, the spatial angle deviation between the working surface of the working mechanism and the reference plane comprises: The spatial normal vector of the reference plane is determined; Based on the relative pose transformation relationship between the pre-calibrated point cloud acquisition device coordinate system and the robot body coordinate system, the spatial angle deviation between the spatial normal vector and the target axial direction in the robot body coordinate system is determined, and the target axial direction is perpendicular to the working surface of the working mechanism.
[0010] In the embodiment of the present application, the robot further comprises a pose adjustment mechanism for adjusting the pose of the robot; Based on the spatial angle deviation, the pose of the robot is adjusted, comprising: The spatial angle deviation is input to a preset closed-loop controller to obtain a pose adjustment control quantity; According to the pose adjustment control quantity, the pose adjustment mechanism is driven to act to adjust at least one of the pitch angle, the roll angle and the yaw angle of the body of the robot.
[0011] In the embodiment of the present application, before the plane feature extraction based on the current frame point cloud, the method further comprises: The current frame point cloud is preprocessed, and the preprocessing includes at least one of noise filtering, voxel filtering, ground point filtering and outlier rejection.
[0012] The second aspect of the present application provides a controller, comprising: a memory configured to store instructions; a processor configured to call the instructions from the memory and enable the above-mentioned method of robot automatic leveling when executing the instructions.
[0013] The third aspect of the present application provides a robot, comprising: the above-mentioned controller; a body; a work mechanism for performing planar work; a point cloud acquisition device arranged on the body towards the planar work mechanism.
[0014] In the embodiment of the present application, the robot further comprises a pose adjustment mechanism for adjusting the pose of the robot.
[0015] The fourth aspect of the present application provides a machine-readable storage medium, which stores instructions for causing a machine to execute the above-mentioned method of robot automatic leveling.
[0016] The above-mentioned technical solution provides a robot comprising a body, a work mechanism and a point cloud acquisition device, the work mechanism is used for performing planar work, and the point cloud acquisition device is arranged on the body towards the work surface of the work mechanism. In the leveling process, first, a current frame point cloud containing a target work surface collected by the point cloud acquisition device is acquired, then planar feature extraction is performed on the current frame point cloud to extract a reference plane where the target work surface is located, then a spatial angle deviation between the work surface of the work mechanism and the reference plane is determined, and finally, the pose of the robot is adjusted based on the spatial angle deviation until the work surface is parallel to the reference plane. The present application takes the real-time point cloud geometry of the target work surface as the only leveling reference, realizes closed-loop pose control, can adapt to any complex working conditions of inclination and unevenness, and realizes high-precision parallel work.
[0017] Other features and advantages of the embodiments of the present application will be described in detail in the following specific implementation part. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings are included to provide a further understanding of the embodiments of the present application, and constitute a part of the specification, and are used together with the following specific implementation to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the drawings: Figure 1 A flowchart of a robot automatic leveling method provided by an embodiment of the present application; Figure 2 A flowchart of a laser radar-based spraying robot automatic leveling and pose calibration method provided by an embodiment of the present application; Figure 3 A structural block diagram of a controller provided by an embodiment of the present application. DETAILED DESCRIPTION
[0019] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be understood that the specific embodiments described herein are merely used to explain and illustrate the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of protection of the present application.
[0020] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are merely used to explain the relative positional relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directional indications also change accordingly.
[0021] In addition, if the embodiments of the present application involve descriptions such as “first”, “second”, etc., the descriptions of “first”, “second”, etc. are merely for description purposes, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features limited by “first”, “second” can explicitly or implicitly include at least one of the features. In addition, the technical solutions of the various embodiments can be combined with each other, but it must be based on the fact that a person of ordinary skill in the art can implement it, and when the combination of technical solutions contradicts each other or cannot be implemented, it should be considered that the combination of technical solutions does not exist, and is also not within the scope of protection claimed by the present application.
[0022] Figure 1 A flowchart of a robot automatic leveling method provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the robot automatic leveling method provided by the embodiment of the present application can include the following steps. Figure 1 The robot includes a body, a working mechanism and a point cloud acquisition device. The working mechanism is used to perform planar construction work. The point cloud acquisition device is arranged on the body and faces the working surface of the working mechanism. The method can include the following steps.
[0023] Step S101, acquiring a current frame point cloud containing a target construction surface collected by the point cloud acquisition device; Step S102, performing planar feature extraction on the current frame point cloud to extract a reference plane where the target construction surface is located; Step S103, determining a spatial angle deviation between the working surface of the working mechanism and the reference plane; At step S104, the pose of the robot is adjusted based on the spatial angle deviation until the working surface is parallel to the reference plane.
[0024] In the embodiments of the present application, the body is the main structure of the robot, which carries various functional modules and realizes the moving function. The working mechanism is a device for performing specific construction work, such as a smoothing disc, a spraying head, a milling cutter, etc., and its working surface needs to be parallel to the plane to be constructed. The point cloud acquisition device is a three-dimensional environment perception sensor, such as a laser radar, a depth camera, etc., which can obtain a dense three-dimensional point coordinate set of the environment surface; in order to realize higher precision environment perception, the point cloud acquisition device in the embodiments of the present application is preferably a high-line laser radar, which can provide more abundant and dense point cloud data compared with the traditional low-line laser radar. The target construction surface refers to the target plane area to be constructed.
[0025] It can be understood that the traditional robot leveling mainly relies on the inclination sensor or manual calibration. The inclination sensor can only measure the attitude of the robot itself relative to the direction of gravity, and cannot perceive the actual spatial trend of the target construction surface. When the construction surface itself is not a horizontal plane, such as a slope or a sloping decoration, simply leveling to a horizontal state will lead to a mismatch between the working mechanism and the construction surface, affecting the construction quality. The manual calibration method is low in efficiency and difficult to adapt to large-area and multi-condition construction requirements.
[0026] In view of the above problems, the embodiments of the present application design a technical scheme of leveling with the target construction surface as a dynamic reference, which perceives the three-dimensional geometric features including the target construction surface in real time through the point cloud acquisition device, extracts the reference plane representing the spatial orientation of the target construction surface therefrom, takes it as the objective spatial reference for leveling, and then calculates the angle deviation between the working mechanism and the reference plane to realize the precise leveling of the working surface to the construction surface.
[0027] Firstly, the current frame of point cloud is obtained through the point cloud acquisition device, which is fixed on the robot body and faces the front or lower working area of the working mechanism. When the robot approaches the target construction surface, the point cloud acquisition device scans and collects the three-dimensional point cloud data of the construction surface and the surrounding environment at a certain frequency. Since the construction surface may not be complete or be partially blocked, a plane feature extraction algorithm is needed to extract the plane features from the current frame of point cloud to extract the reference plane where the target construction surface is located. In one example, the reference plane can be extracted by a robust plane fitting algorithm based on random sample consensus (RANSAC), which generates candidate plane models through multiple random sampling, and takes the model containing the most inliers as the final reference plane. In another example, the reference plane can be extracted by a plane segmentation algorithm based on region growing and normal consistency, which selects a flat seed point from the point cloud, gradually grows and merges according to the normal vector similarity and proximity, and finally determines the maximum continuous plane region as the reference plane.
[0028] Then, a spatial angle deviation is determined, which is the directional angle between the actual working surface of the working mechanism and the reference plane. In an example, the controller can read the known pose matrix of the working surface of the working mechanism in the body coordinate system from the robot kinematics model, so as to obtain the unit normal vector of the working surface; the normal vector is compared with the reference plane normal vector extracted in the previous step, and the included angle between the two is calculated through the spatial vector included angle formula, so as to obtain the spatial angle deviation.
[0029] Finally, the pose adjustment is performed based on the spatial angle deviation. In an example, the controller can decompose the spatial angle deviation into two dimensions of the forward direction of the robot (pitch angle deviation) and the lateral direction (roll angle deviation), and then generate a plurality of sets of coordinated motion instructions according to the calculated pitch angle and roll angle deviations. For example, for a robot equipped with four-wheel independent suspension or four electric leveling legs, the controller accurately calculates the extension amount of each support point, drives the actuator to act, so as to change the spatial pose of the robot body.
[0030] In the process of pose adjustment, the controller continuously returns to step S101 to perform real-time point cloud acquisition and deviation calculation, forming a closed-loop feedback control. When it is detected that the spatial angle deviation continuously decreases to less than the set tolerance, the adjustment stops, and the robot locks the current pose, at which time the working surface has reached a high parallelism with the target construction surface, thereby laying a foundation for subsequent high-quality construction work. The above technical solution provides a robot including a body, a working mechanism, and a point cloud acquisition device, the working mechanism is used to perform planar construction work, and the point cloud acquisition device is arranged on the body and faces the working surface of the working mechanism. In the leveling process, first, the current frame point cloud containing the target construction surface collected by the point cloud acquisition device is obtained, then the plane feature extraction is performed on the current frame point cloud to extract the reference plane in which the target construction surface is located, then the spatial angle deviation between the working surface of the working mechanism and the reference plane is determined, and finally, the pose of the robot is adjusted based on the spatial angle deviation until the working surface is parallel to the reference plane. The present application realizes closed-loop pose control by taking the real-time point cloud geometry of the target construction surface as the only leveling reference, can adapt to any complex working conditions of inclination and unevenness, and realizes high-precision parallel operation.
[0031] In an embodiment, considering that in a dynamic construction scene, the target construction plane can be deformed due to material paving, compaction and other processes. This embodiment can add a millimeter wave radar and an array of inclination sensors to the point cloud acquisition device to form a multi-sensor system. By fusing the geometric information of the point cloud, the sub-millimeter level micro-motion monitoring data of the radar and the high-frequency attitude data of the inclination sensor, a dynamic deformation model of the construction plane is constructed. In addition, the controller not only extracts the current reference plane, but also predicts the plane attitude change trend in the next few hundred milliseconds. The robot can perform feedforward-feedback compound control according to the predicted trend, start adjusting the pose in advance before the actual change of the plane, realize pre-adjustment, and thus can significantly improve the adaptability and control smoothness of the dynamic construction process.
[0032] In the embodiment of the present application, the current frame point cloud is subjected to plane feature extraction to extract the reference plane where the target construction plane is located, which can include: extracting a plurality of candidate planes from the current frame point cloud based on a preset plane fitting algorithm, the number of point clouds in the candidate plane being greater than a preset point cloud number threshold; for each candidate plane, determining a plane model of the candidate plane, determining the number of inlier points of inlier points contained in the candidate plane based on a preset inlier distance threshold, the inlier points being points in the current frame point cloud with a distance from the plane model less than the preset inlier distance threshold; determining the candidate plane with the largest number of inlier points among the plurality of candidate planes as the reference plane.
[0033] In the embodiment of the present application, the preset plane fitting algorithm refers to a mathematical method for identifying and establishing a plane model from discrete point clouds, such as the RANSAC (Random Sample Consensus) algorithm. The candidate plane is a plane region that is preliminarily identified from the point cloud by the preset plane fitting algorithm and may represent the target construction plane. The preset point cloud number threshold is the minimum number of point clouds used to filter valid planes to avoid misjudging small noise regions as planes. The plane model is a mathematical expression describing the spatial position and orientation of the plane, which is usually composed of a normal vector and a plane constant.
[0034] It can be understood that the traditional method often uses single plane fitting or fixed region segmentation, which is prone to extract incorrect planes or incomplete fitting in complex construction scenes, such as operation scenes with multiple approximate planes, a large number of noise points or local occlusions. Considering that the target construction plane is usually the largest and most continuous real plane region in the scanning area, the embodiment of the present application designs a multi-candidate plane competition and inlier point number optimization extraction mechanism, which extracts multiple candidate planes and uses the largest number of inlier points as the final determination standard, to ensure that even in a disturbed environment, the dominant plane that truly represents the target construction plane can be stably identified.
[0035] Specifically, first, a plurality of qualified planar structures are iteratively extracted from the current frame point cloud using a preset plane fitting algorithm. After each extraction, the point set of the plane is temporarily removed from the original data, and the next plane is continued to be searched until no plane satisfying the condition that the number of point clouds is greater than a preset point cloud number threshold can be found, or the extraction times reach a preset maximum number. The preset point cloud number threshold can be set according to the sensor accuracy and the expected size of the construction surface, and is used to filter small planar fragments.
[0036] Next, for each candidate plane, a plane model is accurately calculated using all its points; then, the entire current frame point cloud is checked back, the perpendicular distance of each point to the plane model is calculated, and the number of points with a distance less than a preset inner point distance threshold is counted as the number of inner points of the candidate plane; wherein the preset inner point distance threshold is the maximum allowable distance error for judging whether a point is an inner point of the plane. In this way, the number of inner points of the candidate plane is re-evaluated based on the global point cloud, which can find those points that may be missed in the initial fitting, such as points excluded due to occlusion or noise, thereby more fairly and accurately evaluating the true representation of each candidate plane in the global. Finally, by comparing the number of inner points of all candidate planes, the candidate plane with the most inner points is determined as the reference plane.
[0037] The embodiment realizes robust and accurate extraction of the reference plane of the target construction surface in a complex and noisy construction site environment through the multi-candidate plane competition and global inner point number maximization optimization strategy.
[0038] In the embodiment of the present application, the current frame point cloud is subjected to planar feature extraction to extract the reference plane of the target construction surface, comprising: extracting a plurality of candidate planes from the current frame point cloud based on a preset plane fitting algorithm; determining the spatial position characteristics of each candidate plane, the spatial position characteristics including at least one of a plane azimuth angle, a plane height, a plane normal vector, and a relative distance from the robot; determining the candidate plane whose spatial position characteristics satisfy a preset spatial position prior condition as the reference plane from the plurality of candidate planes.
[0039] In the embodiments of the present application, the spatial position feature is a parameter set describing the specific state of the candidate plane in the three-dimensional space. The plane azimuth angle is the included angle between the projection of the normal vector of the candidate plane on the horizontal plane and the reference direction, reflecting the inclination direction of the candidate plane. The plane height is the position of the candidate plane in the vertical direction relative to the robot coordinate system or the world coordinate system. The plane normal vector is a unit vector perpendicular to the candidate plane, which defines the spatial orientation of the plane. The relative distance of the candidate plane to the robot is the nearest distance from the candidate plane to the robot work center point. The preset spatial position prior condition can be a spatial constraint rule that the reference plane should satisfy, which is pre-set according to the specific construction task, such as the height range, the allowed inclination angle, the maximum distance, etc.
[0040] It can be understood that when the point cloud of the non-target plane such as the wall, the surface of the large equipment, etc. is larger than the actual construction surface, the determination of the reference plane by using the traditional method will lead to misselection. In view of this problem, the spatial prior knowledge of the construction task is introduced as the decision basis in the specific construction task, and the spatial position of the target construction surface has an expected characteristic range, such as a certain height interval, a specific orientation and distance relative to the robot. By comprehensively utilizing these multi-dimensional spatial position features for screening, the interference planes that have a large geometric size but are obviously inconsistent in position can be excluded, so that the real target construction surface can be more intelligently and reliably identified.
[0041] Specifically, for each candidate plane, a set of key spatial position features are calculated according to the plane model fitted by the candidate plane, including: projecting the plane normal vector to the horizontal plane to calculate the azimuth angle to determine the general orientation of the plane; calculating the average height of the plane in the robot coordinate system; directly obtaining the unit normal vector of the plane; and calculating the nearest distance from the plane to the robot work mechanism center point.
[0042] Further, the controller can call a preset spatial position prior condition library, and the spatial position prior condition library includes a plurality of prior conditions pre-configured for the construction type of the robot. For example, for indoor floor construction, the prior conditions can be: the plane height is within ±5 cm, the azimuth angle is close to the horizontal, and the distance from the robot is within 1 m. The spatial position adjustment of each candidate plane is compared with the prior conditions in the spatial position prior condition library one by one. Among all the candidate planes, the plane that completely satisfies or has the highest comprehensive matching degree is found, and the matching degree can be realized by feature weighted scoring. Finally, the candidate plane that satisfies the prior condition and has the optimal matching degree is determined as the reference plane.
[0043] In one embodiment, the spatial position feature and the number of inner points can be considered comprehensively to determine the reference plane. For example, in the case where a plurality of candidate planes satisfy the preset spatial position prior condition, the candidate plane with the largest number of inner points is determined as the reference plane.
[0044] Thus, the embodiment introduces a multi-dimensional space position prior condition for intelligent screening, which is conducive to improving the scene adaptability of the scheme and improving the accuracy of identifying the target construction plane reference plane in a complex and multi-structure scene.
[0045] In the embodiment of the application, the spatial angle deviation between the working surface of the working mechanism and the reference plane comprises: determining a spatial normal vector of the reference plane; determining a spatial angle deviation between the spatial normal vector and a target axial direction in a robot body coordinate system based on a pre-calibrated relative pose transformation relationship between a point cloud acquisition device coordinate system and the robot body coordinate system, the target axial direction being perpendicular to the working surface of the working mechanism.
[0046] In the embodiment of the application, the spatial normal vector of the reference plane is a normal direction unit vector of the reference plane equation obtained through plane feature extraction, which represents the spatial orientation of the target construction plane. The pre-calibrated pose transformation relationship refers to a fixed spatial relationship between the point cloud acquisition device coordinate system and the robot body coordinate system determined through precise measurement or calibration algorithm during robot assembly and debugging, including a rotation matrix and a translation vector. The robot body coordinate system is a reference coordinate system established with the robot chassis or center as the origin, which is the reference coordinate system for robot motion control. The target axial direction is a specific directional axis defined in the robot body coordinate system, which is designed to be perpendicular to the theoretical working plane of the working mechanism, and when the robot posture is ideal, the axis should be perpendicular to the actual construction plane.
[0047] It can be understood that in the calculation of the angle deviation, the traditional method often directly compares the plane normal vector measured by the sensor with the direction of gravity, or simplifies the working surface as a horizontal plane, which ignores the actual factors such as sensor installation position deviation, robot body posture change and working mechanism installation angle, resulting in inaccurate calculation of the deviation. To solve this problem, the embodiment of the application establishes a unified coordinate reference system and an accurate geometric relationship model, and by pre-calibrating the fixed transformation relationship between the sensor and the robot body, all measurement values are converted into the body coordinate system for processing, ensuring the physical accuracy of the angle calculation and truly reflecting the spatial geometric relationship between the working surface and the target construction plane.
[0048] Specifically, first, a spatial normal vector of the reference plane in the point cloud acquisition device coordinate system is extracted from the reference plane equation; then, the normal vector is converted to the robot body coordinate system by using a pre-calibrated transformation matrix to obtain a converted spatial normal vector. In the robot body coordinate system, the target axis direction of the work mechanism is a known design parameter, and the axis is perpendicular to the ideal work surface. A spatial included angle between the target axis direction and the converted spatial normal vector is determined, and the included angle is the total spatial angle deviation between the work surface and the reference plane. In this way, by establishing a unified coordinate reference system and an accurate geometric relationship model, the deviation calculation distortion caused by system errors such as sensor installation bias and robot body tilt is solved, and the subsequent leveling accuracy is improved.
[0049] In the embodiment of the application, the robot further comprises a pose adjustment mechanism for adjusting the pose of the robot; Based on the spatial angle deviation, the pose of the robot is adjusted, comprising: The spatial angle deviation is input to a preset closed-loop controller to obtain a pose adjustment control quantity; According to the pose adjustment control quantity, the pose adjustment mechanism is driven to act, so as to adjust at least one of the pitch angle, the roll angle and the yaw angle of the body of the robot.
[0050] In the embodiment of the application, the pose adjustment mechanism refers to an execution mechanism installed on the robot body and capable of actively changing the spatial pose of the robot body, for example, an independently telescopic electric push rod, a hydraulic leg, an active suspension system or an omnidirectional mobile chassis. The closed-loop controller refers to a regulating system that constitutes a control loop through real-time feedback of a sensor, and in the embodiment of the application, specifically refers to an algorithm module for receiving the spatial angle deviation and outputting the pose adjustment control quantity, such as a PID controller, a fuzzy controller and the like. The pose adjustment control quantity is a specific action instruction required to drive each execution mechanism and calculated by the preset closed-loop controller according to the current deviation, and usually includes the telescopic displacement, the speed or the force / torque instruction of each adjustment mechanism. The pitch angle, the roll angle and the yaw angle are Euler angles for describing the three-dimensional spatial pose of the robot body, and correspond to the rotation angles around the X-axis, the Y-axis and the Z-axis of the body coordinate system.
[0051] It can be understood that the traditional leveling method mostly adopts open-loop control or simple threshold control, that is, the adjustment quantity is calculated once and then executed, and then re-detected. This method has slow response, is easy to overshoot and is difficult to maintain stability in a dynamically changing environment. In view of this problem, the embodiment of the application adopts a real-time closed-loop feedback control mechanism, and constructs the leveling process as a dynamic and continuous error adjustment system. The controller calculates the deviation and outputs the control quantity in real time, and the mechanism is continuously adjusted, so that the robot gradually approaches and maintains the target pose in the movement process.
[0052] Specifically, the system presets a closed-loop controller, and an input of the closed-loop controller is a spatial angle deviation calculated in real time. In an example, when the parallelism between the working surface and the construction plane is adjusted through the pitch angle and the roll angle, the spatial angle deviation can be decomposed into a pitch angle deviation Δα and a roll angle deviation Δβ, which correspond to two independent control channels respectively. The controller operates at a fixed control period. In each control period, the controller calculates a corresponding pose adjustment control quantity according to the current deviation values Δα and Δβ and their change rates according to a preset control algorithm. For example, a PID controller calculates a control signal containing a proportional term, an integral term and a differential term, to realize fast response to the deviation, elimination of steady-state error and damping suppression. The calculated control quantity is usually quantified as a telescopic displacement control instruction for each actuator. Further, the control instruction is sent to the driver of the pose adjustment mechanism, and the driver accurately controls the movement of each actuator according to the instruction, so as to change the spatial pose of the robot body. For example, the pitch angle and the roll angle of the robot body are adjusted independently or coupled. For applications requiring horizontal plane direction adjustment, the controller can also output a yaw angle adjustment quantity if the mechanism allows (such as a omni-directional wheel chassis).
[0053] In this way, the embodiment realizes the dynamicization, high precision and strong robustness of the robot pose adjustment process through the closed-loop control strategy, and significantly improves the leveling efficiency and the final parallelism.
[0054] In the embodiment of the present application, before the plane feature extraction based on the current frame point cloud, the method further comprises: The current frame point cloud is preprocessed, and the preprocessing includes at least one of noise filtering, voxel filtering, ground point filtering and outlier point removal.
[0055] It can be understood that, since the original point cloud data usually contains a large amount of redundant information and various noises, if the original point cloud is directly subjected to plane extraction, these interference points will seriously affect the robustness and accuracy of the fitting algorithm. Therefore, the embodiment of the present application can first preprocess the current frame point cloud before the plane feature extraction of the current frame point cloud. The preprocessing mode can include at least one of noise filtering, voxel filtering, ground point filtering and outlier point removal. Noise filtering is used to remove random and sparse invalid data points caused by sensor errors, environmental light or reflection and the like. Voxel filtering replaces all points in each grid with the centroid or center point of all points in the grid by dividing the three-dimensional space into uniform grids, to realize the simplification of the point cloud data amount and the preservation of the geometric structure. Ground point filtering identifies and removes the point cloud data belonging to the ground, to avoid interfering with the extraction of the target plane. Outlier point removal can remove isolated points whose density in the local neighborhood is significantly lower than that of the surrounding points. In this way, the input data can be effectively purified, and the accuracy, robustness and processing efficiency of the subsequent reference plane extraction are improved.
[0056] Figure 2 A flowchart of a method for automatic leveling and posture calibration of a spraying robot based on a laser radar is provided for an embodiment of the present application. As shown in the figure, Figure 2 in an embodiment of the present application, a non-repetitive scanning solid-state laser radar can be installed at the forehead position of the robot, the laser radar coordinate system is denoted as L, and the robot body coordinate system is denoted as R. The flow of automatic leveling and posture calibration of the spraying robot based on the laser radar is as follows: (1) Obtain the original three-dimensional point cloud data through the 3D laser radar, and the 3D laser radar outputs a frame of point cloud: ; (2) Preprocess the obtained point cloud, including noise filtering, voxel filtering, ground point filtering and outlier removal. The preprocessed point cloud data will be used for subsequent plane feature extraction.
[0057] (3) Extract the maximum plane from the point cloud data using the plane fitting algorithm based on random sample consensus (RANSAC). The specific process is as follows: first, use RANSAC to fit the plane, calculate the number of point clouds of the fitted maximum plane, and determine whether it is greater than the threshold. If it does not reach the threshold, return to the program and continue to the next frame for judgment. If it reaches the threshold, randomly select three points in the point cloud of the range, calculate the corresponding plane equation ; Calculate the distance of all point clouds to the plane : ; Set a threshold dth. If <dth, the point is considered to be an in-model sample point, otherwise it is an out-of-model sample point. Record the number of in-points. Repeat the above steps, set the iteration number, and output the plane model with the most in-points as the reference plane.
[0058] (4) Perform normal vector direction unification processing. According to actual requirements, the can be directed upwards / outward. Obtain the plane normal vector from the plane equation . Obtain the angle according to the projection vector of the plane normal vector on the XOZ and YOZ planes and the included angle with the Z axis.
[0059] (5) Perform external parameter transformation to convert the angle deviation calculated in the laser radar coordinate system to the robot coordinate system. This conversion needs to pre-calibrate the position relationship between the radar coordinate system and the robot coordinate system, including the X-axis displacement, the Y-axis displacement, the Z-axis displacement, and the rotation angle information of the three axes: ; ; ; wherein, a representation of the plane normal vector in the robot coordinate system, a representation of the plane normal vector in the LiDAR coordinate system, is a unit vector of the X-axis of the LiDAR coordinate system, is a unit vector of the Z-axis of the LiDAR coordinate system, is a rotation matrix of the LiDAR to the robot coordinate system, is a unit vector of the X-axis of the robot coordinate system, is a unit vector of the Z-axis of the robot coordinate system.
[0060] (6) Send the offset angle information to the control end, send the angle information and calculate the current angle in real time until the angle deviation that is, the wall angle correction is completed.
[0061] ; .
[0062] wherein, is the angle between the plane normal vector and the X-axis in the robot coordinate system.
[0063] The specific embodiments of the present application use a high-line laser radar (such as a 144-line digital solid-state laser radar) as the main perception sensor. Compared with the traditional low-line radar (less than 20 lines), it can provide rich and dense point cloud data, thereby realizing higher precision environment perception and leveling control. Experiments have proved that the use of this method can achieve a leveling precision of not more than 0.05° in both directions, which is much higher than the prior art. At the same time, the laser radar is not affected by the light condition and has excellent night operation capability. The technical solution of the present application eliminates the dependence on specific environmental configuration (such as wall corner) during robot leveling, and can realize effective leveling in various environments. By adopting advanced point cloud processing algorithm and adaptive parameter adjustment mechanism, the system can adapt to different materials of the ground and the wall (except glass plane), including uneven terrain and complex environmental structure. Compared with the traditional scheme, the present application does not need to rely on additional sensors, reducing the system complexity and dependence on external conditions. The system is completely based on the point cloud data provided by the laser radar, and realizes leveling through algorithm processing. This self-contained feature greatly improves the flexibility and deployment convenience of the system.
[0064] Figure 3 is a structural block diagram of a controller provided by an embodiment of the present application. As shown in Figure 3 the present application provides a controller, which can include: a memory 310 configured to store instructions; The processor 320 is configured to call instructions from the memory 310 and implement the robot automatic leveling method described above when the instructions are executed.
[0065] The application also provides a robot, which comprises: The controller in the above embodiment; The body; The working mechanism is used for performing planar working operation. The point cloud acquisition device is arranged on the body and faces the plane of the working mechanism.
[0066] In the embodiment of the application, the body, i.e., the main structure of the robot, carries various functional modules and realizes the moving function. The working mechanism is a device for performing specific working operation, such as a smoothing disc, a spraying head, a milling cutter disc, etc., and its working surface needs to be parallel to the plane to be constructed. The point cloud acquisition device is a three-dimensional environment perception sensor, such as a laser radar, a depth camera, etc., which can obtain a dense three-dimensional point coordinate set of the surface of the environment; in order to realize higher-precision environment perception, the point cloud acquisition device is preferably a high-line laser radar in the embodiment of the application, which can provide more abundant and dense point cloud data compared with a traditional low-line laser radar. The target construction plane refers to the target plane region to be constructed.
[0067] In the embodiment of the application, the robot further comprises a pose adjustment mechanism for adjusting the pose of the robot.
[0068] In the embodiment of the application, the pose adjustment mechanism refers to an execution mechanism installed on the body of the robot, which can actively change the spatial pose, such as an independently telescopic electric push rod, a hydraulic leg, an active suspension system or an omnidirectional mobile chassis, etc.
[0069] The application also provides a machine-readable storage medium, which stores instructions for causing a machine to execute the robot automatic leveling method in the above embodiment.
[0070] Those skilled in the art should understand that the embodiments of the application can be provided as a method, a system or a computer program product. Therefore, the application can adopt a completely hardware embodiment, a completely software embodiment or an embodiment combining software and hardware aspects. Moreover, the application can adopt the form of a computer program product implemented on one or more computer usable storage media containing computer usable program code (including but not limited to disk storage, CD-ROM, optical storage, etc.).
[0071] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0072] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0073] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0074] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0075] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, for storing instructions and data used and / or generated by the computing device. The memory can also include non-volatile memory, such as read-only memory (ROM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or nonvolatile random access memory (RAM) (e.g., fault tolerant RAM), for storing instructions and data used and / or generated by the computing device. The memory is an example of computer readable media.
[0076] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0077] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or apparatus that includes a list of elements does not only include those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such a process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0078] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.
Claims
1. A method for automatic leveling of a robot, characterized in that, The robot includes a body, a working mechanism, and a point cloud acquisition device. The working mechanism is used to perform planar construction operations, and the point cloud acquisition device is mounted on the body facing the working surface of the working mechanism. The method includes: Obtain the current frame point cloud containing the target construction surface, collected by the point cloud acquisition device; Planar features are extracted from the current frame point cloud to extract the reference plane where the target construction surface is located; Determine the spatial angular deviation between the working surface of the working mechanism and the reference plane; Based on the spatial angle deviation, the robot's pose is adjusted until the working surface is parallel to the reference plane.
2. The method for automatic leveling of a robot according to claim 1, characterized in that, The step of extracting planar features from the current frame point cloud to extract the reference plane where the target construction surface is located includes: Based on a preset plane fitting algorithm, multiple candidate planes are extracted from the current frame point cloud, and the number of point clouds in the candidate planes is greater than a preset point cloud number threshold. For each candidate plane, a planar model of the candidate plane is determined, and the number of interior points of the interior sample points contained in the candidate plane is determined based on a preset interior point distance threshold. The interior sample points are points in the current frame point cloud whose distance from the planar model is less than the preset interior point distance threshold. The candidate plane with the most interior points among the multiple candidate planes is determined as the reference plane.
3. The method for automatic leveling of a robot according to claim 1, characterized in that, The step of extracting planar features from the current frame point cloud to extract the reference plane where the target construction surface is located includes: Based on a preset plane fitting algorithm, multiple candidate planes are extracted from the current frame point cloud; Determine the spatial position characteristics of each candidate plane, wherein the spatial position characteristics include at least one of the following: plane azimuth angle, plane height, plane normal vector, and relative distance to the robot; Among multiple candidate planes, the candidate plane whose spatial location features satisfy the preset spatial location prior conditions is determined as the reference plane.
4. The method for automatic robot leveling according to claim 1, characterized in that, Determining the spatial angular deviation between the working surface of the operating mechanism and the reference plane includes: Determine the spatial normal vector of the reference plane; Based on the relative pose transformation relationship between the pre-calibrated point cloud acquisition device coordinate system and the robot body coordinate system, the spatial angle deviation between the spatial normal vector and the target axis in the robot body coordinate system is determined, wherein the target axis is perpendicular to the working surface of the working mechanism.
5. The method for automatic leveling of a robot according to claim 1, characterized in that, The robot also includes a pose adjustment mechanism for adjusting the robot's pose; Adjusting the robot's pose based on the spatial angle deviation includes: The spatial angle deviation is input to a preset closed-loop controller to obtain the pose adjustment control quantity; The pose adjustment mechanism is driven to move according to the pose adjustment control amount to adjust at least one of the pitch angle, roll angle and yaw angle of the robot body.
6. The method for automatic leveling of a robot according to claim 1, characterized in that, Before performing planar feature extraction based on the current frame point cloud, the method further includes: The current frame point cloud is preprocessed, and the preprocessing includes at least one of noise filtering, voxel filtering, ground point filtering, and outlier removal.
7. A controller, characterized in that, include: The memory is configured to store instructions; as well as The processor is configured to retrieve instructions from memory and, when executing the instructions, to implement the method of automatic robot leveling according to any one of claims 1 to 6.
8. A robot, characterized in that, The robot includes: The controller according to claim 7; ontology; The working mechanism is used to perform surface construction operations; The point cloud acquisition device is mounted on the main body with its plane facing the working mechanism.
9. The robot according to claim 8, characterized in that, The robot also includes: A pose adjustment mechanism is used to adjust the pose of the robot.
10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing the machine to perform the automatic leveling method for a robot according to any one of claims 1 to 6.