Lightweight mapping algorithm and electronic device thereof
By combining radar point cloud and image fusion with sub-cube management and mesh deformation technology, the problems of positioning drift and memory management in multi-sensor fusion mapping were solved, achieving efficient and globally consistent dense mesh reconstruction, thus improving positioning accuracy and computational efficiency.
Patent Information
- Application Number
- CN202511698761.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-24
AI Technical Summary
Existing multi-sensor fusion mapping methods suffer from problems such as location drift leading to model distortion, improper memory management in large-scale scenes causing system lag, and unavoidable cumulative drift, making it impossible to achieve efficient and globally consistent dense grid and dense map reconstruction.
By fusing radar point clouds and images, the sensor pose is estimated using the Gauss-Newton method, a global color point cloud map is constructed, and it is divided into sub-cubes for management. Combining the sub-cube circular queue and hash table index, the optimized pose is used to trigger mesh deformation, perform non-rigid transformation, and achieve incremental mesh reconstruction and global consistency correction.
It achieves simultaneous localization and incremental dense grid reconstruction in large-scale scenarios, improves localization accuracy, solves memory management and computational efficiency issues, and ensures global map consistency.
Smart Images

Figure CN121564259A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a multi-sensor fusion mapping method, and more particularly to a lightweight mapping algorithm and its electronic device. Background Technology
[0002] The core task of laser SLAM is to simultaneously solve the problems of "localization" and "mapping." That is, in an unknown environment, it estimates its own trajectory in real time using laser radar scanning data and builds an environmental model based on this. From the earliest filtering methods, it has evolved to the mainstream optimization-based methods of today. These methods extract feature points from point clouds, construct distance residuals from points to lines / surfaces, and solve for pose through nonlinear optimization, achieving high-precision real-time localization. Early methods mainly constructed and maintained a sparse feature map. This type of map is small and efficient, very suitable for rapid localization and matching, but it cannot represent the complete geometric information of the environment, limiting its value for higher-level applications such as navigation, planning, and interaction. Later, dense point cloud maps were gradually developed. Although they contain more complete environmental information, point clouds themselves are unstructured, resulting in data redundancy, lack of surface information, and difficulties in rendering and physical simulation. Triangular meshes are the standard representation in computer graphics. Composed of vertices and faces, they can clearly represent the surface of an object, offering irreplaceable advantages such as compact data, good visualization effects, and direct use in physical simulation, collision detection, and AR / VR rendering. The bottleneck of traditional reconstruction processes lies in the "map first, then reconstruct" paradigm. First, laser SLAM is run to obtain a dense point cloud map or TSDF volume, and then an offline mesh reconstruction algorithm is executed in the background. Therefore, how to achieve online, incremental mesh reconstruction, allowing the mesh to be reconstructed in 3D in real time during the scanning process, has become a huge challenge for the industry.
[0003] In existing multi-sensor fusion mapping methods, most rely on camera-based or pure radar SLAM for 3D reconstruction. However, these methods suffer from the following problems: First, in most SLAM systems, localization drift directly leads to distortion in the reconstructed model. The lack of auxiliary and improved localization accuracy during reconstruction, preventing loop closure, results in poor reconstruction quality. Second, large-scale scenes involve massive amounts of mesh patches. Without efficient memory management and data scheduling strategies, the system may experience memory overflow or computational lag after prolonged operation. Third, even with high-precision front-end odometry, cumulative drift during mapping cannot be completely avoided, making it impossible to simultaneously complete reconstruction and correct global pose errors caused by loop closure detection. Summary of the Invention
[0004] Purpose of the invention: The purpose of this invention is to provide a lightweight mapping algorithm that reduces the memory size occupied by LiDAR mapping and improves the measurement accuracy and precision of objects; another purpose of this invention is to provide an electronic device for this algorithm.
[0005] Technical solution: The lightweight mapping algorithm of the present invention includes:
[0006] (1) The radar point cloud and the image are fused to obtain a color point cloud. The corner features of the color point cloud are extracted and the features are associated. The sensor pose is iteratively solved based on the Gauss-Newton motion estimation method to construct a global color point cloud map.
[0007] (2) The global color point cloud map is used as input and divided into several sub-cubes. Sub-cubes are managed and topological consistency is maintained. A sub-cube circular queue and hash table index are used to maintain the grid module. When the sensor moves to a new area, a new sub-cube is created or a frozen sub-cube is reactivated. When the sensor moves away from a specific sub-cube, the sub-cube is marked as "frozen". If the memory queue is full, the oldest frozen sub-cube is recycled and its memory is reallocated to a new active sub-cube, forming a sliding window memory management strategy centered on the current field of view.
[0008] (3) The optimized sensor pose triggers mesh deformation. The mapping module performs non-rigid transformation on the affected mesh sub-cubes based on the pose difference before and after optimization to correct the cumulative drift and ensure that the mesh model remains consistent globally.
[0009] (4) When building the map, the surrounding environment is gridded and reconstructed in three dimensions.
[0010] Furthermore, step (4) involves completing the meshing and three-dimensional reconstruction of the surrounding environment during mapping, including:
[0011] (41) The radar-camera odometry module estimates the relative motion between two frames of color point cloud based on a point-to-surface matching algorithm;
[0012] First, extract planar points from the current frame's point cloud and calculate the curvature of each point;
[0013] Secondly, for a planar point in the current frame, find a corresponding plane in the global map; using the pose estimation calculated in the previous iteration, transform the point from the LiDAR coordinate system to the global map coordinate system;
[0014] Construct the residual from the current point to the plane;
[0015] Calculate the directed distance from the point to the plane, and use the effective distance to calculate the optimal pose;
[0016] Stack all the residuals into a vector, and stack all the Jacobian matrices into a matrix;
[0017] Solve for the increment, repeat this process until convergence, and obtain the optimal pose;
[0018] (42) A voxel-based incremental traveling cube algorithm is used to maintain and construct the grid, dividing the space into uniform cubic grids; for each vertex of the grid, a scalar value is calculated for the nearest occupied point cloud grid, the scalar value represents the distance from the point to the object surface, and the value can be positive or negative; isosurface crossing judgment is performed, and the edges of each grid are checked; according to the sign of the vertex, multiple cases can be generated, which can be simplified into multiple basic topological configurations through symmetry and rotation; according to the configuration to which the voxel belongs, the precise intersection point of the isosurface is determined by linear interpolation on the crossing edge, and these intersection points are connected into triangular patches; the radar point cloud is projected onto the new LiDAR scanning plane to find the nearest point cloud;
[0019] (43) The mesh mapping module is a global optimization process that runs in the background. It complements the front-end odometry and provides low-frequency, globally consistent pose correction. The pose estimated by the front-end odometry is used as a node to construct a pose graph, identify the similarity between the current scan and the past historical scene, and establish closure constraints. The odometry constraints and closure constraints are put into the factor graph together for global nonlinear optimization to obtain the optimal, globally consistent pose for all key frames. According to the changes in pose before and after optimization, the affected local mesh is non-rigidly transformed to align it with the optimized pose.
[0020] Furthermore, in step (42), the point cloud formula is as follows:
[0021] in, To calculate the total number of points in the scanned point cloud projected onto the new plane, we consider the vertices V and the optimal pose T within the update range to calculate the nearest point cloud, and simultaneously calculate the distance from vertex V to point T. The normal vector, and its relationship with the point Scan normal vector at the location Compare the values and calculate the directed distance.
[0022] Furthermore, the directed distance is calculated as follows:
[0023] The sign of the directed distance represents the distance from V to S. The location of each vertex V is determined; a weighted averaging method is used to incrementally update the scalar value at each vertex V to smooth noise and build a more stable surface, assuming that vertex V already has a scalar value of [value missing]. The weight is The distance value calculated from the new observations is .
[0024] Furthermore, after obtaining the optimized pose in step (43), the affected local mesh is subjected to a non-rigid transformation based on the change in pose before and after optimization, and aligned with the optimized pose.
[0025] Furthermore, the scalar values and weights are defined in the updated formula as follows:
[0026] in, It is the weight of new observations; when a sub-cube receives new point cloud data, causing a significant change in the scalar distance value of the voxel vertices inside it, a weighted update algorithm is performed on the sub-cube and its neighboring sub-cubes.
[0027] Furthermore, the construction steps for the mesh mapping process in step (43) are as follows:
[0028] (431) Construct keyframes and pose graphs. The system will periodically or when the scene changes significantly. This includes sensor pose. The corresponding point cloud data And the corresponding global descriptor; pose graph It is a graph structure, where nodes Includes pose for each keyframe , The constraints connecting each edge, where the odometer edge connects consecutive keyframes i. and the (i+1)th keyframe The constraints on the odometer edge arise from the relative transformation of the odometer estimation. and its information matrix ; Loop edges connect the i-th non-contiguous keyframes and the j-th keyframe ,satisfy The conditions; the constraints on the loop edges come from the relative transformation calculated by the loop closure detection. and its uncertainty ;
[0029] (432) Use the global descriptor of Scan Context to perform loop closure detection on the point cloud of each keyframe. The calculation yields a compact descriptor vector that is invariant to rotation and translation. Secondly, a similarity search is performed when a new keyframe appears. When adding, descriptor Descriptors of all keyframes in history Perform similarity comparison; find candidate keyframes with similarity higher than a threshold. The system will then perform further point-to-surface matching to accurately calculate the relative pose between the two keyframes;
[0030] (433) The pose graph optimization corrects the pose of the keyframe. Based on this, a non-rigid mesh deformation technique is used to map the global pose correction onto the affected local mesh vertices. Loop closure usually only affects a part of the map. The system will identify all sub-cubes that are related to the optimized pose.
[0031] Furthermore, in step (433), the deformation of the sub-cube generated by the keyframe is described by a transformation function, as shown below:
[0032]
[0033] in, These are keyframes Pose before and after optimization; For the subsequent correction transformation; apply the correction transformation to each mesh vertex V within the sub-cube. The calculation formula is as follows:
[0034] .
[0035] Furthermore, if a region is observed by multiple keyframes, the deformation of the vertices needs to be smooth; in this case, a more complex weighted deformation is used; the final position of a vertex V is the weighted average of its influence from multiple keyframes, calculated as follows:
[0036]
[0037] That is, there exist k instances where multiple weighted summations are performed based on the correction transformation. Vertex position in the previous frame Calculate the vertex positions of the latest frame Weight Calculated based on the distance or association strength between vertices and keyframes.
[0038] Furthermore, an electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor, the computer program executing the lightweight mapping algorithm described above.
[0039] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: 1. It achieves synchronous, incremental, and globally consistent dense mesh and dense map reconstruction in large-scale scenes, overcoming the current limitations of mapping and positioning technologies in real-time 3D reconstruction; 2. It improves positioning accuracy by employing an efficient four-module parallel pipeline to solve computational and memory efficiency issues; 3. It adopts backend optimization based on pose graph optimization and mesh deformation, which better addresses global mapping limitations. Figure 1 Sexuality issues. Attached Figure Description
[0040] Figure 1 This is a flowchart of the present invention;
[0041] Figure 2 This is a schematic diagram comparing the trajectory of the optimized algorithm in this invention with other mapping and localization algorithms;
[0042] Figure 3 This is a schematic diagram comparing the Euler angles of the optimization algorithm in this invention with other mapping and localization algorithms;
[0043] Figure 4 This is a schematic diagram comparing the deviation between the trajectory estimated by the optimization algorithm in this invention and the actual trajectory;
[0044] Figure 5 This is a schematic diagram comparing the trajectory estimated by the optimization algorithm in this invention with the actual trajectory.
[0045] Figure 6 This is a schematic diagram illustrating the pose change error between adjacent frames of the trajectory estimated by the optimization algorithm of this invention and the true trajectory;
[0046] Figure 7 This is a schematic diagram showing the pose comparison between adjacent frames of the trajectory estimated by the optimization algorithm of this invention and the actual trajectory;
[0047] Figure 8 This is a schematic diagram of the color point cloud constructed using the optimization algorithm of this invention;
[0048] Figure 9 This is a schematic diagram of the color point cloud after being lightweighted using the optimized algorithm of this invention. Detailed Implementation
[0049] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0050] like Figure 1 As shown, the lightweight mapping algorithm includes the following steps:
[0051] The first step involves using the collected radar point cloud and image data for localization and mapping. Then, the proposed algorithm `opt_method` is compared with two other algorithms to obtain the following results: Figure 2, Figure 3 The trajectory comparison and yaw angle comparison show that the deviation of the optimized trajectory is smoother and the turning angle changes are smaller compared to other trajectories.
[0052] The second step is to compare the obtained trajectory with the actual trajectory. The estimated pose offset is approximately 0.015m. Figure 4 As shown, the comparison diagram between its trajectory and the actual trajectory is as follows: Figure 5 As shown, Figure 6 This proves that the pose change error between adjacent frames of the estimated trajectory and the true trajectory is less than 0.01m, as shown in the comparison diagram with the true trajectory. Figure 7 As shown, this further proves the reliability of the proposed algorithm;
[0053] The third step involves analyzing the mapping results obtained from the first two steps, as follows: Figure 8 As shown, the results after lightweighting and point cloud sparsification are as follows: Figure 9 As shown, the storage content of point clouds is reduced, and the memory occupied is reduced to about 10% of the original size, thus improving the efficiency of map building.
[0054] The radar point cloud and the image are fused to obtain a color point cloud. The corner features of the color point cloud are extracted and the features are associated. At the same time, the sensor pose is iteratively solved based on the Gauss-Newton motion estimation method to construct a global color point cloud map.
[0055] The system takes a global color point cloud map as input and divides it into several sub-cubes at a resolution of 0.05m. It then performs real-time management of the sub-cubes and maintains topological consistency. A circular queue of sub-cubes and a hash table index are constructed to maintain the partitioned global grid module. Specifically, when radar and camera sensors move to a new area, the system creates new sub-cubes or reactivates previously frozen sub-cubes. When sensors move away from certain sub-cubes, these sub-cubes are marked as "frozen." A sliding window memory management strategy centered on the current field of view is also implemented.
[0056] Finally, there is the mesh mapping module. The optimized pose will trigger mesh deformation. The mapping module performs non-rigid transformation on the affected mesh sub-cubes based on the pose difference before and after optimization, thereby correcting the accumulated drift and making the entire mesh model consistent globally.
[0057] By adopting the above-mentioned lightweight mapping method, the memory size occupied by the LiDAR mapping can be significantly reduced. At the same time, the surrounding environment can be meshed during mapping, which can improve the measurement accuracy and precision of objects, making the pose estimation offset about 0.015m and the pose change error less than 0.01m.
[0058] The process of creating a mesh of the surrounding environment during mapping includes the following steps:
[0059] (1) Radar-camera odometer module
[0060] The radar-camera odometry module is based on a point-to-area matching algorithm, aiming to estimate the relative motion between two frames of color point clouds. First, planar points are extracted from the current frame's point cloud, and the motion of each point is calculated. curvature The calculation formula is:
[0061]
[0062] in Used as the adjacent first A point cloud, S is a point cloud. The set of consecutive nearest neighbors on the same scan line, based on curvature Sort the points and select the points with the smallest curvature as planar points, which is suitable for point-to-plane matching; secondly, for planar points in the current frame... We need to find a corresponding plane in the global map; and use the pose estimate calculated in the previous iteration. (Initially, a uniform velocity model or the pose from the previous frame can be used), and the point The calculation formula for transforming from the LiDAR coordinate system to the global map coordinate system is as follows:
[0063]
[0064] in, The corresponding coordinates in the world coordinate system and the radar coordinate system are respectively Since each sub-cube has been reconstructed as a triangular mesh, points can be quickly located within the global mesh. The i-th sub-cube and its corresponding triangular facet; the i-th triangular facet is composed of... The corresponding normal vector is obtained through the cross product. A plane can be defined by a point. and normal vector To parameterize, that is The corresponding plane is set as Construct the residual from the current point to the plane. The calculation formula is as follows:
[0065]
[0066] Calculate the directed distance from the point to the plane, and simultaneously utilize the aforementioned effective distance. Calculate the optimal pose The calculation formula is as follows:
[0067]
[0068] By stacking all the residuals into a vector e, and all the Jacobian matrices into a matrix J, the following linear equation can be solved:
[0069]
[0070] in, It is a 6×6 approximate Hessian matrix; solve for the increment. Repeat this process until convergence is achieved, yielding the optimal pose. The calculation formula is as follows:
[0071]
[0072] (2) Grid reconstruction and grid maintenance
[0073] A voxel-based incremental moving cube algorithm is used for mesh maintenance and construction, dividing the space into uniform cubic meshes. For each mesh's eight vertices, a scalar value representing the distance from that point to the object's surface is calculated, and the value can be positive or negative. Next, isosurface crossing is performed, checking each mesh's 12 edges. If the signs of the two vertices on an edge are opposite, it indicates that an isosurface crosses that edge. Based on the signs of the eight vertices, 256 cases can be generated, which can be simplified to 15 basic topological configurations through symmetry and rotation. Based on the configuration to which the voxel belongs, the precise intersection points of the isosurfaces are determined on the crossing edges using linear interpolation, and these intersection points are connected to form triangular patches. The radar point cloud is then projected onto a new LiDAR scanning plane to find the nearest point cloud. Right now
[0074]
[0075] in, To calculate the total number of points in the scanned point cloud projected onto the new plane, we consider the vertices V and the optimal pose T within the update range to calculate the nearest point cloud, and simultaneously calculate the distance from vertex V to point T. The normal vector, and its relationship with the point Scan normal vector at the location Compare and calculate directed distance :
[0076]
[0077] in The positive or negative sign represents V at S. Which side; using a weighted average method to incrementally update the scalar value at each vertex V to smooth noise and build a more stable surface, assuming that vertex V already has a scalar value of The weight is and the distance value calculated from the new observations ; Updated scalar value and weight The calculation formula is:
[0078]
[0079] in, The weights of new observations are used; this weighted averaging strategy is key to ensuring grid stability and gradual convergence; only when a sub-cube receives new point cloud data, causing a significant change in the scalar distance value of its internal voxel vertices, will the weighted update algorithm be executed on the sub-cube and its 26 neighboring sub-cubes to ensure that the grids generated at the boundaries of the sub-cubes can be seamlessly connected, i.e., to maintain topological consistency.
[0080] (3) Mesh mapping module
[0081] First, keyframes and pose graphs are constructed. The system creates a keyframe periodically or when the scene undergoes significant changes. This includes sensor pose. The corresponding point cloud data And the corresponding global descriptor; and the pose graph It is a graph structure, where nodes Includes pose for each keyframe ,in The constraints connecting each edge, where the odometer edge connects consecutive keyframes i. and the (i+1)th keyframe The constraint on this edge comes from the relative transformation of the odometry estimation. and its information matrix ; Loop edges connect the i-th non-contiguous keyframes and the j-th keyframe ,satisfy The condition; the constraint on this edge comes from the relative transformation calculated by loop closure detection. and its uncertainty ;
[0082] Next, loop closure detection is performed using the global descriptor of the Scan Context for the point cloud of each keyframe. The calculation yields a descriptor vector that is invariant to rotation and translation. Secondly, a similarity search needs to be performed when new keyframes appear. When adding, descriptor Descriptors of all keyframes in history Perform similarity comparisons (e.g., calculate cosine distance or Euclidean distance); if candidate keyframes with similarity higher than a threshold are found... The system will then perform further point-to-surface matching to accurately calculate the relative pose between the two keyframes and verify whether the transformation is effective.
[0083] Pose graph optimization corrects the pose of keyframes. Based on this, a non-rigid mesh deformation technique is used to map the global pose correction onto the affected local mesh vertices. Loop closure typically only affects a portion of the map. The system identifies all sub-cubes associated with the optimized pose. For a keyframe... The generated sub-cube can be deformed using a transformation function. To describe it, its specific form is as follows:
[0084]
[0085] in, These are keyframes Pose before and after optimization; This is the corrective transformation after processing; for each mesh vertex V within the sub-cube, the corrective transformation is applied. The calculation formula is as follows:
[0086]
[0087] If a region is observed by multiple keyframes, the vertex deformation needs to be smooth; in this case, more complex weighted deformation can be used. For example, the final position of a vertex V is the weighted average of its influence from multiple keyframes, calculated as follows:
[0088]
[0089] That is, there exist k instances where multiple weighted summations are performed based on the correction transformation. Vertex position in the previous frame Calculate the vertex positions of the latest frame Weight It can be calculated based on the distance or association strength between vertices and keyframes; through this deformation, mesh portions that were previously out of alignment due to drift are made consistent across the entire mesh.
[0090] The electronic device of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes a lightweight mapping algorithm through the computer program.
[0091] The technical solution of the present invention can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute the method or some steps of the present invention. The storage medium includes various media that can store program code, such as USB flash drive, read-only memory, random access memory, portable hard disk, magnetic disk or optical disk.
Claims
1. A lightweight mapping algorithm, characterized in that, include: (1) The radar point cloud and the image are fused to obtain a color point cloud. The corner features of the color point cloud are extracted and the features are associated. The sensor pose is iteratively solved based on the Gauss-Newton motion estimation method to construct a global color point cloud map. (2) The global color point cloud map is used as input and divided into several sub-cubes. Sub-cubes are managed and topological consistency is maintained. A sub-cube circular queue and hash table index are used to maintain the grid module. When the sensor moves to a new area, a new sub-cube is created or a frozen sub-cube is reactivated. When the sensor moves away from a specific sub-cube, the sub-cube is marked as "frozen". If the memory queue is full, the oldest frozen sub-cube is recycled and its memory is reallocated to a new active sub-cube, forming a sliding window memory management strategy centered on the current field of view. (3) The optimized sensor pose triggers mesh deformation. The mapping module performs non-rigid transformation on the affected mesh sub-cubes based on the pose difference before and after optimization to correct the cumulative drift and ensure that the mesh model remains consistent globally. (4) When building the map, the surrounding environment is gridded and reconstructed in three dimensions.
2. The lightweight mapping algorithm according to claim 1, characterized in that, Step (4) involves completing the meshing and 3D reconstruction of the surrounding environment during mapping, including: (41) The radar-camera odometry module estimates the relative motion between two frames of color point cloud based on a point-to-surface matching algorithm; First, extract planar points from the current frame's point cloud and calculate the curvature of each point; Secondly, for a planar point in the current frame, find a corresponding plane in the global map; using the pose estimation calculated in the previous iteration, transform the point from the LiDAR coordinate system to the global map coordinate system; Construct the residual from the current point to the plane; Calculate the directed distance from the point to the plane, and use the effective distance to calculate the optimal pose; Stack all the residuals into a vector, and stack all the Jacobian matrices into a matrix; Solve for the increment, repeat this process until convergence, and obtain the optimal pose; (42) A voxel-based incremental traveling cube algorithm is used to maintain and construct the grid, dividing the space into uniform cubic grids; for each vertex of the grid, a scalar value is calculated for the nearest occupied point cloud grid, the scalar value represents the distance from the point to the object surface, and the value can be positive or negative; isosurface crossing judgment is performed, and the edges of each grid are checked; according to the sign of the vertex, multiple cases can be generated, which can be simplified into multiple basic topological configurations through symmetry and rotation; according to the configuration to which the voxel belongs, the precise intersection point of the isosurface is determined by linear interpolation on the crossing edge, and these intersection points are connected into triangular patches; the radar point cloud is projected onto the new LiDAR scanning plane to find the nearest point cloud; (43) The mesh mapping module is a global optimization process that runs in the background. It complements the front-end odometry and provides low-frequency, globally consistent pose correction. The pose estimated by the front-end odometry is used as a node to construct a pose graph, identify the similarity between the current scan and the past historical scene, and establish closure constraints. The odometry constraints and closure constraints are put into the factor graph together for global nonlinear optimization to obtain the optimal, globally consistent pose for all key frames. According to the changes in pose before and after optimization, the affected local mesh is non-rigidly transformed to align it with the optimized pose.
3. The lightweight mapping algorithm according to claim 2, characterized in that, In step (42), the point cloud formula is as follows: in, To calculate the total number of points projected onto the new plane from the scanned point cloud, we consider vertices V within the update range and the optimal pose T to calculate the nearest point cloud, and simultaneously calculate the distance from vertex V to point T. The normal vector, and its relationship with the point Scan normal vector at the location Compare the values and calculate the directed distance.
4. The lightweight mapping algorithm according to claim 3, characterized in that, Directed distance is calculated as follows: The sign of the directed distance represents the distance from V to S. The location of each vertex V is determined; a weighted averaging method is used to incrementally update the scalar value at each vertex V to smooth noise and build a more stable surface, assuming that vertex V already has a scalar value of [value missing]. The weight is The distance value calculated from the new observations is .
5. The lightweight mapping algorithm according to claim 2, characterized in that, After obtaining the optimized pose in step (43), the affected local mesh is subjected to a non-rigid transformation based on the change in pose before and after optimization, and aligned with the optimized pose.
6. The lightweight mapping algorithm according to claim 4, characterized in that, The updated formulas for the scalar values and weights are as follows: in, It is the weight of new observations; when a sub-cube receives new point cloud data, causing a significant change in the scalar distance value of the voxel vertices inside it, a weighted update algorithm is performed on the sub-cube and its neighboring sub-cubes.
7. The lightweight mapping algorithm according to claim 2, characterized in that, The steps for constructing the mesh mapping process in step (43) are as follows: (431) Construct keyframes and pose graphs. The system will periodically or when the scene changes significantly. This includes sensor pose. The corresponding point cloud data And the corresponding global descriptor; pose graph It is a graph structure, where nodes Includes pose for each keyframe , The constraints connecting each edge, where the odometer edge connects consecutive keyframes i. and the (i+1)th keyframe The constraints on the odometer edge arise from the relative transformation of the odometer estimation. and its information matrix ; Loop edges connect the i-th non-contiguous keyframes and the j-th keyframe ,satisfy The conditions; the constraints on the loop edges come from the relative transformation calculated by the loop closure detection. and its uncertainty ; (432) Use the global descriptor of Scan Context to perform loop closure detection on the point cloud of each keyframe. The calculation yields a compact descriptor vector that is invariant to rotation and translation. Secondly, a similarity search is performed when a new keyframe appears. When adding, descriptor Descriptors of all keyframes in history Perform similarity comparison; find candidate keyframes with similarity higher than a threshold. The system will then perform further point-to-surface matching to accurately calculate the relative pose between the two keyframes; (433) The pose graph optimization corrects the pose of the keyframe. Based on this, a non-rigid mesh deformation technique is used to map the global pose correction onto the affected local mesh vertices. Loop closure usually only affects a part of the map. The system will identify all sub-cubes that are related to the optimized pose.
8. The lightweight mapping algorithm according to claim 7, characterized in that, In step (433), the deformation of the sub-cube generated by the keyframe is described by a transformation function, as shown below: in, These are keyframes Pose before and after optimization; For the subsequent correction transformation; apply the correction transformation to each mesh vertex V within the sub-cube. The calculation formula is as follows: 。 9. The lightweight mapping algorithm according to claim 8, characterized in that, When a region is observed by multiple keyframes, the deformation of its vertices needs to be smooth; in this case, a more complex weighted deformation is used. The final position of a vertex V is the weighted average of its influence from multiple keyframes, calculated as follows: That is, there exist k instances where multiple weighted summations are performed based on the correction transformation. Vertex position in the previous frame Calculate the vertex positions of the latest frame Weight Calculated based on the distance or association strength between vertices and keyframes.
10. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and running on the processor, the computer program executing the lightweight mapping algorithm according to any one of claims 1 to 9.