Work environment modeling method, work machine anti-collision detection method, and controller
By constructing an initial octree around the operating machinery and generating a filled point cloud at the boundary, the problem of discontinuity in point cloud modeling is solved, the continuity and integrity of environmental modeling are achieved, and the accuracy of collision detection and the stability of the system are improved.
Patent Information
- Application Number
- CN202611073643.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-11-24
AI Technical Summary
In existing technologies, discontinuous point cloud modeling in boundary regions leads to incomplete environmental modeling, affecting the stability and reliability of collision detection for operating machinery.
By acquiring point cloud data of the surrounding environment of the operating machinery, an initial octree is constructed, and search points are extracted on the boundary of adjacent detection areas. The nearest neighbor points are searched to generate a filled point cloud. The initial octree is then corrected according to the grid size to form the target octree.
This improves the continuity and integrity of environmental modeling, ensuring the accuracy of collision detection and the stability of the system.
Smart Images

Figure CN123160758A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of work machinery technology, specifically to a work environment modeling method, a work machinery collision avoidance detection method, and a controller. Background Technology
[0002] During operation, operators of heavy machinery (such as large excavators, electric shovels, cranes, and agricultural machinery) often have significant blind spots, especially around the boom and the sides and rear of the machine, making them prone to collisions. To improve operational safety, current technologies typically employ environmental perception sensors such as millimeter-wave radar and lidar to detect obstacles around the machinery and issue warnings to the operator based on collision detection results.
[0003] In collision detection, to balance computational efficiency and detection accuracy, existing solutions often employ a multi-level collision detection region strategy, using different levels of environmental modeling accuracy for regions at different distances. However, at the boundaries between modeling regions of different accuracy, the point cloud data is prone to discontinuity due to the different modeling resolutions. This causes fluctuations in collision detection results in the boundary regions, manifesting as jumps in detection distance or frequent switching of warning levels, affecting the stability and reliability of the system.
[0004] Therefore, existing technologies suffer from incomplete environmental modeling due to discontinuous point cloud modeling in boundary regions. Summary of the Invention
[0005] The purpose of this application is to provide a method for modeling the working environment, a method for collision avoidance detection of working machinery, and a controller, so as to solve the problem that the existing technology has incomplete environmental modeling due to discontinuity in point cloud modeling of boundary areas.
[0006] To achieve the above objectives, the first aspect of this application provides a method for modeling a work environment, the method comprising: Acquire point cloud data of the surrounding environment of the operating machinery; Based on the point cloud data, the detection area where the point cloud data is located, and the grid size corresponding to each detection area, an initial octree is constructed; Extract the search point on the boundary of each adjacent detection area, and search for the nearest neighbor of the search point in the adjacent detection area; When the search point has nearest neighbor points in both adjacent detection areas, the point cloud to be filled is determined based on the nearest neighbor points, and the filling grid size is determined based on the grid size corresponding to each adjacent detection area. Based on the filled point cloud and the filled mesh size, the initial octree is corrected to obtain the target octree.
[0007] In this embodiment of the application, before constructing the initial octree based on the point cloud data, the detection area where the point cloud data is located, and the grid size corresponding to each detection area, the method further includes: Based on the distance to the operating machinery, the surrounding environment is divided into multiple detection zones in real time. The grid size of the detection zone is positively correlated with the distance from the operating machinery to that detection zone.
[0008] In this embodiment of the application, the method for determining the grid size corresponding to each detection area includes: Set the grid size of the first detection area closest to the operating machinery as the initial grid size; For other detection areas outside the first detection area, based on the initial grid size, the grid size of each detection area is adaptively assigned according to the size gradient that increases from the inside to the outside, so as to determine the corresponding grid size of each detection area.
[0009] In this embodiment of the application, extracting search points on the boundaries of adjacent detection areas includes: The smaller of the grid sizes corresponding to adjacent detection regions is used as the extraction interval; Based on the extraction interval, search points are extracted uniformly along the boundary.
[0010] In this embodiment of the application, searching for the nearest neighbor of a lookup point in an adjacent detection area includes: The larger of the grid sizes corresponding to adjacent detection areas is used as the search radius; Using the search point as the center, search for the nearest point within the search radius in the adjacent detection area.
[0011] In this embodiment of the application, the initial octree is corrected based on the filled point cloud and the filled mesh size to obtain the target octree, including: Based on the filled point cloud and the filled mesh size, the initial octree is augmented to obtain the target octree.
[0012] A second aspect of this application provides a method for collision avoidance detection of operating machinery, the method comprising: Obtain the target octree constructed for the surrounding environment of the operating machinery, as well as the pose data of the operating machinery. The target octree is constructed by the above-mentioned operating environment modeling method. Based on the target octree and pose data, collision avoidance detection is performed on the operating machinery to obtain the collision avoidance detection results.
[0013] In this embodiment of the application, collision avoidance detection is performed on the operating machinery based on the target octree and pose data to obtain collision avoidance detection results, including: Based on the pose data, construct axis-aligned bounding boxes corresponding to the multiple anti-collision body sub-modules in the operating machinery; Based on the target octree and axis-aligned bounding box, the first anti-collision detection is performed to determine the target sub-module among multiple anti-collision body sub-modules; Construct the target orientation bounding box corresponding to the target submodule; Based on the target orientation bounding box and the target octree, a second collision avoidance detection is performed to obtain the collision avoidance detection result.
[0014] In this embodiment of the application, a first anti-collision detection is performed based on the target octree and axis-aligned bounding boxes to determine the target sub-module among multiple anti-collision body sub-modules, including: Construct an axis-aligned bounding box tree based on multiple axis-aligned bounding boxes; Collision calculations are performed between the axis-aligned bounding box tree and the target octree to determine the initial collision point in the target octree that is closest to the working machine. The anti-collision body submodule with the smallest distance from the initial collision point is identified as the target submodule.
[0015] In this embodiment of the application, a second collision avoidance detection is performed based on the target orientation bounding box and the target octree to obtain the collision avoidance detection result, including: Collision calculations are performed between the target orientation bounding box and the target octree to determine the target collision point in the target octree that is closest to the working machinery. The distance between the target submodule and the target collision point is defined as the collision distance between the operating machinery and environmental obstacles; The target collision point and collision distance are used as the collision avoidance detection results.
[0016] A third aspect of this application provides a controller, comprising: The memory is configured to store instructions; The processor is configured to retrieve instructions from memory and, when executing the instructions, to implement the aforementioned operational environment modeling method and / or the aforementioned operational machinery collision avoidance detection method.
[0017] The above technical solution acquires point cloud data of the surrounding environment of the operating machinery. Based on the point cloud data, the detection area where the point cloud data is located, and the corresponding grid size of each detection area, an initial octree is constructed. Search points are extracted on the boundaries of adjacent detection areas, and the nearest neighbor of each search point in the adjacent detection areas is searched. If the search point has nearest neighbors in all adjacent detection areas, the point cloud to be filled is determined based on the nearest neighbors, and the filling grid size is determined based on the corresponding grid size of each adjacent detection area. Based on the filled point cloud and the filling grid size, the initial octree is corrected to obtain the target octree. This application solves the problem of discontinuity in point cloud modeling at multi-level area boundaries by extracting search points on the boundaries of adjacent detection areas and generating filled point clouds based on nearest neighbors to correct the octree, thus improving the integrity and continuity of environmental modeling.
[0018] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0019] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings: Figure 1 A flowchart illustrating a work environment modeling method provided in an embodiment of this application; Figure 2 A schematic diagram of a multi-level detection area provided in a specific embodiment of this application; Figure 3 A flowchart illustrating a method for collision avoidance detection of operating machinery provided in this application embodiment; Figure 4 A flowchart illustrating a method for collision detection of operating machinery, provided in a specific embodiment of this application; Figure 5 This is a structural block diagram of a controller provided in an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0021] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0022] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0023] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0024] Figure 1 This is a flowchart illustrating a work environment modeling method provided in an embodiment of this application. Figure 1 As shown in the figure, this application provides a method for modeling a work environment, which may include the following steps.
[0025] Step S101: Obtain point cloud data of the surrounding environment of the operating machinery.
[0026] In this embodiment, point cloud data refers to a set of three-dimensional spatial points obtained by scanning the environment surrounding the operating machinery using environmental perception sensors (such as lidar, millimeter-wave radar, etc.), where each point contains its position information in space. In one example, the environmental perception sensor can be lidar, which can be installed on the roof or around the body of the operating machinery to scan the surrounding environment in real time and output point cloud data.
[0027] The surrounding environment is divided into multiple detection zones based on their distance from the operating machinery. For example, these zones can be hierarchical, distributed outwards from the machinery, with different zones used to differentiate environmental modeling accuracy requirements at different distances. These detection zones can be dynamically divided. In some applications, they can update in real-time based on changes in the machinery's position or the orientation of its working device. In other applications, the machinery's position may remain constant, and the detection zones can adaptively adjust based on changes in the working device's orientation, environmental factors (such as ambient brightness and terrain complexity), or other factors. Alternatively, in feasible implementations, the multiple detection zones can be set by default or manually.
[0028] Taking an excavator as an example, multiple detection areas can change according to the position of the excavator. Alternatively, they can change according to the posture of the excavator's working device. For example, a first circumcircle can be drawn with the center of the excavator body as the center and the distance to the outermost position of the body as the radius; the area inside the first circumcircle is one detection area. A second circumcircle can be drawn with the center of the body as the center and the distance to the outermost real-time position of the bucket as the radius; the area between the second circumcircle and the first circumcircle is another detection area. Of course, in some alternative implementations, the second circumcircle can also be drawn with the maximum working radius of the excavator's working device.
[0029] The operating machinery is not limited to excavators; it can also include loaders, aerial work platforms, cranes, agricultural machinery, or operating robots, etc. This list is not exhaustive.
[0030] Each detection area corresponds to a different grid size, and the grid size can be adaptively adjusted based on the distance between the detection area and the operating machinery. For example, an initial grid size can be set for the nearest detection area, and the grid sizes of other detection areas can be adaptively assigned according to the size gradient; alternatively, the grid size of each detection area can be assigned based on the detection area level-grid size correspondence. Detection areas can be hierarchical areas in the form of circles, squares, or other regular shapes, and the boundaries of each area can be preset according to the size of the operating machinery and the operating conditions. For example, the surrounding space can be divided into inner, middle, and outer detection areas based on the maximum extension distance of the operating machinery's boom.
[0031] Understandably, when the operating range of machinery is large, the near-field area requires high collision detection accuracy and necessitates detailed modeling; while the far-field area has relatively lower accuracy requirements and can use relatively coarse modeling to save computational resources. This application's embodiment, by dividing different detection areas and adaptively configuring different modeling accuracies for each area, can effectively reduce computational overhead while ensuring safety.
[0032] Step S102: Construct an initial octree based on the point cloud data, the detection area where the point cloud data is located, and the grid size corresponding to each detection area.
[0033] In this embodiment, an octree is a tree-like data structure used for organizing three-dimensional spatial data. Its basic idea is to recursively divide the three-dimensional space into eight sub-cubes, each sub-cube corresponding to a node in the tree, thereby enabling rapid indexing and querying of spatial point clouds. Each detection region corresponds to a different grid size. The grid size determines the minimum cube side length of the octree leaf node. The smaller the grid size, the finer the spatial division and the higher the modeling accuracy, but the computational load also increases accordingly.
[0034] It is understandable that the operating range of machinery is usually large, and the near-field area requires high collision detection accuracy, necessitating detailed modeling; while the far-field area has relatively lower accuracy requirements, allowing for coarser modeling to save computational resources. Traditional methods typically use a single-precision octree to model the entire environment, which either results in excessive computation due to overly high precision or insufficient near-field detection accuracy due to underlying precision. To address this, this application employs a multi-precision octree construction strategy, adaptively using different grid sizes for different detection areas, effectively controlling overall computational overhead while ensuring high near-field accuracy. Furthermore, octrees possess excellent spatial indexing performance, enabling rapid location of point cloud data near any spatial location, providing efficient query support for subsequent boundary processing.
[0035] Specifically, the process begins by calculating the distance between the point cloud coordinates and the center of gravity of the operating machinery. This distance is then compared to the radius of each region's boundary to determine the detection area to which each point cloud data belongs. For example, given the center of gravity coordinates, for any point in the point cloud, the Euclidean distance between it and the center of gravity is calculated. The radius within which this distance falls determines whether the point belongs to the inner, middle, or outer circle. Next, based on the corresponding grid size for that region, the octree partitioning depth for that region is determined. Smaller grid sizes require more levels of partitioning, resulting in smaller leaf node sizes. After point-by-point processing, an initial octree covering the entire operating environment with different resolutions in different regions is constructed. In one example, point cloud data belonging to the inner circle (high-precision region) is partitioned into a deeper tree structure using a smaller grid size; point cloud data belonging to the outer circle (low-precision region) is partitioned into a shallower tree structure using a larger grid size. Different branches of the same octree can have different depths; this multi-resolution storage characteristic naturally adapts to the modeling needs of different precision levels in multi-level detection regions. In another example, for scenarios with uneven distribution of point cloud data, the detection area to which each point cloud data belongs can be quickly determined first, the point cloud data can be grouped by area, and then the octree nodes of each group of point cloud data can be inserted in batches to reduce the overhead of repeated node creation and lookup.
[0036] In an alternative implementation, a globally uniform precision base octree can be constructed first, and then pruned or refined according to the grid size requirements of each detection region. For example, for inner regions requiring high precision, the nodes at the corresponding positions are further subdivided downwards until the required grid size is reached; for outer regions requiring low precision, the child nodes at the corresponding positions are merged upwards to reduce storage overhead. This post-processing approach may have higher construction efficiency in certain scenarios, such as when the original point cloud data itself is unevenly distributed; constructing a uniform precision octree first can avoid the extra computation of determining the region's affiliation point by point.
[0037] In another alternative implementation, a separate octree can be constructed for each detection area. Each area's octree is stored and indexed independently, and finally linked together by a top-level index structure. For example, three independent octrees can be constructed for the inner, middle, and outer circles, each storing only the point cloud data belonging to that area. During a query, the corresponding octree is accessed based on the area where the target location is located. This approach facilitates independent updating and maintenance of each area's octree and is suitable for dynamically changing operating environments. For instance, after the machinery moves, the point cloud data in different areas needs to be refreshed separately; the independent construction method allows updating only the octree of the affected area.
[0038] The initial octree constructed in the above manner achieves different resolutions for different regions, with fine inner layers and coarse outer layers. This ensures the accuracy of near-field modeling while controlling the amount of computation, and provides efficient spatial index support for subsequent boundary processing.
[0039] Step S103: Extract the search point on the boundary of each adjacent detection area, and search for the nearest neighbor of the search point in the adjacent detection area.
[0040] In this embodiment, adjacent detection areas refer to two adjacent areas within a series of hierarchical regions distributed from the inside out, centered on the operating machinery. The lookup point is a sampling point selected on the boundary of the adjacent areas, used to detect the data distribution on both sides of the boundary. The nearest neighbor point refers to the point cloud data point in the octree of a certain detection area that is closest to the lookup point.
[0041] Understandably, because adjacent detection regions use different grid sizes, the independently constructed octrees may exhibit data discontinuities at the boundaries. Specifically, this manifests as different point cloud densities on both sides of the boundary, and data gaps or breaks may occur near the boundary. Therefore, it is necessary to extract lookup points at the boundaries and search for the nearest points in the octrees of the two adjacent detection regions to generate filler data, ensuring a smooth transition of the environment model on both sides of the boundary.
[0042] Specifically, the boundary position between two adjacent detection regions is first determined. For a circular boundary, the boundary is the dividing line between two concentric circles; for a U-shaped boundary, the boundary is the dividing line between two inner and outer rectangles. Then, several search points are extracted on this boundary according to certain rules. For each search point, a nearest neighbor search is performed in the octrees of the detection regions on both sides to determine the nearest neighbor point in the left region and the nearest neighbor point in the right region. The nearest neighbor search can use the nearest neighbor query function built into the octree, quickly locating the point cloud data closest to the search point by recursively traversing the tree nodes. In one example, for a circular boundary, the search point positions can be determined by equal angular intervals, and the arc length between adjacent search points can be kept consistent to ensure that the search points are evenly distributed on the circumference. In another example, for a polygonal boundary, sampling can be performed along each edge, and the number of search points on each edge is determined by the length of the edge. Sampling points can be added separately at the corners to ensure that the corner areas are also covered by data.
[0043] In an alternative implementation, several points can be randomly selected along the boundary as search points. Random selection ensures that there are sampling points in each region of the boundary and is simple to implement. The number of random points can be determined based on the boundary length and the desired filling density; the longer the boundary or the denser the desired filling, the more random points should be selected.
[0044] In another alternative implementation, search points can be extracted uniformly at fixed intervals. The fixed interval method is simple to implement, easy to control, and can ensure that the fill points are evenly distributed on the boundary, avoiding underfilling or overfilling in some areas due to uneven distribution.
[0045] Thus, by extracting lookup points on the boundary and searching for their nearest neighbors, the data distribution on both sides of the boundary can be accurately identified, providing a basis for the subsequent generation of point cloud filling.
[0046] Step S104: If the search point has nearest neighbor points in both adjacent detection areas, determine the filling point cloud based on the nearest neighbor points, and determine the filling grid size based on the grid size corresponding to each adjacent detection area.
[0047] In this embodiment, the filled point cloud refers to new point cloud data generated at the boundary of adjacent detection areas based on the information of the nearest neighbor points on both sides, used to fill the data gaps at the boundary. The filling grid size refers to the node level corresponding to the filled point cloud when stored in the octree, which determines the position and retrieval range of the filled points in the spatial index.
[0048] For each lookup point, if the nearest neighbor can be found in the octrees of two adjacent detection regions, it indicates that there is data coverage on both sides of the location, but gaps exist between the data. In this case, a filled point cloud needs to be generated based on the information of the two nearest neighbors, and the corresponding grid size needs to be determined. If the lookup point does not have a nearest neighbor on one side, it indicates that the data on that side is sparse or missing, and filling is neither necessary nor appropriate at that location.
[0049] Specifically, for each search point with nearest neighbors on both sides, the coordinates of its nearest neighbor in the octree of the left region and its nearest neighbor in the octree of the right region are obtained. The coordinates of the point cloud to be filled are then calculated based on these two nearest neighbor coordinates. In one example, the midpoint of the line connecting the two nearest neighbors can be used as the coordinates of the point cloud to be filled; this method smoothly connects the data distribution on both sides. In another example, the coordinates of the point cloud to be filled can be determined based on a weighted average of the two nearest neighbors. The weights are set according to the distance between the search point and each nearest neighbor; the closer the nearest neighbor, the greater its weight, and the farther the nearest neighbor, the smaller its weight. This method is suitable for scenarios where there is a large difference in point cloud density on both sides, making the filled point closer to the side with denser data distribution. Preferably, for scenarios with uneven point cloud density distribution, the difference in distance between the nearest neighbors on both sides and the search point can be determined first. If the distance on one side is significantly smaller, the coordinates of the point cloud to be filled can be appropriately shifted towards that side.
[0050] Simultaneously, for each search point with nearest neighbors on both sides, the grid sizes corresponding to the detection regions on the left and right sides of the search point are obtained, and the filling grid size corresponding to the filling point cloud is calculated accordingly. In one example, the filling grid size can be determined by calculating the average of the grid sizes on both sides. In another example, the larger of the grid sizes of adjacent detection regions can be used as the filling grid size, so that the filling point belongs to the side with lower precision; this method is suitable for distant regions. In yet another example, the smaller of the grid sizes can be used as the filling grid size, so that the filling point participates in high-precision calculations; this method is suitable for close-range regions.
[0051] In this way, by generating a filled point cloud at the boundary and determining its grid size, the data gap between adjacent detection areas is filled, the point cloud data that were originally separated on both sides of the boundary are connected, and the filled points are integrated into the octree structure at an appropriate level, providing a data foundation for obtaining a continuous and smooth target octree in the future.
[0052] Step S105: Based on the filled point cloud and the filled mesh size, correct the initial octree to obtain the target octree.
[0053] In this embodiment of the application, the target octree refers to the octree after boundary filling correction, which has a more continuous data distribution at the boundaries of adjacent detection areas.
[0054] Understandably, the initial octree is constructed solely based on the original point cloud data, without considering data discontinuity at the boundaries. By inserting filler point clouds at the boundaries, the previously separate point cloud data on both sides can be connected, forming a continuous environmental model.
[0055] In one example, a filled point cloud could be inserted as a new node into an octree. During insertion, the node's level is determined based on the filled grid size. If the node level corresponding to the filled grid size already exists, the point is directly added to that node; otherwise, the node is created first and then inserted. This results in the target octree.
[0056] In another example, the original point cloud within the filled point cloud and its surrounding adjacent regions can be treated as a whole. A local transition octree can be constructed at the boundary, and then this local transition octree can be merged with the initial octree. This approach better preserves the local topology at the boundary and is suitable for scenarios with significant changes in point cloud density.
[0057] In another example, for the original point cloud nodes near the boundary, their storage locations can be fine-tuned based on the distribution of the filled point cloud. For example, points that originally belonged to one side can be reassigned to more suitable nodes to optimize the balance of the octree at the boundary.
[0058] Through the above steps S101 to S105, this embodiment of the application solves the technical problem of incomplete environmental modeling caused by discontinuities in point cloud modeling at multi-level region boundaries, achieving the technical effect of improving the continuity and integrity of environmental modeling. The target octree constructed in this embodiment can be directly used in subsequent application scenarios such as collision detection and path planning, providing a reliable environmental model foundation for the safe operation of machinery.
[0059] The above technical solution first acquires point cloud data of the surrounding environment of the operating machinery. Then, based on the point cloud data, the detection area where the point cloud data is located, and the corresponding grid size of each detection area, an initial octree is constructed in real time. Next, search points are extracted on the boundaries of each adjacent detection area, and the nearest neighbor of the search point in the adjacent detection area is searched. If the search point has a nearest neighbor in all adjacent detection areas, the fill point cloud is determined based on the nearest neighbor, and the fill grid size is determined based on the corresponding grid size of each adjacent detection area. Finally, the initial octree is dynamically corrected based on the fill point cloud and the fill grid size to obtain the target octree. This application solves the problem of discontinuity in point cloud modeling at the boundaries of multi-level areas by extracting search points on the boundaries of adjacent detection areas and generating fill point clouds based on nearest neighbors to correct the octree, thus improving the integrity and continuity of environmental modeling.
[0060] In this embodiment of the application, extracting search points on the boundaries of adjacent detection areas may include: The smaller of the grid sizes corresponding to adjacent detection regions is used as the extraction interval; Based on the extraction interval, search points are extracted uniformly along the boundary.
[0061] In this embodiment, adjacent detection areas refer to two adjacent areas within a hierarchical distribution of multiple layers centered on the operating machinery, such as the inner circle and the middle circle, or the middle circle and the outer circle. The grid size refers to the side length of the leaf nodes used when constructing the octree for each detection area; a smaller grid size results in a more refined spatial division. The extraction interval refers to the spatial distance between adjacent search points, used to control the density of sampling points on the boundary.
[0062] It is understandable that the method of extracting lookup points directly determines the quality and efficiency of boundary filling. If the extraction interval is too large, the sampling points on the boundary will be too sparse, which may result in some areas not being filled and data gaps still existing; if the extraction interval is too small, the sampling points will be too dense, generating a large number of filling point clouds and increasing unnecessary computational overhead. To address this, the embodiments of this application use the smaller grid size of adjacent detection areas as the extraction interval, so that the sampling density matches the modeling accuracy of the high-precision area, ensuring the continuity of boundary filling while avoiding oversampling, thus achieving a balance between filling quality and computational efficiency.
[0063] Specifically, first, the grid dimensions corresponding to two adjacent detection areas are obtained. For example, the inner grid dimension is 0.2 meters and the middle grid dimension is 0.36 meters, so the extraction interval is the smaller of the two, 0.2 meters. Then, the total length of the boundary between adjacent areas is calculated. For a circular boundary, the boundary length equals the circumference of the circle; for a U-shaped boundary, the boundary length equals the sum of the lengths of all sides. The boundary length is divided by the extraction interval and rounded down to obtain the number of search points to be extracted on the boundary. Finally, starting from a certain starting point on the boundary, the spatial coordinates of each search point are determined sequentially according to the extraction interval until the entire boundary is covered.
[0064] In one example, for a circular boundary, the location of the search point can be determined by taking the center of the circle as the pole and the starting angle as 0, and by using equal angular intervals. The arc length between adjacent search points is equal to the extraction interval.
[0065] In another example, for polygonal boundaries, uniform sampling can be performed along each edge separately. The number of samples for each edge is determined by dividing the edge length by the extraction interval. Corners can be processed separately to ensure that corner areas are also covered by sampling points.
[0066] The search points extracted using the above method have a density consistent with the high-precision region grid size, ensuring that all potential faults at the boundary are detected while avoiding redundant sampling. Furthermore, this extraction interval matches the insertion density of the filled point cloud with the density of the original point cloud, resulting in a uniform transition in the filled boundary region and laying a reliable foundation for subsequent point cloud generation.
[0067] In this embodiment of the application, searching for the nearest neighbor of the search point in the adjacent detection area may include: The larger of the grid sizes corresponding to adjacent detection areas is used as the search radius; Using the search point as the center, search for the nearest point within the search radius in the adjacent detection area.
[0068] In this embodiment, the search radius refers to the spatial distance centered on the search point, used to define the search range for the nearest neighbor point. The nearest neighbor point refers to the point cloud data point that is closest to the search point within the search radius.
[0069] It is understandable that the size of the search radius directly determines the accuracy and efficiency of nearest neighbor finding. If the search radius is too small, it may fail to find nearest neighbors in relatively sparse data areas, causing the positions that should be filled at the boundaries to be missed. If the search radius is too large, it may match points that are too far away, causing the filled point cloud position to deviate from the actual data distribution, thus introducing new discontinuities. To address this, the embodiments of this application use the larger grid size of the adjacent detection area as the search radius, so that the search range can cover the data distribution characteristics of the areas on both sides. This ensures that nearest neighbors can be found within a reasonable range, while avoiding excessive deviation in matching due to an excessively large radius.
[0070] Specifically, first, the grid dimensions corresponding to two adjacent detection regions are obtained, and their sizes are compared. The larger value is determined as the search radius. Then, with the search point as the center, all point cloud data points within the search radius are searched in the octree corresponding to the adjacent detection regions to which the search point belongs. Finally, the point cloud data point closest to the search point is selected from the searched point cloud data points and designated as the nearest neighbor of the search point in that region. If no point cloud data points exist within the search radius, it is determined that the search point has no nearest neighbor in that region.
[0071] In one example, for scenarios with uneven point cloud density distribution, the search radius can be dynamically adjusted. If the nearest neighbor is not found within the initial search radius, the search radius is gradually expanded until the nearest neighbor is found or the maximum search radius limit is reached.
[0072] In this way, by using the larger grid size of the adjacent detection area as the search radius, the search range is matched with the grid size of the side with lower accuracy, ensuring that the nearest neighbor can be found effectively even in areas with relatively sparse data, while avoiding excessive deviation in matching due to an excessively large radius.
[0073] In this embodiment of the application, before constructing the initial octree based on the point cloud data, the detection area where the point cloud data is located, and the grid size corresponding to each detection area, the method further includes: Based on the distance to the operating machinery, the surrounding environment is divided into multiple detection zones in real time. The grid size of the detection zone is positively correlated with the distance from the operating machinery to the detection zone.
[0074] In this embodiment of the application, the distance from the detection area to the operating machinery refers to the spatial distance between the area and the center of gravity of the operating machinery.
[0075] It is understandable that the required modeling accuracy varies depending on the distance of the area surrounding the machinery. Close-range areas (such as around the vehicle body) directly affect the accuracy of collision detection, requiring detailed modeling to avoid missed detections. Distant areas have relatively lower real-time requirements for collision detection and cover a larger area; using the same detailed modeling for distant areas would drastically increase computational load. If a uniform mesh size is used for all areas, either insufficient accuracy at close range will lead to safety hazards, or excessive detail at distant range will waste computational resources. Therefore, this embodiment sets a positive correlation between mesh size and area distance; that is, the closer the distance, the finer the mesh, and the farther the distance, the coarser the mesh, achieving a balance between modeling accuracy and computational efficiency.
[0076] Specifically, taking the center of gravity of the operating machinery as the origin, multiple detection zones are divided sequentially from the inside out. The innermost zone, closest to the center of gravity, uses the smallest mesh size to achieve the highest accuracy in environmental modeling; the middle zones, which expand outwards, use medium mesh sizes; and the outermost zone uses the largest mesh size to achieve a relatively coarse but computationally efficient environmental modeling.
[0077] In one embodiment, the method for determining the grid size corresponding to each detection region may include: Set the grid size of the first detection area closest to the operating machinery as the initial grid size; For other detection areas outside the first detection area, based on the initial grid size, the grid size of each detection area is adaptively assigned according to the size gradient that increases from the inside to the outside, so as to determine the corresponding grid size of each detection area.
[0078] In this embodiment, the initial mesh size corresponds to the highest modeling accuracy, ensuring the accuracy of the near-field environment description. Specifically, multiple detection areas are divided sequentially from the center of gravity of the operating machinery outwards. Areas closer to the operating machinery require higher collision detection accuracy, and their mesh sizes are closer to the initial mesh size, i.e., smaller mesh sizes are assigned to achieve fine modeling. Conversely, areas farther from the operating machinery have relatively lower accuracy requirements, and their mesh sizes increase more significantly relative to the initial mesh size, i.e., larger mesh sizes are assigned to achieve coarse modeling, thus controlling the overall computational load while ensuring near-field accuracy. Through this method, adaptive matching between the mesh size and the spatial distribution of the detection areas is achieved, laying a data foundation that balances accuracy and efficiency for subsequent octree-based environment modeling.
[0079] Figure 2 This is a schematic diagram of a multi-level detection area provided in a specific embodiment of this application. For example... Figure 2 As shown, in one specific embodiment, based on the top-down view of the machine body, its working area is divided into three circular regions: inner, middle, and outer, corresponding to collision detection areas of levels 1, 2, and 3, respectively (with level 1 being the highest, decreasing sequentially thereafter). The level 1 collision detection area corresponds to the smallest outermost circle of the vehicle body, i.e., the inner circle in the above figure; the level 2 collision detection area corresponds to the smallest outermost circle including the vehicle body, boom, and bucket, i.e., the middle circle in the above figure; the level 3 collision detection area corresponds to a circular area with the vehicle's center of gravity as the center point and a radius larger than the middle circle, i.e., the outer circle in the above figure. The radius of the outer circle can be manually configured based on actual working conditions. Among them, the environmental point cloud octree mesh size of the Level 1 collision detection area The numerical values are the base values. Regions 2 and 3 are adaptively calculated based on the base grid size and the current region radius, as detailed below: ; ; in, , These represent the octree mesh sizes of the environmental point cloud for the level 2 and level 3 collision detection regions, respectively. , , These correspond to the radii of the collision detection areas for levels 1, 2, and 3, respectively.
[0080] In one example, multi-level detection areas correspond to multi-level warnings. The warning level is negatively correlated with the distance from the detection area to the operating machinery; the closer the distance, the higher the warning level. Figure 2 For example, a Level 1 collision warning area corresponds to a Level 1 collision detection area, a Level 2 collision warning area corresponds to a Level 2 collision detection area, and a Level 3 collision warning area corresponds to a Level 3 collision detection area.
[0081] In this way, by setting the grid size to be positively correlated with the distance to the detection area, we can achieve fine modeling at close range to ensure safety and coarse modeling at long range to control overhead, thus laying a data foundation that balances accuracy and efficiency for subsequent processing.
[0082] In this embodiment of the application, the initial octree is corrected based on the filled point cloud and the filled mesh size to obtain the target octree, which may include: Based on the filled point cloud and the filled mesh size, the initial octree is augmented to obtain the target octree.
[0083] It's understandable that the initial octree is built solely based on the original point cloud data, resulting in data gaps at the boundaries of adjacent detection regions. Without any supplementation to the initial octree, these gaps will persist in the environment model, causing abrupt changes in detection distance during subsequent collision detection. By adding filler point clouds to the initial octree, the missing data points at the boundaries can be supplemented, connecting the previously separated point cloud data on both sides and thus eliminating the data gaps.
[0084] Specifically, the filled point cloud generated in step S104 and its corresponding filled mesh size are obtained. When inserting this filled point cloud as a new node into the initial octree, the level to which the node should belong in the octree is first determined based on the filled mesh size. If the node at that level already exists, the filled point cloud is directly added to that node; if the node at that level does not exist, nodes are created level by level down the tree structure until the level corresponding to the filled mesh size is reached, and then the filled point cloud is added. After completing the above addition operation for all filled point clouds, the initial octree is corrected into the target octree.
[0085] In one example, all filled point clouds can be grouped according to their filled grid size. Filled point clouds with the same filled grid size can be batch-inserted into the corresponding octree node level to reduce the overhead of repeated node lookup and creation, and improve correction efficiency.
[0086] In another example, while adding fill point cloud, the original point cloud nodes near the boundary can also be locally rebalanced to avoid some nodes becoming too deep or too shallow due to the insertion of new points, thereby maintaining the structural balance of the octree.
[0087] Thus, by performing local augmentation operations on the initial octree, only data gaps at the boundaries are filled without changing the original data structure and accuracy, a continuous and complete target octree is obtained with a small amount of computation, providing a reliable environmental model basis for subsequent collision detection.
[0088] In one specific embodiment, for the boundaries of collision detection regions at different levels, search points are uniformly extracted based on these boundaries. The extraction interval `search_interval` is taken as the smaller of the octree grid size values in the two different level regions of the boundary. The number of search points `search_num` is calculated as follows: ; in, The current boundary length is represented by floor, which indicates rounding down.
[0089] For boundary lookup points, the larger octree mesh size value in the two different level regions of the boundary is used as the search radius. Nearest neighbor lookup is performed for each boundary lookup point. If both environmental point cloud octrees in the two different level regions of the boundary have nearest neighbors within the search radius, the filled point cloud coordinates (point_fill) are calculated based on the nearest neighbors of the two regions, as detailed below: ; in, , The nearest neighbor points of the environmental point cloud octrees corresponding to two different level regions at the boundary.
[0090] Based on the boundary-filled point cloud coordinates, an octree is added to the environment point cloud. The octree mesh size res_fill is calculated as follows: ; in, , The octree mesh sizes for the environmental point cloud represent the dimensions of two different level regions at the boundary.
[0091] Figure 3 This is a flowchart illustrating a method for collision avoidance detection of operating machinery provided in an embodiment of this application. Figure 3 As shown in the figure, this application provides a method for collision avoidance detection of operating machinery, which may include the following steps.
[0092] Step S301: Obtain the target octree constructed for the surrounding environment of the working machine, and the pose data of the working machine. The target octree is constructed by the working environment modeling method in the above embodiments.
[0093] In this embodiment, the target octree refers to the environmental model after boundary filling correction, which has a continuous data distribution at the boundaries of adjacent detection areas. Pose data refers to the position and attitude information of each component of the operating machinery in space, which can be obtained through measurements such as rotary encoders and tilt sensors.
[0094] Specifically, firstly, a pre-constructed target octree is read from the memory. This target octree has been boundary-filled using the aforementioned operational environment modeling method, and can realistically reflect the spatial distribution of obstacles around the operating machinery. Simultaneously, the slewing angle of the operating machinery is obtained through a rotary encoder, and the tilt angle of the boom system is obtained through a tilt sensor. Combined with the geometric parameters of the operating machinery, the spatial pose of the operating machinery as a whole and each movable part at the current moment is calculated.
[0095] In one example, the target octree can be constructed all at once when the machine starts and updated periodically during operation. Pose data is acquired in real time at a high frequency to ensure real-time collision detection.
[0096] In another example, for scenarios where the working environment changes dynamically, the target octree can also be updated dynamically and continuously. That is, based on the latest LiDAR scanning data, the aforementioned working environment modeling method is repeated to continuously refresh the target octree so that it always remains consistent with the current environment.
[0097] Thus, by acquiring the target octree and pose data, complete and reliable input information is provided for subsequent collision detection. The target octree ensures the continuity of the environmental model, and the pose data ensures the authenticity of the working machinery's own state. The combination of the two lays a data foundation for accurately assessing collision risks.
[0098] Step S302: Based on the target octree and pose data, perform collision avoidance detection on the operating machinery to obtain the collision avoidance detection results.
[0099] In this embodiment, collision avoidance detection refers to the process of determining whether there is a risk of collision between various components of the operating machinery and surrounding obstacles. The collision avoidance detection results may include information such as whether there is a collision risk, the risk level, the collision location, and the collision distance.
[0100] Specifically, firstly, based on pose data, the spatial distribution and orientation of the entire operating machinery and its movable parts are determined. Then, spatial collision calculations are performed between the geometric model of the operating machinery and the target octree. The system queries the target octree to determine if there are obstacle point clouds within the range of the operating machinery's geometric model, and calculates the minimum distance between the surface of the operating machinery's geometric model and the surrounding obstacle point clouds. If the minimum distance is less than a safety threshold, a collision risk is identified, and the collision location and distance are output as the collision avoidance detection result.
[0101] In one example, the geometric model of the operating machinery can be discretized into multiple feature points. By querying the nearest neighbor of each feature point in the target octree, the minimum distance between the operating machinery and the obstacle can be quickly obtained.
[0102] In another example, different safety thresholds can be set in advance for different parts of the operating machinery. For example, a larger safety threshold can be set for the boom end with greater swing, while a smaller safety threshold can be set for the relatively stable vehicle body, so that the test results are more in line with the actual operation requirements.
[0103] In this way, by performing spatial collision calculations between the geometric model of the operating machinery and the target octree, the spatial positional relationship between the operating machinery and surrounding obstacles can be accurately determined, and reliable collision avoidance detection results can be output, providing a basis for subsequent early warning or control decisions.
[0104] In this embodiment of the application, collision avoidance detection is performed on the operating machinery based on the target octree and pose data to obtain the collision avoidance detection result, which may include: Based on the pose data, construct axis-aligned bounding boxes corresponding to the multiple anti-collision body sub-modules in the operating machinery; Based on the target octree and axis-aligned bounding box, the first anti-collision detection is performed to determine the target sub-module among multiple anti-collision body sub-modules; Construct the target orientation bounding box corresponding to the target submodule; Based on the target orientation bounding box and the target octree, a second collision avoidance detection is performed to obtain the collision avoidance detection result.
[0105] In this embodiment, the anti-collision body submodule refers to multiple key components of the operating machinery, such as tracks, turntable, boom, stick, and bucket, which are separated according to anti-collision requirements. An axis-aligned bounding box (AABB) is a rectangular bounding box with sides parallel to the coordinate axes; it has fast calculation speed but low fit. An orientation bounding box (OBB) is a fitted bounding box that can rotate with the component; it has high calculation accuracy but a large computational load. The target submodule refers to the submodule closest to environmental obstacles, selected after the first anti-collision detection.
[0106] Understandably, the appropriateness of collision detection directly determines whether the operating machinery can safely avoid surrounding obstacles. Traditional methods often apply collision detection with uniform precision to all components, which can easily lead to excessive computational load, making it difficult to meet real-time requirements, or insufficient detection accuracy, resulting in false alarms and missed alarms. To address this, the embodiments of this application adopt a two-stage detection strategy: first, a fast-computing axis-aligned bounding box is used to quickly filter out suspected targets; then, a high-precision orientation bounding box is used only for the suspected targets for accurate calculation, thereby balancing detection efficiency and accuracy.
[0107] Specifically, firstly, based on the pose data, a corresponding axis-aligned bounding box is constructed for each anti-collision body sub-module. The edges of the axis-aligned bounding box are parallel to the coordinate axes, and it can be quickly generated by simply determining the minimum and maximum coordinate values of each sub-module in space, with minimal computational cost. Then, the axis-aligned bounding boxes are subjected to a first anti-collision detection with the target octree, calculating the distance between each bounding box and environmental obstacles, and selecting one or more sub-modules with the closest distance as target sub-modules. The first anti-collision detection uses a relatively coarse detection method to quickly narrow down the suspicious range. Next, the geometric parameters of the target sub-module are obtained, and combined with its current pose data, a target orientation bounding box that closely fits the sub-module is constructed. The orientation bounding box can rotate with the sub-module, enabling more precise containment of the component shape. Finally, the target orientation bounding box is subjected to a second anti-collision detection with the target octree, accurately calculating the minimum distance and collision point position between the target sub-module and environmental obstacles, and outputting this distance and collision point as the anti-collision detection result.
[0108] Through the above two-stage detection strategy, the first collision avoidance detection uses a low-precision, high-efficiency axis-aligned bounding box to quickly narrow the detection range, while the second collision avoidance detection only uses a high-precision orientation bounding box to accurately calculate the selected target sub-modules. This significantly reduces the amount of computation while ensuring detection accuracy, thus achieving a balance between real-time performance and accuracy in collision avoidance detection.
[0109] In this embodiment, a first anti-collision detection is performed based on the target octree and axis-aligned bounding boxes to determine the target sub-module among multiple anti-collision body sub-modules, which may include: Construct an axis-aligned bounding box tree based on multiple axis-aligned bounding boxes; Collision calculations are performed between the axis-aligned bounding box tree and the target octree to determine the initial collision point in the target octree that is closest to the working machine. The anti-collision body submodule with the smallest distance from the initial collision point is identified as the target submodule.
[0110] In this embodiment, the AABBTree is a data structure that organizes multiple axis-aligned bounding boxes into a binary tree structure. Its core idea is to wrap sub-modules layer by layer with bounding boxes, thereby quickly eliminating a large number of disjoint elements during querying. The initial collision point refers to the environmental obstacle point in the target octree that is closest to the operating machinery during the first collision avoidance detection phase.
[0111] It is understandable that the operating machinery contains multiple anti-collision body sub-modules. If the axis-aligned bounding boxes of each sub-module are individually compared with the target octree for collision calculation, multiple checks are required, which is still inefficient. To address this, the embodiments of this application construct all axis-aligned bounding boxes into an axis-aligned bounding box tree. By performing spatial queries through the tree structure, the nearest collision point and its corresponding sub-module can be quickly located, significantly reducing unnecessary calculations.
[0112] Specifically, firstly, the axis-aligned bounding boxes corresponding to each anti-collision body sub-module constructed in step S302 are obtained. These axis-aligned bounding boxes are used as leaf nodes and recursively merged according to their spatial position relationships to construct an axis-aligned bounding box tree. The upper-level nodes of the tree represent the union of the bounding boxes of their lower-level child nodes, used to quickly eliminate branches that cannot intersect. Then, the constructed axis-aligned bounding box tree is used to perform collision calculations with the target octree. Specifically, starting from the root node of the axis-aligned bounding box tree, it is recursively determined whether the current node intersects with an obstacle in the target octree. If there is no intersection, the branch is pruned; if there is an intersection, the traversal continues downward until the leaf node closest to the obstacle is found, and the collision point corresponding to this leaf node is determined as the initial collision point. Finally, based on the spatial position of the initial collision point, the distance between the axis-aligned bounding box of each anti-collision body sub-module and the collision point is calculated, and the sub-module with the smallest distance is determined as the target sub-module, which is used as the object for subsequent fine-tuning detection.
[0113] In one example, the axis-aligned bounding box tree can be constructed in a bottom-up manner, dividing the space according to the center position of each submodule's bounding box, so that adjacent or close submodules are organized in the same subtree, thereby improving the pruning efficiency during collision detection.
[0114] In one example, collision calculation can employ a depth-first traversal strategy and set the current nearest distance as a pruning threshold. If the bounding box of a node does not intersect with the current nearest distance, the branch is skipped directly, further accelerating the query process.
[0115] Thus, by constructing an axis-aligned bounding box tree and performing collision calculations with the target octree, and utilizing the rapid pruning capability of the tree structure, the nearest target sub-module can be selected from numerous sub-modules in a short time, avoiding the computational overhead of comparing them one by one, and significantly improving the efficiency of the first collision avoidance detection.
[0116] In this embodiment of the application, a second collision avoidance detection is performed based on the target orientation bounding box and the target octree to obtain the collision avoidance detection result, which may include: Collision calculations are performed between the target orientation bounding box and the target octree to determine the target collision point in the target octree that is closest to the working machinery. The distance between the target submodule and the target collision point is defined as the collision distance between the operating machinery and environmental obstacles; The target collision point and collision distance are used as the collision avoidance detection results.
[0117] In this embodiment, the target orientation bounding box refers to the fitted bounding box constructed for the target sub-modules selected by the first collision avoidance detection. The target collision point refers to the environmental obstacle point in the target octree that is closest to the target sub-module during the second collision avoidance detection stage. The collision distance refers to the spatial distance between the target sub-module and the target collision point, used to quantify the collision risk.
[0118] It is understandable that the first collision avoidance detection uses an axis-aligned bounding box, which, although fast in calculation, results in inaccurate detection due to the gap between the axis-aligned bounding box and the actual shape of the submodule. Using the result of the first collision avoidance detection directly as the final judgment may lead to an underestimation or overestimation of the collision distance, resulting in false alarms or missed alarms. Therefore, this embodiment, after identifying the target submodule, further employs a directional bounding box that closely fits the submodule for a second collision avoidance detection to obtain accurate collision distance and collision point location.
[0119] Specifically, firstly, the target sub-module determined by the first collision avoidance detection and its corresponding target orientation bounding box are acquired. The target orientation bounding box has been updated according to the current pose of the target sub-module, and its shape closely matches the actual contour of the sub-module. Then, a precise collision calculation is performed between the target orientation bounding box and the target octree. Specifically, the shortest distance between all points on the surface of the target orientation bounding box and the obstacle point cloud in the target octree is calculated, and the obstacle point corresponding to this shortest distance is determined as the target collision point. This calculation process can use a nearest neighbor search algorithm to quickly locate the nearest point using the spatial indexing characteristics of the octree. Next, this shortest distance is determined as the collision distance between the target sub-module and the target collision point, which is the precise collision distance between the operating machinery and environmental obstacles. Finally, the target collision point and collision distance are output as the collision avoidance detection result for subsequent hierarchical early warning or decision control.
[0120] In one example, if there are multiple candidate collision points with similar distances during the calculation of the nearest distance between the target bounding box and the target octree, the one with the smallest distance can be taken as the target collision point, and the second closest distance can be output as reference information.
[0121] In one example, for targets with complex shapes, the target sub-modules can be further divided into finer-grained geometric units. The distance between each geometric unit and the target octree can be calculated, and the minimum value can be taken as the final collision distance.
[0122] Thus, by employing a directional bounding box that closely fits the target submodule for secondary collision avoidance detection, accurate collision distance and collision point location can be obtained, compensating for the insufficient accuracy of the primary collision avoidance detection. This two-stage detection strategy, proceeding from coarse to fine, significantly improves detection accuracy while maintaining computational efficiency, providing a reliable basis for subsequent graded early warning and control decisions.
[0123] Figure 4 This is a flowchart illustrating a method for collision detection of operating machinery, provided as a specific embodiment of this application. Figure 4 As shown, this method mainly includes two parallel processing chains: environment modeling and collision detection.
[0124] In the environmental modeling process, the first step is to acquire point cloud data of obstacles around the operating machinery and construct hierarchical collision detection regions. Based on the grid size corresponding to each region, an environmental point cloud octree is dynamically constructed using multi-scale resolution. Since adjacent regions have different grid sizes, data discontinuities may exist at the boundaries. Therefore, adaptive point cloud filling is required for the region boundaries to eliminate discontinuities and obtain a continuous and complete environmental octree.
[0125] In the collision detection chain, the operating machinery is first broken down into key anti-collision body sub-modules such as tracked chassis, body, boom, and bucket, and body bounding boxes are constructed. To balance detection efficiency and accuracy, this application adopts a two-stage detection strategy. In the coarse detection stage, axis-aligned bounding boxes (AABBs) of each sub-module are constructed, and all AABBs are further constructed into an ABBTree (axis-aligned bounding box tree). This tree structure can quickly eliminate a large number of non-overlapping elements, enabling fast spatial queries. In the fine detection stage, based on the sub-module closest to environmental obstacles output in the coarse detection stage, an oriented bounding box (OBB) of that sub-module is constructed. The OBB can closely fit the actual shape of the sub-module, which is suitable for high-precision collision calculation.
[0126] Finally, the AABBBTree from the coarse detection stage and the OBB from the fine detection stage are used for overall collision detection with the filled environment octree, respectively. The collision relationship between the two is calculated, and the collision distance and the closest collision point are output as the collision avoidance detection results. It should be noted that the fine detection stage only performs OBB calculation on the target sub-modules selected by the coarse detection, without needing to traverse all sub-modules globally, thus significantly improving computational efficiency while ensuring detection accuracy.
[0127] Figure 5 This is a structural block diagram of a controller provided in an embodiment of this application. Figure 5 As shown in the embodiments of this application, a controller is also provided, including: Memory 510 is configured to store instructions; The processor 520 is configured to retrieve instructions from the memory 510 and, when executing the instructions, to implement the work environment modeling method in the above embodiments and / or the work machinery collision avoidance detection method in the above embodiments.
[0128] In some examples, the operating machinery can be construction machinery such as excavators, electric shovels, and cranes, or it can be agricultural machinery or operating robots. The driving form of the operating machinery can be driven by a fuel engine, or by pure electric drive (such as lithium batteries, sodium-ion batteries, or fuel cells combined with an electric motor), or it can be hybrid or range-extended drive, etc., without specific limitations here.
[0129] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0131] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0132] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0133] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0134] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0135] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0136] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0137] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for modeling a work environment, characterized in that, The operational environment modeling method includes: Acquire point cloud data of the surrounding environment of the operating machinery; Based on the point cloud data, the detection area where the point cloud data is located, and the grid size corresponding to each detection area, an initial octree is constructed; Extract the search point on the boundary of each adjacent detection area, and search for the nearest neighbor of the search point in the adjacent detection area; When the search point has nearest neighbor points in both adjacent detection areas, the filling point cloud is determined based on the nearest neighbor points, and the filling grid size is determined based on the grid size corresponding to each adjacent detection area. Based on the filled point cloud and the filled mesh size, the initial octree is corrected to obtain the target octree.
2. The working environment modeling method according to claim 1, characterized in that, Before constructing the initial octree based on the point cloud data, the detection area where the point cloud data is located, and the grid size corresponding to each detection area, the method further includes: Based on the distance to the operating machinery, the surrounding environment is divided into multiple detection zones in real time. The grid size of each detection zone is positively correlated with the distance from the operating machinery to that detection zone.
3. The working environment modeling method according to claim 1, characterized in that, The method for determining the grid size corresponding to each of the detection areas includes: Set the grid size of the first detection area closest to the operating machinery as the initial grid size; For other detection areas outside the first detection area, based on the initial grid size, the grid size of each detection area is adaptively assigned according to a size gradient that increases from the inside out, so as to determine the grid size corresponding to each detection area.
4. The working environment modeling method according to claim 1, characterized in that, The step of extracting search points on the boundaries of adjacent detection areas includes: The smaller of the grid sizes corresponding to adjacent detection regions is used as the extraction interval; Based on the extraction interval, search points are extracted uniformly along the boundary.
5. The working environment modeling method according to claim 1, characterized in that, The search for the nearest neighbor of the search point in the adjacent detection area includes: The larger of the grid sizes corresponding to adjacent detection areas is used as the search radius; Using the search point as the center, search for the nearest point within the search radius in the adjacent detection area.
6. The working environment modeling method according to claim 1, characterized in that, The step of correcting the initial octree based on the filled point cloud and the filled mesh size to obtain the target octree includes: Based on the filled point cloud and the filled mesh size, the initial octree is augmented to obtain the target octree.
7. A method for collision avoidance detection of operating machinery, characterized in that, The method includes: Obtain a target octree constructed for the surrounding environment of the operating machinery, and pose data of the operating machinery, wherein the target octree is constructed according to the operating environment modeling method as described in any one of claims 1 to 6; Based on the target octree and the pose data, collision avoidance detection is performed on the operating machinery to obtain the collision avoidance detection results.
8. The method according to claim 7, characterized in that, The step of performing collision avoidance detection on the operating machinery based on the target octree and the pose data to obtain collision avoidance detection results includes: Based on the pose data, construct axis-aligned bounding boxes corresponding to the multiple anti-collision body sub-modules in the operating machinery; Based on the target octree and the axis-aligned bounding box, a first anti-collision detection is performed to determine the target sub-module among the plurality of anti-collision body sub-modules; Construct the target orientation bounding box corresponding to the target sub-module; Based on the target orientation bounding box and the target octree, a second collision avoidance detection is performed to obtain the collision avoidance detection result.
9. The method according to claim 8, characterized in that, The first anti-collision detection, based on the target octree and the axis-aligned bounding box, is performed to determine the target sub-module among the plurality of anti-collision body sub-modules, including: Construct an axis-aligned bounding box tree based on multiple axis-aligned bounding boxes; Collision calculations are performed between the axis-aligned bounding box tree and the target octree to determine the initial collision point in the target octree that has the smallest distance from the working machine; The anti-collision body submodule with the smallest distance from the initial collision point is determined as the target submodule.
10. The method according to claim 8, characterized in that, The second collision avoidance detection, based on the target orientation bounding box and the target octree, yields the collision avoidance detection result, including: Collision calculations are performed between the target orientation bounding box and the target octree to determine the target collision point in the target octree that has the smallest distance to the working machinery; The distance between the target sub-module and the target collision point is determined as the collision distance between the operating machinery and the environmental obstacle; The target collision point and the collision distance are used as the collision avoidance detection result.
11. A controller, characterized in that, include: The memory is configured to store instructions; The processor is configured to retrieve the instructions from the memory and, when executing the instructions, to implement the work environment modeling method according to any one of claims 1 to 6, and / or the work machinery collision avoidance detection method according to any one of claims 7 to 10.
