Ground simulation and collision warning method and system for large-size transport vehicle
Patent Information
- Application Number
- CN202611468456.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-21
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]上述技术方案中,规则化的地形表达会丢失山地岩壁、边坡凸起等微地形细节,无法匹配风机叶片这类超长货物的精细化碰撞校验需求,而若直接引入高精度点云数据还原真实地形,全局式的碰撞计算又难以支撑实时交互的仿真运行,二者的冲突直接导致复杂山地场景下大件运输仿真的精度与效率无法兼顾
本发明通过直接采用点云数据构建地形场景,完整保留山地岩壁、边坡凸起等微地形细节,为超长风机叶片的精细化碰撞校验提供了真实的地形基础,避免了规则高程模型带来的细节丢失与碰撞漏检问题。依托八叉树-KD树二级空间索引架构,将全局点云计算转化为局部近邻查询,在保障检测精度的同时大幅降低计算开销,支撑大范围点云场景下的实时交互仿真。同时通过多部件联动的位姿控制与风机叶片独立姿态调节,还原了实际运输中的主动避障操作,结合轨迹外推的碰撞预警机制可提前识别通行风险,显著提升了大件运输仿真的真实性与实用性,可为山地风电大件运输方案的可行性验证提供可靠的虚拟预演支撑。综上本发明有效解决了复杂山地大件运输仿真中地形还原精度与计算实时性难以兼顾的问题。
Smart Images

Figure CN122990131A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle collision simulation technology, specifically to a method and system for ground-hugging simulation and collision warning of heavy transport vehicles. Background Technology
[0002] Oversized transport vehicles are characterized by heavy loads and significantly oversized cargo. Mountainous terrain with numerous curves and cliff-side sections further increases the risk of blades scraping against mountainsides and vehicles getting stuck during transport. Against this backdrop, 3D simulation technology has become a crucial tool for anticipating and mitigating risks in oversized transport scenarios. The industry is placing higher demands on the realism of simulation scenarios, the accuracy of collision detection, and the real-time nature of interactive operations.
[0003] The current conventional approach to 3D simulation of heavy-duty transportation is to construct terrain scenes based on regularized digital elevation models, combined with simplified vehicle rigid body models, and to simulate the driving process according to a pre-planned fixed transportation route. By calculating the geometric distance between the vehicle model and the terrain surface, the collision risk of the transportation route is verified offline, thereby achieving a preliminary feasibility assessment of the transportation plan.
[0004] In the above technical solutions, the regularized terrain representation loses micro-topographical details such as mountain rock walls and slope protrusions, which cannot match the fine collision verification requirements of ultra-long cargo such as wind turbine blades. On the other hand, if high-precision point cloud data is directly introduced to restore the real terrain, global collision calculation is difficult to support real-time interactive simulation operation. The conflict between the two directly leads to the inability to balance the accuracy and efficiency of large-item transportation simulation in complex mountainous scenarios. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method and system for ground-hugging simulation and collision warning of heavy transport vehicles, which aims to solve the above-mentioned problems described in the prior art.
[0006] The first aspect of the present invention is to provide a method for ground-hugging simulation and collision warning of heavy transport vehicles, the method comprising: Import and decompose the 3D model of the heavy transport vehicle to obtain independent component models including the cab, semi-trailer, turntable and fan blades. Record the spatial offset and rotation axis relationship between each component model and extract the convex hull collision body corresponding to each component model. Load terrain point cloud data and construct an octree-KD tree two-level spatial index to accelerate terrain height query and collision detection calculation; Based on the vehicle's current location, the terrain point cloud of the corresponding area is retrieved through the octree-KD tree secondary spatial index and the terrain height is calculated, driving the vehicle model to perform ground-hugging driving on the point cloud terrain. In response to the control command, the vehicle speed and heading quaternion are updated, and the spatial pose of each component model is calculated in conjunction with the spatial offset and the rotation axis relationship to achieve coordinated steering and obstacle avoidance between the vehicle and the wind turbine blades. The pose extrapolation prediction of the wind turbine blades is performed along the vehicle's driving direction. Based on the convex hull collider and the octree-KD tree secondary spatial index, the collision risk between the vehicle component model and the wind turbine blades and the terrain point cloud is detected, and a visual warning is output. The steps involved in loading terrain point cloud data and constructing an octree-KD tree secondary spatial index include: The original terrain point cloud data is subjected to hierarchical detail thinning to generate multi-level precision point cloud subsets and construct corresponding page-style hierarchical detail nodes. The point cloud data of the entire scenic spot is recursively divided into an octree in three-dimensional space. Taking the center point of the current region as the dividing origin, the region is divided into eight sub-regions along the three axes of X, Y and Z. Each point cloud is assigned to the corresponding sub-region according to its coordinates and the division operation is recursively executed until the number of point clouds in each leaf node is less than the preset number threshold, thus obtaining the octree index structure. A KD tree is constructed for each subset of point clouds within the leaf node of the octree index structure to obtain an octree-KD tree secondary spatial index for fast nearest neighbor retrieval.
[0007] According to one aspect of the above technical solution, the step of constructing a KD tree for each subset of point clouds within each leaf node of the octree index structure includes: A KD tree mounting interface is set in each octree node. Each octree leaf node constructs a local KD tree with the subset of point cloud contained within it. The root node of the octree additionally constructs a global KD tree covering the entire terrain point cloud. All KD trees and octree indexes share the same point cloud data. Starting from the root node of each KD tree, the segmentation dimension is determined by taking the recursion depth of the current node modulo 3. The remainders 0, 1, and 2 correspond to the X-axis, Y-axis, and Z-axis, respectively. The median coordinate of the current point set in the corresponding segmentation dimension is taken as the position of the segmentation hyperplane. The point set is divided into two sub-point sets, left and right, and the segmentation operation is recursively performed until the number of point clouds in the node is less than the preset threshold or the recursion depth reaches the preset upper limit. The node is then marked as a leaf node of the KD tree. Specifically, for terrain height queries, the path is set to call the corresponding KD tree to perform radius search after the octree locates the area where the query point is located; for collision detection, the path is set to call the corresponding KD tree to perform nearest neighbor search after the octree filters the candidate point set by bounding box overlap determination.
[0008] According to one aspect of the above technical solution, based on the vehicle's current position, the steps of retrieving the terrain point cloud of the corresponding area using the octree-KD tree secondary spatial index and calculating the terrain height, and driving the vehicle model to perform ground-hugging driving on the point cloud terrain, include: Based on the current vehicle speed and heading angle, calculate the horizontal displacement of the vehicle in the next frame and predict the horizontal position coordinates of the vehicle's articulation point. Using the predicted horizontal coordinates as the query point, search for K nearest neighbor terrain points through the octree-KD tree secondary spatial index, and take the arithmetic mean of the Z coordinates of the K nearest neighbor terrain points as the terrain height of the corresponding position; By combining the predicted horizontal position coordinates with the terrain height, the ground-hugging three-dimensional position of the vehicle's articulation point in the next frame is obtained; The terrain heights of the tractor head, the corresponding semi-trailer position, and the vehicle articulation point are queried separately. The pitch angles of the tractor head and the semi-trailer are calculated by the ratio of the height difference to the horizontal distance, thus completing the full-space posture update of the vehicle driving close to the ground.
[0009] According to one aspect of the above technical solution, the steps for detecting the collision risk between the vehicle component models and wind turbine blades and the terrain point cloud include: The local convex hull colliders of each component model are mapped to the world coordinate system through pose transformation, and the axis-aligned bounding boxes of each component model in the world coordinate system are calculated. The leaf nodes that have spatial intersection with the bounding box aligned with the axis are filtered out by the octree index structure, and the point cloud data in the corresponding leaf nodes are used as the collision detection candidate point set. Traverse each vertex of each convex hull collider, search for the nearest neighbor in the KD tree of the corresponding collision detection candidate point set and calculate the Euclidean distance; If the nearest neighbor distance of a vertex is less than a preset collision distance threshold, then it is determined that there is a collision risk at the corresponding position of the component model to which that vertex belongs.
[0010] According to one aspect of the above technical solution, the step of extrapolating and predicting the pose of the wind turbine blades along the vehicle's travel direction includes: Based on the current vehicle motion state and the wind turbine blade posture, a multi-frame wind turbine blade pose sequence is generated by extrapolation along the driving direction at a preset time step. Collision detection is performed on the extrapolated wind turbine blade pose for each frame, and visual warning information of the corresponding level is output based on the nearest neighbor distance and the preset multi-level warning threshold.
[0011] According to one aspect of the above technical solution, the step of updating the vehicle speed and heading quaternions in response to a control command includes: In response to acceleration and deceleration control commands, the vehicle speed is updated according to preset speed increments, and the vehicle's forward, reverse, or stationary motion status is marked. In response to steering control commands, the vehicle heading angle is updated according to a preset steering increment, and the heading angle is converted to generate a heading quaternion around the Z-axis for rotational transformation of vehicle attitude. In response to the wind turbine blade control commands, a horizontal rotation quaternion around the Z-axis and a vertical rotation quaternion around the Y-axis are generated respectively, and the horizontal deflection angle and vertical pitch angle of the wind turbine blades are adjusted independently.
[0012] According to one aspect of the above technical solution, the pose update of the vehicle model and the wind turbine blades is achieved through the frame callback function of the three-dimensional scene. The frame callback function is executed before each frame of scene rendering, and the spatial position and attitude of each component model are updated synchronously according to the manipulation command and terrain height calculation results of the current frame.
[0013] A second aspect of the present invention is to provide a ground-hugging simulation and collision warning system for heavy-duty transport vehicles, applied to the method described in the above-mentioned technical solution, the system comprising: The model processing module is used to import and decompose the 3D model of the heavy transport vehicle to obtain independent component models including the cab, semi-trailer, turntable and fan blades. It records the spatial offset and rotation axis relationship between each component model and extracts the convex hull collision body corresponding to each component model. The index building module is used to load terrain point cloud data and build an octree-KD tree two-level spatial index to accelerate terrain height query and collision detection calculation. The drive control module is used to retrieve the terrain point cloud of the corresponding area and calculate the terrain height based on the current position of the vehicle through the octree-KD tree secondary spatial index, and drive the vehicle model to perform ground-hugging driving on the point cloud terrain. The control linkage module is used to respond to control commands, update the vehicle speed and heading quaternion, and calculate the spatial pose of each component model based on the spatial offset and the relationship between the rotation axis, so as to realize the coordinated steering and obstacle avoidance of the vehicle and the wind turbine blades. The collision warning module is used to perform pose extrapolation prediction of the wind turbine blades along the vehicle's driving direction. Based on the convex hull collision body and the octree-KD tree secondary spatial index, it detects the collision risk between the vehicle component models and the wind turbine blades and the terrain point cloud, and outputs a visual warning.
[0014] A third aspect of the present invention is to provide a readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method described in any of the above embodiments.
[0015] A fourth aspect of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described in the above technical solutions.
[0016] Compared with existing technologies, the advantages of using the ground-hugging simulation and collision warning method and system for heavy transport vehicles shown in this invention are as follows: This invention constructs terrain scenes directly using point cloud data, fully preserving micro-topographic details such as mountain cliffs and slope protrusions. This provides a realistic terrain foundation for refined collision verification of ultra-long wind turbine blades, avoiding the loss of details and missed collision detection issues caused by regular elevation models. Relying on an octree-KD tree two-level spatial index architecture, global point cloud computing is transformed into local nearest neighbor queries, significantly reducing computational overhead while ensuring detection accuracy and supporting real-time interactive simulation in large-scale point cloud scenarios. Simultaneously, through multi-component coordinated pose control and independent attitude adjustment of wind turbine blades, the active obstacle avoidance operation in actual transportation is reproduced. Combined with a collision warning mechanism based on trajectory extrapolation, passage risks can be identified in advance, significantly improving the realism and practicality of large-item transportation simulation. This provides reliable virtual pre-simulation support for the feasibility verification of large-item transportation schemes in mountainous wind power areas. In summary, this invention effectively solves the problem of balancing terrain restoration accuracy and real-time computation in complex mountainous large-item transportation simulations. Attached Figure Description
[0017] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 A flowchart illustrating the ground-hugging simulation and collision warning method for heavy transport vehicles provided in this embodiment of the invention; Figure 2 This is a schematic diagram illustrating the method of splitting the three-dimensional model of a vehicle into multiple independent component models in the embodiments of the present invention. Figure 1 ; Figure 3 This is a schematic diagram illustrating the method of splitting the three-dimensional model of a vehicle into multiple independent component models in the embodiments of the present invention. Figure 2 ; Figure 4 This is a schematic diagram illustrating the method of splitting the three-dimensional model of a vehicle into multiple independent component models in the embodiments of the present invention. Figure 3 ; Figure 5 The structural block diagram of the ground-hugging simulation and collision warning system for heavy transport vehicles provided in the embodiments of the present invention is shown. Detailed Implementation
[0018] To make the objectives, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the present invention will be more thorough and complete.
[0019] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0021] Addressing the industry pain points of existing heavy haulage simulations, which are mostly based on regular curved surfaces or digital elevation models, have insufficient terrain fidelity, and struggle to balance collision detection accuracy and real-time performance, this invention constructs a complete technical closed loop from model preprocessing, spatial indexing, ground-hugging driving, maneuver linkage control to collision warning output. This allows professionals to verify the passability of heavy haulage vehicles in complex mountainous terrain in a virtual environment.
[0022] Example 1 Please see Figure 1 The first embodiment of the present invention provides a method for ground-hugging simulation and collision warning of heavy transport vehicles, characterized in that the method includes steps S10-S50: Step S10: Import and split the 3D model of the heavy transport vehicle to obtain independent component models including the cab, semi-trailer, turntable and fan blades. Record the spatial offset and rotation axis relationship between each component model and extract the convex hull collision body corresponding to each component model.
[0023] Specifically, please refer to Figure 2-4When conducting ground-hugging simulation and collision warning for heavy transport vehicles, the entire 3D model of the heavy transport vehicle is first separated using 3D modeling tools. The original integrated 3D model is broken down into independent component models, including the cab 100, semi-trailer 200, turntable 300, and fan blades 40. This is because the rotation center and rotation axis of each component are not unified, and the integrated 3D model of the vehicle cannot achieve independent steering and linkage attitude adjustment.
[0024] After disassembly, the hierarchical dependencies between the components need to be defined, including: the tractor and semi-trailer rotate coaxially with the hinge point as the reference, and their rotation axes are consistent; the turntable above the semi-trailer has an independent rotation axis and can rotate horizontally relative to the semi-trailer; the fan blades are fixed on the turntable and have their own rotational freedom, thus forming a hierarchical assembly hierarchy of tractor-semi-trailer-turntable-blade.
[0025] Based on this, the fixed spatial offset of each component relative to the reference point is measured and recorded. For example, the offset of the turntable relative to the semi-trailer articulation point is constant. The offset of the fan blades relative to the center of the turntable is constant. ,in , , These are the fixed offset values of the turntable relative to the articulation point of the semi-trailer on the X, Y, and Z axes, respectively. , , These are the fixed offset values of the fan blades relative to the center of the turntable on the X, Y, and Z axes, respectively.
[0026] Furthermore, the offset remains constant during simulation. When the reference point position is updated, each component can synchronously update its world coordinates through matrix transformation, maintaining the assembly integrity of the entire vehicle at all times. Convex hull collision bodies are extracted from the original mesh model of each component simultaneously, approximating the component shape with a minimum convex polyhedron. Compared to the original triangular mesh, this reduces the number of geometric elements for collision detection by one to two orders of magnitude. Simultaneously, the conservatism of the convex hull ensures that collision detection does not miss any collisions, meeting the safety requirements of engineering simulation.
[0027] Step S20: Load terrain point cloud data and construct an octree-KD tree secondary spatial index to accelerate terrain height query and collision detection calculation.
[0028] It should be noted that since the amount of point cloud data in large-scale mountainous terrain can reach millions or even tens of millions, if a global point-by-point traversal method is used for height query and collision detection, the computational overhead cannot support real-time interactive simulation.
[0029] To address this, the method described in this embodiment employs a two-level index architecture, transforming global computation into local nearest neighbor queries. Specifically, the octree handles coarse-grained partitioning and rapid pruning of spatial regions, quickly eliminating far-field point clouds that have no spatial intersection with vehicle components. Meanwhile, the KD-tree, deployed within the leaf nodes of the octree, is responsible for precise nearest neighbor retrieval of local point clouds. By combining the octree and KD-tree to construct the index structure, the time complexity of point cloud queries can be reduced from linear to logarithmic order of magnitude. Furthermore, this index structure simultaneously serves two core computational types: terrain height query and collision detection, eliminating the need to build separate indexes for each type of computation, thus balancing storage efficiency and computational performance.
[0030] In this embodiment, the steps of loading terrain point cloud data and constructing an octree-KD tree secondary spatial index include: The original terrain point cloud data is subjected to hierarchical detail thinning to generate multi-level precision point cloud subsets and construct corresponding page-style hierarchical detail nodes. The point cloud data of the entire scenic spot is recursively divided into an octree in three-dimensional space. Taking the center point of the current region as the dividing origin, the region is divided into eight sub-regions along the three axes of X, Y and Z. Each point cloud is assigned to the corresponding sub-region according to its coordinates and the division operation is recursively executed until the number of point clouds in each leaf node is less than the preset number threshold, thus obtaining the octree index structure. For each leaf node of the octree index structure, a KD tree is constructed for the point cloud subset. The KD tree recursively partitions the point cloud subset using a hyperplane with alternating dimensions. The partitioning dimension is determined by taking the recursion depth of the current node modulo 3. The remainders 0, 1, and 2 correspond to the X-axis, Y-axis, and Z-axis, respectively. The node is marked as a leaf node after the termination condition is met, thus obtaining an octree-KD tree secondary spatial index for fast nearest neighbor retrieval.
[0031] It should be noted that the point cloud data of large-scale mountainous terrain is enormous, and full loading and rendering will consume a lot of video memory and computing resources, making it impossible to support smooth browsing of large-scale scenes.
[0032] Therefore, the method shown in this embodiment uses hierarchical detailing techniques to thin the original point cloud. In specific implementation, it is assumed that the original LAS point cloud contains... There are 1 point, with point number 1. ,in This represents the total number of points in the original point cloud. Number the points in the point cloud sequentially. Then calculate the sequence for each point. In the formula For the first The value is calculated by taking the remainder of the index of each point. This is the modulo operation.
[0033] Based on the remainder, all points are divided into three precision levels according to the segmentation rules:
[0034] In the formula, For the first The level of detail to which each point belongs, with values of 0, 1, and 2 corresponding to the sparsest, medium-precision, and highest-precision levels, respectively. Three-dimensional engine geometry is generated for each of the three levels and encapsulated as page-style hierarchical detail nodes. In the formula For the first The page-based hierarchy detail nodes corresponding to the layer. For the first Layered cloud subset The generated 3D engine geometry automatically switches display resolution based on the distance between the viewpoint and the point cloud region: sparse point clouds are displayed when the viewpoint is far away to reduce rendering pressure, while high-density point clouds are switched when the viewpoint is close to ensure clear terrain details, effectively reducing the rendering load without affecting the visual effect.
[0035] After completing the point cloud rendering hierarchy construction, an octree index is further constructed for the entire point cloud to achieve rapid filtering of spatial regions. The construction process starts with the initial bounding box of the entire point cloud. First, the maximum and minimum values of the bounding box along the X, Y, and Z axes are calculated, and the arithmetic mean of the maximum and minimum values along each axis is taken as the center point of the region. , , In the formula , , These are the coordinates of the center point of the initial region on the X, Y, and Z axes, respectively. , These are the minimum and maximum values of the initial region on the X-axis, respectively. The same applies to the Y and Z axes, so they will not be elaborated further.
[0036] Divide the current region into eight cubic sub-regions by drawing dividing planes along the three axes through the center point. The bounding box of each sub-region can be represented as the Cartesian product of the three axial intervals:
[0037] In the formula, Numbering in the first layer of division The axis-aligned bounding box of the sub-region. , , This represents the sub-region's number along the three axes, with a value of 0 or 1.
[0038] Traverse all point cloud points within the current region and assign each point to a corresponding sub-region based on its coordinates and the size relationship with the center point. The assignment rule is as follows:
[0039] In the formula, , , The coordinates of a point in the point cloud are 3D. The sub-region number to which the point belongs can be determined based on the relative size of the coordinates to the center point. That is, to be included The corresponding sub-region.
[0040] The above segmentation and allocation process is recursively performed on each sub-region until the number of point clouds in the sub-region is less than a preset threshold. At this point, the segmentation stops and the node is marked as an octagonal leaf node. Through this recursive segmentation, the panoramic view cloud is organized into a tree-like spatial structure. During subsequent spatial queries, irrelevant regions can be quickly pruned by determining the intersection of bounding boxes, without needing to traverse the entire panoramic view cloud.
[0041] Since octrees only implement coarse-grained spatial partitioning, and a single leaf node still contains thousands of point cloud data points, the efficiency of direct linear search for nearest neighbors is still insufficient to meet the real-time requirements of multiple queries per frame. Therefore, it is necessary to construct a KD-tree separately for the point cloud subset of each octree leaf node. The construction of the KD-tree starts from the root node. Beginning, initial point set Initial recursion depth The segmentation dimension is composed of Confirmed, among which The recursion depth of the current node is given. Remainder 0 corresponds to the X-axis, remainder 1 corresponds to the Y-axis, and remainder 2 corresponds to the Z-axis. This three-dimensional partitioning dimension is used in a cyclical alternation to ensure uniform division in all directions of the three-dimensional space.
[0042] After selecting the segmentation dimension, use the values on that dimension. Determine the dividing hyperplane:
[0043] In the formula, For nodes The corresponding dividing hyperplane, For any point in three-dimensional space, For nodes The corresponding segmentation dimension The values of the dividing hyperplane in the corresponding dimension.
[0044] The hyperplane divides the point set into two subsets, left and right:
[0045]
[0046] In the formula, For nodes The subset of the point cloud corresponding to the left child node For nodes The point cloud subset corresponding to the right child node For points in a point cloud, For point The coordinates of the partitioning dimension. The partitioning process is recursively executed until the number of points within a node reaches a minimum threshold or the recursion depth reaches a maximum depth. Each node is then marked as a leaf node in the KD tree, ultimately resulting in the KD tree structure. In the formula To construct the complete KD tree structure, The set of all nodes in the KD-tree. This is the set of edges connecting the nodes of a KD-tree.
[0047] The median splitting method used above ensures the balance of the KD-tree structure and avoids excessively deep subtrees on one side. Combined with alternating dimension splitting, the time complexity of nearest neighbor search can be controlled within a certain range. The performance is more than two orders of magnitude faster than linear search, fully meeting the computational performance requirements of real-time simulation.
[0048] It is easy to understand that when constructing a KD tree, the original LAS point cloud is first thinned and voxel raster downsampled to control the scale; then the global bounding box of the root node is calculated and recursively divided: at each level, the region is divided into 8 sub-regions with the center of the node bounding box as the dividing point, and the sub-region is located by binary octet encoding - if the x-coordinate of a point is not less than the center x, it is set to the 4th position; if the y-coordinate is not less than the center y, it is set to the 2nd position; if the z-coordinate is not less than the center z, it is set to the 1st position. The three-bit combination uniquely determines the sub-node number, thus completing the sub-region assignment of the point in O(1). When a node reaches the maximum depth, or the number of points it contains is not greater than the threshold (e.g., 2000), it is marked as a leaf; the leaf node further constructs a local KD tree with its point set. At this point, the octree is responsible for "slicing the point cloud into blocks according to space", while the KD tree is responsible for "supporting fast nearest neighbor query within each block", and the secondary structure is completed.
[0049] By constructing the above secondary indexes, under the same secondary index architecture, two query paths with different performance characteristics can be followed based on the query intent: ① Ground-level terrain height query: First, an octree is used for region localization—recursively checking if the query point falls within the bounding box of nodes from the root node, pruning subtrees that do not contain the query point, and constraining the search to a small number of local nodes containing the query point; then, a pre-constructed global KD-tree is used to perform a radius search on the query point, taking all terrain points within the radius, and the arithmetic mean (or density estimate) of their Z coordinates is the terrain height at that location. The octree solves "where is the point", and the KD-tree solves "what is the local height", and the combination of the two ensures that multiple height queries per frame maintain logarithmic efficiency.
[0050] ② Collision Detection Query: First, a candidate set is coarsely screened using an octree—the current world axis-aligned bounding box of the vehicle component is taken, and overlap determination is recursively performed with the bounding boxes of each node in the octree. Non-intersecting subtrees are pruned, and only point cloud points falling into the leaf nodes that intersect with the component's bounding box are collected as the candidate set. Combined with Z-axis pre-screening, far-field ground points that are significantly lower than the vehicle body are removed. Then, a KD-tree is constructed using the candidate set, and a nearest neighbor search is performed on each convex hull vertex of the component. If the nearest neighbor distance is less than a threshold, it is determined to be a collision point. The octree solves "which points might collide," and the KD-tree solves "whether a collision actually occurs," reducing collision calculation from a point-by-point traversal of the entire point cloud to a logarithmic query of a small candidate set.
[0051] Step S30: Based on the vehicle's current position, retrieve the terrain point cloud of the corresponding area through the octree-KD tree secondary spatial index and calculate the terrain height, then drive the vehicle model to perform ground-hugging driving on the point cloud terrain.
[0052] It should be noted that, since point cloud terrain differs from regular elevation models and does not have a regular height grid, it is necessary to obtain the terrain height at any location through nearest neighbor lookup.
[0053] The method shown in this embodiment uses the vehicle's hinge point as the motion reference, predicts the horizontal position of the next frame based on the current motion state, queries the terrain height at that position through the aforementioned secondary spatial index, and assigns the corresponding value to the vehicle's Z coordinate. At the same time, it combines the height difference of multiple points to calculate the vehicle's pitch attitude, so that the whole vehicle model can conform to the undulating mountainous terrain and move, thereby avoiding phenomena such as the vehicle body being suspended in the air or penetrating the terrain that do not conform to the real situation, so as to restore the driving posture of large vehicles in complex mountainous terrain as much as possible.
[0054] In this embodiment, based on the vehicle's current position, the terrain point cloud of the corresponding area is retrieved using the octree-KD tree secondary spatial index, and the terrain height is calculated. The vehicle model is then driven to perform ground-hugging driving on the point cloud terrain. This includes: Based on the current vehicle speed and heading angle, calculate the horizontal displacement of the vehicle in the next frame and predict the horizontal position coordinates of the vehicle's articulation point. Using the predicted horizontal coordinates as the query point, search for K nearest neighbor terrain points through the octree-KD tree secondary spatial index, and take the arithmetic mean of the Z coordinates of the K nearest neighbor terrain points as the terrain height of the corresponding position; By combining the predicted horizontal position coordinates with the terrain height, the ground-hugging three-dimensional position of the vehicle's articulation point in the next frame is obtained; The terrain heights of the tractor head, the corresponding semi-trailer position, and the vehicle articulation point are queried separately. The pitch angles of the tractor head and the semi-trailer are calculated by the ratio of the height difference to the horizontal distance, thus completing the full-space posture update of the vehicle driving close to the ground.
[0055] Specifically, the vehicle's pose in three-dimensional space is described by both position and attitude, and is uniformly represented as: ,in The spatial location of the vehicle's hinge point. Let be the quaternion of the vehicle's heading attitude around the Z-axis. This represents a three-dimensional special orthogonal group, which is the set of all legal rotational orientations.
[0056] The corresponding vehicle heading angle can be directly calculated using the components of the quaternion:
[0057] In the formula, For the vehicle's heading angle, The z-component of the heading quaternion. Let w be the real part of the heading quaternion. It is a two-parameter arctangent function that can directly output calculation results across the entire angular range. By converting quaternion attitude into intuitive heading angles, it provides a benchmark for displacement calculation and attitude control.
[0058] The calculation of ground-hugging driving is based on the vehicle's articulation point, which is the mechanical connection point between the tractor and the semi-trailer, and also the reference point for the vehicle's kinematics calculation. During each frame update, the horizontal position of the articulation point in the next frame is first predicted based on the current frame's driving speed and heading angle.
[0059] In a right-handed three-dimensional coordinate system, let the first... The horizontal coordinate of the frame hinge point is The driving speed is The heading angle is Then the horizontal displacement component of the next frame is , Therefore, the predicted horizontal coordinates of the hinge point in the next frame can be obtained as follows:
[0060] In the formula, For the first Predicted horizontal position coordinates of the vehicle's articulation point in the frame. , For the first The X and Y coordinates of the frame hinge point For the first The vehicle speed in the frame, For the first The vehicle heading angle of the frame. This displacement calculation corresponds to the geometric definition of the heading angle, which is the angle between the vehicle's direction of travel and the positive Y-axis. This ensures that the vehicle's direction of movement and attitude are completely consistent, providing accurate coordinates for subsequent terrain height queries.
[0061] After obtaining the predicted horizontal position, using these planar coordinates as the query point, a K-nearest neighbor search is performed in the octree-KD-tree secondary spatial index to obtain the K nearest terrain points to the query point. The set of nearest neighbors can be represented as:
[0062] In the formula, For query point The corresponding set of K nearest neighbor terrain points, For the first A neighboring topographic point, The number of nearest neighbors. This is a complete collection of terrain point clouds.
[0063] Among them, each nearest neighbor point All satisfy the nearest neighbor distance constraint:
[0064] In the formula, , For the first The horizontal coordinates of the nearest neighbor points The formula is a two-dimensional Euclidean distance, which means that the distance from the first K points to the query point is less than or equal to the distance from all other points to the query point, ensuring that the selected K points are the terrain points closest to the query point.
[0065] The reason for using the K-nearest neighbor average method to calculate terrain height is that the cloud data collected by LiDAR on mountainous terrain contains a certain amount of random noise and discreteness. The height of a single point is easily affected by noise points and outliers, causing abnormal bumps in the vehicle model. The terrain height at that location is calculated by taking the arithmetic mean of the Z coordinates of the K nearest neighbors, i.e.:
[0066] In the formula, To query the terrain elevation corresponding to a location, The number of nearest neighbors. For the first Z-axis coordinates of the nearest neighboring terrain points This is the summation operator. This calculation method effectively smooths local terrain fluctuations and improves the stability of the ground-hugging effect. The K value can be flexibly adjusted according to the point cloud density; for example, 10 to 20 nearest neighbors can be selected when the point cloud density is high, and 3 to 5 nearest neighbors can be selected when the point cloud density is low, achieving a balance between smoothness and terrain restoration accuracy. By combining the predicted horizontal coordinates with the calculated terrain height, the ground-hugging 3D position of the hinge point in the next frame can be obtained.
[0067] Furthermore, simply updating the height of the articulation point only ensures that the reference point is on the ground; it cannot reproduce the pitch attitude of the vehicle body as it undulates with the terrain. Also, the tractor unit and semi-trailer of a heavy-duty transport vehicle are two independent rigid bodies, and the terrain slope before and after the articulation point may differ. Therefore, it is necessary to calculate the pitch angles of the tractor unit and semi-trailer separately. Taking the tractor unit as an example, the tractor unit has a fixed local offset relative to the articulation point. The rotation matrix corresponding to the quaternion of the vehicle's front attitude By transforming the local offset to the world coordinate system, the world coordinates of the vehicle's front reference point can be obtained:
[0068] In the formula, The world coordinates of the reference point of the vehicle's front end. The world coordinates of the vehicle's articulation point. Quaternion for the frontal posture The corresponding rotation matrix, This represents the local offset of the vehicle's front reference point relative to the hinge point.
[0069] Using the same height query method as the articulation point, the terrain height corresponding to the vehicle front reference point is obtained. Calculate the height difference between the reference point of the front of the vehicle and the hinge point. And the horizontal distance between the two points:
[0070] In the formula, This is the horizontal distance between the reference point of the vehicle's front and the hinge point. , The horizontal coordinates of the reference point at the front of the vehicle. , represents the horizontal coordinates of the hinge point.
[0071] The pitch angle of the train is then calculated using the arctangent function:
[0072] In the formula, The pitch angle of the car's front end. The height difference between the reference point of the front of the vehicle and the hinge point. The horizontal distance between the two points is given by the arctan2 function. The pitch direction can be directly determined by the sign of the height difference and the horizontal distance, distinguishing between uphill and downhill attitudes, and the output results remain stable even when the horizontal distance is small.
[0073] Then, using the same calculation method, the reference point and articulation point at the rear of the semi-trailer are used to calculate the pitch angle of the semi-trailer. Finally, the position coordinates, heading angle, and pitch angle are integrated into the complete spatial pose of each component to complete the ground-hugging driving update of the whole vehicle, ensuring that the cab and semi-trailer can conform to the terrain slope of the corresponding position, and realistically reproduce the driving posture of the vehicle on undulating mountainous terrain.
[0074] In step S40, in response to the control command, the vehicle speed and heading quaternion are updated, and the spatial pose of each component model is calculated in conjunction with the spatial offset and the rotation axis relationship to achieve coordinated steering and obstacle avoidance between the vehicle and the wind turbine blades.
[0075] It should be noted that the above operation instructions support interactive manual operation, such as having professional transportation dispatchers simulate driving in a virtual environment to verify the feasibility of transportation routes.
[0076] Specifically, after receiving external input control commands, the system updates the vehicle's speed and heading attitude in real time, and updates the spatial pose of all components in conjunction with the pre-calibrated assembly relationships.
[0077] The vehicle body's steering synchronously drives the semi-trailer's movement, while the turntable and fan blades can rotate and adjust independently of the vehicle body. This allows operators to actively avoid obstacles by adjusting the horizontal and vertical tilt angles of the blades when navigating complex scenarios such as narrow bends, mountain slopes, and height-restricted sections. Therefore, passability verification can be completed without a complete detour, greatly improving the practicality and flexibility of the simulation.
[0078] Step S50: Perform pose extrapolation prediction of the wind turbine blades along the vehicle's driving direction. Based on the convex hull collider and the octree-KD tree secondary spatial index, detect the collision risk between the vehicle component models and the wind turbine blades and the terrain point cloud, and output a visual warning.
[0079] It should be noted that wind turbine blades can typically be tens of meters long, while heavy transport vehicles have long braking distances and slow steering responses. Simply detecting collisions at the current position and orientation cannot provide operators with sufficient reaction time.
[0080] Therefore, the method shown in this embodiment introduces a trajectory extrapolation mechanism to predict the pose sequence of the wind turbine blades over a future period along the current driving direction, and uses this pose sequence to identify potential collision risks in advance. The collision detection covers all components, including the tractor unit, semi-trailer, turntable, and wind turbine blades, thus avoiding situations where only the blades are detected while ignoring scrapes between the vehicle body and the terrain.
[0081] For example, when a collision risk is detected, a visual warning is output through 3D scene highlighting and interface prompts to assist on-site operators in adjusting driving strategies in a timely manner, thereby effectively avoiding collision accidents of oversized transport vehicles during the transport of oversized items.
[0082] Compared with existing technologies, the ground-hugging simulation and collision warning method for heavy transport vehicles shown in this embodiment has the following advantages: This embodiment directly constructs a terrain scene using point cloud data, fully preserving micro-topographic details such as mountain cliffs and slope protrusions. This provides a realistic terrain foundation for refined collision verification of ultra-long wind turbine blades, avoiding the loss of details and missed collision detection issues caused by regular elevation models. Relying on an octree-KD tree two-level spatial index architecture, global point cloud computing is transformed into local nearest neighbor queries, significantly reducing computational overhead while ensuring detection accuracy and supporting real-time interactive simulation in large-scale point cloud scenarios. Simultaneously, through multi-component coordinated pose control and independent attitude adjustment of wind turbine blades, the active obstacle avoidance operation in actual transportation is reproduced. Combined with a collision warning mechanism based on trajectory extrapolation, passage risks can be identified in advance, significantly improving the realism and practicality of large-item transportation simulation. This provides reliable virtual pre-simulation support for the feasibility verification of large-item transportation schemes in mountainous wind power areas. In summary, this embodiment effectively solves the problem of balancing terrain restoration accuracy and real-time computation in complex mountainous large-item transportation simulations.
[0083] Example 2 The second embodiment of the present invention also provides a method for ground-hugging simulation and collision warning of large transport vehicles. The method shown in this embodiment is basically the same as the method shown in the first embodiment, except that: In this embodiment, the steps for detecting the collision risk between the vehicle component models and wind turbine blades and the terrain point cloud include: The local convex hull colliders of each component model are mapped to the world coordinate system through pose transformation, and the axis-aligned bounding boxes of each component model in the world coordinate system are calculated. The leaf nodes that have spatial intersection with the bounding box aligned with the axis are filtered out by the octree index structure, and the point cloud data in the corresponding leaf nodes are used as the collision detection candidate point set. Traverse each vertex of each convex hull collider, search for the nearest neighbor in the KD tree of the corresponding collision detection candidate point set and calculate the Euclidean distance; If the nearest neighbor distance of a vertex is less than a preset collision distance threshold, then it is determined that there is a collision risk at the corresponding position of the component model to which that vertex belongs.
[0084] Specifically, collision detection first requires matching the local convex hull collider of a component to the vehicle pose in the current frame. For any component model Due to its convex hull point set in its own local coordinate system It is fixed and unchanging; each frame requires the current pose transformation matrix of this component. Map all vertices of the convex hull from the local coordinate system to the world coordinate system to obtain the set of convex hull points in the world coordinate system:
[0085] In the formula, For components The set of points on the convex hull in the world coordinate system For components pose transformation matrix, The vertices of the convex hull in the local coordinate system. For components The set of points on the convex hull in the local coordinate system. It should be noted that the convex hull, as the minimal convex polyhedron containing the original model, has inherent conservatism; as long as the convex hull does not collide with the terrain, the original model will not collide. Therefore, collision detection based on the convex hull will not miss any detections and can meet the safety requirements of engineering simulation.
[0086] After completing the coordinate transformation of the convex hull, the axis-aligned bounding box of the component in the world coordinate system is further calculated. This involves traversing all convex hull vertices and extracting the maximum and minimum values along the X, Y, and Z axes. The axis-aligned bounding box of the component is formed by these six extreme values.
[0087] In the formula, For components The axis is aligned with the bounding box. , These represent the minimum and maximum values of the component's convex hull on the X-axis, respectively; the same applies to the Y and Z axes. The Cartesian product operation represents a cubic region in three-dimensional space. Calculating the axis-aligned bounding box only requires finding the maximum or minimum value, and intersection detection only requires comparisons along six axes, resulting in extremely low computational cost. It is the most commonly used coarse screening method in collision detection.
[0088] Since the octree candidate point set screening achieves coarse-grained pruning of the collision region, after obtaining the axis-aligned bounding box of the component, coarse-grained pruning is performed using the spatial block characteristics of the octree to quickly eliminate the vast majority of far-field point clouds that are irrelevant to collisions. Specifically, the octree is recursively traversed starting from the root node, and each octree node is judged sequentially. Enclosure and component enclosure To determine if a spatial intersection exists, the intersection determination requires that the overlap conditions of three axes be satisfied simultaneously. The logic can be expressed as follows:
[0089] In the formula, octree node The surrounding box, For set intersection operations, It is an empty set. Indicates equivalence relation, This represents the maximum value of an octree node on the X-axis. The minimum value is the value along the X-axis; the same applies to the Y and Z axes. For logical AND operation.
[0090] If the current node does not intersect with the bounding box of the component, prune the node and all its child nodes directly without further traversal; if they intersect and the current node is not a leaf node, continue traversing its child nodes; if they intersect and the current node is a leaf node, include all point clouds within that node in the collision detection candidate point set, and the final candidate point set is the union of all intersecting leaf node point sets.
[0091] In the formula, For components The corresponding collision detection candidate point set, For the set union operation, octree node The subset of points contained within the bounding box is summed to the octagonal leaf nodes that intersect with the bounding box of the component. Through this spatial pruning mechanism, the final candidate point set typically accounts for only a fraction of the total point cloud, which can reduce the computational cost of subsequent accurate detection to an extremely low level.
[0092] After obtaining the candidate point set, perform an exact nearest neighbor distance calculation for each vertex of the convex hull collider. This involves traversing all vertices of the convex hull. Using the world coordinates of each vertex as the query point, a nearest neighbor search is performed in the KD-tree corresponding to the candidate point set. The branch and bound mechanism of the KD-tree is used to quickly locate the terrain point closest to the vertex.
[0093] In the formula, Distance to query point The nearest topographic point, This represents the independent variable that minimizes the objective function. For point With point The three-dimensional Euclidean distance between them Given a set of candidate point clouds, calculate the Euclidean distance between them as the minimum collision distance for that vertex.
[0094] In the formula, For query point The corresponding minimum collision distance, The vertex of the convex hull collision body. This is the terrain point closest to the given vertex. Leveraging the logarithmic search efficiency of the KD-tree, even if a single component's convex content contains hundreds of vertices, the distance calculation for all vertices can be completed within milliseconds, fully meeting the frame rate requirements of real-time simulation.
[0095] By presetting a collision distance threshold This threshold corresponds to the safety protection distance in the simulation and can be set comprehensively based on factors such as the safety level of the transportation scenario and point cloud measurement errors. After traversing the minimum distance of all convex hull vertices, if there exists a vertex whose nearest neighbor distance is less than this threshold, then the following condition is met:
[0096] In the formula, For components The set of collision points, For convex hull vertices, Indicates equivalence relation, This represents the minimum collision distance at that vertex. If a preset collision distance threshold is set, the component to which the vertex belongs is determined to be at a collision risk at the corresponding location. This detection mechanism can accurately identify the specific location where a collision occurs, providing accurate location references for subsequent visual warnings and operator adjustments.
[0097] In this embodiment, the step of extrapolating and predicting the pose of the wind turbine blades along the vehicle's travel direction includes: Based on the current vehicle motion state and the wind turbine blade posture, a multi-frame wind turbine blade pose sequence is generated by extrapolation along the driving direction at a preset time step. Collision detection is performed on the extrapolated wind turbine blade pose for each frame, and visual warning information of the corresponding level is output based on the nearest neighbor distance and the preset multi-level warning threshold.
[0098] It should be noted that wind turbine blades, as extra-long cargo, are the most vulnerable components to collisions during heavy transport. Furthermore, heavy transport vehicles have heavy loads and high inertia, resulting in braking distances and steering responses that are much slower than those of ordinary vehicles. If only the collision at the current position is detected, operators often do not have enough time to adjust and avoid it.
[0099] The core function of pose extrapolation is to shift the timeline of collision detection forward, allowing operators sufficient reaction and handling time. Specifically, the extrapolation calculation is based on the vehicle's motion state and the wind turbine blade attitude in the current frame. Given the low-speed operation characteristics of heavy-duty transport, it assumes that the vehicle's speed, heading angle, and blade attitude remain constant for a short period. Extrapolation is performed frame by frame along the current direction of travel at a preset time step, generating a continuous sequence of blade poses. The time step and the number of extrapolated frames can be flexibly set according to simulation requirements. Typically, the time step is 0.2 to 1 second, and the number of extrapolated frames is set to 3 to 5 frames, covering the travel trajectory for the next 1 to 3 seconds. This duration meets the requirements of the average reaction time of heavy-duty transport drivers and the vehicle's braking distance, while preventing the motion state assumptions from becoming invalid or the prediction error from being too large due to excessive extrapolation time.
[0100] Then, for the blade pose of each extrapolated frame, a complete collision detection process is performed to obtain the minimum collision distance between each position of the blade and the terrain in that frame.
[0101] To avoid overly harsh single-threshold warnings and frequent alarms that could interfere with operators, the method described in this embodiment employs a multi-level warning mechanism, with multiple warning thresholds pre-set to correspond to different risk levels. For example, a three-level warning system can be set: when the minimum distance is greater than the first threshold, it is a safe state and no warning is triggered; when the distance is between the first and second thresholds, it is a level one low-risk warning, prompting operators to pay attention to the terrain ahead; when the distance is between the second and third thresholds, it is a level two medium-risk warning, suggesting that operators slow down and adjust the vehicle or blade attitude; when the distance is less than the third threshold, it is a level three high-risk warning, prompting operators to immediately stop and adjust the route or blade angle.
[0102] The warning output is presented in a visual way, highlighting the risk area of the blade in a three-dimensional scene with corresponding colors, gradually transitioning from safe green to warning yellow and red. At the same time, the simulation interface displays the current warning level, minimum collision distance and expected collision time, allowing operators to intuitively and quickly grasp the degree of risk and make timely operational adjustments.
[0103] In this embodiment, the steps of updating the vehicle speed and heading quaternions in response to a control command include: In response to acceleration and deceleration control commands, the vehicle speed is updated according to preset speed increments, and the vehicle's forward, reverse, or stationary motion status is marked. In response to steering control commands, the vehicle heading angle is updated according to a preset steering increment, and the heading angle is converted to generate a heading quaternion around the Z-axis for rotational transformation of vehicle attitude. In response to the wind turbine blade control commands, a horizontal rotation quaternion around the Z-axis and a vertical rotation quaternion around the Y-axis are generated respectively, and the horizontal deflection angle and vertical pitch angle of the wind turbine blades are adjusted independently.
[0104] Specifically, the vehicle's speed is controlled via an external input device. After responding to acceleration or deceleration commands, the system updates the current speed according to a preset speed increment.
[0105] In the formula, For the first The vehicle speed in the frame, For the first The vehicle speed in the frame, The speed increment corresponds to the control command; positive values are for acceleration commands and negative values are for deceleration commands.
[0106] The magnitude of the speed increment determines the acceleration sensitivity and can be adjusted according to simulation requirements, typically set to 0.05 to 0.2 m / s per frame. To ensure the realism and controllability of the simulation, the maximum and minimum vehicle speeds also need to be set. For heavy haulage simulations, the maximum speed is usually limited to below 5 m / s to prevent excessive speed from causing an inability to avoid obstacles in time. The system marks the vehicle's motion state in real time based on the current speed; the motion state is segmented as follows:
[0107] In the formula, For the first The vehicle motion state marker in the frame, For the first The vehicle speed in the frame, Corresponding to the backward state, Corresponding to the forward state, This corresponds to the stationary state. The motion state marker is not only used for directional control in displacement calculation, but also provides directional basis for trajectory extrapolation and collision warning, ensuring that the warning direction is consistent with the driving direction when the vehicle reverses, and avoiding false warnings due to incorrect direction.
[0108] The vehicle's horizontal steering is controlled by directional commands. After responding to the steering command, the system updates the vehicle's heading angle according to a preset steering increment.
[0109] In the formula, For the first The vehicle heading angle of the frame. For the first The vehicle heading angle of the frame. The steering increment corresponds to the control command, with positive and negative values for left and right turns, respectively. The steering increment determines the steering sensitivity and is typically set to 0.3 to 1 degree per frame. At the same time, a maximum steering angle limit is set to simulate the upper limit of the steering wheel angle of a real vehicle, avoiding extremely small turning radii that do not conform to the vehicle's dynamic characteristics.
[0110] After obtaining the updated heading angle, convert it into a heading quaternion rotating about the Z-axis, with the corresponding expression as follows:
[0111] In the formula, For the corresponding heading angle The quaternion of rotation about the Z-axis, For heading angle, It is a cosine function. For a sine function, the quaternion components are the real parts from top to bottom. virtual part virtual part virtual part .
[0112] In this embodiment, quaternions are used to describe heading attitude, which has multiple advantages over traditional Euler angles: First, it can avoid the gimbal lock problem of Euler angles and ensure the stability of attitude calculation; second, quaternion rotations can be quickly combined through multiplication, and the calculation efficiency is higher when superimposing blade rotations and pitch rotations; third, it can be directly adapted to the model transformation interface of mainstream 3D engines without additional format conversion, improving development efficiency and running performance.
[0113] To achieve active obstacle avoidance in complex terrain, the wind turbine blades support independent rotational adjustment in two degrees of freedom, without affecting the vehicle's overall motion. The horizontal rotation occurs around the Z-axis, controlled by corresponding manipulation commands, generating a horizontal rotation quaternion around the Z-axis.
[0114] In the formula, For the corresponding rotation angle A quaternion rotated horizontally around the Z-axis. Let be the horizontal deflection angle of the wind turbine blades. The quaternion components, from top to bottom, are the real parts. virtual part virtual part virtual part This quaternion is used to adjust the horizontal deflection angle of the blades, which can reduce the lateral clearance of vehicles in narrow bends.
[0115] The vertical rotation around the Y-axis is controlled by another set of manipulation commands, which generates a corresponding vertical rotation quaternion around the Y-axis:
[0116] In the formula, For the corresponding rotation angle A quaternion that rotates vertically around the Y-axis. Let be the vertical pitch angle of the wind turbine blades. The quaternion components, from top to bottom, are the real parts. virtual part virtual part virtual part .
[0117] The aforementioned quaternions are used to adjust the vertical pitch angle of the blades, allowing for blade elevation to avoid collisions on uneven terrain or in height-restricted sections. The two rotational degrees of freedom are independent, allowing operators to adjust one or both simultaneously, flexibly adapting to different terrain and obstacle scenarios. The blade rotation angles are also subject to reasonable travel limits, such as a horizontal rotation range limited to ±90 degrees and a vertical rotation range limited to ±30 degrees, conforming to the adjustable range of blades in actual wind power transportation and ensuring the engineering reference value of the simulation results.
[0118] In addition, in this embodiment, the pose update of the vehicle model and the wind turbine blades is achieved through the frame callback function of the three-dimensional scene. The frame callback function is executed before each frame of scene rendering, and the spatial position and attitude of each component model are updated synchronously according to the manipulation command and terrain height calculation result of the current frame.
[0119] First, it should be noted that in a simulation system based on a 3D engine, scene rendering is performed periodically in frames. The pose update of the model must be synchronized with the rendering frames; otherwise, problems such as screen tearing and inconsistencies between logic and display will occur.
[0120] The method described in this embodiment involves registering scene update callback functions for the vehicle model and the wind turbine blade model. These callback functions are automatically triggered by the update traversal of the 3D engine, and their execution timing is fixed before each frame of scene rendering, ensuring that each frame's rendered image is based on the latest pose calculation results. Compared to independent thread updates, frame callbacks naturally run in the main rendering thread, complying with the thread safety requirements of the 3D engine. This avoids crashes or rendering anomalies caused by multi-threaded modifications of scene nodes, resulting in higher system stability.
[0121] After each frame's callback function is triggered, calculations are executed in a fixed logical order. First, the user input command for the current frame is read, and manipulation quantities such as acceleration / deceleration, steering, and blade rotation are parsed to update motion parameters such as speed and angle. Then, operations such as ground position prediction, terrain height query, and pitch angle calculation are performed to obtain the latest spatial pose of the hinge point and each component. Finally, based on the pre-calibrated spatial offset and rotation axis association, the world transformation matrix of the tractor, semi-trailer, turntable, and wind turbine blades is calculated sequentially and synchronously assigned to the corresponding scene nodes.
[0122] The pose updates of all the above components are completed in a single callback, ensuring that the relative positions and assembly relationships between the components are always accurate and preventing misalignment or disconnection between intermediate frames. Simultaneously, collision detection, warning calculation, and other logic can also be integrated into the same callback process, ensuring that the collision state and the pose displayed on the screen completely correspond, avoiding the problem of desynchronization between warnings and the screen.
[0123] Additionally, it should be noted that the execution frequency of frame callbacks is consistent with the scene rendering frame rate, typically stable at 30 to 60 frames per second, ensuring smooth interactive operations. This solution uses a two-level spatial index to keep the computational load of height lookup and collision detection per frame to an extremely low level, ensuring that all logical operations can be completed within the time budget of a single frame, without frame delays or stuttering / frame drops. For devices with weaker performance, the computational load per frame can be further reduced by adjusting parameters such as the LOD level, point cloud thinning ratio, and the number of convex hull vertices, ensuring that the execution efficiency of frame callbacks always meets the frame rate requirements of real-time simulation, and possessing good device adaptability and scene scalability.
[0124] Example 3 Please see Figure 5 The third embodiment of the present invention provides a ground-hugging simulation and collision warning system for heavy transport vehicles, applied to the method described in any of the above embodiments, the system comprising: The model processing module 10 is used to import and split the 3D model of the heavy transport vehicle to obtain independent component models including the cab, semi-trailer, turntable and fan blades, record the spatial offset and rotation axis relationship between each component model, and extract the convex hull collision body corresponding to each component model. Index building module 20 is used to load terrain point cloud data and build an octree-KD tree two-level spatial index to accelerate terrain height query and collision detection calculation; The drive control module 30 is used to retrieve the terrain point cloud of the corresponding area and calculate the terrain height according to the current position of the vehicle through the octree-KD tree secondary spatial index, and drive the vehicle model to perform ground-hugging driving on the point cloud terrain. The control linkage module 40 is used to respond to control commands, update the vehicle speed and heading quaternion, and calculate the spatial pose of each component model based on the spatial offset and the relationship between the rotation axis, so as to realize the coordinated steering and obstacle avoidance of the vehicle and the wind turbine blades. The collision warning module 50 is used to perform pose extrapolation prediction of the wind turbine blades along the vehicle's driving direction. Based on the convex hull collision body and the octree-KD tree secondary spatial index, it detects the collision risk between the vehicle component models and the wind turbine blades and the terrain point cloud, and outputs a visual warning.
[0125] Compared with existing technologies, the advantages of using the ground-following simulation and collision warning system for heavy transport vehicles shown in this embodiment are as follows: This embodiment directly constructs a terrain scene using point cloud data, fully preserving micro-topographic details such as mountain cliffs and slope protrusions. This provides a realistic terrain foundation for refined collision verification of ultra-long wind turbine blades, avoiding the loss of details and missed collision detection issues caused by regular elevation models. Relying on an octree-KD tree two-level spatial index architecture, global point cloud computing is transformed into local nearest neighbor queries, significantly reducing computational overhead while ensuring detection accuracy and supporting real-time interactive simulation in large-scale point cloud scenarios. Simultaneously, through multi-component coordinated pose control and independent attitude adjustment of wind turbine blades, the active obstacle avoidance operation in actual transportation is reproduced. Combined with a collision warning mechanism based on trajectory extrapolation, passage risks can be identified in advance, significantly improving the realism and practicality of large-item transportation simulation. This provides reliable virtual pre-simulation support for the feasibility verification of large-item transportation schemes in mountainous wind power areas. In summary, this embodiment effectively solves the problem of balancing terrain restoration accuracy and real-time computation in complex mountainous large-item transportation simulations.
[0126] Example 4 A fourth embodiment of the present invention provides a readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the methods described in the above embodiments.
[0127] Example 5 A fifth embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the methods described in the above embodiments.
[0128] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0129] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A method for ground-hugging simulation and collision warning of heavy transport vehicles, characterized in that, The method includes: Import and decompose the 3D model of the heavy transport vehicle to obtain independent component models including the cab, semi-trailer, turntable and fan blades. Record the spatial offset and rotation axis relationship between each component model and extract the convex hull collision body corresponding to each component model. Load terrain point cloud data and construct an octree-KD tree two-level spatial index to accelerate terrain height query and collision detection calculation; Based on the vehicle's current location, the terrain point cloud of the corresponding area is retrieved through the octree-KD tree secondary spatial index and the terrain height is calculated, driving the vehicle model to perform ground-hugging driving on the point cloud terrain. In response to the control command, the vehicle speed and heading quaternion are updated, and the spatial pose of each component model is calculated in conjunction with the spatial offset and the rotation axis relationship to achieve coordinated steering and obstacle avoidance between the vehicle and the wind turbine blades. The pose extrapolation prediction of the wind turbine blades is performed along the vehicle's driving direction. Based on the convex hull collider and the octree-KD tree secondary spatial index, the collision risk between the vehicle component model and the wind turbine blades and the terrain point cloud is detected, and a visual warning is output. The steps involved in loading terrain point cloud data and constructing an octree-KD tree secondary spatial index include: The original terrain point cloud data is subjected to hierarchical detail thinning to generate multi-level precision point cloud subsets and construct corresponding page-style hierarchical detail nodes. The point cloud data of the entire scenic spot is recursively divided into an octree in three-dimensional space. Taking the center point of the current region as the dividing origin, the region is divided into eight sub-regions along the three axes of X, Y and Z. Each point cloud is assigned to the corresponding sub-region according to its coordinates and the division operation is recursively executed until the number of point clouds in each leaf node is less than the preset number threshold, thus obtaining the octree index structure. A KD tree is constructed for each subset of point clouds within the leaf node of the octree index structure to obtain an octree-KD tree secondary spatial index for fast nearest neighbor retrieval.
2. The method for ground-hugging simulation and collision warning of heavy transport vehicles according to claim 1, characterized in that, The steps of constructing a KD-tree for each subset of point clouds within each leaf node of the octree index structure include: A KD tree mounting interface is set in each octree node. Each octree leaf node constructs a local KD tree with the subset of point cloud contained within it. The root node of the octree additionally constructs a global KD tree covering the entire terrain point cloud. All KD trees and octree indexes share the same point cloud data. Starting from the root node of each KD tree, the segmentation dimension is determined by taking the recursion depth of the current node modulo 3. The remainders 0, 1, and 2 correspond to the X-axis, Y-axis, and Z-axis, respectively. The median coordinate of the current point set in the corresponding segmentation dimension is taken as the position of the segmentation hyperplane. The point set is divided into two sub-point sets, left and right, and the segmentation operation is recursively performed until the number of point clouds in the node is less than the preset threshold or the recursion depth reaches the preset upper limit. The node is then marked as a leaf node of the KD tree. Specifically, for terrain height queries, the path is set to call the corresponding KD tree to perform radius search after the octree locates the area where the query point is located; for collision detection, the path is set to call the corresponding KD tree to perform nearest neighbor search after the octree filters the candidate point set by bounding box overlap determination.
3. The method for ground-hugging simulation and collision warning of heavy transport vehicles according to claim 1, characterized in that, Based on the vehicle's current location, the terrain point cloud of the corresponding area is retrieved using the octree-KD tree secondary spatial index, and the terrain height is calculated. The vehicle model is then driven to perform ground-hugging driving on the point cloud terrain, including: Based on the current vehicle speed and heading angle, calculate the horizontal displacement of the vehicle in the next frame and predict the horizontal position coordinates of the vehicle's articulation point. Using the predicted horizontal coordinates as the query point, search for K nearest neighbor terrain points through the octree-KD tree secondary spatial index, and take the arithmetic mean of the Z coordinates of the K nearest neighbor terrain points as the terrain height of the corresponding position; By combining the predicted horizontal position coordinates with the terrain height, the ground-hugging three-dimensional position of the vehicle's articulation point in the next frame is obtained; The terrain heights of the tractor head, the corresponding semi-trailer position, and the vehicle articulation point are queried separately. The pitch angles of the tractor head and the semi-trailer are calculated by the ratio of the height difference to the horizontal distance, thus completing the full-space posture update of the vehicle driving close to the ground.
4. The method for ground-hugging simulation and collision warning of heavy transport vehicles according to any one of claims 1-3, characterized in that, The steps for detecting the collision risk between various vehicle component models and wind turbine blades and terrain point clouds include: The local convex hull colliders of each component model are mapped to the world coordinate system through pose transformation, and the axis-aligned bounding boxes of each component model in the world coordinate system are calculated. The leaf nodes that have spatial intersection with the bounding box aligned with the axis are filtered out by the octree index structure, and the point cloud data in the corresponding leaf nodes are used as the collision detection candidate point set. Traverse each vertex of each convex hull collider, search for the nearest neighbor in the KD tree of the corresponding collision detection candidate point set and calculate the Euclidean distance; If the nearest neighbor distance of a vertex is less than a preset collision distance threshold, then it is determined that there is a collision risk at the corresponding position of the component model to which that vertex belongs.
5. The method for ground-hugging simulation and collision warning of heavy transport vehicles according to claim 4, characterized in that, The steps for extrapolating and predicting the pose of the wind turbine blades along the vehicle's direction of travel include: Based on the current vehicle motion state and the wind turbine blade posture, a multi-frame wind turbine blade pose sequence is generated by extrapolation along the driving direction at a preset time step. Collision detection is performed on the extrapolated wind turbine blade pose for each frame, and visual warning information of the corresponding level is output based on the nearest neighbor distance and the preset multi-level warning threshold.
6. The method for ground-hugging simulation and collision warning of heavy transport vehicles according to claim 1, characterized in that, The steps for updating the vehicle's speed and heading quaternions in response to control commands include: In response to acceleration and deceleration control commands, the vehicle speed is updated according to preset speed increments, and the vehicle's forward, reverse, or stationary motion status is marked. In response to steering control commands, the vehicle heading angle is updated according to a preset steering increment, and the heading angle is converted to generate a heading quaternion around the Z-axis for rotational transformation of vehicle attitude. In response to the wind turbine blade control commands, a horizontal rotation quaternion around the Z-axis and a vertical rotation quaternion around the Y-axis are generated respectively, and the horizontal deflection angle and vertical pitch angle of the wind turbine blades are adjusted independently.
7. The method for ground-hugging simulation and collision warning of heavy transport vehicles according to claim 1, characterized in that, The pose update of the vehicle model and the wind turbine blades is achieved through the frame callback function of the 3D scene. The frame callback function is executed before each frame of scene rendering. Based on the manipulation command and terrain height calculation results of the current frame, the spatial position and pose of each component model are updated synchronously.
8. A ground-following simulation and collision warning system for heavy transport vehicles, characterized in that, The system, applicable to the method of any one of claims 1-7, comprises: The model processing module is used to import and decompose the 3D model of the heavy transport vehicle to obtain independent component models including the cab, semi-trailer, turntable and fan blades. It records the spatial offset and rotation axis relationship between each component model and extracts the convex hull collision body corresponding to each component model. The index building module is used to load terrain point cloud data and build an octree-KD tree two-level spatial index to accelerate terrain height query and collision detection calculation. The drive control module is used to retrieve the terrain point cloud of the corresponding area and calculate the terrain height based on the current position of the vehicle through the octree-KD tree secondary spatial index, and drive the vehicle model to perform ground-hugging driving on the point cloud terrain. The control linkage module is used to respond to control commands, update the vehicle speed and heading quaternion, and calculate the spatial pose of each component model based on the spatial offset and the relationship between the rotation axis, so as to realize the coordinated steering and obstacle avoidance of the vehicle and the wind turbine blades. The collision warning module is used to perform pose extrapolation prediction of the wind turbine blades along the vehicle's driving direction. Based on the convex hull collision body and the octree-KD tree secondary spatial index, it detects the collision risk between the vehicle component models and the wind turbine blades and the terrain point cloud, and outputs a visual warning.
9. A readable storage medium having computer instructions stored thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-7.