Robot situation map construction method and system for indoor dynamic scene, and readable storage medium
By fusing multimodal data from 3D LiDAR and RGB-D cameras, and combining a multi-criteria keyframe selection strategy and multi-layer factor graph structure optimization, the problems of pose drift and image distortion in indoor dynamic scenes were solved, improving the robot's positioning accuracy and scene understanding capabilities.
Patent Information
- Application Number
- CN202611641511.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-22
- Publication Date
- 2026-11-20
AI Technical Summary
In complex indoor dynamic scenarios, traditional robot situation map construction methods are prone to pose drift and image distortion, and cannot effectively integrate geometric and semantic information, resulting in insufficient positioning accuracy and scene understanding.
By fusing data from 3D LiDAR and RGB-D cameras, geometric and semantic information of the environment is acquired through multimodal sensors. A multi-criteria keyframe selection strategy based on time intervals, pose changes, and image differences is combined to construct a multi-layer factor graph structure, including keyframe layer, object layer, wall layer, room layer, and corridor layer, and optimize it to improve positioning accuracy and scene understanding.
It improves the positioning accuracy and mapping consistency of mobile robots in complex indoor dynamic scenes, enhances the robustness of the system and the fine-grained scene perception capability, and realizes the upgrade from geometric modeling to semantic cognition.
Smart Images

Figure CN123136642A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method, system and readable storage medium for constructing robot situation maps for indoor dynamic scenes. Background Technology
[0002] Simultaneous Localization and Mapping (SLAM), a core technology for autonomous environmental cognition in mobile robots, is rapidly transitioning from pure geometric representation to high-order semantic understanding. In related technical solutions, mobile robot situation map construction typically employs a scheme based on single-dimensional 3D LiDAR data, constructing a four-layer topology including keyframe, wall, room, and corridor layers. Factor graph optimization is used to jointly estimate the robot's pose and environmental geometric elements, thus achieving good localization accuracy and mapping results in structured static indoor environments.
[0003] However, when applied to complex indoor dynamic scenes, current situational graph (S-Graphs) methods limit the simultaneous localization and map building problem to a framework of pure geometric optimization, which easily leads to pose drift and image distortion. This is because in complex indoor dynamic scenes, when there are moving people or objects in the indoor environment, the dynamic pixels will impose incorrect constraints on pose optimization.
[0004] Traditional keyframe selection strategies typically rely solely on pose changes or time intervals, neglecting to incorporate the core "objects" within the interior. Consequently, traditional situation map methods can only represent spatial outlines during map construction, failing to support room function reasoning and fine-grained scene understanding. To incorporate object semantic information during modeling, the core nodes of the factor map cannot merely encode geometric elements in space; they also need to construct object semantics to achieve functional cognition of the interior scene. However, the single-modal data acquisition methods such as LiDAR used in traditional situation maps cannot provide the visual semantic information required to construct object semantics.
[0005] Based on this, this application proposes a robot situation map construction method for indoor dynamic scenes. It aims to integrate data collected by multimodal sensors to simultaneously obtain geometric and semantic information of the environment, realize stable extraction and tracking of objects in dynamic indoor environments, and realize functional cognition of indoor scenes based on the constructed object semantics, thereby overcoming the problems of pose drift and image distortion that are prone to occur in indoor dynamic scenes. Summary of the Invention
[0006] The main purpose of this application is to provide a method for constructing robot situation maps for indoor dynamic scenes, aiming to solve the problems of pose drift and image distortion that easily occur in indoor dynamic scenes.
[0007] To achieve the above objectives, this application provides a method for constructing a robot situation map for indoor dynamic scenes, the method comprising:
[0008] S10, acquire the point cloud data collected by the lidar and the image data collected by the RGB-D camera, and generate skeleton point cloud and object point cloud based on the point cloud data and the image data;
[0009] S20, select key frame sequences that meet preset selection rules from the skeleton point cloud. The preset selection rules include at least one of fusion time interval, pose change and image difference to obtain the processed skeleton point cloud.
[0010] Furthermore, static and dynamic objects in the object point cloud are identified, static object nodes are generated for the static objects, and the dynamic objects are tracked using an association adaptive particle filter to obtain the processed object point cloud.
[0011] S30, Based on the semantic features of the static object nodes, the functional category labels within the robot's space are obtained through classifier reasoning;
[0012] S40, the processed skeleton point cloud, the processed object point cloud, and the functional category label are encoded into a multi-layer factor graph structure, and the situation map is obtained by optimizing the structure through the preset loss function corresponding to each layer. The multi-layer factor graph structure includes a keyframe layer, an object layer, a wall layer, a room layer, and a corridor layer.
[0013] Optionally, the fusion time interval includes: if the current frame Compared to the previous keyframe The time interval between Greater than the preset time threshold If so, insert a keyframe;
[0014] The pose change includes: if the current frame Compared to the previous keyframe pose translation and rotation angle Each greater than the set translation threshold and rotation angle threshold If so, insert a keyframe;
[0015] The image differences include: the proportion of dynamic objects in the current frame. If the percentage is less than or equal to the set percentage threshold, the current frame is determined. The detected object ID is the same as the previous keyframe. The symmetric difference set corresponding to each detected object ID, if the current frame The absolute value of the symmetric difference set and the previous keyframe The absolute difference of the symmetric difference sets is greater than a preset symmetric difference set threshold. If so, then insert a keyframe.
[0016] Optionally, the preset filtering rules further include:
[0017] If it does not fall under the categories of the fusion time interval, the pose change, and the image difference, then a comprehensive score is constructed:
[0018]
[0019] In the formula, and These represent the normalized scores for time interval, pose change, and image difference, respectively:
[0020]
[0021] In the formula, Indicates the current frame Symmetric difference set of detected object IDs Indicates the previous keyframe Symmetric difference set of detected object IDs;
[0022] Among them, weight Update using the following formula:
[0023]
[0024] In the formula, To save the most A collection of keyframe queues; Indicates when Saved At each keyframe According to the first of the three keyframe determination criteria, the third one... The number of keyframes identified as keyframes ; express The number of keyframes is considered the most important factor in the evaluation. , ,like ,but It should be considered a keyframe; otherwise, the frame should not be considered a keyframe.
[0025] Optionally, in S20, determining static objects in the object point cloud includes:
[0026] The candidate static objects detected in the current frame are matched with the objects in the candidate object container. When the cumulative number of detected frames of the candidate static objects reaches a first preset threshold, they are transferred to the confirmed object container and used as the static objects.
[0027] The distance and intersection-union ratio (IUU) of two static objects identified as belonging to the same category in the confirmed object container are determined at preset intervals. When the distance and IUU meet preset conditions, the point clouds of the two objects are merged.
[0028] Optionally, in S20, determining the dynamic objects in the object point cloud includes:
[0029] Dynamic objects are tracked using correlation-adaptive particle filtering, and the following steps are performed sequentially: state prediction, data correlation based on dynamic thresholds, tracking updates for matched observations, new tracking initialization for unmatched observations, prediction updates for unmatched old tracking, and deletion of long-term unmatched old tracking.
[0030] Optionally, S30 includes:
[0031] S31, Obtain the category and quantity of static objects in each room as room identification features;
[0032] S32, the room identification features are converted into feature vectors, and the room category probability vectors are obtained through multilayer perceptron inference. The category with the highest probability is selected as the functional category label of the room.
[0033] Optionally, the global state of the multi-level factor graph structure is defined as:
[0034]
[0035] In the formula, For the robot located The pose at a selected keyframe, where SE(3) is a three-dimensional special Euclidean group;
[0036] for Parameters of a plane;
[0037] for The parameters of an object;
[0038] Include Parameters for each room;
[0039] Include Parameters of each corridor;
[0040] for Parameters for each floor;
[0041] Odometer coordinate system With map coordinate system The drift between them.
[0042] Optionally, the preset loss function includes:
[0043] (1) The preset loss function of the keyframe layer The expression is:
[0044]
[0045] In the formula, For the current frame, This represents the robot's pose in the current frame. For factor nodes of the keyframe layer; , These represent combinations and inverse combinations, respectively. This indicates a search for the Mahalanobis distance. Indicates the pose Information matrix; This indicates pairwise odometer data constraints;
[0046] (2) The preset loss function of the object layer The expression is:
[0047]
[0048] In the formula, and These are the coordinate estimates of the object on the x-axis and y-axis, respectively. The inputs are respectively into the preset loss function. The original coordinates of the object on the x and y axes. and The first The x-axis and y-axis coordinates of each room. and The first The width of the walls along the x and y axes of each room. This represents the information matrix for an object;
[0049] (3) The preset loss function of the wall layer The expression is:
[0050]
[0051] In the formula, It is a plane; Based on the current pose of the robot and plane parameters in map coordinate system The predicted plane in the LiDAR coordinate system This represents the information matrix for a plane;
[0052] (4) The preset loss function of the room layer The expression is:
[0053]
[0054] In the formula, Let be the set of planes whose normal vectors are opposite to those in the x and y directions. The original center of the room, For the estimated center of the room, For the estimated parameters of the plane that is opposite to the normal vectors in the x and y directions, The function is calculated using estimated parameters from four planes. This represents the information matrix for a room, where T represents the number of poses at the selected keyframe, and S represents the number of rooms.
[0055] (5) The preset loss function of the corridor floor The expression is:
[0056]
[0057] In the formula, For floor parameters The center of the first Floors and corridors The center of the first The relative distance between the rooms Represents the node of the corridor floor With room nodes The relative distance between them This represents the information matrix for the corridor, where F represents the number of floors.
[0058] In addition, to achieve the above objectives, this application also provides a computer system, the computer system comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, it implements the steps of the robot situation map construction method for indoor dynamic scenes as described in any of the preceding claims.
[0059] In addition, to achieve the above objectives, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the robot situation map construction method for indoor dynamic scenes as described in any of the preceding claims.
[0060] This application has at least the following beneficial effects:
[0061] 1. By fusing multimodal data from 3D LiDAR and RGB-D cameras, the system balances environmental geometric accuracy with semantic richness, effectively improving the positioning accuracy and modeling capabilities of mobile robots in complex indoor dynamic scenes. Figure 1 To the point of being compatible;
[0062] 2. A multi-criteria keyframe selection strategy based on fusion time interval, pose change, and image difference is adopted to improve the quality of keyframe selection, reduce the risk of pose drift and tracking loss, and enhance the robustness of the system.
[0063] 3. A two-stage static object determination strategy and associated adaptive particle filtering are designed to stably generate high-confidence static objects and achieve real-time tracking of dynamic targets, thereby improving the fine-grained perception capability of the scene.
[0064] 4. Based on the traditional situation map, an object level is added and room function category reasoning is realized through MLP based on the semantic features of static objects in the room. This effectively alleviates the bottleneck of existing methods that can only identify spatial structure and cannot understand scene functions, and realizes the upgrade from geometric modeling to semantic cognition.
[0065] 5. Construct a situational graph with a four-layer factor graph structure, uniformly encode robot pose, geometric elements, semantic objects, rooms and floors and their spatial constraints. The system has good real-time performance and stable operation, which can enhance the autonomous cognition, environmental understanding and intelligent decision-making capabilities of mobile robots. Attached Figure Description
[0066] Figure 1 This is a flowchart illustrating the robot situation map construction method for indoor dynamic scenes according to an embodiment of this application;
[0067] Figure 2 This is a point cloud image (top view) of the method and comparison algorithm of this application in a simulation environment.
[0068] Figure 3 This refers to the CPU utilization of each node and the total relative CPU utilization in a real indoor scene as described in the embodiments of this application.
[0069] Figure 4 This is a schematic diagram of the hardware operating environment of the computer system involved in the embodiments of this application.
[0070] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0071] To better understand the above technical solutions, exemplary embodiments of this disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of this disclosure to those skilled in the art.
[0072] First Embodiment
[0073] Reference Figure 1 This embodiment provides a method for constructing a robot situation map for indoor dynamic scenes, characterized by its applicability to robots including LiDAR and RGB-D cameras. The method includes the following steps:
[0074] S10, acquire the point cloud data collected by the lidar and the image data collected by the RGB-D camera, and generate skeleton point cloud and object point cloud based on the point cloud data and the image data;
[0075] In this embodiment, the raw data collected by the two types of heterogeneous sensors on the mobile robot—LiDAR and RGB-D camera—are converted into a standardized data format required for subsequent processing. The LiDAR acquires the geometric point cloud of the surrounding environment through periodic scanning, but its output is only a set of spatial coordinates (x, y, z), containing no semantic information. The RGB-D camera simultaneously outputs color images and depth images. The color image includes visual semantic information such as object appearance, texture, and color, while the depth image provides pixel-level distance measurements.
[0076] Since the two types of sensors have different sampling frequencies and are not hardware synchronized, time soft synchronization is first required. This involves aligning the LiDAR point cloud frames with the RGB-D image frames in the temporal dimension using timestamp alignment and linear interpolation, allowing geometric and visual data to be used collaboratively at the same time. After time soft synchronization, downsampling, denoising, and skeleton extraction operations are performed on the LiDAR point cloud to generate a skeleton point cloud that preserves the main geometric structure of the environment. On the other hand, object detection and semantic segmentation are performed on the RGB image to extract the category labels and pixel-level masks of each object in the scene. After depth inpainting is performed on the depth image, a lightweight 3D point cloud, i.e., the object point cloud, is generated based on the segmentation mask.
[0077] Skeleton point clouds provide the data foundation for subsequent geometric modeling, while object point clouds provide the data foundation for object management and semantic reasoning.
[0078] S20, select key frame sequences that meet preset selection rules from the skeleton point cloud. The preset selection rules include at least one of fusion time interval, pose change and image difference to obtain the processed skeleton point cloud.
[0079] Furthermore, static and dynamic objects in the object point cloud are identified, static object nodes are generated for the static objects, and the dynamic objects are tracked using an association adaptive particle filter to obtain the processed object point cloud.
[0080] In this step, after obtaining the skeleton point cloud and the object point cloud, they are processed in parallel using the method described in step S20. Specifically, keyframes are selected from a continuous frame sequence of the skeleton point cloud, choosing representative and high-quality frames.
[0081] It should be noted that traditional keyframe selection methods based on pure geometry SLAM rely solely on time intervals or pose changes for threshold determination, assuming a static and uniform environment. However, in real indoor environments, factors such as pedestrian movement, rapid robot turns, and lighting changes can cause simple thresholding strategies to easily select low-quality frames containing significant dynamic interference as keyframes, thereby contaminating the factor map and causing pose drift.
[0082] Therefore, in this step, evaluation factors of four dimensions—time interval, pose change, image difference, and dynamic object interference—are integrated to perform multi-dimensional scene adaptive keyframe selection, and a judgment strategy is adaptively selected according to different scenes.
[0083] Specifically, this embodiment designs corresponding branch logic for four typical scenarios: stable environment and smooth robot movement, rapid robot turning or violent movement, dynamic object interference in the field of vision, and normal situation. The first three scenarios are based on time threshold, pose threshold and proportion of dynamic objects as the main judgment criteria, while the normal situation is judged by a comprehensive score of construction time interval, pose change and image difference.
[0084] On the other hand, considering that there are a large number of stationary objects such as tables, chairs and cabinets in the indoor environment, as well as moving objects such as pedestrians and animals, the significance of the two types of objects for the construction of the situation map is completely different: the position information of static objects is a reference for room function reasoning and scene structure modeling, and needs to be verified through multiple frames to ensure its high confidence, and its position needs to be fixed in the map; while the position of dynamic objects changes continuously in the time dimension, and needs to be continuously tracked to maintain the perception of dynamic changes in the environment, and its position should not be permanently fixed in the map.
[0085] However, single-frame object detection results have inherent uncertainties, such as being affected by occlusion, changes in lighting, and fluctuations in the detection network's recognition. The same object may be detected, missed, or misclassified in different frames. Therefore, this step processes the two types of objects separately, performing static / dynamic determination on the detected objects. Static objects determined to be static undergo progressive multi-frame verification from the candidate container to the confirmation container. Newly detected static objects are first temporarily stored in the candidate container. Only objects whose cumulative detection frame count reaches a preset threshold are transferred to the confirmation container to become high-confidence static object nodes. Candidate static objects that fail to be confirmed within the timeout period are removed from the candidate container.
[0086] Objects identified as dynamic are then connected to an adaptive particle filter framework for real-time tracking.
[0087] S30, Based on the semantic features of the static object nodes, the functional category labels within the robot's space are obtained through classifier reasoning;
[0088] After obtaining the high-confidence static object nodes in the room, this step uses the semantic information of these objects for a higher level of scene understanding—namely, room function category recognition.
[0089] Traditional situation mapping methods, while defining the geometric outline of a room through wall planes and informing the robot that "this is a space enclosed by four walls," cannot answer the cognitive-level question of "what is this space used for?" The core idea of this step is that the function of a room is determined by the categories and spatial distribution of objects within it—for example, an office typically has desks, chairs, and monitors; a classroom has a podium, desks and chairs, and a whiteboard; and a kitchen has a stove, refrigerator, and sink. These strong correlations between object and function can be used to infer the room's function from object semantics. Therefore, by statistically analyzing the categories and quantities of static objects in each room as features and inputting them into a classifier, the functional category label of the room (such as office, classroom, kitchen, bedroom, etc.) can be inferred, elevating scene understanding from a purely geometric dimension to a semantic dimension.
[0090] Understandably, dynamic objects, due to their unfixed positions and potential movement between different rooms, are excluded from this feature statistics to avoid introducing interfering information.
[0091] S40, the processed skeleton point cloud, the processed object point cloud, and the functional category label are encoded into a multi-layer factor graph structure, and the situation map is obtained by optimizing the structure through the preset loss function corresponding to each layer. The multi-layer factor graph structure includes a keyframe layer, an object layer, a wall layer, a room layer, and a corridor layer.
[0092] In this embodiment, all the heterogeneous information obtained above is uniformly encoded into a multi-layer factor graph structure, and a globally consistent situational graph is obtained through backend optimization.
[0093] In this embodiment, the multi-layer factor graph structure includes four levels: keyframe layer, object and wall layer, room layer, and corridor layer. These levels form a hierarchical topology network through factor nodes and constraints. Specifically, the keyframe layer is at the bottom, maintaining the robot's pose nodes and their inter-frame constraints generated from odometry data. The object and wall layer is at the second level, establishing factor nodes for static objects within a room and wall planes extracted through planar segmentation. Object nodes are associated with their respective rooms through spatial position constraints, while planar nodes form mutual constraints with pose nodes. The room layer is at the third level, defining the geometric boundaries of rooms and corridors by corresponding wall planes, and constructing factor nodes for rooms and corridors respectively. The corridor layer is at the top level, determining the floor center based on planar boundaries, establishing floor factor nodes, and unifying all rooms and corridors within the same floor under a global framework.
[0094] In this step, a corresponding loss function is defined for each level. By minimizing the weighted sum of the loss functions of each level as the global loss function, and optimizing the parameters of all nodes, the constraint relationship between each level reaches the global optimum.
[0095] In the technical solution provided in this embodiment, time-based soft synchronization and preprocessing are performed on multi-source perception data from 3D LiDAR and RGB-D cameras to generate skeleton point clouds and object point clouds. Then, time intervals, pose changes, image differences, and dynamic target interference are fused to construct a multi-criteria high-quality keyframe selection strategy, providing a reliable data foundation for pose optimization and factor map construction. Next, a two-stage static object determination strategy is adopted to generate high-confidence static object nodes, and dynamic target real-time tracking and stable representation are achieved through associative adaptive particle filtering. Then, based on the semantic and spatial features of static objects in the room, a classifier is used to complete the room function category inference. Finally, a multi-layer situation map including keyframe layer, object and wall layer, room layer, and corridor layer is constructed to uniformly encode robot pose, geometric elements, semantic objects, and spatial constraint relationships. Pose estimation and situation map updates are achieved through backend optimization, providing mobile robots with scalable and robust scene cognition capabilities.
[0096] Second Embodiment
[0097] Based on the first embodiment, this embodiment provides a detailed description of the keyframe sequence filtering rules. In this embodiment, the fusion time interval includes: if the current frame Compared to the previous keyframe The time interval between Greater than the preset time threshold If so, then insert a keyframe.
[0098] Specifically, when the environment is stable and the robot moves slowly or is stationary, the changes in content between sensor frames are mainly caused by the robot's slow movement. This scenario includes indoor service robots moving at a constant speed along a corridor, slowly inspecting a room, or temporarily stopping to wait for instructions. In this scenario, the pose changes between adjacent frames are minimal, making it inefficient to determine whether a new perspective has been acquired based on pose or image differences, as these minute pose changes are often within the odometry noise range.
[0099] Therefore, this scenario uses time interval as the primary criterion: taking the most recently inserted keyframe as the time base, the difference between the timestamp of the current frame and the timestamp of the previous keyframe is calculated and recorded as the time interval. If this time interval exceeds a preset time threshold, it is considered that the robot has moved a sufficient distance to generate valid new environmental observations, and thus the frame is inserted as a new keyframe.
[0100] In some optional implementations, the preset time threshold can be set according to the sensor's frame rate and the robot's typical movement speed—for a sensor system operating at 10Hz and a robot moving at 0.5m / s, the preset time threshold can be set to a range of 1.0 to 3.0 seconds, so that the spatial interval between keyframes is approximately 0.5 to 1.5 meters. If the time interval does not exceed the preset time threshold, it is determined that the current frame and the previous keyframe highly overlap in spatial content, and are skipped without further processing to control the keyframe density.
[0101] The pose change includes: if the current frame Compared to the previous keyframe pose translation and rotation angle Each greater than the set translation threshold and rotation angle threshold If so, insert a keyframe;
[0102] Specifically, when the robot performs rapid turns, accelerates sharply, or traverses uneven ground causing severe jolting, the pose changes between adjacent frames increase significantly. In such scenarios, relying solely on time intervals may fail to capture rapidly changing perspectives in a timely manner—because the robot may have moved a considerable distance or rotated a large angle within a short period—resulting in excessively large gaps between keyframes and insufficient overlap between adjacent keyframes, thus affecting the accuracy of inter-frame data association in subsequent pose optimization.
[0103] Therefore, this scenario uses pose change as the primary criterion: real-time tracking of the robot's current six-degree-of-freedom pose estimation (including 3D position and 3D orientation), calculating the translational vector magnitude and rotational angular magnitude of the current frame relative to the previous keyframe. When the translational magnitude exceeds a preset translational threshold, or the rotational angular magnitude exceeds a preset rotational angular threshold, it is determined that the robot's pose has changed significantly enough, and the current frame is inserted as a keyframe.
[0104] In some alternative implementations, the values of these two thresholds can be flexibly adjusted according to the actual application scenario: in small spaces such as offices and laboratories, a smaller threshold (such as 0.3 meters and 15 degrees) can be set to increase the keyframe density and ensure sufficient coverage of the small space; in open spaces such as halls and corridors, the threshold can be appropriately increased (such as 0.5 meters and 30 degrees) to avoid excessive redundancy of keyframes.
[0105] In some alternative implementations, the rotation angle can be obtained by calculating the trace of the rotation matrix or by converting it into an axis-angle representation using quaternions.
[0106] The image differences include: the proportion of dynamic objects in the current frame. If the percentage is less than or equal to the set percentage threshold, the current frame is determined. The detected object ID is the same as the previous keyframe. The symmetric difference set corresponding to each detected object ID, if the current frame The absolute value of the symmetric difference set and the previous keyframe The absolute difference of the symmetric difference sets is greater than a preset symmetric difference set threshold. If so, then insert a keyframe.
[0107] Specifically, when moving objects (such as pedestrians, other mobile robots, pushed carts, or shopping carts) appear in the field of view of a mobile robot, these dynamic objects introduce incorrect constraints in pose estimation and map building—because the presence of dynamic points violates the fundamental assumption of "scene stillness" in pose optimization. If frames containing a large amount of dynamic content are selected as keyframes, their corresponding point cloud and image features will be used for subsequent pose constraints, causing the optimization direction of the factor map to be "biased" by the dynamic objects, resulting in significant pose drift and mapping distortion.
[0108] This scenario introduces a dynamic object perception mechanism. Before determining whether to insert a keyframe, the severity of dynamic interference in the current frame is assessed. Specifically, the proportion of dynamic objects among all detected objects in the current frame is calculated. This proportion can be calculated in two ways: pixel-level calculation, which divides the total number of pixels in the dynamic object segmentation mask by the total number of pixels in the image, reflecting the area proportion of dynamic objects in the field of view; and object-level calculation, which divides the number of dynamic objects by the total number of detected objects, reflecting the number proportion of dynamic objects in the field of view. Each method has its own emphasis—pixel-level proportion is more sensitive to large dynamic objects (such as pedestrians at close range), while object-level proportion is more sensitive to small but numerous dynamic objects (such as multiple people at a distance). The appropriate method can be chosen or used in combination depending on the specific scenario.
[0109] If the proportion of dynamic objects exceeds a preset threshold, it indicates that dynamic interference dominates the visual information. In this case, regardless of other conditions, the system prohibits the insertion of keyframes to prevent dynamic content from contaminating the factor map. If the proportion of dynamic objects does not exceed the threshold, it indicates that the dynamic interference is within an acceptable range. Furthermore, a symmetric difference operation is performed between the set of unique identifiers of all objects detected in the current frame and the set of object identifiers in the previous keyframe. The size of the symmetric difference reflects the degree of change in the composition of objects in the field of view relative to the previous keyframe. If the number of symmetric differences exceeds a preset threshold, it indicates that the scene content has been updated, such as a robot turning a corner and entering a new room, or multiple objects being added or removed. In this case, a keyframe is inserted to capture the new scene content. Conversely, if the number of symmetric differences is small, it indicates that the scene content is basically stable, and no keyframe is inserted at this time.
[0110] For example, when a dynamic object appears in the robot's field of vision, if The proportion of dynamic objects in the middle Exceeding the set threshold ,Right now This indicates that there are too many or too close moving objects, making it impossible to insert a keyframe. If ,Will Detected objects and The detected object IDs are compared to find the symmetric difference set as follows: ,show and If the symmetric difference set changes significantly, a keyframe needs to be inserted. Indicates the objects detected in the current frame. gather, Indicates the object detected in the previous keyframe. gather:
[0111]
[0112] In the formula, , They represent and The set of object IDs detected in the two frames.
[0113] Further and optionally, the preset filtering rules also include:
[0114] If it does not fall under the categories of the fusion time interval, the pose change, and the image difference, then a comprehensive score is constructed:
[0115]
[0116] In the formula, and These represent the normalized scores for time interval, pose change, and image difference, respectively.
[0117] Specifically, when the robot's operating state does not fall into any of the three specific scenarios mentioned above (e.g., moving straight through a static environment at a moderate speed, or when there are a few dynamic objects in the environment but the triggering conditions for a dynamic interference branch are not met), any single-dimensional judgment criterion is insufficient to comprehensively evaluate the quality of the current frame as a keyframe—the time interval may be moderate but the scene content remains unchanged, and although the pose change is small, the image content differs significantly due to subtle changes in viewpoint. Therefore, this scenario requires a comprehensive evaluation of information from multiple dimensions to make a decision.
[0118] This scenario constructs a comprehensive scoring function that integrates three dimensions: time interval, pose change, and image difference. Specifically, the time interval, pose translation, pose rotation, and image feature difference are each transformed to the 0-1 range using a normalization mapping function, resulting in three normalized scores: the time normalization score reflects the ratio of the time interval between the current frame and the previous keyframe relative to a time threshold; the pose normalization score comprehensively reflects the degree of change in translation and rotation; and the image difference normalization score is obtained by calculating the feature matching ratio between the current frame and the previous keyframe or the reciprocal of the similarity in the bag-of-words model, which is particularly sensitive to scenarios where the pose change is small but the visual content changes due to local motion (such as objects being moved on a table). Each dimension is assigned an adjustable weight, and the sum of the three weighted scores is the comprehensive score.
[0119]
[0120] In the formula, Indicates the current frame Symmetric difference set of detected object IDs Indicates the previous keyframe Symmetric difference set of detected object IDs;
[0121] In this embodiment, the weights of each dimension in the comprehensive score are not fixed, but are adaptively updated based on the statistical results of the most recent preset number of historical keyframes. The specific update logic is as follows: maintain a queue storing the most recent N keyframes, and statistically analyze the distribution of the number of keyframes identified as keyframes according to which criterion. If most keyframes in a certain period are selected based on the pose change criterion, it indicates that pose change has the strongest indicative effect on scene content updates in the current environment, and the weight of the pose dimension in the comprehensive score is increased accordingly; if the contribution rate of the image difference criterion increases in historical statistics, the weight of the image difference dimension is increased accordingly.
[0122] Weight Update using the following formula:
[0123]
[0124] In the formula, To save the most A collection of keyframe queues; Indicates when Saved At each keyframe According to the first of the three keyframe determination criteria, the third one... The number of keyframes identified as keyframes ; express The fourth comprehensive scoring criterion considers the number of keyframes to be the most important factor. , ,like ,but It should be considered a keyframe; otherwise, the frame should not be considered a keyframe. This is a preset comprehensive score threshold.
[0125] Third Embodiment
[0126] Based on any of the above embodiments, this embodiment provides a detailed description of the static object determination and dynamic object determination in step S20:
[0127] In this embodiment, considering that the object detection results of a single frame are affected by various uncertainties: the object may be partially occluded, resulting in an incomplete detection box; changes in illumination direction may affect the boundary accuracy of the segmentation mask; and the detection network may give slightly different class confidence distributions for the same object from different viewpoints. If the detection results of a single frame are directly incorporated into the map without verification, a large number of false objects and duplicate representations will accumulate in the map, which will lead to false detections in a single frame and errors in treating the same object as a new object in multiple frames.
[0128] To this end, this step establishes two containers to manage object states: a candidate object container is used to temporarily store newly detected static objects that have not yet undergone sufficient time-dimensional verification; the confirmed object container stores reliable static objects that have undergone multi-frame consistency verification and have high confidence. The system processes the static objects detected in each frame in the following manner:
[0129] S21, match the candidate static objects detected in the current frame with the objects in the candidate object container. When the cumulative number of detected frames of the candidate static objects reaches a first preset threshold, they are transferred to the confirmed object container and used as the static objects.
[0130] Specifically, for each static object detected in the current frame, the system first searches the candidate object container to see if a matching candidate object exists. The matching criteria include three elements:
[0131] First, the Euclidean distance between the center points of the two objects is less than a preset first preset distance threshold.
[0132] Second, the intersection-over-union ratio (IoU, or intersection volume divided by union volume) between the three-dimensional bounding boxes of the two objects is greater than the first preset IoU threshold.
[0133] Third, the category labels of the two objects are consistent. If a matching object that meets the above three conditions is found in the candidate container, the cumulative detection frame count counter of the matching candidate object is incremented by 1, and the point cloud data of the newly observed object is downsampled again after point cloud stitching to update the point cloud set of the candidate object, while updating its center position and size information.
[0134] If no matching object is found, a new candidate object entry is created in the candidate container with the detection result of the current frame, its cumulative detection frame count is initialized to 1, and the timestamp of the current frame is recorded as the time of its first appearance.
[0135] For each candidate object in the candidate object container, the system continuously monitors two key metrics: the cumulative number of detected frames and the longest consecutive number of frames not detected, i.e., the timeout frame count. When the cumulative number of detected frames reaches a preset first confirmation threshold, it indicates that the object has been stably observed over multiple consecutive frames, demonstrating temporal consistency. At this point, the candidate object is transferred from the candidate container to the confirmation container, officially becoming a high-confidence static object node. Conversely, if the timeout frame count of a candidate object exceeds a preset maximum retention frame threshold, it indicates that the object may only be a false detection in a single frame or has been removed from the scene. It is then deleted from the candidate container to free up storage space. This two-stage design of candidate and confirmation effectively balances the reliability and response speed of object confirmation—objects that actually exist in the environment can usually be verified within a few to a dozen frames, while a single-frame false detection will not cause persistent pollution to the map.
[0136] S22, at a preset interval, determine the distance and intersection-union ratio of two static objects identified as belonging to the same category in the confirmed object container, and merge the point clouds of the two objects when the distance and the intersection-union ratio meet a preset condition.
[0137] In this embodiment, even if an object has passed the first-stage verification and entered the confirmation container, due to changes in viewing angle and the natural offset of the detection bounding box, the same physical entity may be created as two or more confirmed object nodes that are close in location but not completely overlapping at different times. For example, when a robot observes a desk from the left and right sides respectively, the detection box and point cloud coverage will differ, potentially resulting in two spatially adjacent but not completely overlapping confirmed objects. This will lead to redundant object representations in the situation map, affecting the accuracy of room inference—because the same object will be counted multiple times.
[0138] To address this, the system uses a timer to periodically perform pairwise verification on objects within the same category label that are confirmed to be in the object container. The verification criteria include two conditions that must be met simultaneously: first, the center-to-center distance between the two objects is less than a preset second distance threshold (less than the first distance threshold because the confirmed objects have higher positional accuracy); second, the intersection-over-union (IoU) ratio between the 3D bounding boxes of the two objects is greater than a preset second IoU threshold (higher than the matching threshold in the first stage). When both conditions are met, it is determined that the two confirmed objects actually correspond to the same physical entity.
[0139] In some optional implementations, the merging operation includes: merging the point clouds of the two objects into a single point cloud by stitching and then downsampling; retaining the center coordinates and size information of the confirmed object with the higher cumulative detection frame count or higher confidence score as parameters in the merged result; and deleting one redundant node. After merging, the point cloud of each object in the confirmed object container accumulates observation data from multiple perspectives, further improving the completeness and accuracy of its 3D representation.
[0140] Further and optionally, in S20, determining the dynamic objects in the object point cloud includes:
[0141] S23, track dynamic objects using correlation adaptive particle filtering, and sequentially perform state prediction, data correlation based on dynamic threshold, tracking update for matched observations, new tracking initialization for unmatched observations, prediction update for unmatched old tracking, and deletion of long-term unmatched old tracking.
[0142] The following is a detailed explanation of each step:
[0143] (1) State prediction
[0144] In the state prediction stage, a state transition for velocity and position is performed on the particle swarm maintained for each tracked target. It is assumed that the target's motion approximately follows a constant velocity model within short time intervals: the velocity of each particle is based on the velocity of the previous frame, superimposed with Gaussian noise (the velocity noise variance reflects the breadth of the target's acceleration distribution); the particle's position is based on the position of the previous frame, superimposed with the product of velocity and the inter-frame time interval, and then superimposed with Gaussian position noise (the position noise variance reflects the residual of the motion model's fit to the target's true trajectory). This prediction model provides the prior distribution for the particles of each tracked target in the next frame.
[0145] For example, in the first Frame, for the first One tracking The The speed of each particle With position The prediction is as follows:
[0146]
[0147] in, Then it is the first Frame and the The time interval between frames, and Noise for velocity and noise for position, respectively. and Let Variance be the variance of velocity noise and position noise, respectively. It is a 3x1 identity matrix. , The first The first frame The velocity and position of each particle.
[0148] (2) Data association based on dynamic threshold
[0149] In the data association stage, the short-term mean position is first calculated for each tracked target—the average of the filtered posterior positions of the target particles within the most recent preset number of frames. The contribution weight of each frame is determined by the weighted average of the normalized weights of the particles in the corresponding frame, to reduce the impact of occasional bad observations on the association prior. Then, the Euclidean distance between each detected observation and each tracked target's short-term mean position in the current frame is calculated. Considering that targets with different movement speeds require different search ranges—fast-moving pedestrians may move a large distance between two frames, while slow-moving or stationary targets have very little position change—if the same fixed search radius is used for all targets, either fast targets will be missed, or too many irrelevant candidates will be introduced for slow targets. Therefore, a dynamic threshold mechanism adaptively adjusts the search radius based on the current estimated velocity modulus of each target: the search radius equals the base radius plus the product of the current velocity modulus and the velocity coefficient; the faster the speed, the larger the search radius. Only observation-tracking pairs that meet the adaptive search radius condition are included in the candidate pairing set. On the candidate pairing set, a global greedy minimum distance matching algorithm is used—each time, the observation-tracking pair with the smallest distance is selected for assignment, and then all candidate pairs of the observation and the track are removed from the candidate set. This process is repeated until all possible pairings are completed—ensuring that each observation matches at most one tracking target, and each tracking target matches at most one observation.
[0150] For example, for each tracked target Using the short-term mean position as the association prior:
[0151]
[0152] in, For the first Frame tracking target The The weight of each particle, For the number of particles, for No. Overall frame rate.
[0153] For the Observation In the Position in the frame Calculate each pair Euclidean distance between Considering the impact of target velocity on the search radius, we use dynamic gating for each pair. To perform filtering, that is:
[0154]
[0155] in, The search radius distance, For velocity coefficient, only when Only then will the pair be considered as candidates. This is in order to obtain the final pairing. We are in the candidate pair set The algorithm employs a global greedy minimum distance matching method for pairwise allocation.
[0156] (3) Tracking and updating of matched observations
[0157] For a successfully matched target, a tracking update operation is performed. First, the observation position of the current frame is stored in the target's short-term observation queue (the queue length has an upper limit; when it exceeds the limit, the oldest observation is removed). A smoothed position is calculated based on the observation positions of each frame in the queue (using a weighted average, with the most recent observation having a higher weight). Then, the latest velocity of the target is estimated by dividing the difference between the previous smoothed position and the current smoothed position by the inter-frame time interval. Next, for each particle of the tracked target, the observation likelihood between its current observation position and the observed position is calculated based on a Gaussian observation model—the closer the particle is to the observation, the higher the likelihood value—and the normalized weights of each particle are updated using the observation likelihood as weights. The updated particle distribution reflects the posterior probability of the target position, while the real-time velocity estimate provides input for the dynamic threshold adaptive search radius in the next frame.
[0158] For example, for data association, the data is assigned to Each Its observation location and will Number of missed frames Set to 0. Then, Put into Short-term observation queue In this context, the maximum length of the queue is... , Given the current number of items in the queue, calculate... The smoothed position is as follows:
[0159]
[0160] Based on this, the target velocity is estimated using the previous smoothed position and the current smoothed position as follows:
[0161]
[0162] For that Each particle The observed likelihood is calculated as follows:
[0163]
[0164] in, The standard deviation is then used. Next, the normalized weights for each particle are calculated. The observation information is then used to update the particle velocities as follows:
[0165]
[0166] Thus, the overall speed of updating the target is as follows:
[0167]
[0168] Among them, hyperparameters .
[0169] (4) Initialize new tracking for unmatched observations
[0170] For those who were not involved in the data association process Matched observations It needs to be initialized to obtain new In order to avoid existing When creating duplicates nearby, we check for similarities with existing ones before creation. Estimate the distance to the location. Skip creation if the following conditions are met.
[0171]
[0172] in, This is the distance threshold. If the above conditions are met, then... Center sampling An initial particle.
[0173] (5) Update predictions for unmatched old tracking
[0174] If no detection is detected in the current frame Then all Both need to be updated and predicted, and if the current frame detects the presence of... At that time, only unmatched Those Updates and forecasts are needed. Specifically, in the context of... Number of missed frames conduct Based on the cumulative updates, the particle's position, velocity, weight, and smoothed position are extrapolated and predicted as follows:
[0175]
[0176] Among them, hyperparameters Subsequently, if the number of effective particles is less than the threshold... If so, resampling will be performed.
[0177] (6) Deletion of old tracks that have not been matched for a long time
[0178] For each Number of missed frames When it exceeds the threshold for the number of missed frames, i.e. If so, it will be removed from the tracking list. When displayed on the map, the target location is displayed using... Because it is more stable, and This reflects the posterior center of the filter.
[0179] Fourth embodiment
[0180] Based on any of the above embodiments, in this embodiment, S30 includes:
[0181] S31, Obtain the category and quantity of static objects in each room as room identification features;
[0182] S32, the room identification features are converted into feature vectors, and the room category probability vectors are obtained through multilayer perceptron inference. The category with the highest probability is selected as the functional category label of the room.
[0183] In this embodiment, the room layer can perform room type inference by combining information from the object layer (i.e., the spatial location of the object, the object's unique ID, and category) and the room's spatial extent. To clearly record the association between rooms and objects, we use a key-value pair data structure to store the set of objects within each room. For each room, we first count the categories and number of objects within it, serving as the basic features for subsequent room category identification. The key-value pair representation of room entities and object entities is as follows:
[0184]
[0185] in, Indicates the number of room entities. No. One room, for The set of all static objects in the set is represented as
[0186]
[0187] Since dynamic objects move between rooms, they not only fail to contribute positively to room category identification but may also cause misidentification. Therefore, we stipulate that each room entity contains only static objects. Based on this, we use an MLP to determine the room type; that is, after obtaining the category, number, and location information of objects in a room, we further transform them into a list containing... Vectors of object types As input. Then, through MLP inference, we obtain the following: Room-like output vector Then select The room type (such as office, classroom, etc.) corresponding to the subscript with the highest probability is the label type of the room, and the recognition result is marked on the map to complete the accurate determination of the room category.
[0188] Fifth Embodiment
[0189] Based on any of the above embodiments, in this embodiment, in S40, the global state of the multi-layer factor graph structure is defined as:
[0190]
[0191] In the formula, For the robot located The pose at a selected keyframe, where SE(3) is a three-dimensional special Euclidean group;
[0192] for Parameters of a plane;
[0193] for The parameters of an object;
[0194] Include Parameters for each room;
[0195] Include Parameters of each corridor;
[0196] for Parameters for each floor;
[0197] Odometer coordinate system With map coordinate system The drift between them.
[0198] Furthermore, and optionally, for the keyframe layer, in At any time, if judgment If it is a keyframe, a factor node will be created at the key layer. The node is subject to continuous pose The pairwise odometer data constraints between nodes. The correlation loss function between nodes is as follows:
[0199]
[0200] In the formula, For the current frame, This represents the robot's pose in the current frame. For factor nodes of the keyframe layer; , These represent combinations and inverse combinations, respectively. This indicates a search for the Mahalanobis distance. Indicates the pose Information matrix; This indicates pairwise odometer data constraints;
[0201] For the object layer, only static objects within the room are included in the factor graph, excluding static objects in the corridor and all dynamic objects, to ensure constraint stability and optimization accuracy. The definition of a static object node is:
[0202]
[0203] in, For the object in the map coordinate system The position along the lower x and y axes. The loss function for the object layer is:
[0204]
[0205] In the formula, and These are the coordinate estimates of the object on the x-axis and y-axis, respectively. The inputs are respectively into the preset loss function. The original coordinates of the object on the x and y axes. and The first The x-axis and y-axis coordinates of each room. and The first The width of the walls along the x and y axes of each room. This represents the information matrix for an object;
[0206] For the wall layer, a wall is defined as consisting of two planes whose centers are closest and whose normal vectors are opposite. For plane acquisition and segmentation, we use sequential random sample consensus (RANSAC) to extract the planes from the 3D point cloud of newly registered keyframes. On one hand, if the x or y vector of the plane normal is greater than the z vector, it is a vertical plane. Specifically, if the x vector of the normal is greater than the y vector, then the normal is the x-plane normal; otherwise, it is the y-plane normal. On the other hand, if the z vector is greater than both the x and y vectors, then the plane is a horizontal plane or the ground. After plane initialization, subsequent new plane observations must first be associated with the already segmented planes. If the association is successful, data fusion is performed; otherwise, a new segmented plane is created. Here, the plane factor nodes are defined as follows:
[0207]
[0208] in, The plane in the map coordinate system The azimuth, elevation, and distance within the plane. Furthermore, this allows for the determination of the plane's azimuth, elevation, and distance. The loss function with minimum cost is as follows:
[0209]
[0210] In the formula, It is a plane; Based on the current pose of the robot and plane parameters in map coordinate system The predicted plane in the LiDAR coordinate system This represents the information matrix for a plane;
[0211] For a room level, the room level includes rooms and corridors. A room consists of a plane with four normal vectors pointing to the same point, while a corridor consists of two planes with opposite normal vectors. The factor nodes of a room are defined as follows:
[0212]
[0213] in, and The rooms are located in the map coordinate system. The x and y coordinates of the room are obtained from the centers of the four planes that make up the room. The loss function for the room nodes is defined as follows:
[0214]
[0215] In the formula, Let be the set of planes whose normal vectors are opposite to those in the x and y directions. The original center of the room, For the estimated center of the room, For the estimated parameters of the plane that is opposite to the normal vectors in the x and y directions, The function is calculated using estimated parameters from four planes. This represents the information matrix for a room, where T represents the number of poses at the selected keyframe, and S represents the number of rooms.
[0216] The factor nodes of the corridor are defined as follows:
[0217]
[0218] in, and Corridors in map coordinate system The x and y coordinates are obtained from the centers of the two planes that make up the corridor. The loss function for the corridor nodes along the x-axis is:
[0219]
[0220] in, The coordinates are the average of the centers of the two planes. For the estimated center of the corridor, To use two planes and The function that maps the center of the corridor. This represents the information matrix for the corridor. The corridor along the y-axis is similar to that along the x-axis.
[0221] For the corridor level, for all segmented planes, we obtain the widths of plane pairs opposite to the normal vector direction in both the x and y directions, and select the plane pairs with the largest widths in each direction as boundary candidates for the current floor. To avoid misclassifying isolated planes outside the building as boundaries, we adopt a strategy of verifying the boundary candidates using the normal vector dot product; that is, only those with approximately opposite normal vector directions are retained. Finally, the center of the selected plane is the center of the floor, and when the robot switches floors, this center is dynamically updated only based on the walls of the current floor. In the corridor level, the corridor level nodes are composed of the centers of the current floor calculated by the floor segmentation, and the loss function is constructed between the floor nodes and all constructed rooms, i.e.:
[0222]
[0223] In the formula, For floor parameters The center of the first Floors and corridors The center of the first The relative distance between the rooms Represents the node of the corridor floor With room nodes The relative distance between them This represents the information matrix for the corridor, where F represents the number of floors.
[0224] In this embodiment, the factor nodes and loss functions of the above-mentioned levels are integrated into a unified global least squares optimization problem. The optimization variable vector includes all keyframe poses, planar parameters, object positions, room and corridor parameters, and floor parameters. The global loss function is defined as the weighted sum of the loss functions of each level—the weight of each level reflects the relative reliability of the constraints at that level. The global loss function is iteratively optimized using a nonlinear least squares solver until the convergence condition is met.
[0225] After optimization, all parameters reach their theoretical optimum under the joint constraints of the global loss function. The final output situation map contains the following complete information: keyframe pose trajectory, 3D geometric point cloud map, category and precise location of high-confidence static objects, functional category label of each room / corridor, floor structure, and the affiliation of corridor floors. This situation map continuously receives new keyframes and observation data as the robot continues to operate, achieving dynamic evolution of the map through incremental optimization or periodic global re-optimization, providing the mobile robot with a real-time, scalable, and cognitive environmental representation.
[0226] Verification of Examples
[0227] Based on the first to fifth embodiments, in this embodiment, to verify the effectiveness of the invention, the TIERS public dataset and the Gazebo simulation environment were used for testing, and four indoor simulation environments were built: (a) Home_1, (b) Home_2, (c) School_1, and (d) School_2. The invention was compared with mainstream algorithms such as HDL-SLAM, ALOAM, FLOAM, LeGO-LOAM, and S-Graphs+.
[0228] like Figure 2 As shown, the point cloud map constructed by LeGO-LOAM is the worst, exhibiting significant misalignment in large scenes and failing to maintain consistency in the environmental geometry. FLOAM, S-Graphs+, and MOLS-Graphs perform relatively better, constructing complete point cloud maps in both small and large scenes. However, S-Graphs+ and the MOLS-Graphs constructed in this invention produce point cloud maps with higher accuracy and clearer visual effects, and have fewer redundant ground point clouds than FLOAM, indicating that the point cloud map constructed in this invention has a complete structure and higher geometric fidelity.
[0229] Table 1. ATE values of the TIERS dataset, MOLS-Graphs, and other methods
[0230]
[0231] Note: The best and second-best results are marked in bold and underline, respectively.
[0232] Table 2. Computation time of MOLS-Graphs varies with sequence length.
[0233]
[0234] As shown in Table 1, the method of the present invention has an average absolute trajectory error (ATE) of only 42.8 cm on the TIERS dataset, which is lower than all the comparison algorithms, and the positioning accuracy is significantly improved. As shown in Table 2, the operation time of each functional module of the present invention is low, and the average time of the modules such as plane segmentation, room segmentation, and backend optimization all meet the real-time processing requirements.
[0235] In real indoor scenarios, this invention can gradually build and dynamically update the situation map over time.
[0236] like Figure 3 As shown, the CPU utilization of each node process indicates that it can run in real time in a real environment.
[0237] As one implementation scheme, Figure 4 This is a schematic diagram of the hardware operating environment of the computer system involved in the embodiments of this application.
[0238] like Figure 4 As shown, the computer system may include: a processor 1001, such as a CPU; a memory 1005; a user interface 1003; a network interface 1004; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0239] Those skilled in the art will understand that Figure 4 The computer system architecture shown does not constitute a limitation on the computer system and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0240] like Figure 4 As shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and computer programs. The operating system is a program that manages and controls the hardware and software resources of the computer system, as well as the operation of the computer programs and other software or programs.
[0241] exist Figure 4In the computer system shown, the user interface 1003 is mainly used to connect to the terminal and communicate with the terminal; the network interface 1004 is mainly used to communicate with the backend server; and the processor 1001 can be used to call the computer program stored in the memory 1005.
[0242] In this embodiment, the computer system includes: a memory 1005, a processor 1001, and a computer program stored in the memory and executable on the processor, wherein:
[0243] When the processor 1001 calls the computer program stored in the memory 1005, it implements each step of the robot situation map construction method for indoor dynamic scenes as described in the above embodiment.
[0244] Furthermore, those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in a computer system to implement the process steps of the embodiments of the above methods.
[0245] Therefore, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the various steps of the robot situation map construction method for indoor dynamic scenes as described in the above embodiments.
[0246] The computer-readable storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0247] It should be noted that, since the storage medium provided in the embodiments of this application is the storage medium used to implement the methods of the embodiments of this application, those skilled in the art can understand the specific structure and variations of the storage medium based on the methods described in the embodiments of this application, and therefore will not be repeated here. All storage media used in the methods of the embodiments of this application fall within the scope of protection of this application.
[0248] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0249] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0250] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0251] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0252] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0253] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for constructing a robot situation map for indoor dynamic scenes, characterized in that, Applied to robots including LiDAR and RGB-D cameras, the method includes the following steps: S10, acquire the point cloud data collected by the lidar and the image data collected by the RGB-D camera, and generate skeleton point cloud and object point cloud based on the point cloud data and the image data; S20, select key frame sequences that meet preset selection rules from the skeleton point cloud. The preset selection rules include at least one of fusion time interval, pose change and image difference to obtain the processed skeleton point cloud. Furthermore, static and dynamic objects in the object point cloud are identified, static object nodes are generated for the static objects, and the dynamic objects are tracked using an association adaptive particle filter to obtain the processed object point cloud. S30, Based on the semantic features of the static object nodes, the functional category labels within the robot's space are obtained through classifier reasoning; S40, the processed skeleton point cloud, the processed object point cloud, and the functional category label are encoded into a multi-layer factor graph structure, and the situation map is obtained by optimizing the structure through the preset loss function corresponding to each layer. The multi-layer factor graph structure includes a keyframe layer, an object layer, a wall layer, a room layer, and a corridor layer.
2. The robot situation map construction method for indoor dynamic scenes as described in claim 1, characterized in that, The fusion time interval includes: if the current frame Compared to the previous keyframe The time interval between Greater than the preset time threshold If so, insert a keyframe; The pose change includes: if the current frame Compared to the previous keyframe pose translation and rotation angle Each greater than the set translation threshold and rotation angle threshold If so, insert a keyframe; The image differences include: the proportion of dynamic objects in the current frame. If the percentage is less than or equal to the set percentage threshold, the current frame is determined. The detected object ID is the same as the previous keyframe. The symmetric difference set corresponding to each detected object ID, if the current frame The absolute value of the symmetric difference set and the previous keyframe The absolute difference of the symmetric difference sets is greater than a preset symmetric difference set threshold. If so, then insert a keyframe.
3. The robot situation map construction method for indoor dynamic scenes as described in claim 2, characterized in that, The preset filtering rules also include: If it does not fall under the categories of the fusion time interval, the pose change, and the image difference, then a comprehensive score is constructed: ; In the formula, and These represent the normalized scores for time interval, pose change, and image difference, respectively: ; In the formula, Indicates the current frame Symmetric difference set of detected object IDs Indicates the previous keyframe Symmetric difference set of detected object IDs; Among them, weight Update using the following formula: ; In the formula, To save the most A collection of keyframe queues; Indicates when Saved At each keyframe According to the first of the three keyframe determination criteria, the third one... The number of keyframes identified as keyframes ; express The number of keyframes is considered the most important factor in the evaluation. , ,like ,but It should be considered a keyframe; otherwise, the frame should not be considered a keyframe.
4. The robot situation map construction method for indoor dynamic scenes as described in claim 1, characterized in that, In S20, determining static objects in the object point cloud includes: The candidate static objects detected in the current frame are matched with the objects in the candidate object container. When the cumulative number of detected frames of the candidate static objects reaches a first preset threshold, they are transferred to the confirmed object container and used as the static objects. The distance and cross-union ratio (CUI) of two objects identified as belonging to the same category in the confirmed object container are determined at preset intervals. When the distance and the CUI meet preset conditions, the point clouds of the two objects are merged.
5. The robot situation map construction method for indoor dynamic scenes as described in claim 1, characterized in that, In S20, determining the dynamic objects in the object point cloud includes: Dynamic objects are tracked using correlation-adaptive particle filtering, and the following steps are performed sequentially: state prediction, data correlation based on dynamic thresholds, tracking updates for matched observations, new tracking initialization for unmatched observations, prediction updates for unmatched old tracking, and deletion of long-term unmatched old tracking.
6. The robot situation map construction method for indoor dynamic scenes as described in claim 1, characterized in that, S30 includes: S31, Obtain the category and quantity of static objects in each room as room identification features; S32, the room identification features are converted into feature vectors, and the room category probability vectors are obtained through multilayer perceptron inference. The category with the highest probability is selected as the functional category label of the room.
7. The robot situation map construction method for indoor dynamic scenes as described in claim 1, characterized in that, The global state of the multi-layer factor graph structure is defined as follows: ; In the formula, For the robot located The pose at a selected keyframe, where SE(3) is a three-dimensional special Euclidean group; for Parameters of a plane; for The parameters of an object; Include Parameters for each room; Include Parameters of each corridor; for Parameters for each floor; Odometer coordinate system With map coordinate system The drift between them.
8. The robot situation map construction method for indoor dynamic scenes as described in claim 7, characterized in that, The preset loss function includes: (1) The preset loss function of the keyframe layer The expression is: ; In the formula, For the current frame, This represents the robot's pose in the current frame. For factor nodes of the keyframe layer; , These represent combinations and inverse combinations, respectively. This indicates a search for the Mahalanobis distance. Indicates the pose Information matrix; This indicates pairwise odometer data constraints; (2) The preset loss function of the object layer The expression is: ; In the formula, and These are the coordinate estimates of the object on the x-axis and y-axis, respectively. The inputs are respectively into the preset loss function. The original coordinates of the object on the x and y axes. and The first The x-axis and y-axis coordinates of each room. and The first The width of the walls along the x and y axes of each room. This represents the information matrix for an object; (3) The preset loss function of the wall layer The expression is: ; In the formula, It is a plane; Based on the current pose of the robot and plane parameters in map coordinate system The predicted plane in the LiDAR coordinate system This represents the information matrix for a plane; (4) The preset loss function of the room layer The expression is: ; In the formula, Let be the set of planes whose normal vectors are opposite to those in the x and y directions. The original center of the room, For the estimated center of the room, For the estimated parameters of the plane that is opposite to the normal vectors in the x and y directions, The function is calculated using estimated parameters from four planes. This represents the information matrix for a room, where T represents the number of poses at the selected keyframe, and S represents the number of rooms. (5) The preset loss function of the corridor floor The expression is: ; In the formula, For floor parameters The center of the first Floors and corridors The center of the first The relative distance between the rooms Represents the node of the corridor floor With room nodes The relative distance between them This represents the information matrix for the corridor, where F represents the number of floors.
9. A computer system, characterized in that, The computer system includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the robot situation map construction method for indoor dynamic scenes as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the robot situation map construction method for indoor dynamic scenes as described in any one of claims 1 to 8.
