Stable obstacle avoidance method and system applied to legged robot
By dynamically adjusting the grid size to adapt to environmental changes, the problem of decreased accuracy of traditional NDT point cloud registration algorithms in complex dynamic environments is solved, achieving high-precision obstacle recognition and stable obstacle avoidance.
Patent Information
- Application Number
- CN202611643976.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-23
- Publication Date
- 2026-11-20
AI Technical Summary
Traditional NDT point cloud registration algorithms struggle to adapt to changes in the complexity of static environmental structures in complex dynamic environments, leading to decreased point cloud registration accuracy and loss of obstacle features. Furthermore, robot jitter and interference from dynamic objects cause point cloud distortion, affecting the stability of the obstacle avoidance system.
By evaluating the static and dynamic influence parameters of the point cloud, the mesh size is dynamically adjusted, and combined with the preset base size, the mesh is reconstructed to adapt to environmental changes, ensuring the accuracy and stability of point cloud registration.
It improves the accuracy of point cloud registration and the reliability of obstacle recognition, thereby enhancing the safety and stability of obstacle avoidance path planning for legged robots in complex environments.
Smart Images

Figure CN123137356A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot obstacle avoidance technology, specifically to a stable obstacle avoidance method and system applied to legged robots. Background Technology
[0002] With the continuous development of robotics technology, legged robots have been widely used in inspection and operation in various complex scenarios. Safe and reliable obstacle avoidance control is the core of autonomous navigation for legged robots. Currently, legged robots mainly rely on onboard LiDAR to collect 3D point clouds in real time, and then use the NDT (Normal Distribution Transform) point cloud registration algorithm to register and align the point clouds, thereby constructing a 3D environmental model for planning obstacle avoidance paths.
[0003] However, in practical applications, traditional NDT point cloud registration algorithms typically employ fixed-size spatial grid partitioning, which has significant limitations and struggles to meet the stable obstacle avoidance requirements of legged robots in complex dynamic environments. Firstly, fixed grids are ill-suited to adapting to changes in the static structural complexity of the environment. If the grid is too large, multiple objects or subtle geometric features in a complex environment may be forcibly included in the same grid, resulting in the smoothing of local features and a decrease in matching accuracy. If the grid is too small, in open or structurally simple areas, the number of points within the grid may be insufficient to form an effective statistical distribution model, easily leading to registration algorithm divergence. Furthermore, when legged robots traverse steps or uneven surfaces, gait movements cause high-frequency shaking of the robot body; simultaneously, the limited scanning cycle of the LiDAR causes motion distortion in dynamic objects in the environment. Both of these factors contribute to spatial stretching, compression, or sparsity of the acquired point cloud. Existing methods using fixed grids often misclassify point clouds with abnormal distributions due to dynamic disturbances as noise, or lose the normal features of distorted point clouds due to grid size mismatch.
[0004] Therefore, how to adaptively and dynamically adjust the mesh size of the NDT algorithm based on the static structural characteristics of the current environment, and by integrating the dynamic shaking degree of the legged robot itself and the interference of dynamic objects in the environment, in order to ensure the accuracy of point cloud registration and the stability of the obstacle avoidance system, is a technical problem that urgently needs to be solved in the field of legged robot navigation. Summary of the Invention
[0005] To address the aforementioned technical problems, the purpose of this application is to provide a stable obstacle avoidance method and system for legged robots, and the specific technical solution adopted is as follows: In a first aspect, embodiments of this application provide a stable obstacle avoidance method for legged robots, the method comprising the following steps: Acquire continuous multi-frame 3D point cloud data collected by LiDAR during the movement of the legged robot, and divide the current frame point cloud data into an initial grid; Based on the density of point cloud distribution in each initial grid, the structural feature differences between each initial grid and its neighboring grids, and the responsivity of the point cloud in each initial grid to represent the environmental background, the static environmental features of the current frame point cloud are evaluated, and the static influence parameters corresponding to each initial grid are obtained. Based on the differences in point cloud density distribution in specific directions within each initial grid and the consistency characteristics of point cloud normal vectors within the initial grid, the machine jitter interference and dynamic object interference experienced by each initial grid are evaluated, and the dynamic influence parameters corresponding to each initial grid are obtained. By using the static and dynamic influence parameters of each initial mesh, the size scaling factor corresponding to each initial mesh is determined, and combined with the preset base mesh size, the corrected mesh size corresponding to each initial mesh is determined; By correcting the mesh size, the current frame point cloud is reconstructed and point cloud registration is performed. The point clouds of multiple frames are fused to construct a three-dimensional environment model, which is used to identify obstacles and plan obstacle avoidance paths to control the movement of the legged robot.
[0006] In one embodiment, determining the static influence parameters corresponding to each initial grid includes: The density of the point cloud distribution is obtained by calculating the ratio of the number of points in the initial grid to the grid volume. Extract local geometric feature descriptors of the point cloud from the initial mesh and adjacent meshes, and evaluate the differences in structural features by comparing the local geometric feature descriptors; Analyze the numerical distribution and aggregation of local geometric feature descriptors of the initial mesh to determine the responsivity of the point cloud to represent the environmental background; The static influence parameter is obtained by fusing the evaluation value of the structural feature difference with the positive correlation of the responsivity and performing a weighted calculation with the density of the point cloud distribution.
[0007] In one embodiment, evaluating the structural feature differences by comparing local geometric feature descriptors includes: Calculate the similarity between the local geometric feature descriptor of the point cloud of the initial grid and the local geometric feature descriptor of the point cloud of each of its neighboring grids, and evaluate the structural feature difference by the mean of the similarity of all neighboring grids.
[0008] In one embodiment, determining the responsivity of the point cloud representing the environmental background includes: Extract several maximum feature values from the local geometric feature descriptors of the initial mesh, and calculate the product of the mean of the extracted maximum feature values and the overall range of the local geometric feature descriptors of the point cloud as the responsivity of the point cloud in representing the environmental background.
[0009] In one embodiment, determining the dynamic influence parameters corresponding to each initial grid includes: Construct a sequence of connected grids in a specific direction from the initial grid, and calculate the discreteness of the point cloud density distribution of the connected grid sequence as a jitter characteristic parameter for evaluating machine jitter interference; Based on the local consistency characteristics of the point cloud normal vectors of the initial grid and adjacent grids, dynamic characteristic parameters characterizing the disturbance of dynamic objects are calculated. The jitter feature parameters and the dynamic feature parameters are added and fused to obtain the dynamic influence parameters.
[0010] In one embodiment, the calculation of the degree of discreteness includes: The specific direction is set as the Z-axis direction in the coordinate system of the lidar body. Multiple grids that are collinear with the initial grid in this specific direction are extracted to construct a connected grid sequence. The point cloud density of each grid in the connected grid sequence is calculated. The variance of the point cloud density is used as the degree of dispersion of the point cloud density distribution of the connected grid sequence.
[0011] In one embodiment, the calculation of dynamic characteristic parameters characterizing the disturbance of dynamic objects includes: Clustering of point clouds within the initial grid based on the difference in normal vector angles, obtaining the principal normal vector of the initial grid, calculating the maximum angle difference between the normal vector of each point cloud within the initial grid and the principal normal vector, and the standard deviation of the maximum angle difference corresponding to each adjacent grid; The dynamic characteristic parameters are determined by the ratio of the maximum angular difference of the initial grid to the standard deviation.
[0012] In one embodiment, determining the size scaling factor corresponding to each initial grid includes: A constant bias term is added to the dynamic influence parameter, and the result after adding the bias term is multiplied and fused with the static influence parameter. The multiplication and fusion result is normalized to obtain the size scaling factor corresponding to each initial mesh.
[0013] In one embodiment, determining the corrected grid size corresponding to each initial grid includes: The size scaling factor, the preset scaling limit factor, and the base mesh size are multiplied together to obtain the candidate mesh size. If the candidate mesh size is less than or equal to the preset lower limit size threshold, the corrected mesh size is set to the lower limit size threshold; otherwise, the candidate mesh size is used as the corrected mesh size.
[0014] Secondly, embodiments of this application also provide a stable obstacle avoidance system for legged robots, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of any of the methods described above.
[0015] This application has at least the following beneficial effects: This application effectively solves the technical problem that fixed mesh sizes in traditional NDT point cloud registration are difficult to adapt to complex scenes. By comprehensively evaluating the density of point cloud distribution within the initial mesh, the structural feature differences between adjacent meshes, and the responsiveness of the point cloud to the environmental background, it can accurately quantify the static features of the environment. This allows for automatic mesh enlargement in open or repetitive structure areas, ensuring sufficient point cloud support for the normal distribution statistical model to prevent algorithm divergence. Conversely, in structurally complex areas, the mesh size can be reduced or maintained to avoid confusion of multiple object features, greatly improving the integrity of point cloud feature preservation and registration accuracy. Furthermore, by analyzing the differences in point cloud density distribution in specific directions and the consistency characteristics of local point cloud normal vectors within the mesh, it can accurately identify objects generated by robots. The point cloud stretching and sparsity caused by body undulation and vibration, as well as dynamic objects in the environment, are addressed by dynamically enlarging the mesh in these disturbed areas. This ensures that the distorted point cloud can be completely encapsulated in the same statistical model, avoiding the shortcomings of traditional methods that misclassify it as invalid noise and cause the loss of key obstacle features. Finally, by integrating static environmental spatial assessment with dynamic interference compensation mechanisms, the point cloud of multiple consecutive frames can still be accurately aligned under complex, dynamic, and self-vibrating extreme conditions. This allows for the construction of a high-precision, high-density 3D environmental model, providing a highly reliable data source for subsequent obstacle recognition. This fundamentally improves the safety of autonomous obstacle avoidance path planning and the stability of system operation for legged robots in complex inspection scenarios. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the steps of a stable obstacle avoidance method for a legged robot, as provided in one embodiment of this application. Detailed Implementation
[0017] The following description, in conjunction with the accompanying drawings, details the specific scheme of the stabilization obstacle avoidance method and system for legged robots provided in this application.
[0018] Please see Figure 1 The diagram illustrates a flowchart of a method for stabilizing obstacle avoidance in a legged robot according to an embodiment of this application. The method includes the following steps: During the movement of the legged robot, the LiDAR module on its body scans and collects continuous multi-frame 3D point cloud data of the surrounding environment in real time.
[0019] To meet the real-time dynamic obstacle avoidance response requirements of legged robots, the time interval between the acquisition of two adjacent frames of point cloud data is set to t. As a preferred implementation, t can be set to 0.1s to ensure that the gait tremors of the legged robot and changes in dynamic objects in the environment can be accurately captured.
[0020] For each frame of 3D point cloud data acquired, each data point contains, but is not limited to, 3D spatial coordinate information, RGB color information, and normal vector information.
[0021] After acquiring continuous 3D point cloud data, the current frame of point cloud data is first divided into multiple initial grids of preset fixed sizes. These grids serve as the basic spatial units for subsequent static feature evaluation, dynamic interference evaluation, and dynamic grid size reconstruction. The initial grids are typically cubic spatial units. In one specific embodiment of this application, the preset fixed size can be set to a cubic grid with a side length n of 30cm (i.e., 30cm × 30cm × 30cm). This basic size can be pre-calibrated based on the physical shape of the legged robot, the typical openness of the scanning environment, and the resolution of the LiDAR.
[0022] The complexity of the environment in which legged robots operate varies significantly depending on the application scenario. When using the traditional NDT registration algorithm, using a fixed-size initial grid can lead to drastic fluctuations in the effective information contained within a single grid. For example, when the robot is inspecting areas with simple structures, high repetition, or open spaces, the collected point cloud data is relatively sparse, with weak structural features, and the point cloud is likely to be environmental background such as the ground or walls. In this case, if the grid size is too small, there will be too few data points in the grid to participate in the calculation of the normal distribution statistical model (mean and covariance matrix), resulting in insufficient model representativeness and a lack of sufficient geometric constraints, which can easily cause the registration algorithm to diverge.
[0023] Conversely, when a robot inspects an area with a relatively complex environmental structure (such as an indoor scene filled with goods), the point cloud data is densely distributed, and the geometric features between adjacent areas are significantly different. If the mesh size is too large, it is easy to mix the geometric details of multiple different objects or the target object with the background point cloud in the statistical model of the same mesh, resulting in the loss of key features and thus reducing the accuracy of subsequent registration and alignment.
[0024] Therefore, this embodiment comprehensively evaluates the static environmental characteristics of the point cloud in the current frame based on the density of point cloud distribution within each initial grid, the structural feature differences between each initial grid and its adjacent grids, and the responsiveness of the point cloud within each initial grid to represent the environmental background. Specifically: for regions with sparse point cloud distribution, highly similar structural features between adjacent grids, and a high probability of being the environmental background, the grid size should be increased to ensure that the statistical model has sufficient representativeness while smoothing noise; Conversely, for regions with dense point cloud distribution, significant differences in structural features between adjacent meshes, and complex environmental structures, the mesh size should be reduced or maintained at a smaller level to accurately preserve subtle geometric details and improve point cloud registration accuracy. Based on this, the static influence parameters corresponding to each initial mesh are obtained to provide a basis for subsequent dynamic adjustment of the mesh size.
[0025] Therefore, for the data within each initially divided grid, a validity filter is first performed to remove invalid initial grids with fewer than two internal point clouds, preventing the inability to extract effective local geometric features and calculate distances later. For the remaining valid initial grids, the total number of point cloud data contained within each grid is counted, and the ratio of this total number of point clouds to the initial grid volume is calculated. This ratio is used as the point cloud distribution density B of the current initial grid. The larger the value of parameter B, the higher the degree of point cloud data aggregation within the current grid, and the more complex the actual environment at its location may be.
[0026] Furthermore, the structural feature differences of point cloud data within the initial grid are evaluated. Taking a single initial grid as an example, the remaining grids adjacent to it in 3D space are considered as neighboring grids. First, the actual point cloud data point closest to the geometric center of the grid within each grid is selected as the representative point. Then, a preset neighborhood search radius is set (e.g., 1.5 times the side length of the base grid), and based on this search radius, fast point feature histograms (FPFHs) of the representative points of the current initial grid and all its neighboring grids are extracted. The extracted representative point FPFHs are directly used as the local geometric feature descriptors of the corresponding grid. To accurately evaluate the texture structure similarity between the current grid and its neighboring grids, the number of effective neighboring grids of the current initial grid is first determined. If the number of effective neighboring grids is 0, the structural feature similarity C is directly set to 0. If the number of effective neighboring grids is greater than 0, the cosine similarity between the local geometric feature descriptor of the current initial grid and the local geometric feature descriptors of each of its neighboring grids is calculated, and the mean of the cosine similarities of all neighboring grids is recorded as the structural feature similarity C. The larger the value of parameter C, the more similar the current mesh is to the texture structure of the surrounding area, and the smaller the difference in structural features.
[0027] If the initial grid contains relatively flat environmental information (such as structured background information like walls, roads, and steps), its FPFH feature values will exhibit sharp peaks in specific intervals. The FPFH output is known to be a data set of length 33, composed of 11 interval histograms of 3 angular features. To quantify the clustering of this feature distribution, the three largest values from the 33 dimensions of the current initial grid's FPFH data are extracted as feature peaks. The mean of these three feature peaks is calculated, and the product of this mean and the overall range of the 33 dimensions is denoted as the environmental background responsibility D. A larger value for parameter D indicates that the FPFH values are mainly concentrated in a few intervals and are relatively large, suggesting a higher probability that the point cloud data in the current initial grid represents environmental background information.
[0028] Finally, based on the above evaluation results, the static influence parameters corresponding to each initial grid are calculated. Taking the i-th initial grid as an example, the structural feature similarity is calculated. Responsiveness to environmental background Perform positive correlation multiplication and fusion, and utilize the density of point cloud distribution. The fusion result is then subjected to division and weight reduction calculations to obtain the static influence parameters corresponding to the current i-th initial grid. ,Right now Static influence parameters The larger the value, the more likely the point cloud contained in the current initial grid belongs to an environmental background with highly repetitive features and the point cloud distribution is relatively sparse. Therefore, the size of the grid should be increased appropriately to ensure that enough effective information point cloud can be contained and extracted in the normal distribution statistical model of the same grid.
[0029] In actual inspection processes, the smoothness of the inspection surface often varies, requiring the robot to continuously traverse steps or rugged terrain. The gait characteristics of legged robots make them prone to high-frequency changes in body pose during this process. Since conventional 3D LiDAR requires tens to hundreds of milliseconds to complete a full scan frame, body jitter during this period can cause relative spatial displacement misalignment between points scanned earlier and later in the same frame. In particular, vertical (Z-axis) jitter can abnormally stretch or compress the originally uniform point cloud, resulting in significant differences and dispersion in the point cloud density distribution within connected grids in specific directions (such as the vertical direction).
[0030] Furthermore, dynamic objects in the environment undergo spatial displacement during radar scan cycles, causing the point cloud data of these objects to be elongated or exhibiting scan gaps. This distortion manifests as the point cloud of moving objects becoming sparse and spanning multiple initial grids. Within these local grids, the sparse object point cloud often contains background or noise data, leading to local abrupt changes in the point cloud normal vectors; however, due to the physical continuity of the moving object's surface, the principal normal vectors of its true surface (such as a specific side) still maintain strong consistency overall.
[0031] If analysis relies solely on the aforementioned static environmental characteristics, it is highly likely that the point cloud stretched and sparsed due to machine vibration or dynamic object displacement will be misjudged as invalid noise, thus ignoring their real threat to robot obstacle avoidance. Therefore, this embodiment further introduces a dynamic interference analysis mechanism. The degree of machine vibration is quantified by evaluating the difference in point cloud density distribution in a specific direction, and the influence of dynamic objects is quantified by evaluating the consistency characteristics of point cloud normal vectors. When a greater degree of machine vibration or the influence of dynamic objects is identified in a certain area, it indicates that the point cloud in that area has severe dynamic stretching distortion. In this case, the mesh size of that area should be increased to ensure that the stretched and distorted object point cloud can be completely enveloped and classified into the same normal distribution statistical model, thereby avoiding the loss of key object features during registration and subsequent obstacle avoidance.
[0032] To quantify the impact of machine jitter and dynamic objects in the environment, dynamic impact parameters corresponding to each initial grid are calculated. First, regarding the impact of machine jitter on point cloud data, the dispersion of point cloud density distribution in the connected grid sequence of the initial grid in a specific direction is evaluated. Specifically, taking a single initial grid as an example, the specific direction is set as the Z-axis direction in the lidar body coordinate system (i.e., the direction perpendicular to the radar scanning plane). A predetermined number of consecutive collinear grids adjacent to the initial grid in the Z-axis direction are extracted (in this embodiment, M collinear grids above and below the initial grid are selected, where M is a predetermined integer, taken as 2), thereby constructing a vertically connected grid sequence. Subsequently, the point cloud density of each grid in the connected grid sequence is calculated. In this embodiment, the point cloud density is defined as: the average Euclidean distance between each point cloud data in the grid and its nearest neighbor point cloud data, and the reciprocal of this average distance is used as the point cloud density to ensure that the density value is positively correlated with the spatial clustering. In particular, if the number of point clouds inside the extracted collinear grid is less than 2, making it impossible to calculate the nearest neighbor distance, the point cloud density of that grid is directly set to 0.
[0033] Subsequently, the point cloud densities of these grids are arranged sequentially according to their height coordinates along the Z-axis, forming a longitudinal density sequence. The variance S of this longitudinal density sequence is then calculated and used as a jitter characteristic parameter to characterize machine jitter interference. A larger variance S indicates a more uneven distribution of point cloud density along the Z-axis, and a more pronounced stretching distortion caused by vertical undulations and jitter in the fuselage.
[0034] Secondly, considering the impact of dynamic objects in the environment on point cloud data, dynamic feature parameters are calculated based on the local consistency of point cloud normal vectors. Specifically, all point cloud data within the initial grid are used as input, and the Density Peak Clustering (DPC) algorithm is employed. The difference in normal vector angles (i.e., spatial angles) between point cloud data points is used as the distance metric, with a cutoff distance set to 0.1 radians, outputting multiple normal vector angle clusters. Since the point cloud normal vectors within the same cluster are basically consistent, the cluster containing the largest number of point clouds is selected, and the normal vector direction corresponding to this cluster is used as the principal normal vector of the initial grid.
[0035] Subsequently, to measure the distortion of the normal vector caused by noise or motion blur, the maximum angular difference (i.e., the maximum value of the spatial angle) between the normal vectors of each point cloud in the current initial grid and the principal normal vector is calculated. Simultaneously, the maximum angular difference calculated for the point cloud normal vectors in each of its adjacent grids is obtained, and the standard deviation of these maximum angular differences between adjacent grids is calculated. Specifically, when the number of adjacent grids containing valid point cloud data is less than two, this standard deviation is directly set to 0.
[0036] Next, the sum of the standard deviation characteristics of the adjacent grids and the preset minimum protection constant (0.01 radians in this embodiment) is calculated. The ratio of the maximum angular difference of the current initial grid to this sum is used as a dynamic characteristic parameter to characterize the interference of dynamic objects. The larger the ratio, the more significant the normal distortion of the current grid center point cloud is compared with the surrounding environment, and the more likely the point cloud it contains originates from a moving object.
[0037] Finally, combining the above two analyses, based on the extreme values of parameters of all valid initial grids in the current frame as benchmarks, the jitter feature parameter S, which characterizes machine jitter interference, and the dynamic feature parameter, which characterizes dynamic object interference, are subjected to minimax normalization. The normalized jitter feature parameter is then used as the basis for further analysis. Adding the normalized dynamic characteristic parameters to obtain the dynamic influence parameters corresponding to the i-th initial grid. ,Right now ;in, represents the normalized dynamic feature parameters corresponding to the i-th initial grid. The larger the value, the more susceptible the current mesh is to severe shaking during the inspection process of the legged robot or displacement and stretching caused by dynamic objects in the environment. The size of the mesh should be increased to ensure the integrity of the target geometric features in the normal distribution statistical model.
[0038] Furthermore, the static and dynamic influence parameters corresponding to each initial grid are fused to determine the base size scaling factor. To prevent feature loss in the absence of dynamic disturbance, the dynamic influence parameters of the i-th initial grid are... Add a constant bias term of 1 to construct the multiplier factor, i.e. Subsequently, the multiplier factor is compared with the static influence parameters of the initial grid. Perform multiplication and fusion to obtain the basic size scaling factor. ,Right now .
[0039] When the robot is in an ideal state of stable operation and no interference, the dynamic influence parameters Approaching 0, the above operation of adding a constant bias term ensures that the base size scaling factor can completely retain the characteristic information of the statically affecting parameters. Base size scaling factor The larger the value, the larger the current grid size should be to adapt to the current static environment characteristics and dynamic interference.
[0040] To unify the scaling ratio to a standard dimension, historical scaling factor extreme values within a historical time window are obtained. The basic scaling factors calculated for the current frame are then subjected to maximum-minimum normalization. During normalization, it is determined whether the maximum and minimum values in the extreme value records are equal. If they are equal, all scaling factors for the current frame are set to 0. If they are not equal, the normalization is performed using the conventional maximum-minimum normalization formula, and the normalization result is truncated, setting values less than 0 to 0 and values greater than 1 to 1, thus obtaining scaling factors whose value range is strictly between 0 and 1. Specifically, a historical sliding window of a preset length (100 frames in this embodiment) is maintained to continuously record and update the maximum and minimum values of the coefficients. During the initial cold start phase, if the window is not full, preset prior maximum and prior minimum values are used as a benchmark for normalization and truncation. The prior minimum value is preset to 0, and the prior maximum value is set based on the historical maximum scaling factor from similar scenario calibration experiments, such as 10.
[0041] Based on the preset base grid size, the corrected grid size corresponding to each initial grid is determined. The normalized scaling factor, the preset scaling limit factor, and the initial base grid size are multiplied together to obtain the candidate grid size. The scaling limit factor is used to limit the scaling range of the grid size, and its value is usually set to 1 to 5; in this embodiment, a value of 2 is preferred. Subsequently, to ensure that the minimum grid scale can accommodate a certain number of point clouds, it is determined whether the candidate grid size is less than or equal to a preset lower limit size threshold (set to 5cm in this embodiment). If the candidate grid size is less than or equal to the lower limit size threshold, the corrected grid size of the initial grid is forcibly set to the lower limit size threshold; otherwise, the candidate grid size is directly used as the corrected grid size. Through the above operations, the optimal side length required for grid reconstruction in different spatial regions at the current time can be calculated.
[0042] Based on the calculated corrected grid sizes for each region, the current frame point cloud is reconstructed and NDT (Normal Distribution Transform) point cloud registration is performed. Using the geometric center of each initial grid as a reference, the grid boundaries are redefined according to the corresponding corrected grid sizes. After dynamic adjustment of the grid size, spatial overlap or uncovered gaps may occur between adjacent grids. For point cloud data in grid overlap regions, the Euclidean distance from the point cloud to the geometric center of each overlapping grid is calculated, and it is assigned to the grid with the smallest distance. For point cloud data not included in any reconstructed grid, it is directly back-assigned to the preset base grid (i.e., the initial grid). After grid reassignment, the total number of point cloud data contained in each reconstructed grid and the base grid that received the back-assigned point cloud is detected. If the total number of point clouds is less than a preset effective threshold h (to ensure the invertibility of the covariance matrix, h is usually an integer greater than or equal to 3; in this embodiment, it is 3), the grid is considered invalid and discarded. For valid grids where the total number of point clouds meets the requirement, the mean vector q and covariance matrix of all point cloud data within the grid are calculated respectively. Thus, a normal distribution model N(q) representing the statistical characteristics of the grid point cloud is constructed. ).
[0043] Next, a scoring function for point cloud registration is defined. Given pose transformation parameters including rotation matrices and translation vectors, the source point cloud (current frame point cloud) is spatially transformed and mapped to the target point cloud (reference local map) coordinate system. For any transformed point, the target grid it falls into is searched. During this spatial retrieval process, an exclusive matching rule is set: if the point falls into multiple overlapping reconstructed grid spaces, it is uniquely mapped to the reconstructed grid whose geometric center is closest to the point; if the point does not fall into any reconstructed grid space, it is uniquely mapped to the base grid corresponding to its spatial location. Based on the normal distribution model of the uniquely determined target grid, the score probability of the point is calculated using a Gaussian probability density function. In this process, to prevent the covariance matrix from becoming irreversible under extreme point cloud distributions, a very small regularization constant can be applied to the main diagonal of the covariance matrix. The score probabilities of all mapped points are summed to obtain the overall scoring function used to characterize the current registration accuracy. Subsequently, Newton's method is used to perform nonlinear optimization of the scoring function. The update step size of the transformation parameters is obtained by calculating the gradient direction and Hessian matrix of the scoring function, and the transformation parameters are iteratively updated until the update step size is less than a preset convergence threshold (set to 0.01 in this embodiment). Using the finally converged optimal transformation parameters, the continuously acquired multi-frame point cloud data are accurately aligned and stitched together to construct a more complete and dense 3D environment model.
[0044] Based on the 3D environment model constructed through registration, obstacle identification is further performed. First, the Random Sample Consensus (RANSAC) algorithm is used to fit the ground plane model in the point cloud. Points belonging to this plane are marked as ground points and removed to reduce interference from irrelevant data on obstacle avoidance. Then, the remaining non-ground point cloud is segmented into multiple independent obstacle clusters using Euclidean clustering. For each independent obstacle cluster, its physical feature parameters, including geometric center coordinates, bounding box, and volume dimensions, are extracted to accurately locate each physical obstacle in the 3D environment model.
[0045] Finally, obstacle avoidance control is executed based on the identified obstacle information. The A* path planning algorithm is employed, with obstacle features incorporated into its heuristic cost function for dynamic adjustment: the closer a node on the planned path is to the obstacle's bounding box, or the larger the obstacle, the higher the penalty cost for traversing that node. This approach ensures the shortest global path while actively guiding the path away from dangerous obstacles, thus planning a safe and optimal obstacle avoidance route. Upon receiving the latest obstacle avoidance route, the robot's underlying control system calculates in real time and sends corresponding linear and angular velocity control commands to the robot's four legs, driving the legged robot to perform lateral avoidance or turning maneuvers. This ensures the robot can stably and safely complete inspection tasks even in complex, dynamic environments with its own vibrations.
[0046] Based on the same inventive concept as the above methods, this application also provides a stable obstacle avoidance system for legged robots, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any of the above-described stable obstacle avoidance methods for legged robots.
Claims
1. A stable obstacle avoidance method applied to legged robots, characterized in that, The method includes the following steps: Acquire continuous multi-frame 3D point cloud data collected by LiDAR during the movement of the legged robot, and divide the current frame point cloud data into an initial grid; Based on the density of point cloud distribution in each initial grid, the structural feature differences between each initial grid and its neighboring grids, and the responsivity of the point cloud in each initial grid to represent the environmental background, the static environmental features of the current frame point cloud are evaluated, and the static influence parameters corresponding to each initial grid are obtained. Based on the differences in point cloud density distribution in specific directions within each initial grid and the consistency characteristics of point cloud normal vectors within the initial grid, the machine jitter interference and dynamic object interference experienced by each initial grid are evaluated, and the dynamic influence parameters corresponding to each initial grid are obtained. By using the static and dynamic influence parameters of each initial mesh, the size scaling factor corresponding to each initial mesh is determined, and combined with the preset base mesh size, the corrected mesh size corresponding to each initial mesh is determined; By correcting the mesh size, the current frame point cloud is reconstructed and point cloud registration is performed. The point clouds of multiple frames are fused to construct a three-dimensional environment model, which is used to identify obstacles and plan obstacle avoidance paths to control the movement of the legged robot.
2. The stable obstacle avoidance method for legged robots as described in claim 1, characterized in that, The determination of the static influence parameters corresponding to each initial grid includes: The density of the point cloud distribution is obtained by calculating the ratio of the number of points in the initial grid to the grid volume. Extract local geometric feature descriptors of the point cloud from the initial mesh and adjacent meshes, and evaluate the differences in structural features by comparing the local geometric feature descriptors; Analyze the numerical distribution and aggregation of local geometric feature descriptors of the initial mesh to determine the responsivity of the point cloud to represent the environmental background; The static influence parameter is obtained by fusing the evaluation value of the structural feature difference with the positive correlation of the responsivity and performing a weighted calculation with the density of the point cloud distribution.
3. The stable obstacle avoidance method for legged robots as described in claim 2, characterized in that, The evaluation of structural feature differences by comparing local geometric feature descriptors includes: Calculate the similarity between the local geometric feature descriptor of the point cloud of the initial grid and the local geometric feature descriptor of the point cloud of each of its neighboring grids, and evaluate the structural feature difference by the mean of the similarity of all neighboring grids.
4. The stable obstacle avoidance method for legged robots as described in claim 2, characterized in that, The determination of the point cloud's responsivity to represent the environmental background includes: Extract several maximum feature values from the local geometric feature descriptors of the initial mesh, and calculate the product of the mean of the extracted maximum feature values and the overall range of the local geometric feature descriptors of the point cloud as the responsivity of the point cloud in representing the environmental background.
5. The stable obstacle avoidance method for legged robots as described in claim 1, characterized in that, The determination of the dynamic influence parameters corresponding to each initial grid includes: Construct a sequence of connected grids in a specific direction from the initial grid, and calculate the discreteness of the point cloud density distribution of the connected grid sequence as a jitter characteristic parameter for evaluating machine jitter interference; Based on the local consistency characteristics of the point cloud normal vectors of the initial grid and adjacent grids, dynamic characteristic parameters characterizing the disturbance of dynamic objects are calculated. The jitter feature parameters and the dynamic feature parameters are added and fused to obtain the dynamic influence parameters.
6. The stable obstacle avoidance method for legged robots as described in claim 5, characterized in that, The calculation of the degree of dispersion includes: The specific direction is set as the Z-axis direction in the coordinate system of the lidar body. Multiple grids that are collinear with the initial grid in this specific direction are extracted to construct a connected grid sequence. The point cloud density of each grid in the connected grid sequence is calculated. The variance of the point cloud density is used as the degree of dispersion of the point cloud density distribution of the connected grid sequence.
7. The stable obstacle avoidance method for legged robots as described in claim 5, characterized in that, The calculation of dynamic characteristic parameters characterizing the disturbance of dynamic objects includes: Clustering of point clouds within the initial grid based on the difference in normal vector angles, obtaining the principal normal vector of the initial grid, calculating the maximum angle difference between the normal vector of each point cloud within the initial grid and the principal normal vector, and the standard deviation of the maximum angle difference corresponding to each adjacent grid; The dynamic characteristic parameters are determined by the ratio of the maximum angular difference of the initial grid to the standard deviation.
8. The stable obstacle avoidance method for legged robots as described in claim 1, characterized in that, Determining the size scaling factor corresponding to each initial grid includes: A constant bias term is added to the dynamic influence parameter, and the result after adding the bias term is multiplied and fused with the static influence parameter. The multiplication and fusion result is normalized to obtain the size scaling factor corresponding to each initial mesh.
9. The stable obstacle avoidance method for legged robots as described in claim 1, characterized in that, Determining the corrected grid size corresponding to each initial grid includes: The size scaling factor, the preset scaling limit factor, and the base mesh size are multiplied together to obtain the candidate mesh size. If the candidate mesh size is less than or equal to the preset lower limit size threshold, the corrected mesh size is set to the lower limit size threshold; otherwise, the candidate mesh size is used as the corrected mesh size.
10. A stabilization obstacle avoidance system for legged robots, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1-9.
