Indoor environment map drawing method, device, electronic device and storage medium

By obtaining the building information model and applying filtering semantic rules to generate accurate maps, the problem of map construction errors and interference in indoor environments is solved, and the accuracy and safety of robot navigation are achieved.

CN118347489BActive Publication Date: 2024-09-27BEIJING UNIV OF CIVIL ENG & ARCHITECTURE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410782543.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-27
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

Existing technologies have problems with measurement errors and external interference when constructing maps in indoor environments, resulting in inaccurate robot navigation. Especially when building structures change or complex scenes, SLAM technology is difficult to effectively update and apply.

Method used

By obtaining the building information model, applying preset filtering semantic rules for processing, a three-dimensional point cloud map is generated, and converted into a two-dimensional raster map and an expanded raster map, and fusion processing is performed to generate an accurate two-dimensional target map, reducing Effects of sensor errors and environmental interference.

Benefits of technology

The accuracy and completeness of indoor environment maps are improved, ensuring that robots can accurately plan routes and avoid obstacles, improving navigation safety and work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118347489B
    Figure CN118347489B
Patent Text Reader

Abstract

The present invention relates to the field of map drawing technology, and in particular to a method, device, electronic device and storage medium for drawing indoor environment maps, in order to solve the problem of how to draw an accurate map in a real scene so that a robot can accurately plan a route and travel according to the map. The method comprises: obtaining a building information model of an indoor environment, and filtering and processing the building information model based on preset filtering semantic rules to obtain a corresponding three-dimensional point cloud map; generating a corresponding two-dimensional grid map according to the three-dimensional point cloud map, and expanding the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map; fusing the two-dimensional grid map and the two-dimensional expanded grid map to obtain a two-dimensional target map of the indoor environment. The method avoids the influence of sensor errors and debris in the actual environment on the effect of the indoor environment map, and greatly improves the accuracy of drawing a two-dimensional target map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of map drawing technology, and in particular to a method, device, electronic equipment and storage medium for drawing indoor environment maps. Background Art

[0002] Today, the development of robots is in a stage of rapid evolution. Robotics has made remarkable progress in various fields. Industrial robots play a key role in the manufacturing industry, improving production efficiency and quality. Service robots are increasingly appearing in our daily lives, providing us with services such as navigation, cleaning and entertainment. The development of robots has benefited from advances in artificial intelligence, perception technology and autonomous navigation. Despite many achievements, robotics still faces challenges such as reliability, safety and human-computer interaction. However, with the advancement of technology and continuous innovation, robots will further develop in various fields and have a profound impact on the way we live and work.

[0003] Robot mapping refers to the process by which robots use sensors and algorithms to obtain environmental information and generate maps. This process allows robots to understand and perceive the world around them so that they can navigate, plan paths, and perform tasks. The key to robot mapping is the collection and processing of sensor data. Commonly used sensors include lidar, cameras, ultrasonic sensors, and IMU (Inertial Measurement Unit). These sensors can provide information about the position, distance, and direction of objects around the robot. With sensors such as lidar, the robot can emit a laser beam and measure its return time to obtain the distance and position of objects in the surrounding environment. The camera can capture images and perform computer vision analysis to identify and locate objects. Ultrasonic sensors can be used to measure the distance between objects and the robot. IMU can provide information such as the robot's acceleration, angular velocity, and direction. Once the robot collects sensor data, it uses a mapping algorithm to convert this data into a map. Common mapping algorithms include lidar mapping, visual SLAM (Simultaneous Localization And Mapping), and graph optimization-based methods. These algorithms combine sensor data with the robot's motion information to estimate the robot's position in space and gradually build an environmental map.

[0004] Robotic mapping has a wide range of applications in many fields, including autonomous vehicles, drones, indoor navigation robots, and industrial automation. By building accurate maps, robots can better understand the environment, plan paths, avoid obstacles, and perform various tasks. LiDAR mapping uses the reflection of laser beams in the environment to obtain the distance and position information of objects. The laser radar emits a laser beam and receives the reflected light signal through a receiver. By measuring the flight time of the laser beam, the distance between the laser beam and the object can be calculated. By installing and rotating the laser radar on the robot, multiple laser scan data of the environment can be obtained. This data is processed and fused to finally generate a 3D point cloud map of the robot's surroundings. LiDAR mapping has high precision and accuracy and is suitable for indoor and outdoor environments.

[0005] Visual mapping uses cameras to obtain image information of the environment and analyzes and processes it through computer vision algorithms. Visual mapping can use a single or multiple cameras to capture images of the environment. By performing feature extraction, target detection, and image registration on the image, objects and features in the environment can be identified and located. By matching and fusing images from different perspectives, a two-dimensional or three-dimensional map of the environment can be generated. Visual mapping has a wide range of applications, including indoor navigation, autonomous driving, and augmented reality. LiDAR mapping and visual mapping are both mainstream mapping methods, and they have their own advantages in different scenarios and applications. LiDAR mapping is highly accurate and reliable, and is suitable for scenarios that require precise distance and location information. Visual mapping is flexible and adaptable, and can handle complex visual information.

[0006] Due to the complexity and variability of indoor building environments, mobile robots need to have higher technical performance requirements. Most current map construction methods use SLAM technology, which allows robots to obtain identification information in unknown environments through sensors and gradually obtain relevant maps. When the environment changes significantly, the map constructed by SLAM will not be usable, and when faced with large scenes, the use of SLAM technology will also make the map construction process more complicated and cumbersome. Drawing through actual on-site scanning and measurement requires an ideal on-site environment, and there are problems such as a lot of external environmental interference and low equipment accuracy. If the building structure changes due to construction planning and other reasons, it needs to be re-scanned. Figure 1 As shown in the figure, problems such as incomplete scanning content and missing semantic information seriously affect the application of robots based on SLAM.

[0007] BIM (Building Information Modeling) is a digital representation method that includes a three-dimensional geometric model of a building and related information. It can obtain building information more accurately and timely. Using BIM models can quickly create indoor maps. Combining BIM for path planning can utilize the spatial information, such as walls, stairs, doors, and equipment and pipeline layouts. This information can help robots avoid obstacles, comply with building regulations and rules, and generate more accurate paths. In addition, the geometric information in BIM can also be used for collision detection and obstacle avoidance with the robot's sensor data. By comparing the robot's perception data with BIM, it can be ensured that the robot avoids collisions with buildings, equipment or other obstacles during path planning, improving the safety of the robot's navigation and the efficiency of its work. Therefore, the technology of combining BIM and SLAM for mapping brings opportunities for the robot's mapping method.

[0008] However, the technology of combining BIM and SLAM for mapping, as a cross-product of multi-field technologies, is affected by various factors in its development and application. During the operation of robot navigation, it is necessary to load the map in advance as prior knowledge and use the map as a reference for navigation. Traditional map drawing requires the use of sensors such as lidar and vision to scan the space and record the distance information of obstacles to draw 2D or 3D maps. However, the sensor mapping method has inherent disadvantages, namely measurement errors and external environmental interference. Therefore, how to draw an accurate map in a real scene so that the robot can accurately plan and move according to the map is an urgent problem to be solved. Summary of the invention

[0009] In view of this, the purpose of the present invention is to provide a method, device, electronic device and storage medium for drawing indoor environment maps to solve the above-mentioned problems, and to achieve accurate mapping based on BIM, so that the robot can accurately plan and move its route according to the map, thereby improving work efficiency.

[0010] In a first aspect, an embodiment of the present invention provides a method for drawing an indoor environment map, the method comprising:

[0011] Acquire a building information model of the indoor environment, and filter the building information model based on preset filtering semantic rules to obtain a corresponding three-dimensional point cloud map; wherein the preset filtering semantic rules include at least one of the following: attribute rules, material rules and coordinate rules of building components; the building components include at least one of the following: chairs, tables, walls, windows, doors, and lights of the indoor environment;

[0012] Generate a corresponding two-dimensional grid map according to the three-dimensional point cloud map, and expand the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map;

[0013] The two-dimensional grid map and the two-dimensional expanded grid map are fused to obtain a two-dimensional target map of the indoor environment.

[0014] Preferably, the step of filtering the building information model based on preset filtering semantic rules to obtain a corresponding three-dimensional point cloud map includes:

[0015] The building information model is screened and processed according to the preset screening semantic rule to obtain parameters of the building components of the indoor environment; wherein the parameters include at least one of the following: properties, materials and coordinates of the building components;

[0016] Drawing a three-dimensional map according to the parameters of the building components of the indoor environment;

[0017] The three-dimensional map is subjected to point cloud estimation processing to obtain the three-dimensional point cloud map.

[0018] Preferably, the step of generating a corresponding two-dimensional grid map according to the three-dimensional point cloud map comprises:

[0019] Inputting the three-dimensional point cloud map into a filtering model so that the filtering model outputs a target three-dimensional point cloud map; wherein the filtering model includes a through filtering model and a radius filtering model;

[0020] The target three-dimensional point cloud map is projected to obtain the two-dimensional grid map.

[0021] Preferably, the step of inputting the three-dimensional point cloud map into a filtering model so that the filtering model outputs a target three-dimensional point cloud map comprises:

[0022] Inputting the three-dimensional point cloud map into the through-filtering model so that the through-filtering model outputs a first three-dimensional point cloud map;

[0023] The first three-dimensional point cloud map is input into the radius filtering model so that the radius filtering model outputs the target three-dimensional point cloud map.

[0024] Preferably, the height interval at which the laser point of the three-dimensional point cloud map is located includes: a first height interval and a second height interval; wherein the first height interval is greater than a preset height, and the second height interval is less than or equal to the preset height;

[0025] The step of inputting the three-dimensional point cloud map into the through-filtering model so that the through-filtering model outputs a first three-dimensional point cloud map comprises:

[0026] In the three-dimensional point cloud map, the laser points within the first height interval are removed, and the three-dimensional point cloud map including the laser points within the second height interval is input into the through-filtering model, so that the through-filtering model outputs the first three-dimensional point cloud map.

[0027] Preferably, the step of inputting the first three-dimensional point cloud map into the radius filtering model so that the radius filtering model outputs the target three-dimensional point cloud map includes:

[0028] Calculating a neighborhood radius between any two adjacent laser points in the first three-dimensional point cloud map; wherein the neighborhood radius is the Euclidean distance between the two adjacent laser points;

[0029] Determine whether the neighborhood radius is greater than a preset value. If so, the radius filtering model outputs the target three-dimensional point cloud map that does not include the laser point corresponding to the neighborhood radius. If not, the radius filtering model outputs the target three-dimensional point cloud map that includes the laser point corresponding to the neighborhood radius.

[0030] Preferably, the step of expanding the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map comprises:

[0031] Setting the expansion coefficient of the grid of the two-dimensional grid map;

[0032] It is determined whether the pixels of the grid are greater than the expansion coefficient. If so, the grids whose pixels are greater than the expansion coefficient are formed into the two-dimensional expansion grid map.

[0033] The indoor environment map drawing method provided by the present invention brings the following beneficial effects:

[0034] The embodiment of the present invention provides a method for drawing an indoor environment map, generating a corresponding two-dimensional grid map according to a three-dimensional point cloud map, and performing expansion processing on the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map, and performing fusion processing on the two-dimensional grid map and the two-dimensional expanded grid map to obtain a two-dimensional target map of the indoor environment. The three-dimensional point cloud map in the method is obtained by screening the acquired building information model based on a preset screening semantic rule, and has high accuracy, thereby improving the accuracy of the three-dimensional point cloud map, the two-dimensional grid map and the two-dimensional expanded grid map, avoiding the influence of sensor errors and debris in the actual environment on the indoor environment map effect, and greatly improving the accuracy of drawing the two-dimensional target map.

[0035] In a second aspect, an embodiment of the present invention further provides an indoor environment map drawing device, the device comprising:

[0036] An acquisition module is used to acquire a building information model of the indoor environment, and filter the building information model based on a preset filtering semantic rule to obtain a corresponding three-dimensional point cloud map; wherein the preset filtering semantic rule includes at least one of the following: an attribute rule, a material rule, and a coordinate rule of a building component; the building component includes at least one of the following: a chair, a table, a wall, a window, a door, and a lamp of the indoor environment;

[0037] An expansion processing module, used to generate a corresponding two-dimensional grid map according to the three-dimensional point cloud map, and to expand the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map;

[0038] The fusion processing module is used to fuse the two-dimensional grid map and the two-dimensional expanded grid map to obtain a two-dimensional target map of the indoor environment.

[0039] The indoor environment map drawing device provided in the embodiment of the present invention has the same technical features as the indoor environment map drawing method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.

[0040] In a third aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the beneficial effects of any of the methods described above are achieved, which will not be repeated here.

[0041] In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the beneficial effects of any of the methods described above are achieved, which will not be repeated here.

[0042] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.

[0043] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 Indoor environment map drawn in the prior art;

[0046] Figure 2 A flow chart of a method for drawing an indoor environment map provided by an embodiment of the present invention;

[0047] Figure 3 A screening process flow chart provided by an embodiment of the present invention;

[0048] Figure 4 A flow chart of another indoor environment map drawing method provided by an embodiment of the present invention;

[0049] Figure 5 A schematic diagram of the structure of an indoor environment map drawing device provided by an embodiment of the present invention;

[0050] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] To facilitate understanding of this embodiment, the embodiment of the present invention is described in detail below.

[0053] Embodiment 1:

[0054] The embodiment of the present invention provides a method for drawing an indoor environment map. Figure 2 As shown, the method comprises the following steps:

[0055] Step S102, obtaining a building information model of the indoor environment, and filtering the building information model based on a preset filtering semantic rule to obtain a corresponding three-dimensional point cloud map;

[0056] The preset screening semantic rules include at least one of the following: attribute rules, material rules and coordinate rules of building components; building components include at least one of the following: chairs, tables, walls, windows, doors and lights in the indoor environment; in practical applications, the building information model is a three-dimensional graphic of the indoor environment drawn by BIM technology. BIM technology has the characteristics of rapid advancement and wide application. However, since the drawing of the building information model requires manual survey of the existing or under-construction indoor environment and then draws it, there are certain errors, so it is necessary to convert the building information model into IFC (Industry Foundation Class, Industrial Foundation Class) format, and filter and process the building information model converted into IFC format according to the preset filtering semantic rules; among them, the attribute rules include the relative movement and stillness of each building component, such as: the opening and closing method of the door relative to the wall, the opening and closing method of the window relative to the wall, the fixing method of the lamp relative to the wall, the fixing method of the table relative to the wall, and the movement method of the chair relative to the wall. The coordinate rules of the building components include the starting coordinate rules, orientation (vector direction) rules, height rules, length rules and thickness (width) rules of each building component. The material rules include the material types of the chair, the material types of the table, the material types of the wall, the material types of the window, the material types of the door, and the material types of the lamp. With such settings, the obtained 3D point cloud map is closer to the actual indoor environment, which improves the accuracy of the 3D point cloud map.

[0057] It should be noted that the above-mentioned preset screening semantic rules include but are not limited to attribute rules, material rules and coordinate rules of building components, which can be specifically determined according to the building components; and the above-mentioned building components include but are not limited to chairs, tables, walls, windows, doors and lights, etc., which can be specifically set according to the specific indoor environment, and the embodiments of the present invention do not limit this.

[0058] Step S104, generating a corresponding two-dimensional grid map according to the three-dimensional point cloud map, and performing expansion processing on the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map;

[0059] Among them, the two-dimensional grid map, that is, the global map global_map, is expanded, and the obtained two-dimensional expanded grid map can be understood as a buffer zone set in the two-dimensional grid map. When the robot moves to the area where the two-dimensional expanded grid map is located, braking measures are taken or the running direction is changed to avoid the robot from colliding with the building components of the indoor environment due to inertia factors, so that the robot can accurately avoid the building components of the indoor environment.

[0060] Step S106, fusing the two-dimensional grid map and the two-dimensional expanded grid map to obtain a two-dimensional target map of the indoor environment.

[0061] As can be seen from the above, the two-dimensional target map is obtained by superimposing and fusing the two-dimensional grid map and the two-dimensional expanded grid map; the two-dimensional target map needs to be exported as a PGM (Portable graymap file format) file, and a YAML (YAML Ain't a Markup Language) file with the same name as the two-dimensional target map is created to define the save location, resolution, original coordinates, rotation angle, occupied / idle threshold, and whether to invert the two-dimensional target map. The two-dimensional target map can fully reflect the layout of the indoor environment with higher accuracy, and is suitable for the robot's route planning for the indoor environment.

[0062] The indoor environment map drawing method provided by the embodiment of the present invention generates a corresponding two-dimensional grid map according to the three-dimensional point cloud map, and expands the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map, and fuses the two-dimensional grid map and the two-dimensional expanded grid map to obtain a two-dimensional target map of the indoor environment. Among them, the three-dimensional point cloud map is obtained by screening the acquired building information model based on the preset screening semantic rules. Compared with the method in the prior art, the coordinates of the building components of the indoor environment are collected by the robot's own sensors, laser radar or camera, and the map is drawn according to the coordinates of the building components. In this method, the processing of the building information model based on the semantic screening rules reduces the error of the three-dimensional point cloud map, thereby improving the accuracy of the two-dimensional grid map; the two-dimensional grid map is expanded to accurately determine the real layout of the building components, and a two-dimensional expanded grid map that is closer to the real scene is obtained; the two-dimensional grid map and the two-dimensional expanded grid map are fused to further improve the integrity of the two-dimensional target map. This method avoids measurement errors and external environmental interference, and greatly improves the accuracy of mapping.

[0063] In one embodiment, the step of filtering and processing the building information model based on preset filtering semantic rules to obtain the corresponding three-dimensional point cloud map includes: filtering and processing the building information model according to preset filtering semantic rules to obtain parameters of building components of the indoor environment; wherein the parameters include at least one of the following: properties, materials and coordinates of the building components; drawing a three-dimensional map according to the parameters of the building components of the indoor environment; and performing point cloud estimation processing on the three-dimensional map to obtain a three-dimensional point cloud map.

[0064] Specifically, the chair in the building component is represented by the keyword IFCCHAIR, the column is represented by IFCCOLUMN, the floor is represented by the keyword IFCBUILDINGSTOREY, the wall is represented by the keyword IFCWALLSTANDARDCASE, the door is represented by the keyword IFCDOOR, and the light is represented by the keyword IFCLIGHT. Figure 3 As shown, the building information model needs to be converted into the IFC format, and the building information model converted into the IFC format is screened and processed according to the above keywords based on the preset screening semantic rules to obtain the parameters of each building component, and then the parameters are analyzed, and in the BIM software, a layout is performed on the newly created blank map based on the parameters to draw a three-dimensional map; wherein, the three-dimensional map can proportionally reflect the structural relationship between each building component and the parameters of the building component, that is, the properties, materials and coordinates of the building component; the properties of the building component are the movable relationship of each building component, for example: the door can be opened and closed relative to the wall, the window can be opened and closed relative to the wall, the lamp is fixed relative to the wall, the table is fixed relative to the wall, and the chair can be moved relative to the wall, and the coordinates of the building component include the starting coordinates, orientation (vector direction), height, length and thickness (width) of each building component; the three-dimensional map needs to verify the integrity, that is, to ensure that the spatial relationship of each building component is consistent with the actual situation, for example: there is no gap at the boundary of the wall, the handover is complete, and it is completely closed. In Matlab software, point cloud estimation is performed on the three-dimensional map, which is exported in the form of a PCD (Point Cloud Data) file, and then processed by PTM (Point Cloud to Map) to obtain a three-dimensional point cloud map.

[0065] In this method, the parameters obtained by screening the building information model can fully reflect the real indoor environment, and the three-dimensional map obtained based on this is closer to the real indoor environment. By converting the building information model into the IFC format, the topological structure of the intelligent navigation of the indoor environment is automatically generated based on the preset screening semantic rules, and the topological relationship of the indoor environment is extracted from the building information model converted into the IFC format in an automated manner to support the realization of intelligent navigation of the indoor environment. The three-dimensional point cloud map obtained by point cloud estimation of the three-dimensional point cloud map has a high degree of accuracy, and because the three-dimensional point cloud map is composed of multiple laser points, it is also more convenient to further analyze and process the building components in the three-dimensional point cloud map.

[0066] In one embodiment, the above-mentioned step of generating a corresponding two-dimensional grid map based on the three-dimensional point cloud map includes: inputting the three-dimensional point cloud map into a filtering model so that the filtering model outputs a target three-dimensional point cloud map; wherein the filtering model includes a straight-through filtering model and a radius filtering model; and projecting the target three-dimensional point cloud map to obtain a two-dimensional grid map.

[0067] Specifically, the three-dimensional point cloud map is filtered using the straight-through filtering model and the radius filtering model to obtain the target three-dimensional point cloud map. Since the mobile basic module move_base software package used by the robot to plan the tight route is based on the two-dimensional grid map, the target three-dimensional point cloud map needs to be projected to obtain a two-dimensional grid map.

[0068] The accuracy of the target three-dimensional point cloud map obtained by this method is greatly improved compared with the three-dimensional point cloud map before filtering, and the accuracy of the two-dimensional grid map obtained from the target three-dimensional point cloud map is also high.

[0069] In one embodiment, the step of inputting the three-dimensional point cloud map into the filtering model so that the filtering model outputs the target three-dimensional point cloud map includes: inputting the three-dimensional point cloud map into the through-filtering model so that the through-filtering model outputs a first three-dimensional point cloud map; inputting the first three-dimensional point cloud map into the radius filtering model so that the radius filtering model outputs the target three-dimensional point cloud map.

[0070] In the above method, the three-dimensional point cloud map is obtained by performing point cloud estimation on the three-dimensional map. The laser points in the three-dimensional point cloud map are used to characterize each building component in the three-dimensional map. Therefore, by filtering the three-dimensional point cloud map through a pass-through filter model (Pass ThroughFilter), the height of each building component in the three-dimensional map can be limited; a first three-dimensional point cloud map is obtained; then, the isolated points, i.e., noise, in the first three-dimensional point cloud map are filtered out through a radius filter model (Radious Outlier Filter) to obtain a target three-dimensional point cloud map.

[0071] This method combines the straight-through filtering model and the radius filtering model to make the target three-dimensional point cloud map more accurate and more in line with the real indoor environment.

[0072] In one embodiment, the height interval at which the laser points of the three-dimensional point cloud map are located includes: a first height interval and a second height interval; wherein the first height interval is greater than a preset height, and the second height interval is less than or equal to the preset height; the step of inputting the three-dimensional point cloud map into a pass-through filtering model so that the pass-through filtering model outputs a first three-dimensional point cloud map includes: in the three-dimensional point cloud map, removing the laser points within the first height interval, and inputting the three-dimensional point cloud map containing the laser points within the second height interval into the pass-through filtering model so that the pass-through filtering model outputs the first three-dimensional point cloud map.

[0073] Specifically, the preset height is the height that needs to be limited to the building components. For example, the height of the wall is preferably limited to 4000 cm. Since the first height interval is greater than 4000 cm and the second height interval is less than or equal to 4000 cm, the direct filtering model can filter out the laser points in the first height interval, leaving the laser points corresponding to the wall in the second height interval, which are the laser points corresponding to the wall in the first three-dimensional point cloud map. The height of the table is preferably limited to 120 cm. Since the first height interval is greater than 120 cm and the second height interval is less than or equal to 120 cm, the direct filtering model can filter out the laser points in the first height interval, leaving the laser points corresponding to the table in the second height interval, which are the laser points corresponding to the table in the first three-dimensional point cloud map.

[0074] The first three-dimensional point cloud map obtained in this way can more accurately reflect the parameters of building components in the real indoor environment.

[0075] In one embodiment, the step of inputting the first three-dimensional point cloud map into the radius filtering model so that the radius filtering model outputs the target three-dimensional point cloud map includes: calculating the neighborhood radius between any two adjacent laser points in the first three-dimensional point cloud map; wherein the neighborhood radius is the Euclidean distance between two adjacent laser points; determining whether the neighborhood radius is greater than a preset value, if so, the radius filtering model outputs a target three-dimensional point cloud map that does not include the laser points corresponding to the neighborhood radius, and if not, the radius filtering model outputs a target three-dimensional point cloud map that includes the laser points corresponding to the neighborhood radius.

[0076] In the above method, the KNN (K-Nearest Neighbor) algorithm based on radius neighborhood search is used to calculate the neighborhood radius of any two adjacent laser points in the first three-dimensional point cloud map. If the neighborhood radius is greater than a preset value, the laser point corresponding to the neighborhood radius is regarded as an isolated point, i.e., noise, and needs to be removed. The radius filtering model outputs a target three-dimensional point cloud map that does not include the laser point corresponding to the neighborhood radius; if the neighborhood radius is greater than a preset value, the laser point corresponding to the neighborhood radius is regarded as normal and needs to be retained. The radius filtering model outputs a target three-dimensional point cloud map that includes the laser point corresponding to the neighborhood radius.

[0077] This method can effectively remove the suspended isolated points or invalid points in the first three-dimensional point cloud map through the radius filtering model, thereby improving the quality of the point cloud data and making the target three-dimensional point cloud map have higher accuracy.

[0078] In one embodiment, the above-mentioned step of expanding the two-dimensional grid map to obtain the corresponding two-dimensional expanded grid map includes: setting the expansion coefficient of the grid of the two-dimensional grid map; determining whether the pixels of the grid are greater than the expansion coefficient, and if so, forming the grids whose pixels are greater than the expansion coefficient into a two-dimensional expanded grid map.

[0079] In the above method, the expansion coefficient is set manually. In the two-dimensional expansion grid map, if the cost scaling factor cost_scaling_factor becomes larger and the inflation radius inflation_radius becomes smaller, the fewer grids that make up the two-dimensional expansion grid map, the smaller the range of the two-dimensional expansion grid map; if the cost scaling factor becomes smaller and the inflation radius becomes larger, the more grids that make up the two-dimensional expansion grid map, the larger the range of the two-dimensional expansion grid map, and the cost scaling factor and the inflation radius are determined by the expansion coefficient. The larger the inflation coefficient, the smaller the cost scaling factor and the larger the inflation radius. Therefore, the expansion coefficient can be set according to the distance from the building component. For example, if the range of the two-dimensional expansion grid map is set to 0.3 meters to 1 meter from the building component (taking the wall as an example), the expansion coefficient can be set to 0.3-1, so that the robot can work away from the building component, avoiding the robot from colliding with the building component of the indoor environment due to inertia factors, so that the robot can accurately avoid the building component of the indoor environment.

[0080] In this method, each grid in the two-dimensional grid map is traversed in breadth, and the pixel of each grid is compared with the set expansion coefficient. If the pixel of the grid is greater than the expansion coefficient, multiple grids form a two-dimensional expansion grid map; if the pixel of the grid is less than or equal to the expansion coefficient, then the two-dimensional expansion grid map cannot be formed according to the grid. For example: if the pixel of the grid of the two-dimensional grid map corresponding to the wall in the indoor environment is greater than the expansion coefficient, then the grid forms a two-dimensional expansion grid map, and if the pixel of the grid of the two-dimensional grid map corresponding to the ground is less than or equal to the expansion coefficient, then the grid cannot form a two-dimensional expansion grid map, and the grid still forms a two-dimensional grid map; before the two-dimensional grid map is expanded, the resolution of the two-dimensional grid map needs to be obtained first, and then according to the resolution, based on the Cell Distance function, the two-dimensional grid map with meters as the length unit, that is, global_map (global map) is converted into a two-dimensional grid map with cells (centimeters) as the length unit.

[0081] This method can prevent the robot from colliding with building components in the indoor environment due to inertia factors, so that the robot can accurately avoid the building components in the indoor environment, ensure the safety of the robot while working, and improve the work efficiency of the robot.

[0082] Embodiment 2:

[0083] Based on the above method embodiment, the present invention provides another method for drawing indoor environment maps. Figure 4 As shown, the method comprises the following steps:

[0084] S402, obtaining a building information model of an indoor environment, and filtering the building information model based on a preset filtering semantic rule to obtain a corresponding three-dimensional point cloud map;

[0085] The preset filtering semantic rules include at least one of the following: attribute rules, material rules and coordinate rules of building components; the building components include at least one of the following: chairs, tables, walls, windows, doors and lights in the indoor environment.

[0086] S404, inputting the three-dimensional point cloud map into the through-filtering model, so that the through-filtering model outputs a first three-dimensional point cloud map; for details, reference may be made to the aforementioned embodiment, which will not be described in detail herein.

[0087] S406, inputting the first three-dimensional point cloud map into the radius filtering model, so that the radius filtering model outputs a target three-dimensional point cloud map; for details, please refer to the aforementioned embodiment, and the embodiment of the present invention will not be described in detail here.

[0088] S408, projecting the target three-dimensional point cloud map to obtain a two-dimensional grid map;

[0089] Specifically, the projection processing process is to project the laser points corresponding to the building components in the target three-dimensional point cloud map onto the plane xoy along the z-axis direction to obtain a two-dimensional grid map, wherein the projection of the laser points is a grid in the two-dimensional grid map.

[0090] S410, setting the expansion coefficient of the grid of the two-dimensional grid map; for details, reference may be made to the above-mentioned embodiment, which will not be described in detail herein.

[0091] S412, determining whether the pixels of the grid are greater than the expansion coefficient, if so, composing the grids whose pixels are greater than the expansion coefficient into a two-dimensional expansion grid map; for details, please refer to the above embodiment, which will not be described in detail in the embodiment of the present invention.

[0092] S414, fusing the two-dimensional grid map and the two-dimensional expanded grid map to obtain a two-dimensional target map of the indoor environment;

[0093] Specifically, the fusion process is to superimpose the obtained two-dimensional grid map and the two-dimensional expanded grid map to form a two-dimensional target map (global cost map). It should be noted that in the case where there is no two-dimensional expanded grid map, the two-dimensional target map of the indoor environment is a two-dimensional grid map.

[0094] The indoor environment map drawing method provided by the embodiment of the present invention inputs a three-dimensional point cloud map into a straight-through filtering model to obtain a first three-dimensional point cloud map, inputs the first three-dimensional point cloud map into a radius filtering model to obtain a target three-dimensional point cloud map, performs projection processing on the target three-dimensional point cloud map to obtain a two-dimensional grid map, sets the expansion coefficient of the grid of the two-dimensional grid map, and if the pixel of the grid is greater than the expansion coefficient, the grid forms a two-dimensional expansion grid map, and fuses the two-dimensional grid map and the two-dimensional expansion grid map to obtain a two-dimensional target map of the indoor environment. Among them, the three-dimensional point cloud map is obtained by screening the acquired building information model based on a preset screening semantic rule. The method realizes automated topological derivation, and automatically derives the topological relationship between the building components of the indoor environment, such as the connection relationship between the walls and the position of the door, based on the graph theory algorithm by analyzing the geometric and spatial information in the building information model converted into the IFC format, and can automatically generate the topological structure of the indoor environment, which can provide accurate and reliable navigation path planning for the robot and provide an important foundation for the realization of the intelligent navigation system of the indoor environment. This method uses clustering algorithm analysis to group command lines with the same characteristics based on preset filtering semantic rules, provides feature values ​​for each group of data, and divides the parameters of building components into different categories based on preset filtering semantic rules. Building components in the same category are related, and uses association algorithm analysis to add relationships between doors, windows, and walls, thereby enhancing the correlation between building components, avoiding the influence of sensor errors and debris in the actual environment on the mapping effect, and greatly improving the accuracy of mapping.

[0095] Embodiment three:

[0096] Based on the above method embodiment, the embodiment of the present invention provides an indoor environment map drawing device, such as Figure 5 As shown, the device includes an acquisition module 51, an expansion processing module 52 and a fusion processing module 53; wherein the functions of each module are as follows:

[0097] The acquisition module 51 is used to acquire the building information model of the indoor environment, and filter the building information model based on the preset filtering semantic rules to obtain the corresponding three-dimensional point cloud map; wherein the preset filtering semantic rules include at least one of the following: attribute rules, material rules and coordinate rules of building components; the building components include at least one of the following: chairs, tables, walls, windows, doors, and lights in the indoor environment;

[0098] An expansion processing module 52 is used to generate a corresponding two-dimensional grid map according to the three-dimensional point cloud map, and to expand the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map;

[0099] The fusion processing module 53 is used to fuse the two-dimensional grid map and the two-dimensional expanded grid map to obtain a two-dimensional target map of the indoor environment.

[0100] The embodiment of the present invention provides an indoor environment map drawing device, which generates a corresponding two-dimensional grid map according to a three-dimensional point cloud map, and performs expansion processing on the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map, and fuses the two-dimensional grid map and the two-dimensional expanded grid map to obtain a two-dimensional target map of the indoor environment. The three-dimensional point cloud map in the device is obtained by screening the acquired building information model based on preset screening semantic rules, and has high accuracy, thereby improving the accuracy of the three-dimensional point cloud map, the two-dimensional grid map and the two-dimensional expanded grid map, avoiding the influence of sensor errors and debris in the actual environment on the indoor environment map effect, and greatly improving the accuracy of drawing the two-dimensional target map.

[0101] Preferably, the building information model is screened based on preset screening semantic rules to obtain a corresponding three-dimensional point cloud map, including:

[0102] The building information model is screened and processed according to preset screening semantic rules to obtain parameters of building components of the indoor environment; wherein the parameters include at least one of the following: properties, materials and coordinates of the building components;

[0103] Draw a three-dimensional map based on the parameters of the building components of the indoor environment;

[0104] The three-dimensional map is processed by point cloud estimation to obtain a three-dimensional point cloud map.

[0105] Preferably, generating a corresponding two-dimensional grid map according to the three-dimensional point cloud map includes:

[0106] Inputting the three-dimensional point cloud map into the filtering model so that the filtering model outputs the target three-dimensional point cloud map; wherein the filtering model includes a straight-through filtering model and a radius filtering model;

[0107] The target three-dimensional point cloud map is projected to obtain a two-dimensional grid map.

[0108] Preferably, the three-dimensional point cloud map is input into the filtering model so that the filtering model outputs a target three-dimensional point cloud map, including:

[0109] Inputting the three-dimensional point cloud map into the through-filter model so that the through-filter model outputs a first three-dimensional point cloud map;

[0110] The first three-dimensional point cloud map is input into the radius filtering model so that the radius filtering model outputs a target three-dimensional point cloud map.

[0111] Preferably, the height interval at which the laser point of the three-dimensional point cloud map is located includes: a first height interval and a second height interval; wherein the first height interval is greater than a preset height, and the second height interval is less than or equal to the preset height;

[0112] Inputting the three-dimensional point cloud map into the through-filter model so that the through-filter model outputs a first three-dimensional point cloud map, including:

[0113] In the three-dimensional point cloud map, the laser points in the first height interval are removed, and the three-dimensional point cloud map including the laser points in the second height interval is input into the through-filter model, so that the through-filter model outputs the first three-dimensional point cloud map.

[0114] Preferably, the first three-dimensional point cloud map is input into a radius filtering model so that the radius filtering model outputs a target three-dimensional point cloud map, including:

[0115] Calculate the neighborhood radius between any two adjacent laser points in the first three-dimensional point cloud map; wherein the neighborhood radius is the Euclidean distance between the two adjacent laser points;

[0116] Determine whether the neighborhood radius is greater than a preset value. If so, the radius filtering model outputs a target three-dimensional point cloud map that does not include the laser points corresponding to the neighborhood radius. If not, the radius filtering model outputs a target three-dimensional point cloud map that includes the laser points corresponding to the neighborhood radius.

[0117] Preferably, the two-dimensional grid map is expanded to obtain a corresponding two-dimensional expanded grid map, including:

[0118] Set the expansion coefficient of the grid of the two-dimensional grid map;

[0119] It is determined whether the pixels of the grid are greater than the expansion coefficient. If so, the grids whose pixels are greater than the expansion coefficient are combined into a two-dimensional expansion grid map.

[0120] The indoor environment map drawing device provided in the embodiment of the present invention has the same technical features as the indoor environment map drawing method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.

[0121] An embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned indoor environment map drawing method.

[0122] See also Figure 6 As shown, the electronic device includes a processor 100 and a memory 101, wherein the memory 101 stores machine executable instructions that can be executed by the processor 100, and the processor 100 executes the machine executable instructions to implement the above-mentioned indoor environment map drawing method.

[0123] Further, Figure 6 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .

[0124] Among them, the memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 102 can be an ISA (Industrial Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Enhanced Industry Standard Architecture) bus, etc. The above-mentioned bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0125] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware.

[0126] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned indoor environment map drawing method.

[0127] The computer program product of the indoor environment map drawing method, device and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0129] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0130] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0131] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0132] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for drawing an indoor environment map, It is characterized in that The method comprises: S102, obtaining a building information model of the indoor environment, and filtering and processing the building information model based on preset filtering semantic rules to obtain a corresponding three-dimensional point cloud map; wherein the preset filtering semantic rules include at least one of the following: attribute rules, material rules and coordinate rules of building components; the building components include at least one of the following: chairs, tables, walls, windows, doors, and lights in the indoor environment; the building information model is a three-dimensional graphic of the indoor environment drawn by BIM technology; the attribute rules include relative movement and stillness between the building components, and the coordinate rules include starting coordinate rules, orientation rules, height rules, length rules and thickness rules of each building component; S104, generating a corresponding two-dimensional grid map according to the three-dimensional point cloud map, and performing expansion processing on the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map; S106, performing superposition and fusion processing on the two-dimensional grid map and the two-dimensional expanded grid map to obtain a two-dimensional target map of the indoor environment; Step S102 includes: In the process of screening the building information model, the building information model is converted into the IFC format, and the building information model converted into the IFC format is screened based on the preset screening semantic rules to obtain the parameters of each building component, analyze the parameters, and lay out on the newly created blank map based on the parameters in the BIM software to draw a three-dimensional map; In Matlab software, the point cloud of the three-dimensional map is estimated, exported in the form of PCD file, and PTM processing is performed to obtain the three-dimensional point cloud map; Step S104 includes: In the three-dimensional point cloud map, laser points within the first height interval are removed, and the three-dimensional point cloud map including the laser points within the second height interval is input into the through-filter model, so that the through-filter model outputs a first three-dimensional point cloud map; wherein the preset height is the height that the building component needs to be limited; Calculate the neighborhood radius between any two adjacent laser points in the first three-dimensional point cloud map; determine whether the neighborhood radius is greater than a preset value, if so, the radius filtering model outputs a target three-dimensional point cloud map that does not include the laser points corresponding to the neighborhood radius, if not, the radius filtering model outputs a target three-dimensional point cloud map that includes the laser points corresponding to the neighborhood radius; wherein the neighborhood radius is the Euclidean distance between two adjacent laser points; Project the target three-dimensional point cloud map to obtain a two-dimensional grid map; The resolution of the two-dimensional grid map is obtained, and according to the resolution, based on the Cell Distance function, the two-dimensional grid map with meters as the length unit is converted into a two-dimensional grid map with centimeters as the length unit; the expansion coefficient of the grid of the two-dimensional grid map is set; each grid in the two-dimensional grid map is traversed in breadth, and the pixel of each grid is compared with the set expansion coefficient. If the pixel of the grid is greater than the expansion coefficient, a plurality of the grids constitute a two-dimensional expanded grid map; if the pixel of the grid is less than or equal to the expansion coefficient, the grid still constitutes a two-dimensional grid map.

2. An indoor environment map drawing device, It is characterized in that The method as claimed in claim 1, wherein the device comprises: An acquisition module is used to acquire a building information model of the indoor environment, and filter the building information model based on a preset filtering semantic rule to obtain a corresponding three-dimensional point cloud map; wherein the preset filtering semantic rule includes at least one of the following: an attribute rule, a material rule, and a coordinate rule of a building component; the building component includes at least one of the following: a chair, a table, a wall, a window, a door, and a lamp of the indoor environment; An expansion processing module, used to generate a corresponding two-dimensional grid map according to the three-dimensional point cloud map, and to expand the two-dimensional grid map to obtain a corresponding two-dimensional expanded grid map; The fusion processing module is used to fuse the two-dimensional grid map and the two-dimensional expanded grid map to obtain a two-dimensional target map of the indoor environment.

3. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to claim 1 are implemented.

4. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to claim 1 are executed.