Self-adaptive compression method for three-dimensional map of quadruped robot under complex terrain
By using dynamic programming and RANSAC plane fitting methods, a 3D point cloud map is adaptively compressed into a 2D map, which solves the problems of map distortion and obstacle recognition errors in complex environments. This generates a continuous and reliable 2D map suitable for quadruped robots, improving the accuracy and reliability of the navigation system.
Patent Information
- Application Number
- CN202511588896.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies, when compressing 3D maps into 2D maps in complex environments, are prone to problems such as map distortion, obstacle recognition errors, and insufficient continuity of 2D maps.
By acquiring a 3D point cloud map, extracting the Z-axis height information of keyframes, performing filtering and smoothing, dynamically programming to divide the keyframes into compressed units with consistent internal heights, using the RANSAC plane fitting method to identify ground points, setting the compression height range, and performing orthophoto projection to generate 2D local sub-maps, which are finally stitched together to generate a global 2D map.
It enables the generation of continuous and reliable two-dimensional maps in complex environments, improving the accuracy and reliability of navigation systems and making it suitable for autonomous localization and path planning of quadruped robots.
Smart Images

Figure CN121708231A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of inspection robot mapping and navigation, in particular, to a three-dimensional map adaptive compression method for quadruped robots in complex terrain. BACKGROUND
[0002] In the field of quadruped robot autonomous mapping and navigation, three-dimensional point cloud maps are widely used in complex scene environment modeling due to their ability to fully represent the spatial structure and height information of the environment. However, in the specific process of path planning and navigation, most quadruped robots still rely on two-dimensional occupancy grid maps. This two-dimensional representation has advantages in computational efficiency and path search, but there is a dimensional difference between it and three-dimensional maps, which requires three-dimensional data to be compressed or converted into two-dimensional data for use. Traditional methods usually project point clouds directly onto a horizontal plane or slice them at a fixed Z-axis height to obtain a two-dimensional map.
[0003] However, in a flat ground scenario, even if there is no obvious ups and downs, the Z-axis will gradually diverge due to accumulated errors after a long running time of the three-dimensional SLAM system. This drift causes the point clouds on the same plane to have false height differences in the vertical direction, which in turn causes severe distortion when generating a two-dimensional grid map. Specifically, the ground is stretched into a wavy shape, and height errors are mistakenly considered as obstacles or voids, resulting in a two-dimensional map that cannot accurately reflect the true terrain features. Such problems not only destroy the geometric consistency of the map, but also cause deviations in path planning and obstacle avoidance judgment of the navigation system, affecting the positioning accuracy and navigation reliability of the quadruped robot in flat ground environments.
[0004] Currently, a fixed height slicing method is commonly used to convert three-dimensional maps into two-dimensional maps. The basic idea is to crop or project point cloud data within a predetermined Z-axis height range, retaining only points near that height layer, thereby generating a two-dimensional occupancy grid map. This method has a simple implementation process, low computational overhead, and can quickly obtain a two-dimensional representation, so it is widely used in flat ground or single-layer environments. For example, in indoor robot navigation or regular road scenarios, setting an appropriate slicing height can better reflect the ground obstacle distribution and generate a two-dimensional grid map that can be directly used for path planning The disadvantages of the fixed height slicing method are: when the ground has pits, undulations, or slight height differences, the fixed height slicing will misjudge these areas as obstacles or blank areas; and even if the ground is generally flat, the three-dimensional SLAM system may gradually diverge in the Z-axis during a long mapping process, causing point clouds on the same plane to be incorrectly layered or distorted.
[0005] Another commonly used method is direct orthographic projection, that is, the entire three-dimensional point cloud is directly projected along the Z-axis direction to the horizontal plane to obtain a top-down two-dimensional map. The advantage of this method is that it can completely retain the horizontal position relationship of objects in the scene, so it is often used for rapid modeling, visual display and bird's eye view generation of the environment. In this method, the three-dimensional point cloud does not need to be segmented or screened, and all points are directly mapped to a two-dimensional plane according to their horizontal coordinates, so that the overall implementation is simple and efficient. At the same time, for some application scenarios that need to observe the structure of the environment intuitively, this method can quickly generate a top-down image to assist the operator or system to make a preliminary judgment on the environmental distribution.
[0006] Disadvantages of direct orthographic projection: This method completely ignores the height information, and all points of different heights are superimposed on the same plane, which easily leads to information confusion. For example, columns and ceilings, obstacles on the ground and suspended objects in the air will be overlaid, making obstacle identification errors frequently occur in the two-dimensional map; at the same time, the slope and other non-horizontal terrains will be compressed and appear large-scale geometric distortion, which cannot be used as a navigation basis.
[0007] The present application proposes a new method for compressing a three-dimensional map into a two-dimensional map to solve the problems of map distortion, obstacle identification error and insufficient continuity of the two-dimensional map caused by the existing fixed height slicing and direct projection methods in complex environments. Instead of aligning the global Z-axis, this method aggregates key frames with small Z-axis height changes into compression units by traversing the height changes of the key frames, identifies the ground points in each unit, determines the reference ground height, and then sets the compression range according to the height, to finally generate a continuous and reliable two-dimensional map, thereby effectively improving the applicability and accuracy of the two-dimensional map in complex environments. SUMMARY
[0008] To solve the above problems, the present application provides a four-legged robot three-dimensional map adaptive compression method in complex terrain, which aims to solve the problems of map distortion, obstacle identification error and insufficient continuity of the two-dimensional map caused by the existing fixed height slicing and direct projection methods in complex environments.
[0009] The first aspect of the embodiment of the present application provides a four-legged robot three-dimensional map adaptive compression method in complex terrain, comprising: Obtain a three-dimensional point cloud map, extract the Z-axis height information of each key frame in the three-dimensional point cloud map, and obtain an original height sequence; Filter and smooth the original height sequence to obtain a smoothed height sequence; Based on the smoothed height sequence, the key frames are divided into a plurality of compression units with consistent internal heights by a dynamic programming method; For each compression unit, initial ground points are identified using the RANSAC plane fitting method. Non-ground points are then eliminated by combining normal vector constraints and height thresholds to obtain optimized ground points. The reference ground height for each compression unit is then determined based on these optimized ground points. Based on the reference ground height, a compression height range is set, and the three-dimensional point cloud within this compression height range is used as the set of points to be projected. Orthographic projection is performed on the set of points to be projected to generate a two-dimensional local subgraph corresponding to each compression unit; The various two-dimensional local sub-maps are stitched together to generate a global two-dimensional occupied grid map.
[0010] In one optional implementation, the step of using a one-dimensional Kalman filter to filter and smooth the original height sequence specifically includes: The state vector of a Kalman filter is defined as follows:
[0011] in, For state vectors, For a high rate of change, For the first Frame height; The state transition model of Kalman filtering adopts a constant velocity model.
[0012] In one optional implementation, the keyframe is divided into multiple compression units with consistent internal height using a dynamic programming method, specifically including: The intra-segment cost function for the interval [j, i] is defined as follows:
[0013] in, For from the first Frame to the The average height value of all keyframes between frames. For the interval [ Within [the area], the height of all keyframes is relative to the average height. The sum of squared errors, For the first Frame height; If the interval [ If the height difference between ] satisfies the following formula, then the allowed interval is [ As the same compression unit:
[0014] in, In the interval The maximum height difference between internal keyframes. For the first Frame to the The maximum height among all keyframe height values in the frame. For the first Frame to the The minimum height among all keyframe height values in the frame. The allowed height envelope threshold within the segment; The recurrence relation for dynamic programming is:
[0015] in, For the future The minimum total cost after dividing a frame into several segments. This is the cumulative cost of the previous stage. For interval The sum of squared fitting errors within the range, This is the penalty parameter.
[0016] In one optional implementation, the normal vector constraint is to ensure that the angle between the normal vector of the RANSAC fitting plane and the Z-axis is less than a preset maximum angle threshold. The height threshold is used to discard three-dimensional points whose height deviates from a preset range as non-ground points.
[0017] In one optional implementation, an adaptive threshold method is used to set the compression height range, specifically including: Calculate the set of height differences between the three-dimensional point cloud within the compression unit and the reference ground; Based on the set of height differences, quantiles are used to define the lower and upper limits of the compression range:
[0018]
[0019] in, Set of height differences The Quantiles The set of height differences Quantiles The lower limit height of the compression range. This represents the upper limit height of the compression range; Compression conditions are:
[0020] in, For the first point cloud The height difference of each point relative to the reference ground; The three-dimensional point cloud that meets the above compression height range is taken as the point set to be projected.
[0021] In an optional embodiment, the stitching of each two-dimensional local subgraph comprises translational adjustment and weighted fusion: The translational adjustment aligns adjacent subgraphs at the boundary:
[0022] wherein, is the two-dimensional coordinate of a certain point in the second compression unit, Δ is the translational compensation amount in the two-dimensional coordinate system; For the case where there is a boundary overlapping area , weighted average is used for fusion: Let the occupancy probability of the same position point in adjacent subgraphs be and , then the result after fusion is:
[0023] wherein, is the occupancy probability value in the global two-dimensional map after fusion, is the occupancy probability in the sub , Figure 1 is the occupancy probability in the sub . Figure 2
[0024] In an optional embodiment, the stitching further comprises a global optimization correction step, specifically comprising: The key point set formed after stitching all two-dimensional local subgraphs is taken as an optimization variable, and a minimum error function is constructed as follows:
[0025] wherein, is the global stitching error function, , are the key point coordinate vectors of the corresponding positions in the unit and the unit , is the adjacent unit pair set, is the boundary alignment transformation from the unit to the unit ; Based on minimizing the error function, the positions of all key points are globally optimized.
[0026] The second aspect of the embodiment of the present application provides a four-legged robot three-dimensional map adaptive compression device under complex terrain, the device comprises: The sequence extraction module is configured to obtain a three-dimensional point cloud map, extract Z-axis height information of each key frame in the three-dimensional point cloud map, and obtain an original height sequence. The sequence preprocessing module is configured to filter and smooth the original height sequence, and obtain a smoothed height sequence. The adaptive division module is configured to divide the key frame into a plurality of internal height-consistent compression units by a dynamic programming method based on the smoothed height sequence. The reference surface determination module is configured to identify initial ground points by a RANSAC plane fitting method for each compression unit, eliminate non-ground points by combining a normal vector constraint and a height threshold, obtain optimized ground points, and determine a reference ground height of each compression unit according to the optimized ground points. The compression range calculation module is configured to set a compression height range based on the reference ground height, and take three-dimensional point clouds in the compression height range as a set of to-be-projected points. The projection compression module is configured to perform orthographic projection on the set of to-be-projected points, and generate a two-dimensional local sub-map corresponding to each compression unit. The map fusion module is configured to splice the two-dimensional local sub-maps, and generate a global two-dimensional occupancy grid map.
[0027] The third aspect of the embodiment of the application provides an electronic device, characterized in that comprising a processor, a memory, a computer program stored in the memory and executable on the processor, and the processor executes the program to realize the adaptive compression method of the three-dimensional map of the quadruped robot in complex terrain.
[0028] The fourth aspect of the embodiment of the application provides a computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the adaptive compression method of the three-dimensional map of the quadruped robot in complex terrain.
[0029] The present application has at least the following advantages or beneficial effects: The application realizes effective reduction of map dimension and data complexity while maintaining overall geometric topological relationship, avoids serious distortion and information loss caused by the traditional fixed height slicing method. The filtering and smoothing in the preprocessing link ensures the stability of height data, the key frame aggregation based on dynamic programming improves the rationality of unit division, the robust identification of ground plane in complex scenes is realized by using RANSAC plane fitting and normal vector constraint, and then the fixed or adaptive threshold setting compression range ensures that the map can filter irrelevant height disturbance and also consider the slope continuity, finally the continuity and consistency of the two-dimensional map are ensured through boundary translation, weighted fusion and global optimization in the cross combination link. The method can not only generate a two-dimensional occupancy grid map suitable for four-legged robot navigation and obstacle avoidance, but also can reasonably label the position of three-dimensional high-rise obstacles in the two-dimensional map, thereby improving the self-positioning, path planning and safe operation ability of the four-legged robot in the industrial environment. BRIEF DESCRIPTION OF DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0031] Figure 1 is a flow chart of a four-legged robot three-dimensional map adaptive compression method in complex terrain according to an embodiment of the present application; Figure 2 is a schematic diagram of the overall structure of a four-legged inspection robot according to an embodiment of the present application; Figure 3 is a schematic diagram of the original three-dimensional environment map generated by SLAM according to an embodiment of the present application; Figure 4 is a comparison diagram of the results of the fixed slicing method and the compression method of the present application according to an embodiment of the present application; Figure 5 is a schematic diagram of the two-dimensional grid map generated by the present application according to an embodiment of the present application; Figure 6 is a structural diagram of a four-legged robot three-dimensional map adaptive compression device in complex terrain according to an embodiment of the present application; Figure 7 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0033] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating an adaptive 3D map compression method for a quadruped robot in complex terrain, as proposed in one embodiment of this application. Figure 1 As shown, an adaptive compression method for 3D maps of a quadruped robot in complex terrain includes: S110: Obtain a 3D point cloud map, extract the Z-axis height information of each keyframe in the 3D point cloud map, and obtain the original height sequence; S120: Filter and smooth the original height sequence to obtain a smoothed height sequence; In this embodiment, the 3D environment map generated by the SLAM system is first preprocessed. In this stage, the system traverses all keyframes, unifies the coordinate system, and extracts the Z-axis height value for each frame. Since workshop environments often involve ground vibrations, equipment operation-induced jitter, and sensor positioning errors, this stage also requires filtering and smoothing of the height sequence, achieved using a one-dimensional Kalman filter method.
[0034] The process of filtering and smoothing the original height sequence using a one-dimensional Kalman filter specifically includes: S121: The state vector of the Kalman filter is defined as follows:
[0035] in, For state vectors, For a high rate of change, For the first Frame height; The state transition model of the Kalman filter adopts a constant velocity model:
[0036] in The time interval between adjacent keyframes. This is process noise; The observation equation is:
[0037] in, The height value measured by the sensor. To observe noise; S122: In the filtering recursion process, firstly, the state estimation value at the current time is obtained by a prediction equation, then the innovation is calculated by combining the observation equation, and the update is performed by using the Kalman gain:
[0038] wherein, is the optimal state estimation vector obtained after combining the current observation at time t, is an observation matrix, and when only the height is measured, =
[10] .
[0039] The calculation formula of the Kalman gain matrix K is as follows:
[0040] wherein, is a prediction covariance matrix, representing the uncertainty of the current predicted state, is an observation noise covariance, reflecting the size of the sensor measurement error.
[0041] Through the above update process, the weight of the predicted value and the observed value can be dynamically balanced at each time, and the real-time smoothing and accurate estimation of the height information can be realized.
[0042] S130: Based on the smoothed height sequence, the dynamic programming method is used to divide the key frames into a plurality of internal height consistent compression units; In the factory workshop environment in the embodiment, most of the areas are flat ground, but may be mixed with ramps, trenches or high platforms and other discontinuous structures. In order to avoid the projection distortion caused by these height mutations, the application adopts the strategy of dynamic programming, and the compression unit is timely divided when the height change exceeds the set threshold. If the running track of the quadruped robot crosses different floors or steps, when the height difference of the continuous key frames exceeds the preset range (such as 0.5 to 0.8 meters), the system automatically terminates the current unit and starts a new unit, so as to ensure that the height difference in each unit is kept within a controllable range.
[0043] The dynamic programming method is used to divide the key frames into a plurality of internal height consistent compression units, which specifically includes: S131: Assuming that the time stamp of the first key frame is t0, the time stamp of the last key frame is ti, and the number of key frames is N, the dynamic programming method is used to divide the key frames into a plurality of internal height consistent compression units. In each segment, it is assumed that the height basically remains unchanged, and the average height of all key frames in the segment is used to represent the height change of the whole segment, and the segment cost function of the interval [j, i] is defined as:
[0044]
[0045] wherein, the average height value of all keyframes between the first frame and the second frame, the average height value of all keyframes between the first frame and the second frame, the average height value of all keyframes between the first frame and the second frame, the average height value of all keyframes between the first frame and the second frame, the average height value of all keyframes between the first frame and the second frame, the average height value of all keyframes between the first frame and the second frame, the height of the first frame; S132: for suppressing excessive segmentation, a penalty parameter is applied to each newly created segment. At the same time, in order to keep each segment controllable in the ground undulation in the workshop environment, a judgment criterion is introduced to determine whether the region can be approximately compressed into the same horizontal plane.
[0046] If the height difference of the interval satisfies the following formula, the interval is allowed as the same compression unit:
[0047] wherein, the maximum height difference of keyframe height in the interval , the maximum height of all keyframe height values between the first frame and the second frame, the maximum height of all keyframe height values between the first frame and the second frame, the maximum height of all keyframe height values between the first frame and the second frame, the minimum height of all keyframe height values between the first frame and the second frame, the minimum height of all keyframe height values between the first frame and the second frame, the minimum height of all keyframe height values between the first frame and the second frame, the height envelope threshold value allowed in the segment; The recursive relationship of dynamic programming is:
[0048] wherein, the minimum total cost after dividing the first frame into several segments, the cumulative cost of the last stage, the fitting error sum of squares in the interval , and the penalty parameter.
[0049] S140: for each compression unit, the initial ground points are identified by the RANSAC plane fitting method, the non-ground points are removed by combining the normal vector constraint and the height threshold value to obtain the optimized ground points, and the reference ground height of each compression unit is determined according to the optimized ground points; In this embodiment, there are a large number of columns, pipelines, mechanical equipment in the environment of the factory and the workshop, which will interfere with the ground detection, so the plane fitting method based on RANSAC is used as the core algorithm, and the normal vector constraint and the height threshold are combined to eliminate non-ground points. Specifically, RANSAC estimates a candidate plane by randomly selecting a small number of points, and then iteratively finds a plane model containing the most ground points, and takes the plane as the reference ground of the unit. Through the above steps, the system can reliably estimate the reference ground height of each unit.
[0050] S141: randomly select three non-collinear points from the point cloud , , ) respectively , , calculate the plane normal vector by solving the following determinant :
[0051] and obtain the plane equation:
[0052] For any point , , , the distance from the point to the plane is defined as:
[0053] If ≤ε, the point is determined to be an in-plane point, where ε is a set distance threshold. By continuously repeating random sampling and in-plane evaluation within the maximum number of iterations N, the plane model with the largest number of in-plane points is finally selected as the ground plane of the compression unit.
[0054] S142: On this basis, further combine the normal vector constraint to ensure that the angle between the normal vector of the fitted plane and the Z axis is less than a predetermined threshold max , and combine the height threshold to eliminate unreasonable candidate planes. The final plane equation (A, B, C, D) is used to calculate the reference ground height of the unit, which provides input for subsequent compression range calculation.
[0055] S150: Based on the reference ground height, set the compression height range, and take the three-dimensional point cloud within the compression height range as the set of points to be projected; In this embodiment, an adaptive threshold method is used to set the compression height range, which specifically includes: S151: Calculate the height difference set of the three-dimensional point cloud in the compression unit relative to the reference ground height:
[0056] After obtaining the height difference of each point to the ground, set the height range allowed to be flattened ,+ ]. When is satisfied, the point is considered to be in the compressible range and is mapped to the reference ground:
[0057] wherein is the height of the reference plane at the horizontal position.
[0058] S152: For areas with large slopes or undulations, an adaptive threshold method can be used to define the lower and upper limits of the compression range according to the height difference set ,..., } using quantiles:
[0059]
[0060] wherein is the th quantile of the height difference set is the th quantile of the height difference set is the lower limit of the compression range is the upper limit of the compression range The compression condition is:
[0061] wherein is the height difference of the th point in the point cloud to the reference ground.
[0062] S153: After determining the compression range, the system performs a compression operation on the compression unit. The specific implementation is to perform orthographic projection on the point cloud data, map the three-dimensional coordinates of each point to a two-dimensional plane, and only retain the horizontal plane position information, thereby generating a corresponding two-dimensional map.
[0063] S160: Perform orthographic projection on the set of points to be projected to generate a two-dimensional local sub-map corresponding to each compression unit. S170: Stitch each two-dimensional local sub-map to generate a global two-dimensional occupancy grid map.
[0064] In this embodiment, since there may be slight differences in the reference height of each unit, alignment and transition processing are required when stitching the boundaries. The stitching of the various two-dimensional local sub-images includes translation adjustment and weighted fusion: S171: Let the reference ground heights of two adjacent units be respectively To and The difference is:
[0065] S172: Translation adjustment to align adjacent subgraphs at the boundary:
[0066] in, Let Δ be the two-dimensional coordinates of a point in the second compression unit. This refers to the translation compensation amount in a two-dimensional coordinate system. S173: For regions with overlapping boundaries In such cases, a weighted average is used for fusion: Let the occupancy probabilities of points at the same location in adjacent subgraphs be respectively and The result after fusion is: ,
[0067] in, This represents the probability value of the merged entity in the global 2D map. for In the child Figure 1 The probability of occupancy in for In the child Figure 2 The occupancy probability and weights satisfy the following conditions: + =1, and can be dynamically adjusted according to the distance from the point to the boundary.
[0068] Furthermore, the normal vector constraint ensures that the angle between the normal vector of the RANSAC-fitted plane and the Z-axis is less than a preset maximum angle threshold. The height threshold is used to discard three-dimensional points whose height deviates from a preset range as non-ground points.
[0069] Furthermore, the stitching also includes a global optimization and correction step, specifically including: Using the set of key points formed by stitching together all two-dimensional local subgraphs as the optimization variable, the following error minimization function is constructed:
[0070] in, is a global stitching error function, , are keypoint coordinate vectors at corresponding positions in unit and unit , is a set of adjacent unit pairs, is a boundary alignment transform from unit to unit ; Based on minimizing the error function, the positions of all key points are globally optimized.
[0071] In this embodiment, by minimizing E, the uniform distribution of gaps in the global range and the optimization of map continuity are realized. After the above translation compensation, weighted fusion and global optimization, the final two-dimensional map not only retains the geometric accuracy of each unit, but also realizes the overall coherence, which can be directly applied to the path planning of quadruped robots in factory and workshop environments.
[0072] Please refer to Figure 6 , Figure 6 is a kind of complex terrain under the adaptive compression device structure diagram of three-dimensional map of quadruped robot proposed in an embodiment of the application. As shown in Figure 6 The disclosure embodiment also provides a kind of complex terrain under the adaptive compression device of three-dimensional map of quadruped robot, the device includes: sequence extraction module 601, sequence preprocessing module 602, adaptive division module 603, reference surface determination module 604, compression range calculation module 605, projection compression module 606 and map fusion module 607;Wherein, Sequence extraction module 601 is used to obtain a three-dimensional point cloud map, extract the Z-axis height information of each key frame in the three-dimensional point cloud map, and obtain an original height sequence; Sequence preprocessing module 602 is used to filter and smooth the original height sequence, and obtain a smooth height sequence; Adaptive division module 603 is used to divide the key frame into a plurality of internal height consistent compression units based on the smooth height sequence by dynamic programming method; Reference surface determination module 604 is used to identify initial ground points for each compression unit by RANSAC plane fitting method, remove non-ground points by combining normal vector constraint and height threshold, obtain optimized ground points, and determine the reference ground height of each compression unit according to the optimized ground points; Compression range calculation module 605 is used to set a compression height range based on the reference ground height, and set the three-dimensional point cloud within the compression height range as a set of points to be projected; Projection compression module 606 is used to orthographic projection on the set of points to be projected, to generate a two-dimensional local subgraph corresponding to each compression unit. The map fusion module 607 is configured to splice the two-dimensional local sub-maps to generate a global two-dimensional occupancy grid map.
[0073] The electronic device is also provided in the embodiments of the present disclosure. Please refer to Figure 7 , Figure 7 is a schematic diagram of the electronic device according to the embodiments of the present disclosure. As shown in Figure 7 , the electronic device 100 includes a memory 110 and a processor 120. The memory 110 and the processor 120 are connected by a bus in communication. The memory 110 stores a computer program, which can be run on the processor 120, so as to implement the steps of the adaptive compression method for a three-dimensional map of a quadruped robot in a complex terrain according to the embodiments of the present disclosure.
[0074] The embodiments of the present disclosure also provide a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of a computer device, the computer device can perform the steps of the adaptive compression method for a three-dimensional map of a quadruped robot in a complex terrain according to the embodiments of the present disclosure.
[0075] Example one, please refer to Figure 2 , a quadruped inspection robot for an indoor structured environment is installed with a laser radar, a camera, an infrared holder, an industrial computer and a gas sensor. After the above translation compensation, weighted fusion and global optimization, the final two-dimensional map is obtained. As shown in Figure 5 , the geometric accuracy of each unit is retained, and the overall coherence is achieved, which can be directly applied to the path planning of the quadruped robot in the factory and workshop environment.
[0076] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams according to the methods, devices, electronic devices and computer program products of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device realize the functions specified in the flow Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The device for realizing the functions specified in one flow or multiple flows and / or blocks.
[0077] These computer program instructions can also be stored in a computer readable storage medium, which can guide the computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer readable storage medium produce a product including instruction devices, which realize the functions specified in the flowFigure 1 one or more processes and / or blocks Figure 1 the function(s) specified in the block or blocks.
[0078] These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that a series of operation steps are performed on the computer or other programmable terminal devices to generate a computer-implemented process, so that the instructions executed on the computer or other programmable terminal devices provide a process for implementing the function(s) specified in the flowchart Figure 1 one or more processes and / or blocks Figure 1 the function(s) specified in the block or blocks.
[0079] Although the preferred embodiments of the application have been described, those skilled in the art will be able to make additional changes and modifications to these embodiments once they have the basic inventive concept. Therefore, the appended claims are intended to cover all changes and modifications that fall within the scope of the embodiments of the application.
[0080] Each of the embodiments in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the embodiments can be referred to each other.
[0081] Although the preferred embodiments of the application have been described, those skilled in the art will be able to make additional changes and modifications to these embodiments once they have the basic inventive concept. Therefore, the appended claims are intended to cover all changes and modifications that fall within the scope of the embodiments of the application.
[0082] Finally, it should also be noted that, in this document, relational terms such as first and second, and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or terminal device. Without more limitations, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0083] The above provides a detailed description of the adaptive compression method for 3D maps of quadruped robots in complex terrain provided by this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. An adaptive compression method for 3D maps of a quadruped robot in complex terrain, characterized in that, include: Obtain a 3D point cloud map, extract the Z-axis height information of each keyframe in the 3D point cloud map, and obtain the original height sequence; The original height sequence is filtered and smoothed to obtain a smoothed height sequence. Based on the smooth height sequence, the keyframe is divided into multiple compressed units with consistent internal height using a dynamic programming method. For each compression unit, initial ground points are identified using the RANSAC plane fitting method. Non-ground points are then eliminated by combining normal vector constraints and height thresholds to obtain optimized ground points. The reference ground height for each compression unit is then determined based on these optimized ground points. Based on the reference ground height, a compression height range is set, and the three-dimensional point cloud within this compression height range is used as the set of points to be projected. Orthographic projection is performed on the set of points to be projected to generate a two-dimensional local subgraph corresponding to each compression unit; The various two-dimensional local sub-maps are stitched together to generate a global two-dimensional occupied grid map.
2. The adaptive compression method for three-dimensional maps of quadruped robots in complex terrain according to claim 1, characterized in that, The process of filtering and smoothing the original height sequence using a one-dimensional Kalman filter specifically includes: The state vector of a Kalman filter is defined as follows: in, For state vectors, For a high rate of change, For the first Frame height; The state transition model of Kalman filtering adopts a constant velocity model.
3. The adaptive compression method for three-dimensional maps of quadruped robots in complex terrain according to claim 1, characterized in that, The keyframe is divided into multiple compression units with consistent internal height using a dynamic programming method, specifically including: Define the intra-segment cost function for the interval [j, i] as follows: in, For from the first Frame to the The average height value of all keyframes between frames. For the interval [ Within [the area], the height of all keyframes is relative to the average height. The sum of squared errors, For the first Frame height; If the interval [ If the height difference between ] satisfies the following formula, then the allowed interval is [ As the same compression unit: in, For in the interval The maximum height difference between internal keyframes. For the first Frame to the The maximum height among all keyframe height values in the frame. For the first Frame to the The minimum height among all keyframe height values in the frame. The allowed height envelope threshold within the segment; The recurrence relation for dynamic programming is: in, For the future The minimum total cost after dividing a frame into several segments. This is the cumulative cost of the previous stage. For interval The sum of squared fitting errors within the range, This is the penalty parameter.
4. The adaptive compression method for three-dimensional maps of quadruped robots in complex terrain according to claim 1, characterized in that, The normal vector constraint is to ensure that the angle between the normal vector of the RANSAC fitting plane and the Z-axis is less than a preset maximum angle threshold. The height threshold is used to discard three-dimensional points whose height deviates from a preset range as non-ground points.
5. The adaptive compression method for three-dimensional maps of quadruped robots in complex terrain according to claim 1, characterized in that, An adaptive threshold method is used to set the compression height range, specifically including: Calculate the set of height differences between the three-dimensional point cloud within the compression unit and the reference ground; Based on the set of height differences, quantiles are used to define the lower and upper limits of the compression range: in, Set of height differences The Quantiles The set of height differences Quantiles The lower limit height of the compression range. This represents the upper limit height of the compression range; Compression conditions are: in, For the first point cloud The height difference of each point relative to the reference ground; The three-dimensional point cloud that meets the above compression height range is taken as the point set to be projected.
6. The adaptive compression method for three-dimensional maps of a quadruped robot in complex terrain according to claim 1, characterized in that, The process of stitching together the various two-dimensional local sub-images includes translation adjustment and weighted fusion: Translate and align adjacent subgraphs at the boundaries: in, Let Δ be the two-dimensional coordinates of a point in the second compression unit. This refers to the translation compensation amount in a two-dimensional coordinate system. For regions with overlapping boundaries In such cases, a weighted average is used for fusion: Let the occupancy probabilities of points at the same location in adjacent subgraphs be respectively and The result after fusion is: in, This represents the probability value of the merged entity in the global 2D map. for Occupancy probability in subgraph 1 for Occupancy probability in subgraph 2.
7. The adaptive compression method for three-dimensional maps of a quadruped robot in complex terrain according to claim 6, characterized in that, The splicing process also includes a global optimization and correction step, specifically including: Using the set of key points formed by stitching together all two-dimensional local subgraphs as the optimization variable, the following error minimization function is constructed: in, This is the global splicing error function. , In the unit respectively With unit The coordinate vector of the key point at the corresponding position in the middle. For the set of adjacent unit pairs, For the unit To unit Boundary alignment transformation; Based on minimizing the error function, the positions of all key points are globally optimized.
8. The adaptive compression device for three-dimensional maps of a quadruped robot in complex terrain according to any one of claims 1-7, characterized in that, The device includes: The sequence extraction module is used to acquire a 3D point cloud map, extract the Z-axis height information of each keyframe in the 3D point cloud map, and obtain the original height sequence. The sequence preprocessing module is used to filter and smooth the original height sequence to obtain a smoothed height sequence. An adaptive partitioning module is used to divide the keyframe into multiple compressed units with consistent internal height based on the smooth height sequence using a dynamic programming method. The reference plane determination module is used to identify initial ground points for each compression unit using the RANSAC plane fitting method, and to remove non-ground points by combining normal vector constraints and height thresholds to obtain optimized ground points. The reference ground height for each compression unit is then determined based on the optimized ground points. The compression range calculation module is used to set a compression height range based on the reference ground height, and to take the three-dimensional point cloud within the compression height range as the set of points to be projected. The projection compression module is used to perform orthophoto projection on the set of points to be projected, and generate a two-dimensional local subgraph corresponding to each compression unit. The map fusion module is used to stitch together various two-dimensional local sub-maps to generate a global two-dimensional occupied grid map.
9. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method for adaptive compression of three-dimensional maps of a quadruped robot in complex terrain as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the adaptive compression method for three-dimensional maps of a quadruped robot in complex terrain as described in any one of claims 1 to 7.