Scene map construction method and device based on grid distance value and intelligent mobile equipment

Through a method based on raster distance values, smart mobile devices use environmental point clouds to update raster maps, solving the problem of autonomous positioning and navigation in unfamiliar scenes, building accurate scene maps, and improving the operation of devices in unknown environments. ability.

CN118533166APending Publication Date: 2024-08-23HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410601377.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-14
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

It is difficult for smart mobile devices to autonomously locate and navigate in unfamiliar scenes, and there is a lack of effective scene map construction methods.

Method used

A scene map construction method based on raster distance values ​​is adopted to gradually build a scene map by obtaining environmental point clouds, updating the distance values ​​in the raster map, and using detection sensors such as lidar and image acquisition equipment to generate environmental points in the local coordinate system. Cloud, and determine the distance value and weight of the target grid in the global coordinate system.

Benefits of technology

It realizes the construction of accurate scene maps for smart mobile devices in unfamiliar scenes, provides a foundation for subsequent positioning, navigation and tasks, and improves the device's operational capabilities in unknown environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118533166A
    Figure CN118533166A
Patent Text Reader

Abstract

The embodiment of the invention provides a scene map construction method and device based on a grid distance value and intelligent mobile equipment, and relates to the technical field of artificial intelligence. The method comprises the following steps: acquiring each frame of environment point cloud; according to the generation sequence of each frame of environment point cloud, executing a distance value updating process for each frame of environment point cloud in sequence; comprising the steps of determining a current distance value of each target grid of a preset grid map based on the frame of environment point cloud; for each target grid, if the target grid records a distance value, updating the distance value recorded by the target grid based on the determined current distance value of the target grid; otherwise, recording the determined current distance value of the target grid into the target grid; and in response to the situation that the intelligent mobile equipment passes through all areas in the scene, determining the current grid map recorded with the distance value as a scene map of the scene. By applying the scheme provided by the embodiment of the invention, the scene map of the scene where the intelligent mobile equipment is located can be constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device and intelligent mobile device for constructing a scene map based on a grid distance value. Background Art

[0002] Smart mobile devices are a comprehensive system that integrates multiple functions such as environmental perception, dynamic decision-making and planning, behavior control and execution. With the continuous evolution of smart mobile devices, their application in various industries is becoming more and more common, for example, smart home mobile devices such as sweeping robots, industrial smart mobile devices such as inspection robots, etc. For smart mobile devices, it is very important to use the sensors they carry to perceive the environment in the scene where they are located and complete autonomous positioning. In order to achieve autonomous positioning of smart mobile devices, it is necessary to rely on the scene map of the scene where the smart mobile devices are located.

[0003] Based on this, it is particularly important to provide a scene map generation method to generate a scene map of the scene where the smart mobile device is located. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method, device and smart mobile device for constructing a scene map based on grid distance values, so as to construct a scene map of the scene where the smart mobile device is located. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for constructing a scene map based on a grid distance value, the method comprising:

[0006] Obtaining each frame of environmental point cloud generated by performing environmental detection on the scene currently located by the smart mobile device and located in a preset local coordinate system;

[0007] According to the generation order of each frame environment point cloud, the distance value update process is performed for each frame environment point cloud in turn; wherein the distance value update process includes: based on the frame environment point cloud, determining the current distance value of each target grid of the preset grid map; for each target grid, if the target grid records a distance value, then based on the determined current distance value of the target grid, the distance value recorded by the target grid is updated; otherwise, the determined current distance value of the target grid is recorded in the target grid; the target grids include: the matching grids to which the points corresponding to the frame environment point cloud belong in the grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent condition; the points corresponding to the frame environment point cloud are: the points of the target global point cloud corresponding to the frame environment point cloud in the preset global coordinate system;

[0008] In response to the intelligent mobile device passing through all areas within the scene, the current grid map recording the distance values ​​is determined as the scene map of the scene.

[0009] Optionally, in a specific implementation, determining the current distance value of each target grid of the grid map based on the frame environment point cloud includes:

[0010] Based on the target global pose corresponding to the frame environment point cloud in the global coordinate system, the frame environment point cloud is converted into the target global point cloud in the global coordinate system, and the normal vector of each point of the target global point cloud is determined; wherein, if the frame environment point cloud is the first frame environment point cloud, the target global pose is: the set pose in the global coordinate system; if the frame environment point cloud is an environment point cloud other than the first frame environment point cloud, the target global pose is determined based on the pose of the smart mobile device in the global coordinate system when the environment point cloud is generated;

[0011] Determine the grids to which each point of the target global point cloud belongs in the grid map as each matching grid, and set the current distance value of each matching grid to a specified value;

[0012] For each matching grid, a grid whose distance from the matching grid along the normal vector direction of the point corresponding to the matching grid does not exceed a preset distance is determined as an adjacent grid, and the distance value between the adjacent grid and the matching grid closest to it is determined as the current distance value of the adjacent grid.

[0013] Optionally, in a specific implementation, for each frame of environment point cloud except the first frame of environment point cloud, a method for determining the target global pose corresponding to the frame of environment point cloud in the global coordinate system includes:

[0014] Acquire the position and posture of the intelligent mobile device in the global coordinate system when generating the frame environment point cloud as the initial position and posture corresponding to the frame environment point cloud;

[0015] Determine each candidate angle based on an initial angle included in the initial posture and a preset angle search window, and determine each candidate position based on an initial position included in the initial posture and a preset position search window;

[0016] Determine each candidate pose based on each candidate angle and each candidate position; wherein each candidate pose includes: a candidate angle and a candidate position, and different candidate poses include different candidate angles and / or candidate positions;

[0017] For each candidate pose, based on the candidate pose, the frame environment point cloud is converted into an initial global point cloud in the global coordinate system, and based on the initial global point cloud and the distance values ​​of each grid record of the grid map, the score of the candidate pose is calculated;

[0018] The candidate pose whose score meets the preset requirement is determined as the target global pose corresponding to the frame environment point cloud in the global coordinate system.

[0019] Optionally, in a specific implementation, the calculating the score of the candidate pose based on the initial global point cloud and the distance values ​​of each grid record of the grid map includes:

[0020] Determine the grids to which each point of the initial global point cloud belongs in the grid map as the designated grid, and determine the maximum value of the distance values ​​recorded in each grid of the grid map;

[0021] For each designated grid, if the designated grid records a distance value, the difference between the distance value recorded in the designated grid and the maximum value is calculated; otherwise, the difference between the designated value and the maximum value is calculated;

[0022] The sum of all the differences is calculated as the score of the candidate pose.

[0023] Optionally, in a specific implementation, for each frame of the environment point cloud except the first frame of the environment point cloud, updating the distance value recorded by the target grid based on the determined current distance value of the target grid includes:

[0024] Calculating the uncertainty of the target global pose based on the scores of each candidate pose except the target global pose and the target global pose;

[0025] Based on the normal vector of the target grid and the uncertainty, the current weight of the target grid is calculated; wherein, if the target grid is the matching grid, the normal vector of the target grid is: the normal vector of the point belonging to the target grid in the target global point cloud corresponding to the frame environment point cloud in the preset global coordinate system; if the target grid is the adjacent grid, the normal vector of the target grid is: the normal vector of the matching grid closest to the target grid;

[0026] Calculate a new distance value of the target grid using the current distance value of the target grid, the current weight of the target grid, the distance value recorded by the target grid, and the weight recorded by the target grid, and record the new distance value in the target grid;

[0027] The method further comprises:

[0028] For the first frame environment point cloud, in response to obtaining a target global point cloud corresponding to the frame environment point cloud in a preset global coordinate system, determining the weight of each target grid, and recording the weight of each target grid in the target grid;

[0029] For each frame of the environment point cloud except the first frame of the environment point cloud, in response to recording the new distance value into the target grid, the weight recorded in the target grid is updated using the current weight of the target grid.

[0030] Optionally, in a specific implementation, the calculating the uncertainty of the target global pose based on the scores of each candidate pose except the target global pose and the target global pose includes:

[0031] The uncertainty of the target global pose is calculated using a first formula; wherein the first formula includes:

[0032]

[0033]

[0034] Where Pi is the i-th candidate pose among all candidate poses except the target global pose, P best is the target global pose, n is the number of candidate poses other than the target global pose, cov x is the uncertainty of the target global pose in the X direction, score Pi is the score of the i-th candidate pose, Pi x is the X-direction component of the i-th candidate pose, is the X-direction component of the target global pose, cov y is the uncertainty of the target global pose in the Y direction, Pi y is the Y direction component of the i-th candidate pose, is the Y component of the target global pose.

[0035] Optionally, in a specific implementation manner, the calculating the current weight of the target grid based on the normal vector of the target grid and the uncertainty includes:

[0036] The current weight of the target grid is calculated using the second formula; wherein the second formula includes:

[0037]

[0038] Among them, n j is the normal vector of the jth target grid, w(p) j is the current weight of the j-th target grid, njx is the X-direction component of the normal vector of the j-th target grid, n jy is the Y-direction component of the normal vector of the j-th target grid.

[0039] Optionally, in a specific implementation, the calculating a new distance value of the target grid by using the current distance value of the target grid, the current weight of the target grid, the distance value recorded by the target grid, and the weight recorded by the target grid includes:

[0040] The new distance value of the target grid is calculated using the third formula; wherein the third formula includes:

[0041]

[0042] in, is the new distance value of the jth target grid, W(p) j is the weight of the j-th target grid record, DF(p) j is the distance value recorded by the jth target grid, df(p) j is the current distance value of the j-th target grid.

[0043] In a second aspect, an embodiment of the present application provides a smart mobile device, including: a detection sensor and a processor;

[0044] The detection sensor is used to detect the environment of the scene and generate each frame of the environment point cloud in a preset local coordinate system when the smart mobile device moves in the scene.

[0045] The processor is used to execute any of the scene map construction methods based on grid distance values ​​provided in the first aspect based on the environment point clouds of each frame.

[0046] In a third aspect, an embodiment of the present application provides a scene map construction device based on a grid distance value, the device comprising:

[0047] A point cloud acquisition module is used to acquire each frame of environmental point cloud generated by performing environmental detection on the scene where the smart mobile device is currently located and located in a preset local coordinate system;

[0048] The distance value updating module is used to execute the distance value updating process for each frame of the environment point cloud in turn according to the generation order of each frame of the environment point cloud; wherein the distance value updating process includes: based on the frame of the environment point cloud, determining the current distance value of each target grid of the preset grid map; for each target grid, if the target grid records a distance value, then based on the determined current distance value of the target grid, updating the distance value recorded in the target grid; otherwise, recording the determined current distance value of the target grid into the target grid; the target grids include: the matching grids to which the points corresponding to the frame of the environment point cloud belong in the grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent condition; the points corresponding to the frame of the environment point cloud are: the points of the target global point cloud corresponding to the frame of the environment point cloud in the preset global coordinate system;

[0049] The map determination module is used to determine the current grid map recording the distance value as the scene map of the scene in response to the intelligent mobile device passing through all areas within the scene.

[0050] In a fourth aspect, an embodiment of the present application provides an electronic device, including:

[0051] Memory, used to store computer programs;

[0052] The processor is used to implement any of the scene map construction methods based on grid distance values ​​provided in the first aspect when executing the program stored in the memory.

[0053] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any of the scene map construction methods based on raster distance values ​​provided in the first aspect is implemented.

[0054] In a sixth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the scene map construction methods based on grid distance values ​​provided in the first aspect above.

[0055] Beneficial effects of the embodiments of the present application:

[0056] As can be seen from the above, by applying the solution provided by the embodiment of the present application, in order to construct a scene map of an unfamiliar scene entered by a smart mobile device, the smart mobile device is usually equipped with various detection sensors, such as laser radar, image acquisition equipment, etc. After the smart mobile device enters the scene, the smart mobile device can move in the scene. During the movement, the scene can be detected based on the detection sensor carried by the smart mobile device, and each frame of environmental point cloud located in a preset local coordinate system can be generated, and the scene map of the scene can be constructed using the above-mentioned frame of environmental point cloud. In this way, when constructing the scene map of the scene currently located by the smart mobile device, the frame of environmental point cloud generated by the environmental detection of the scene and located in the above-mentioned local coordinate system can be obtained first during the movement of the smart mobile device in the scene. Then, the distance value update process can be performed for each frame of environmental point cloud in sequence according to the generation order of each frame of environmental point cloud, that is, according to the generation order of each frame of environmental point cloud, each frame of environmental point cloud is used in sequence to update the distance value of each grid record of the preset grid map. Among them, for each frame of environmental point cloud, the above distance value update process includes: first, each point of the target global point cloud corresponding to the frame of environmental point cloud in the preset global coordinate system is used as each point corresponding to the frame of environmental point cloud. After that, the matching grids to which each point corresponding to the frame of environmental point cloud belongs in the above grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent condition are all determined as target grids. Then, based on the frame of environmental point cloud, the current distance value of each target grid is determined. Then, for each target grid, if the target grid records a distance value, the distance value recorded by the target grid is updated based on the determined current distance value of the target grid; if the target grid does not record a distance value, the determined current distance value of the target grid is recorded in the target grid. When the above distance value update is performed for each frame of environmental point cloud, it can be considered that the update of the above grid map by the frame of environmental point cloud is completed. Finally, in response to the intelligent mobile device moving through all areas within the above scene, the current grid map recording the distance value is determined as the scene map of the scene.

[0057] Based on this, the solution provided by the embodiment of the present application is applied, and the environment point cloud of each frame in the above-mentioned local coordinate system is generated by the intelligent mobile device for environmental detection of the current scene, so as to gradually update the distance value recorded by each grid in the preset grid map, and complete the construction of the scene map of the scene. In addition, the scene map can also provide a basis for the subsequent intelligent mobile device to locate, navigate and perform various tasks in the scene. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0059] Figure 1 A schematic diagram of a flow chart of a scene map construction method based on grid distance values ​​provided in an embodiment of the present application;

[0060] Figure 2 A flowchart of a specific implementation of step 1021 is shown;

[0061] Figure 3 A schematic diagram of a grid map provided in an embodiment of the present application;

[0062] Figure 4 A flowchart of a specific implementation method of determining a target global pose corresponding to each frame of the environment point cloud in the global coordinate system, except for the first frame of the environment point cloud, provided in an embodiment of the present application;

[0063] Figure 5 A schematic diagram of the relationship between an initial angle and an angle search window provided in an embodiment of the present application;

[0064] Figure 6 A schematic diagram of the relationship between an initial position and a position search window provided in an embodiment of the present application;

[0065] Figure 7 A schematic diagram of a geometric relationship satisfied by an angle search step, a grid map resolution, and a specified maximum distance provided in an embodiment of the present application;

[0066] Figure 8 A schematic diagram of the X-direction component and the Y-direction component of the normal vector of a target grid provided in an embodiment of the present application;

[0067] Fig. 9 A schematic diagram of edge features of a ceiling area of ​​an image extracted according to an embodiment of the present application;

[0068] Fig.10 A schematic diagram of the capture angle of view of an image capture device carried by a smart mobile device provided in an embodiment of the present application;

[0069] Fig.11 A schematic diagram of the structure of a smart mobile device provided in an embodiment of the present application;

[0070] Fig.12A schematic diagram of the structure of a scene map construction device based on grid distance values ​​provided in an embodiment of the present application;

[0071] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0073] At present, with the continuous development of artificial intelligence technology, how to construct scene maps of unfamiliar scenes entered by smart mobile devices plays a vital role in the normal application of intelligent mobile robots.

[0074] In order to solve the above technical problems, an embodiment of the present application provides a scene map construction method based on grid distance values.

[0075] Among them, the method can be applicable to various application scenarios of constructing scene maps for scenes where smart mobile devices are located or unfamiliar scenes they enter. For example, when a sweeping robot is used for the first time, a floor map of the house that the sweeping robot needs to clean is constructed. For example, after the factory building is replanned and laid out, the floor map of the factory building used by the inspection robot working in the factory building is reconstructed.

[0076] Generally, a smart mobile device can use the detection sensor it carries to detect the environment of the scene in which it is located to build a scene map of the scene, and different smart mobile devices can be equipped with different detection sensors according to the different working scenes of the smart mobile device, and of course, they can also be equipped with the same detection sensor. For example, a smart mobile device is equipped with a laser radar, which realizes environmental detection of the scene in which it is located by transmitting radar signals and receiving radar echo signals; for another example, a smart mobile device is equipped with an image acquisition device including various cameras, and the image acquisition device collects scene images of the scene in which it is located to realize environmental detection of the scene in which it is located; wherein, when the smart mobile device is equipped with an image acquisition device, the image acquisition device it carries can be a monocular camera, a depth camera, and other types of cameras. Since the monocular camera has a low cost, in order to use the solution provided by the embodiment of the present application in a low-cost smart mobile device, the monocular camera can be mounted on the smart mobile device as a detection sensor, thereby reducing the production cost of the smart mobile device, so as to be more conducive to the application of the solution provided by the embodiment of the present application in a low-cost smart mobile device.

[0077] Moreover, according to the data processing capability of the smart mobile device, the data processing capability of the detection sensor carried by the smart mobile device, and other parameters of the smart mobile device, different execution entities can be used to execute the scheme provided by the embodiment of the present application. Among them, the execution entity of the method can be the smart mobile device itself, and the smart mobile device can be equipped with a data processing module with data processing capability while carrying a detection sensor. After generating each frame of environmental point cloud using the detection sensor, the data processing module can use the above-mentioned each frame of environmental point cloud to execute the method; the execution entity of the method can also be a detection sensor carried by the smart mobile device, and the detection sensor is provided with a data processing module with data processing function, and the data processing module can obtain each frame of environmental point cloud generated by the detection sensor, and use the above-mentioned each frame of environmental point cloud to execute the method; the execution entity of the method can also be other electronic devices other than the smart mobile device, for example, a management platform of the smart mobile device, etc., the electronic device can communicate with the smart mobile device, and is provided with a data processing module with data processing capability, so that the electronic device can obtain each frame of environmental point cloud generated by the detection sensor from the smart mobile device, and use the above-mentioned each frame of environmental point cloud to execute the method. When the execution subject of the method is an electronic device, the electronic device may be an independent electronic device or a device cluster composed of multiple electronic devices, hereinafter referred to as the electronic device.

[0078] Based on this, the embodiments of the present application do not specifically limit the application scenarios and execution entities of the method, nor do they specifically limit the types of detection sensors carried by the smart mobile device.

[0079] A method for constructing a scene map based on a grid distance value provided in an embodiment of the present application may include the following steps:

[0080] Obtaining each frame of environmental point cloud generated by performing environmental detection on the scene currently located by the smart mobile device and located in a preset local coordinate system;

[0081] According to the generation order of each frame environment point cloud, the distance value update process is performed for each frame environment point cloud in turn; wherein the distance value update process includes: based on the frame environment point cloud, determining the current distance value of each target grid of the preset grid map; for each target grid, if the target grid records a distance value, then based on the determined current distance value of the target grid, the distance value recorded by the target grid is updated; otherwise, the determined current distance value of the target grid is recorded in the target grid; the target grids include: the matching grids to which the points corresponding to the frame environment point cloud belong in the grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent condition; the points corresponding to the frame environment point cloud are: the points of the target global point cloud corresponding to the frame environment point cloud in the preset global coordinate system;

[0082] In response to the intelligent mobile device passing through all areas within the scene, the current grid map recording the distance values ​​is determined as the scene map of the scene.

[0083] As can be seen from the above, by applying the solution provided by the embodiment of the present application, in order to construct a scene map of an unfamiliar scene entered by a smart mobile device, the smart mobile device is usually equipped with various detection sensors, such as laser radar, image acquisition equipment, etc. After the smart mobile device enters the scene, the smart mobile device can move in the scene. During the movement, the scene can be detected based on the detection sensor carried by the smart mobile device, and each frame of environmental point cloud located in a preset local coordinate system can be generated, and the scene map of the scene can be constructed using the above-mentioned frame of environmental point cloud. In this way, when constructing the scene map of the scene currently located by the smart mobile device, the frame of environmental point cloud generated by the environmental detection of the scene and located in the above-mentioned local coordinate system can be obtained first during the movement of the smart mobile device in the scene. Then, the distance value update process can be performed for each frame of environmental point cloud in sequence according to the generation order of each frame of environmental point cloud, that is, according to the generation order of each frame of environmental point cloud, each frame of environmental point cloud is used in sequence to update the distance value of each grid record of the preset grid map. Among them, for each frame of environmental point cloud, the above distance value update process includes: first, each point of the target global point cloud corresponding to the frame of environmental point cloud in the preset global coordinate system is used as each point corresponding to the frame of environmental point cloud. After that, the matching grids to which each point corresponding to the frame of environmental point cloud belongs in the above grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent condition are all determined as target grids. Then, based on the frame of environmental point cloud, the current distance value of each target grid is determined. Then, for each target grid, if the target grid records a distance value, the distance value recorded by the target grid is updated based on the determined current distance value of the target grid; if the target grid does not record a distance value, the determined current distance value of the target grid is recorded in the target grid. When the above distance value update is performed for each frame of environmental point cloud, it can be considered that the update of the above grid map by the frame of environmental point cloud is completed. Finally, in response to the intelligent mobile device moving through all areas within the above scene, the current grid map recording the distance value is determined as the scene map of the scene.

[0084] Based on this, the solution provided by the embodiment of the present application is applied, and the environment point cloud of each frame in the above-mentioned local coordinate system is generated by the intelligent mobile device for environmental detection of the current scene, so as to gradually update the distance value recorded by each grid in the preset grid map, and complete the construction of the scene map of the scene. In addition, the scene map can also provide a basis for the subsequent intelligent mobile device to locate, navigate and perform various tasks in the scene.

[0085] Below, in conjunction with the accompanying drawings, a scene map construction method based on grid distance values ​​provided in an embodiment of the present application is specifically described.

[0086] Figure 1 A schematic diagram of a flow chart of a scene map construction method based on grid distance values ​​provided in an embodiment of the present application, such as Figure 1 As shown, the method may include the following steps S101-S103.

[0087] S101: Obtaining environmental point clouds of each frame generated by performing environmental detection on a scene currently located by a smart mobile device and located in a preset local coordinate system.

[0088] The construction of the scene map of the scene where the smart mobile device is located depends on the detection sensor carried by the smart mobile device to detect the environment of the scene where it is located. Therefore, in order to implement the solution provided by the embodiment of the present application, it is necessary to first place the smart mobile device in the scene where the scene map is to be constructed. For example, the sweeping robot is moved to the house that needs to be cleaned, and the inspection robot is controlled to move to the factory that needs to be inspected. In this regard, the embodiment of the present application does not specifically limit the way in which the smart mobile device is placed in the scene where the scene map is to be constructed. After the smart mobile device enters the above-mentioned scene, it can start to move, and the detection sensor carried by it can perform environmental detection on the above-mentioned scene during the movement of the smart mobile device to generate an environmental point cloud, thereby using the above-mentioned environmental point cloud to realize the construction of the scene map of the above-mentioned scene.

[0089] That is to say, the above-mentioned environmental point cloud is: a point cloud generated by detecting the environment of the scene where the smart mobile device is currently located through the detection sensor carried by the smart mobile device, and the above-mentioned environmental point cloud is located in a preset local coordinate system.

[0090] For example, if the detection sensor is a laser radar, the preset local coordinate system may be the radar coordinate system of the laser radar. For another example, if the detection sensor is an image acquisition device, the preset local coordinate system may be the camera coordinate system of the image acquisition device. In other words, different detection sensors may correspond to different local coordinate systems. Therefore, different local coordinate systems may be selected according to the type of detection sensor carried by the smart mobile device.

[0091] Furthermore, the environmental detection of the scene by the detection sensor and the generation of the environmental point cloud are in one-to-one correspondence, that is, each time the detection sensor completes an environmental detection of the scene, it can generate a frame of environmental point cloud based on the detection result of the environmental detection.

[0092] For example, if the detection sensor is an image acquisition device, then each time the image acquisition device acquires a frame of scene image of the scene, it completes an environmental detection of the scene, and then, based on the frame of scene image acquired by the environmental detection, a frame of environmental point cloud can be generated, and the generated environmental point cloud is located in the camera coordinate system of the image acquisition device, that is, the preset local coordinate system is the camera coordinate system of the image acquisition device. In other words, each frame of environmental point cloud is generated based on a frame of scene image of the scene acquired by the image acquisition device, and is a point cloud located in the camera coordinate system of the image acquisition device.

[0093] Compared with the high-end detection sensors such as TOF (Time of flight) cameras, laser radars, and depth cameras carried by smart mobile devices in the relevant technologies of map construction; and considering that the embodiment of the present application ultimately achieves recording the distance value of each grid in the scene map, and using each frame image collected by the monocular camera, it is possible to record the distance value in each grid of the above-mentioned scene map, that is, the solution provided by the embodiment of the present application can be implemented using a monocular camera, and the accuracy of the obtained scene map will not be reduced. Therefore, in the embodiment of the present application, the smart mobile device can be equipped with a monocular camera as a detection sensor, etc. In this way, since the performance requirements for the detection sensor can be significantly reduced, the cost of the smart mobile device can be reduced, which is more conducive to the application of the solution provided by the embodiment of the present application in low-cost smart mobile devices.

[0094] For another example, if the detection sensor is a laser radar, each time the laser radar completes a radar signal emission and reception of the echo signal of the emitted radar signal, it completes an environmental detection of the above-mentioned scene, and at the end of this environmental detection, it can generate and output a frame of environmental contour point cloud of the above-mentioned scene according to the detection situation of this environmental detection, and this frame of environmental contour point cloud is located in the radar coordinate system of the laser radar, that is, each frame of environmental contour point cloud is each frame of environmental point cloud. At this time, the preset local coordinate system is the radar coordinate of the laser radar.

[0095] Among them, each time a frame of environmental point cloud is generated, the frame of environmental point cloud can be immediately obtained, and the distance value update process can be immediately executed for the frame of environmental point cloud. Alternatively, when the smart mobile device passes through all areas within the scene and completes the environmental exploration of the scene, all environmental point clouds generated in the above exploration process can be obtained at one time, and the distance value update process can be executed for each frame of environmental point cloud in the order in which each frame of environmental point cloud is generated.

[0096] S102: According to the generation order of each frame of environmental point cloud, a distance value update process is executed for each frame of environmental point cloud in turn; wherein the distance value update process includes: based on the frame of environmental point cloud, determining the current distance value of each target grid of the preset grid map; for each target grid, if the target grid records a distance value, then based on the determined current distance value of the target grid, updating the distance value recorded in the target grid; otherwise, recording the determined current distance value of the target grid in the target grid.

[0097] Among them, each target grid includes: the matching grids to which each point corresponding to the frame environment point cloud belongs in the grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent conditions; each point corresponding to the frame environment point cloud is: each point of the target global point cloud corresponding to the frame environment point cloud in the preset global coordinate system.

[0098] After obtaining the above-mentioned environmental point clouds of each frame, the distance value updating process can be performed for each frame of environmental point cloud in turn according to the generation order of the environmental point clouds of each frame.

[0099] That is to say, the distance value update process is first executed for the first frame of the environment point cloud with the earliest generation time; after the execution is completed, the distance value update process is executed for the second frame of the environment point cloud; after the execution is completed, the distance value update process is executed for the third frame of the environment point cloud. The distance value update process for each frame of the environment point cloud is completed in a cycle. That is, according to the generation order of each frame of the environment point cloud, starting from the above-mentioned first frame of the environment point cloud, after the distance value update process is completed for a frame of the environment point cloud, the distance value update process is executed for the next frame of the environment point cloud of the frame. Since when the distance value update process is executed for each frame of the environment point cloud, it can be considered that the distance value update of the preset grid map is completed using the frame of the environment point cloud, therefore, according to the generation order of each frame of the environment point cloud, each frame of the environment point cloud is used in turn to complete the step-by-step update of the above-mentioned grid map.

[0100] Among them, for each frame of the environment point cloud, the above distance value updating process may include the following steps 1021-1022.

[0101] Step 1021: Based on the frame environment point cloud, determine the current distance value of each target grid of the preset grid map.

[0102] Step 1022: For each target grid, if the target grid records a distance value, based on the determined current distance value of the target grid, update the distance value recorded in the target grid; otherwise, record the determined current distance value of the target grid in the target grid.

[0103] In order to construct a scene map of the scene currently located by the smart mobile device, a grid map can be pre-set, and the map coordinate system of the grid map is the same coordinate system as the global coordinate system. For example, when the global coordinate system is the world coordinate system, the map coordinate system of the grid map is also the world coordinate system, then the grid map can also be called a global grid map.

[0104] In this way, for each frame of the environment point cloud, the points of the target global point cloud corresponding to the frame of the environment point cloud in the preset global coordinate system can first be used as the points corresponding to the frame of the environment point cloud. Since the map coordinate system of the above-mentioned grid map is the same coordinate system as the above-mentioned global coordinate system, for each point corresponding to the frame of the environment point cloud, the position of the point in the above-mentioned grid map can be determined according to the coordinates of the point in the above-mentioned global coordinate system, and thus, according to the above-mentioned position, the grid to which the point belongs in the above-mentioned grid map is determined as the matching grid. In addition, for each matching grid, the grid whose positional relationship with the matching grid meets the adjacent conditions can be screened in the above-mentioned grid map as an adjacent grid. Furthermore, the above-mentioned matching grid and the above-mentioned adjacent grid can both be used as target grids.

[0105] For each frame of the environmental point cloud, the current distance value of each target grid in the above grid map can be determined. For each target grid, if the target grid has already recorded a distance value, the distance value recorded in the target grid can be updated based on the determined current distance value of the target grid. On the contrary, if the target grid has not recorded a distance value, the determined current distance value of the target grid can be recorded in the target grid. After the above execution process is completed for all target grids, it can be considered that the distance value update process for the frame of the environmental point cloud is completed.

[0106] Among them, for the above-mentioned first-frame environmental point cloud, when determining the current distance value of each target grid, since no distance value is recorded in each grid of the above-mentioned grid map, for the above-mentioned first-frame environmental point cloud, the current distance value of each target grid can be directly recorded in the target grid.

[0107] For each frame of environmental point cloud except the first frame of environmental point cloud, there are already grids with distance values ​​recorded in the above-mentioned grid map. Therefore, for each frame of environmental point cloud except the first frame of environmental point cloud, when determining the current distance value of each target grid, for each target grid, you can first check whether the distance value has been recorded in the target grid. If the distance value has been recorded in the target grid, then based on the determined current distance value of the target grid, update the distance value recorded in the target grid; otherwise, record the determined current distance value of the target grid in the target grid.

[0108] For the sake of clarity, the specific implementation method of the above distance value updating process will be explained with examples later.

[0109] S103: In response to the intelligent mobile device passing through all areas within the scene, the current grid map recording the distance values ​​is determined as the scene map of the scene.

[0110] In the solution provided in the embodiment of the present application, in order to avoid missing areas in the above scene in the constructed scene map and reduce the accuracy and comprehensiveness of the constructed scene map, it is necessary to record the areas that the smart mobile device has passed through during the movement of the smart mobile device in the above scene, so as to judge whether the smart mobile device has passed through all areas in the above scene based on the recorded area information. In other words, in the solution provided in the embodiment of the present application, the smart mobile device can have the function of checking whether there are areas in the scene that have not been passed through.

[0111] For example, each time the smart mobile device moves to a position in the above scene, the scene information of the area where the position is located can be recorded, for example, the scene image of the area where the position is located; thus, each time the smart mobile device moves to the next position, the scene information of the area where the next position is located can be compared with the recorded scene information to determine whether the area where the next position is located is an area that has been passed. If yes, leave the current position, continue to move to the next position, and loop the above comparison process; if not, record the scene information of the area where the next position is located, continue to move, and loop the above comparison process. Loop in sequence until the comparison result obtained by the smart mobile device is yes regardless of the direction it moves in, then it can be determined that the smart mobile device has passed through all areas in the above scene. At this time, the smart mobile device can be controlled to stop moving, and the detection sensor where the smart mobile device is located can be controlled to stop detecting the environment of the above scene, and then stop generating the environmental point cloud. In this way, in response to the smart mobile device passing through all areas in the scene, the grid map currently recording the distance value can be determined as the scene map of the above scene.

[0112] Based on this, the solution provided by the embodiment of the present application is applied, and the environment point cloud of each frame in the above-mentioned local coordinate system is generated by the intelligent mobile device for environmental detection of the current scene, so as to gradually update the distance value recorded by each grid in the preset grid map, and complete the construction of the scene map of the scene. In addition, the scene map can also provide a basis for the subsequent intelligent mobile device to locate, navigate and perform various tasks in the scene.

[0113] The following is an example of a specific implementation of the distance value update process performed on each frame of the environment point cloud.

[0114] Optionally, in a specific implementation, such as Figure 2 As shown, the above step 1021, based on the frame environment point cloud, determines the current distance value of each target grid of the preset grid map, and can include the following steps S201-S203.

[0115] S201: based on the target global pose corresponding to the frame environment point cloud in the global coordinate system, convert the frame environment point cloud into a target global point cloud in the global coordinate system, and determine the normal vector of each point of the target global point cloud;

[0116] Among them, if the frame environment point cloud is the first frame environment point cloud, the target global pose is: the set pose in the global coordinate system; if the frame environment point cloud is an environment point cloud other than the first frame environment point cloud, the target global pose is determined based on the pose of the smart mobile device in the global coordinate system when the environment point cloud is generated.

[0117] In this specific implementation, for each frame of the environment point cloud, the target global pose corresponding to the frame environment point cloud in the above global coordinate system can be first determined, and based on the target global pose, the frame environment point cloud is converted into a target global point cloud in the global coordinate system, and the normal vector of each point of the target global point cloud is determined. The normal vector of each point of the above target global point cloud can also become the gradient direction of each point of the target global point cloud.

[0118] Generally, a pose may include: position and attitude, and the position is the coordinate of a position point in the coordinate system to which the pose belongs, and the attitude is the angle between the specified direction of the object with the pose and the specified coordinate axis of the coordinate system to which the pose belongs, that is, the attitude can be represented by an angle. In this specific implementation, the target global pose corresponding to each frame of the environmental point cloud can be understood as the pose of the smart mobile device in the global coordinate system when the frame of the environmental point cloud is generated.

[0119] The global coordinate system is a three-dimensional coordinate system, which includes two horizontal coordinate axes located in the same horizontal plane and perpendicular to each other, and a vertical coordinate axis perpendicular to the horizontal plane and passing through the intersection of the two horizontal coordinate axes, and the intersection of the two horizontal coordinate axes and the vertical coordinate axis is the origin of the global coordinate system. In addition, considering that smart devices usually move on the ground within the scene where they are located, in this specific implementation, it can be considered that the height coordinate of the smart mobile device in the vertical direction is 0, and the horizontal plane of the global coordinate system can be considered to be the same plane as the ground.

[0120] Based on this, in this specific implementation, since the height coordinate of the intelligent mobile device in the vertical direction can be considered to be 0, the position included in the target global pose corresponding to each frame environment point cloud can be represented by the two-dimensional coordinates of a position point in the horizontal plane of the global coordinate system, and the two-dimensional coordinates are the coordinates of the position point on the two horizontal coordinate axes of the above global coordinate system, while the coordinates on the vertical coordinate axis of the global coordinate system are omitted. In addition, the posture included in the above target global pose is the angle between the orientation of the intelligent mobile device and the specified coordinate axis in the horizontal plane of the above global coordinate system when generating the frame environment point cloud.

[0121] For example, the above-mentioned global coordinate system is a world coordinate system, then the smart mobile device is located in the XOY plane (horizontal plane) of the world coordinate system, and its coordinate in the Z axis (vertical direction) is 0. Therefore, the position included in the above-mentioned target global posture is a two-dimensional coordinate expressed in the form of (x-axis coordinate, y-axis coordinate), and the smart mobile device is located at the position point with the two-dimensional coordinate in the XOY plane, and the posture included in the above-mentioned target global posture is the angle between the orientation of the smart mobile device and the X-axis or Y-axis of the world coordinate system.

[0122] For the first-frame environment point cloud, a pose in a global coordinate system can be directly preset for the first-frame environment point cloud as the target global pose corresponding to the first-frame environment point cloud in the global coordinate system. The directly preset pose can be called a set pose.

[0123] Exemplarily, for the first-frame environmental point cloud, the set posture includes a position (0,0) and an angle α, wherein the point with a position (0,0) in the horizontal plane of the global coordinate system is the origin of the global coordinate system. When generating the first-frame environmental point cloud, the position of the intelligent mobile device in the horizontal plane of the global coordinate system is set as the origin of the global coordinate system, and the angle α indicates that when generating the first-frame environmental point cloud, the angle between the orientation of the intelligent mobile device and the specified coordinate axis (X-axis or Y-axis) in the horizontal plane of the global coordinate system is α.

[0124] Optionally, the world coordinate system can be used as the above-mentioned global coordinate system, and the smart mobile device can be equipped with a positioning sensor to locate its own position and posture in the world coordinate system. Therefore, when generating the first frame of the environmental point cloud, the above-mentioned set position and posture can be the position and posture of the smart mobile device in the world coordinate system determined by the positioning sensor carried by the smart mobile device at the same time. Among them, this application does not limit the type of positioning sensor carried by the smart mobile device. For example, an inertial measurement unit, a wheel speed recorder, a laser odometer, a visual odometer, etc.

[0125] In this way, the position and posture of the intelligent mobile device determined by the above-mentioned positioning sensor is the position and posture of the intelligent mobile device in the world coordinate system, and the map coordinate system of the above-mentioned preset raster map is the same as the world coordinate system. Therefore, in the subsequent use of the constructed scene map, when positioning and navigating the intelligent mobile device located in the scene, there is no need to convert between the map coordinate system of the scene map and the world coordinate system, which simplifies the calculation process of positioning the intelligent mobile device in the world coordinate system, reduces the calculation pressure, and improves the positioning efficiency.

[0126] For each frame of environmental point cloud except the first frame of environmental point cloud, the above-mentioned target global pose is determined based on the pose of the intelligent mobile device in the above-mentioned global coordinate system when the environmental point cloud is generated. Among them, for each frame of environmental point cloud except the first frame of environmental point cloud, when the environmental point cloud is generated, the pose of the intelligent mobile device in the above-mentioned global coordinate system can become the initial pose of the frame environment, and the initial pose is: at the same time when the frame of environmental point cloud is generated, the pose determined by the positioning sensor carried by the intelligent mobile device. In this way, the target global pose corresponding to the frame of environmental point cloud in the global coordinate system can be determined based on the initial pose of the frame of environment determined by the positioning sensor carried by the intelligent mobile device.

[0127] For example, the above-mentioned smart mobile device is equipped with a laser odometer. For each frame of environment point cloud except the first frame of environment point cloud, the laser odometer simultaneously determines a posture at the same time when the frame of environment point cloud is generated, and the posture can be used as the initial posture of the frame environment.

[0128] In order to explain this solution more clearly, the method of determining the target global pose corresponding to each frame of the environment point cloud except the first frame of the environment point cloud in the global coordinate system will be described in detail later.

[0129] S202: Determine the grids to which each point of the target global point cloud belongs in the grid map as each matching grid, and set the current distance value of each matching grid to a specified value.

[0130] S203: For each matching grid, determine a grid whose distance from the matching grid along the normal vector direction of the point corresponding to the matching grid does not exceed a preset distance as an adjacent grid, and determine the distance value between the adjacent grid and the nearest matching grid as the current distance value of the adjacent grid.

[0131] For each frame of the environment point cloud, after converting the frame of the environment point cloud into the target global point cloud in the global coordinate system, the grids to which each point of the target global point cloud belongs in the grid map can be determined as each matching grid, and the current distance value of each matching grid is set to a specified value. The specified value is a constant, for example, 0.

[0132] Furthermore, for each matching grid determined above, the point in the target global point cloud belonging to the matching grid can be used as the point corresponding to the matching grid, so that the grid whose distance from the matching grid along the normal vector direction of the point corresponding to the matching grid does not exceed the set distance can be determined as the adjacent grid. For each adjacent grid, the matching grid closest to the adjacent grid is selected, so that the distance between the adjacent grid and the selected matching grid with the closest distance can be used as the current distance value of the adjacent grid.

[0133] For example, Figure 3 As shown in the figure, the black grids are the matching grids; the direction pointed by the arrow in each black grid is the normal vector direction of the point corresponding to the matching grid; assuming that the preset distance is 1, for each matching grid (black grid), the gray grid above it is the adjacent grid of the matching grid (black grid), and the current distance value of the adjacent grid of each matching grid (black grid) is 1.

[0134] Optionally, in a specific implementation, such as Figure 4 As shown, for each frame of environment point cloud except the first frame of environment point cloud, a method for determining the target global pose corresponding to the frame of environment point cloud in the global coordinate system may include the following steps S401-S406.

[0135] S401: Acquire the position and posture of the intelligent mobile device in the global coordinate system when generating the frame environment point cloud as the initial position and posture corresponding to the frame environment point cloud.

[0136] In this specific implementation, for each frame of environmental point cloud except the first frame of environmental point cloud, the position and posture of the intelligent mobile device in the global coordinate system when generating the frame of environmental point cloud can be first obtained as the initial position and posture corresponding to the environmental data. The initial position and posture is read from the positioning sensor carried by the intelligent mobile device. The positioning sensor is the position and posture determined at the same time when the frame of environmental point cloud is generated, wherein the initial position and posture may include an initial position and an initial angle.

[0137] S402: Determine each candidate angle based on the initial angle included in the initial posture and a preset angle search window.

[0138] S403: Determine each candidate position based on the initial position included in the initial posture and a preset position search window.

[0139] For each frame of environmental point cloud except the first frame, after obtaining the initial pose corresponding to the frame of environmental point cloud, each candidate angle can be determined based on the initial angle included in the initial pose and the preset angle search window, and each candidate position can be determined based on the initial position included in the initial pose and the preset position search window.

[0140] Taking into account the posture errors caused by equipment errors, temperature drift, etc., the initial posture corresponding to the frame environment point cloud determined by the above positioning sensor may have errors, and the error may be an error in the above initial position, an error in the above initial angle, or an error in both the above initial position and the above initial angle. Therefore, the angle search window and the position search window can be pre-set according to the angle range where the error in the above initial angle may be located, and the position range where the error in the above initial position may be located. In this way, each candidate angle can be determined based on the above initial angle and the angle search window, and each candidate position can be determined based on the above initial position and the position search window.

[0141] The angle search window is an angle range, the maximum value of the angle range is the angle value obtained by rotating the initial angle along the set positive direction by the first angle, and the minimum value of the angle range is the angle value obtained by rotating the initial angle along the set negative direction by the second angle. The first angle and the second angle may be the same or different. The angle search window includes the initial angle, and each of the determined candidate angles includes the initial angle.

[0142] For example, assuming that the clockwise direction is the negative direction and the counterclockwise direction is the positive direction, the maximum value of the angle search window is the angle value reached by rotating the initial angle counterclockwise by a first angle, and the minimum value of the angle search window is the angle value reached by rotating the initial angle clockwise by a second angle.

[0143] For example, Figure 5 As shown, it is a schematic diagram of the relationship between the initial angle and the angle search window. Assuming that the clockwise direction is the negative direction, the counterclockwise direction is the positive direction, the initial angle is 0 degrees, the first angle and the second angle are both α, then the obtained angle search window is (-α, α).

[0144] Similarly, the position search window is a position range, which is an area including the initial position and having a specified shape and size. The position search window includes the initial position, and each determined candidate position includes the initial position.

[0145] For example, the position search window is a positive direction area of ​​a specified length centered at the initial position.

[0146] For example, Figure 6As shown, it is a schematic diagram of the relationship between the initial position and the position search window, wherein the position of the grid where the solid triangle is located is the initial position, and the square area centered at the initial position and with the sum of the side lengths of 5 grids as the position search window, and the position of each grid in the position search window may be a candidate position.

[0147] Optionally, in a specific implementation, the above step S402 may include the following step 4021.

[0148] Step 4021: Based on the initial angle included in the initial posture, the preset angle search window and the angle search step, determine each candidate angle that is within the angle search window and includes the initial angle.

[0149] In this specific implementation, for each frame of the environment point cloud except the first frame of the environment point cloud, after obtaining the initial pose corresponding to the frame of the environment point cloud, each candidate angle can be determined based on the initial angle included in the initial pose, the preset angle search window and the angle search step. Among them, each candidate angle is located in the angle search window, and each candidate angle includes the initial angle.

[0150] The maximum or minimum value of the angle search window may be used as a starting point to gradually reduce or increase the angle search step, and then the angles obtained by each reduction or increase may be used as candidate angles. When the angles reduced or increased each time include the initial angle, the initial angle is determined as a candidate angle, and when the angles reduced or increased each time do not include the initial angle, the initial angle may be added to the candidate angles after gradually reducing or increasing the angle search step, that is, the initial angle is also determined as a candidate angle.

[0151] For example, if the initial angle in the above initial posture is 0 degree, the preset angle search window is (-3 degrees, 3 degrees), and the angle search step is 1 degree, then the candidate angles can be determined to be: -2 degrees, -1 degree, 0 degrees, 1 degree and 2 degrees.

[0152] For another example, if the initial angle in the above initial posture is 0 degree, the preset angle search window is (-3 degrees, 3 degrees), and the angle search step is 2 degrees, then it can be determined that the candidate angles are: 1 degree, -1 degree and 0 degree.

[0153] The above angle search step size may be set in a variety of ways, for example, according to historical experience values.

[0154] Optionally, in a specific implementation, when determining the above-mentioned candidate angles, before the above-mentioned step 4021, a scene map construction method based on raster distance values ​​provided by an embodiment of the present invention can also perform the following step 4020.

[0155] Step 4020: Calculate the angle search step size based on the preset grid map resolution and the specified maximum distance.

[0156] The specified maximum distance is: the maximum distance between each point of the frame environment point cloud and the center of the detection sensor used to generate the frame environment point cloud.

[0157] In this embodiment, for each frame of environment point cloud except the first frame of environment point cloud, after obtaining the initial pose corresponding to the frame of environment point cloud, before determining each candidate angle, the distance between each point of the frame of environment point cloud and the center of the detection sensor used to generate the frame of environment point cloud can be first determined, and the maximum distance among the above distances is used as the specified maximum distance, and then the angle search step is calculated based on the resolution of the above grid map and the above specified maximum distance. The resolution of the above grid map is the side length of each grid in the above grid map.

[0158] After the angle search step length is calculated, each candidate angle is determined based on the initial angle included in the initial posture, the preset angle search window and the angle search step length calculated above.

[0159] Optionally, the angle search step length may be calculated using the following formula (1):

[0160]

[0161] Among them, θ is the angle search step, r is the resolution of the preset grid map, and d max To specify the maximum distance.

[0162] That is, in the specific implementation of the angle search step length calculated using the first formula, the angle search step length, the resolution of the grid map and the specified maximum distance satisfy the following conditions: Figure 7 The geometric relationship shown in Figure 7 The triangle shown is an isosceles triangle.

[0163] Optionally, in a specific implementation, the above step S403 may include the following step 4031.

[0164] Step 4031: Based on the initial position included in the initial posture, the preset position search window and the position search step, determine each candidate position that is within the position search window and includes the initial position.

[0165] In this specific implementation, for each frame of the environment point cloud except the first frame of the environment point cloud, after obtaining the initial pose corresponding to the frame of the environment point cloud, each candidate position can be determined based on the initial position, the preset position search window and the position search step included in the initial pose. Among them, each candidate position is located in the position search window, and each candidate window includes the initial position.

[0166] The above initial position may be determined as a candidate position, and taking the above initial position as a starting point, each position whose distance from the previous candidate position in any specified direction is the above position search step may be determined as each candidate position.

[0167] For example, Figure 6 The initial position and position search window shown in the figure, assuming that the position search step length is the side length of the grid map, and the specified direction includes horizontal and vertical directions, then Figure 6 The positions of each grid in the position search window shown can be used as candidate positions.

[0168] For example, Figure 6 Assume that the position search step length is twice the side length of the grid map, and the specified direction includes horizontal and vertical directions. Figure 6 The positions of the grids marked with "x" in the position search window shown and the above initial positions are used as candidate positions.

[0169] The angle search step size can be set in a variety of ways, for example, according to historical experience values. Optionally, the position search step size can be: the resolution of a preset grid map. That is, the position search step size can be: the side length of each grid in the grid map.

[0170] S404: Determine each candidate pose based on each candidate angle and each candidate position.

[0171] Each candidate pose includes: a candidate angle and a candidate position, and different candidate poses include different candidate angles and / or candidate positions;

[0172] For each frame of the environment point cloud except the first frame, after determining the above-mentioned candidate angles and candidate positions, each candidate pose can be determined based on the candidate angles and candidate positions, and each candidate pose is a pose in the above-mentioned global coordinate system.

[0173] Any candidate angle can be combined with any candidate position to obtain a candidate pose. In this way, each candidate pose obtained includes: a candidate angle and a candidate position, and different candidate poses include different candidate angles and / or candidate positions.

[0174] That is to say, for two different candidate postures, they may include the same candidate angle and different candidate positions, or may include different candidate angles and the same candidate position, or may include different candidate angles and different candidate positions. That is, the candidate angles and candidate positions included in different candidate postures are not completely the same.

[0175] For example, for the environment point cloud A except the first frame environment point cloud, the determined candidate angles include angle A1, angle A2 and angle A3, and the determined candidate positions include position a1, position a2 and position a3. Then, candidate pose 1, candidate pose 2 and candidate pose 3 can be determined, wherein candidate pose 1 includes angle 1 and position a1, candidate pose 2 includes angle 1 and position a2, and candidate pose includes angle 2 and position a1.

[0176] Among them, all different postures of the candidate angles and / or candidate positions that can be obtained by combining the candidate angles and the candidate positions can be used as candidate postures, or only a part of them can be selected as candidate postures.

[0177] For example, for the environmental point cloud A except the first frame environmental point cloud, the determined candidate angles include angle A1, angle A2 and angle A3, and the determined candidate positions include position a1, position a2 and position a3, then 9 poses 1-9 with different candidate angles and / or candidate positions can be combined, wherein pose 1 includes angle A1 and position a1, pose 2 includes angle A1 and position a2, pose 3 includes angle A1 and position a3, pose 4 includes angle A2 and position a1, pose 5 includes angle A2 and position a2, pose 6 includes angle A2 and position a3, pose 7 includes angle A3 and position a1, pose 8 includes angle A3 and position a2, and pose 9 includes angle A3 and position a3. Then, all of the above poses 1-9 can be used as candidate poses to obtain 9 candidate poses, or some of the poses can be selected from the above poses 1-9 as candidate poses. For example, poses 1-5 are selected as candidate poses.

[0178] S405: For each candidate pose, based on the candidate pose, the frame environment point cloud is converted into an initial global point cloud in the global coordinate system, and based on the initial global point cloud and the distance values ​​of each grid record of the grid map, the score of the candidate pose is calculated.

[0179] For each frame of the environment point cloud except the first frame, after obtaining the above-mentioned candidate poses, each candidate pose can be scored, and the target global pose corresponding to the environment point cloud of the frame can be selected according to the score of each candidate pose.

[0180] For each candidate pose, the frame environment point cloud is converted into an initial global point cloud in the global coordinate system based on the candidate pose. Then, the score of the candidate pose is calculated based on the initial global point cloud and the distance values ​​of each grid record of the grid map.

[0181] Optionally, in a specific implementation, in the above step S405, the score of the candidate pose is calculated based on the initial global point cloud and the distance values ​​of each grid record of the grid map, which may include the following steps 4051-4053.

[0182] Step 4051: Determine the grids to which each point of the initial global point cloud belongs in the grid map as the designated grid, and determine the maximum value of the distance values ​​recorded in each grid of the grid map.

[0183] In this specific implementation, for each frame of environment point cloud except the first frame of environment point cloud, after obtaining the above-mentioned candidate poses, for each of the above-mentioned candidate poses, the frame environment point cloud can be converted into an initial global point cloud in the global coordinate system based on the candidate pose.

[0184] Since the map coordinate system of the above-mentioned grid map is the same coordinate system as the above-mentioned global coordinate system, for each point of the above-mentioned initial global point cloud, the position of the point in the above-mentioned grid map can be determined according to the coordinates of the point in the above-mentioned global coordinate system, thereby determining the grid to which the point belongs in the above-mentioned grid map as the designated grid.

[0185] Furthermore, for each frame of the environment point cloud except the first frame of the environment point cloud, since there are already grids with distance values ​​recorded in the grid map before the distance value update process is performed on the frame of the environment point cloud, the maximum value of the distance values ​​recorded in each grid of the grid map can be determined. That is, the maximum value of the distance values ​​already recorded in the grid map before the distance value update process is performed on the frame of the environment point cloud is determined.

[0186] Step 4052: For each designated grid, if the designated grid records a distance value, the difference between the distance value recorded in the designated grid and the maximum value is calculated; otherwise, the difference between the designated value and the maximum value is calculated.

[0187] Step 4053: Calculate the sum of all the differences obtained as the score of the candidate pose.

[0188] For each designated grid determined above, it can be checked whether the designated grid has a distance value recorded. If the designated grid has a distance value recorded, the difference between the distance value recorded in the designated grid and the maximum value is calculated. On the contrary, if the designated grid does not have a distance value recorded, the difference between the designated value and the maximum value is calculated.

[0189] Among them, the above-mentioned specified numerical value is: when executing the distance value update process for the frame environment point cloud, after converting the frame environment point cloud into the target global point cloud in the global coordinate system, the current distance value set for the grid to which each point in the above-mentioned target global point cloud belongs in the grid map, that is, the current distance value of the matching grid determined for the frame environment point cloud.

[0190] After a difference is calculated for each specified grid, the sum of all the difference values ​​can be calculated as the score of the candidate pose.

[0191] Optionally, for each frame of the environment point cloud except the first frame of the environment point cloud, after obtaining the above-mentioned candidate poses, the following formula (2) can be used to calculate the score of each candidate pose.

[0192]

[0193] Among them, score Pi is the score of the i-th candidate pose, Dis max is the maximum value of the distance values ​​recorded by each grid in the grid map, c ik is the kth point of the target global point cloud in global coordinates obtained by transforming the frame environment point cloud based on the i-th candidate pose; if the k-th point has a distance value in the specified grid record in the grid map, then Dis(c ik ) is the distance value recorded in the specified grid of the k-th point in the grid map; if the specified grid of the k-th point in the grid map does not record a distance value, then Dis(c ik ) is the above-specified value, and N is the total number of points in the target global point cloud in global coordinates obtained by transforming the frame environment point cloud based on the ith candidate pose.

[0194] S406: Determine the candidate pose whose score meets the preset requirement as the target global pose corresponding to the frame environment point cloud in the global coordinate system.

[0195] For each frame of the environment point cloud except the first frame, after calculating the scores of the above candidate poses, the candidate pose whose score meets the preset requirements is determined as the target global pose corresponding to the frame of the environment point cloud in the global coordinate system. The above-determined target global pose can also be called the optimal pose.

[0196] Optionally, in a specific implementation, the above step S406 may include the following step 4061.

[0197] Step 4061: Determine the candidate pose with the highest score as the target global pose corresponding to the frame environment point cloud in the global coordinate system.

[0198] In this specific implementation, for each frame of the environment point cloud except the first frame of the environment point cloud, after calculating the scores of the above-mentioned candidate poses, the candidate pose with the highest score is determined as the target global pose corresponding to the frame of the environment point cloud in the global coordinate system.

[0199] Optionally, in a specific implementation, for each frame of the environment point cloud except the first frame of the environment point cloud, in the above step 1022, based on the determined current distance value of the target grid, the distance value recorded by the target grid is updated, which may include the following steps 1-3.

[0200] Step 1: Based on the scores of each candidate pose except the target global pose and the target global pose, calculate the uncertainty of the target global pose.

[0201] In this specific implementation, for each frame of the environment point cloud except the first frame of the environment point cloud, after determining the target global pose corresponding to the frame of the environment point cloud in the global coordinate system from each candidate pose, the uncertainty of the above target global pose can be calculated first. Among them, the uncertainty of the target global pose can be calculated based on the scores of each candidate pose except the above target global pose in each candidate pose, and the target global pose. In fact, the above uncertainty can also be called pose variance.

[0202] Optionally, the above step 1 may include the following step 11:

[0203] Step 11: Calculate the uncertainty of the target global pose using the first formula; wherein the first formula includes:

[0204]

[0205]

[0206] Among them, Pi is the i-th candidate pose among all candidate poses except the target global pose, P best is the target global pose, n is the number of candidate poses other than the target global pose, cov x is the uncertainty of the target global pose in the X direction, score Pi is the score of the i-th candidate pose, Pi x is the X-direction component of the i-th candidate pose, is the X-direction component of the target global pose, cov y is the uncertainty of the target global pose in the Y direction, Pi y is the Y direction component of the i-th candidate pose, is the Y component of the target global pose.

[0207] That is to say, in the specific implementation shown in the above step 11, the uncertainty of the target global pose includes: uncertainty in the X direction and uncertainty in the Y direction, so that the uncertainty of the target global pose in the X direction can be calculated by using the scores of each candidate pose except the above target global pose and the X direction component of each candidate pose, and the uncertainty of the target global pose in the Y direction can be calculated by using the scores of each candidate pose except the above target global pose and the Y direction component of each candidate pose. Among them, the uncertainty of the target global pose in the X direction can be called the pose variance of the target global pose in the X direction, and the uncertainty of the target global pose in the Y direction can be called the pose variance of the target global pose in the Y direction.

[0208] Step 2: Calculate the current weight of the target grid based on the normal vector and uncertainty of the target grid.

[0209] Among them, if the target grid is a matching grid, the normal vector of the target grid is: the normal vector of the point belonging to the target grid in the target global point cloud corresponding to the frame environment point cloud in the preset global coordinate system; if the target grid is an adjacent grid, the normal vector of the target grid is: the normal vector of the matching grid closest to the target grid.

[0210] For each frame of environmental point cloud except the first frame, after calculating the uncertainty of the above-mentioned global position of the target, for each target grid, if the target grid records a distance value, the distance value recorded by the target grid is updated based on the determined current distance value of the target grid. In order to realize the update of the distance value recorded by the target grid, it is necessary to first determine the normal vector of the target grid.

[0211] Among them, since for each frame of environmental point cloud except the first frame of environmental point cloud, each target grid includes: the matching grids to which each point corresponding to the frame of environmental point cloud belongs in the grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent conditions; therefore, for each target grid, if the target grid is a matching grid, the normal vector of the target grid is: the normal vector of the point belonging to the target grid in the target global point cloud corresponding to the frame of environmental point cloud in the preset global coordinate system, and if the target grid is an adjacent grid, the normal vector of the target grid is: the normal vector of the matching grid closest to the target grid.

[0212] In this way, after the normal vector of each target grid is obtained, the current weight of the target grid can be calculated based on the uncertainty of the target global pose and the normal vector of the target grid.

[0213] Optionally, the above step 2 may include the following step 21:

[0214] Step 21: Calculate the current weight of the target grid using the second formula; wherein the second formula includes:

[0215]

[0216] Among them, n j is the normal vector of the jth target grid, w(p) j is the current weight of the jth target grid, n jx is the X-direction component of the normal vector of the j-th target grid, n jy is the Y component of the normal vector of the j-th target grid.

[0217] For example, Figure 8 As shown in FIG. 1 , a schematic diagram of the X-direction component and the Y-direction component of the normal vector of a target grid is shown, where vector n is the normal vector of a target grid, and vector n X is the X-direction component of the normal vector n of the target grid, vector n Y The Y component of the normal vector n of the target grid.

[0218] Step 3: Calculate the new distance value of the target grid using the current distance value of the target grid, the current weight of the target grid, the distance value recorded by the target grid, and the weight recorded by the target grid, and record the new distance value in the target grid.

[0219] For each frame of environmental point cloud except the first frame of environmental point cloud, after determining the current distance value of each target grid, for each target grid, if the target grid records a distance value and the current weight of the target grid has been determined, the current distance value of the target grid, the current weight of the target grid, the distance value recorded by the target grid, and the weight recorded by the target grid can be used to calculate the new distance value of the target grid, and the new distance value is recorded in the target grid. In this way, for each target grid, if the target grid records a distance value, after updating the distance value recorded by the target grid based on the determined current distance value of the target grid, the distance value recorded by the target grid is: the new distance value calculated above.

[0220] Optionally, the above step 3 may include the following step 31:

[0221] Step 31: Calculate the new distance value of the target grid using the third formula; wherein the third formula includes:

[0222]

[0223] in, is the new distance value of the jth target grid, W(p) j is the weight of the j-th target grid record, DF(p) j is the distance value recorded by the jth target grid, df(p) j is the current distance value of the jth target grid, w(p) j is the current weight of the j-th target grid.

[0224] In order to realize the calculation of the new distance value of each target grid in the specific implementation manner shown in the above steps 1-3, it is necessary to first obtain the current weight of the target grid and the weight recorded by the target grid.

[0225] Correspondingly, based on the specific implementation methods shown in the above steps 1-3, a scene map construction method based on grid distance values ​​provided in an embodiment of the present application may also include the following steps 104-105.

[0226] Step 104: for the first frame environment point cloud, in response to obtaining the target global point cloud corresponding to the frame environment point cloud in a preset global coordinate system, determine the weight of each target grid, and record the weight of each target grid in the target grid.

[0227] Step 105: For each frame of the environment point cloud except the first frame of the environment point cloud, in response to recording the new distance value into the target grid, the weight recorded in the target grid is updated using the current weight of the target grid.

[0228] In this specific implementation method, for each frame of environmental point cloud, after obtaining the target global point cloud corresponding to the frame of environmental point cloud in the above-mentioned global coordinate system, weights can be assigned to each point of the target global point cloud to obtain the initial weights of each point of the target global point cloud, and based on the initial weights of each point of the target global point cloud, the initial weights of each target grid can be determined.

[0229] Among them, for each target grid, if the target grid is a matching grid, the weight of the target grid is: the weight of the points belonging to the target grid in the target global point cloud corresponding to the frame environment point cloud in the above-mentioned global coordinate system, and if the target grid is an adjacent grid, the weight of the target grid is: the weight of the matching grid closest to the target grid, that is, if the target grid is an adjacent grid, the weight of the target grid is: the weight of the points belonging to the matching grid closest to the target grid in the target global point cloud corresponding to the frame environment point cloud in the above-mentioned global coordinate system.

[0230] As for the first frame environmental point cloud, when determining the initial weight of each target grid, since no weight is recorded in each grid of the above-mentioned grid map, the initial weight of each target grid can be directly recorded in the target grid for the above-mentioned first frame environmental point cloud.

[0231] In this way, for the first frame environment point cloud, in response to obtaining the target global point cloud corresponding to the frame environment point cloud in the above-mentioned global coordinate system, the weights of each target grid are determined, and the weight of each target grid is recorded in the target grid. When the distance value update process is completed for the first frame environment point cloud, the distance value and weight are recorded in each target grid at the same time.

[0232] Correspondingly, for each frame of environmental point cloud except the first frame of environmental point cloud, after obtaining the initial weights of each target grid, for each target grid, if the target grid has no weight recorded, the initial weight of the target grid is recorded in the target grid; and if the target grid has a weight recorded, the current weight of the target grid calculated in the above step 2 is used to update the weight recorded in the target grid.

[0233] In this way, for each frame of environmental point cloud except the first frame, if the target grid records a distance value, the weight recorded in the target grid can be updated using the current weight of the target grid in response to recording the new distance value in the target grid.

[0234] That is to say, in the iterative process of updating the above-mentioned grid map using each frame of the environmental point cloud, the same grid in the above-mentioned grid map will record both the weight and the distance value, or neither the weight nor the distance value will be recorded at the same time. There is no grid that only records the weight but not the distance value, and there is no grid that only records the distance value but not the weight.

[0235] Optionally, for each frame of the environment point cloud except the first frame, if the target grid record has a weight, the following formula (3) can be used to calculate the new weight obtained by updating the weight of the target grid record based on the current weight of the target grid.

[0236]

[0237] in, is the new weight obtained by updating the weight of the j-th target grid record based on the current weight of the j-th target grid, w(p) j is the current weight of the j-th target grid, W(p) j The weight of the j-th target grid record.

[0238] Optionally, for each frame of environmental point cloud, after obtaining the target global point cloud corresponding to the frame of environmental point cloud in the above-mentioned global coordinate system, the point cloud error model can be used to assign weights to each point of the target global point cloud to obtain the initial weights of each point of the target global point cloud.

[0239] Generally, in the point cloud error model, the farther the point cloud is from the center of the detection sensor used to generate the point cloud, the greater the error of the point cloud. Therefore, for the same point cloud, the farther the point in the point cloud is from the center of the detection sensor, the greater the error of the point. Based on this, for each frame of the environment point cloud, after obtaining the target global point cloud corresponding to the frame of the environment point cloud in the global coordinate system, the weight of each point of the target global point cloud can be determined based on the preset point cloud error model, and among the points of the target global point cloud, the farther the point is from the center of the detection sensor, the smaller the weight.

[0240] For example, the above-mentioned target global point cloud A includes point A1 and point A2, and the distance between point A1 and the center of the detection sensor is a, and the distance between point A2 and the center of the detection sensor is b, and a>b, then the initial weight of point A1 obtained by weight assignment is smaller than the initial weight of point A2.

[0241] In the above steps 1-3, and the specific implementation shown in steps 104-105, when the grid map is updated using each frame of the environmental point cloud, the current weight of the target grid is determined based on the above-mentioned pose variance and the normal vector of the target grid, and then the grid map is updated based on the current weight of the target grid. In this way, compared with the existing map update method based on distance or ray incidence angle, in the solution provided in the embodiment of the present application, when the grid map is updated using each frame of the environmental point cloud, the uncertainty of the pose is taken into account, thereby improving the accuracy of the constructed scene map.

[0242] In addition, the prior art only uses the positioning variance to verify the current positioning result, and does not consider the positioning variance when building the map. When updating the distance field grid map, the weight of each point is determined according to the distance value or the incident angle. In the solution provided in the embodiment of the present application, when updating the grid map using each frame of the environmental point cloud, the positioning variance, that is, the positioning uncertainty, is considered, and the weight of the target grid is determined according to the pose variance, thereby improving the accuracy of the constructed scene map and, in turn, improving the positioning accuracy.

[0243] When the smart mobile device is equipped with different types of detection sensors, the methods of obtaining the above-mentioned environmental point clouds of each frame may be different. Below, taking the image acquisition device as a detection sensor as an example, the above-mentioned step S101 is used to obtain the specific implementation method of each frame of environmental point clouds generated by environmental detection of the scene where the smart mobile device is currently located and located in a preset local coordinate system, and is illustrated by way of example.

[0244] Optionally, in a specific implementation, the smart mobile device is equipped with an image acquisition device as a detection sensor, and the image acquisition device acquires images of the scene currently located by the smart mobile device to obtain each frame of scene image. For each frame of scene image, edge features of the ceiling area of ​​the frame of scene image are extracted.

[0245] For example, Fig. 9 As shown, it is a frame of image captured by the above-mentioned image acquisition device, wherein the area surrounded by white dots is the ceiling area, and the white dots are edge features of the ceiling area extracted based on the Canny algorithm.

[0246] Furthermore, for each frame of the scene image, the extracted edge features are converted into a local point cloud in the camera coordinate system of the image acquisition device, and the local point cloud is the environment point cloud. The generation order of each frame of the environment point cloud is the acquisition order of the scene images used to obtain each frame of the environment point cloud. For example, the first frame of the environment point cloud is the local point cloud determined based on the first frame of the scene image acquired, and the second frame of the environment point cloud is the local point cloud determined based on the second frame of the scene image acquired, and so on. The camera coordinate system of the image acquisition device is a local coordinate system. Moreover, the obtained environment point cloud is a point cloud in the camera coordinate system of the image acquisition device under the top view angle. The so-called top view angle refers to the acquisition angle of the image acquisition device that is vertically upward, such as Fig.10 The camera perspective shown on the left, the image captured under the top view perspective can be considered as the top view of the ceiling of the scene where the smart mobile device is currently located.

[0247] Among them, edge features of the ceiling area of ​​each frame of the scene image can be extracted in a variety of ways. Exemplarily, a ceiling area recognition model is trained using sample images with ceiling areas annotated, so that each frame of the image is input into the ceiling area recognition model, and a recognition result output by the ceiling area recognition model is obtained, and the recognition result includes: images with ceiling areas annotated. For example, edge features of the ceiling area of ​​each frame of the image are extracted using a Canny edge detection algorithm, a Sobel operator, etc.

[0248] In this regard, the embodiments of the present application do not make specific limitations. For example, a CNN (Convolutional Neural Network) is used to train a ceiling area edge feature extraction model to extract edge features of the ceiling area of ​​the above-mentioned frame images; for another example, a HOG (Histogram of Oriented Gradient) algorithm is used to extract edge features of the ceiling area by calculating and counting the gradient directions of local areas in the above-mentioned frame images.

[0249] Among them, the method of extracting the edge features of the ceiling area of ​​each frame of the scene image can be selected according to the device configuration of the smart mobile device. Exemplarily, according to whether the smart mobile device is equipped with a GPU (Graphics Processing Unit) or an NPU (Neural-network Processing Unit), a method of segmenting the ceiling area of ​​each frame of the image using a deep learning algorithm and extracting the edge features of the segmented ceiling area is selected, or a method of segmenting the ceiling area of ​​each frame of the image based on a traditional image processing algorithm and extracting the edge features of the segmented ceiling area is selected.

[0250] Moreover, the edge features of the ceiling area of ​​each frame image are two-dimensional information located in the image coordinate system of the frame image, while the point cloud is usually information in a three-dimensional coordinate system. Therefore, in this specific implementation method, the edge features of the ceiling area in the two-dimensional coordinate system are converted into a point cloud in the three-dimensional coordinate system.

[0251] For the scene where the smart mobile machine is currently located, the distance between the ceiling and the ground of the scene is usually much larger than the distance between the various objects placed on the ceiling and the ceiling. Therefore, it can be considered that the ceiling of the scene is parallel to the ground, and further, it can be considered that the height of the edge features of the ceiling area in each frame of the scene image is the same. In this way, under the premise that the height of the edge features of the ceiling area in each frame of the scene image is the same, the extracted edge features can be converted into the above-mentioned local point cloud as the environmental point cloud based on the current posture of the image acquisition device and the camera intrinsic parameters. Among them, the current camera posture can be obtained by a positioning sensor such as an inertial measurement unit carried by the smart mobile device, and can also be obtained by the external parameter calibration of the image acquisition device.

[0252] Among them, the above-mentioned preset ceiling height can be determined based on empirical values, or by actual measurement of the scene in which the intelligent robot is currently located, for example, 2.7 meters, 3 meters, etc.; of course, in many cases, it can also be estimated based on the posture of the positioning sensor carried by the intelligent mobile robot before and after the intelligent mobile robot moves a certain distance.

[0253] Optionally, the edge features of each frame of the image can be converted into a point cloud using formulas (4) and (5);

[0254]

[0255]

[0256] Among them, (x mn ,y mn) is the local point cloud corresponding to the nth edge feature of the mth frame image; (u mn ,y mn ) is the nth edge feature of the mth frame image; z is the ceiling height; f x 、f y 、c x and c y is the model parameter in the target internal reference model.

[0257] Among them, since the image acquisition devices carried by different smart mobile devices can be installed at different positions of the smart mobile devices, the image acquisition devices carried by different smart mobile devices can have different acquisition viewing angles.

[0258] For example, Fig.10 As shown in , the intelligent mobile device is a robot, and the image acquisition device is a camera. Fig.10 As shown in the robot on the left, the camera is installed vertically upward, and the camera's acquisition angle of view is vertically upward, that is, the camera's acquisition angle of view is a top view angle. The machine vertically upward collects the ceiling image, and the collected image can be considered as a top view of the ceiling; Fig.10 As shown in the robot on the right, the camera can be installed tilted upward, and the camera's collecting angle of view is tilted upward. At this time, because the collecting angle of view is tilted at an angle to the vertical direction, the ceiling area in the collected image will be deformed, resulting in angle loss.

[0259] When the capture angle of the image acquisition device carried by the smart mobile device is vertically upward, the target internal reference model is the internal reference model of the image acquisition device, and the target camera coordinate system corresponding to the target internal reference model is the camera coordinate system of the image acquisition device, so that the camera coordinate system of the image acquisition device can be used as the local coordinate system. Therefore, the edge features of each frame of the scene image can be directly converted into a point cloud by using the preset target ceiling height and the internal reference model of the image acquisition device, and the local point cloud corresponding to each frame of the scene image in the camera coordinate system of the image acquisition device is obtained as the environmental point cloud.

[0260] Accordingly, when the capture angle of the image acquisition device carried by the smart mobile device is tilted, since the capture angle of the image acquisition device is tilted upward, the ceiling area in the captured scene image will be deformed and there will be angle loss. Therefore, before using the preset ceiling height for point cloud conversion, each frame of the scene image needs to be converted into an image under the capture angle of the image acquisition device.

[0261] Therefore, for each frame of scene image, firstly, based on the tilt angle of the capture angle of the image acquisition device, each frame of scene image is subjected to inverse perspective transformation to obtain an inverse perspective image under a vertically upward capture angle of view. The inverse perspective image can be understood as an image obtained by the image acquisition device capturing the ceiling area under a vertically upward capture angle of view. Afterwards, based on the conversion relationship between the image coordinate system of the frame of scene image and the image coordinate system of the inverse perspective image, the target features corresponding to the edge features of each frame of scene image in the inverse perspective image are determined as the target features of each frame of scene image. Moreover, for the inverse perspective image, it is equivalent to an image obtained by using a simulated camera with a capture angle of view vertically upward to simulate image capture of the ceiling area of ​​the scene. Therefore, the memory model of the above-mentioned model camera can also be determined, and the memory model of the simulated camera can be used as the target internal reference model, and the camera coordinate system of the simulated camera can be used as the local coordinate system.

[0262] In this way, when performing point cloud conversion, the preset ceiling height and the target internal reference model of the simulated camera can be used to perform point cloud conversion on the target features of each frame of the scene image, and the local point cloud corresponding to each frame of the scene image in the camera coordinate system of the simulated camera can be obtained as the environmental point cloud.

[0263] That is to say, in this specific implementation, when the edge features of each frame scene image are converted into a point cloud, the edge features located in the image coordinate system of the inverse perspective image are converted into a point cloud in the camera coordinate system of the simulated camera used to simulate the acquisition of the inverse perspective image.

[0264] In this specific implementation, the scene map is constructed by using the edge features of the ceiling area of ​​each frame of the scene image. Therefore, there is no need to track the feature points in each frame of the scene image, and there is no need to accurately estimate the position of the tracked feature points, which can reduce the computing power requirements of the computing chip and save computing power. In addition, when tracking the feature points in each frame of the scene image, the illumination change in the scene will affect the tracking accuracy of the feature points in the image, thereby reducing the accuracy of the position estimation of the feature points and the accuracy of the constructed scene map. The above-mentioned illumination change has a small effect on the edge features of the ceiling area in the scene image. Therefore, compared with the related technology of map construction, which tracks, describes and matches the visual features of the scene image to construct the scene map, in this specific implementation, the map is constructed based on the edge features of the ceiling area in each frame of the scene image, which is less affected by illumination changes and has higher robustness.

[0265] Based on the same inventive concept, corresponding to the above-mentioned embodiment of the present application Figure 1A scene map construction method based on grid distance values ​​is shown, and an embodiment of the present application also provides a smart mobile device.

[0266] Fig.11 A schematic diagram of the structure of a smart mobile device provided in an embodiment of the present application is shown in FIG. Fig.11 As shown, the smart mobile device may include a detection sensor 100 and a processor 200 .

[0267] The detection sensor 100 is used to detect the environment of the scene when the smart mobile device moves in the current scene, and generate each frame of the environment point cloud in a preset local coordinate system;

[0268] The processor 200 is used to execute a scene map construction method based on grid distance values ​​provided in an embodiment of the present application based on the environment point cloud of each frame.

[0269] In this specific implementation, in order to construct a scene map of the scene currently located by the smart mobile device, the detection sensor 100 can detect the environment of the scene while the smart mobile device is moving in the current scene, generate each frame of environmental point cloud located in a preset local coordinate system, and then send the generated each frame of environmental point cloud to the processor 200. In this way, the processor 200 can execute a scene map construction method based on grid distance values ​​provided in an embodiment of the present application based on each frame of environmental point cloud generated by the above detection sensor 100, and construct a scene map of the scene currently located by the smart mobile device.

[0270] The above has detailed the specific implementation method of a scene map construction method based on raster distance values ​​provided in an embodiment of the present application. The processor 200 executes the various steps of a scene map construction method based on raster distance values ​​provided in an embodiment of the present application according to the previous specific implementation method, which will not be repeated here.

[0271] Based on the same inventive concept, corresponding to the above-mentioned embodiment of the present application Figure 1 A scene map construction method based on grid distance values ​​is shown, and an embodiment of the present application also provides a scene map construction device based on grid distance values.

[0272] Fig.12 A schematic diagram of the structure of a scene map construction device based on grid distance values ​​provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the device may include the following modules:

[0273] The point cloud acquisition module 1210 is used to acquire the environmental point clouds of each frame generated by performing environmental detection on the scene where the smart mobile device is currently located and located in a preset local coordinate system;

[0274] The distance value updating module 1220 is used to perform the distance value updating process for each frame of the environment point cloud in turn according to the generation order of each frame of the environment point cloud; wherein the distance value updating process includes: based on the frame of the environment point cloud, determining the current distance value of each target grid of the preset grid map; for each target grid, if the target grid records a distance value, then based on the determined current distance value of the target grid, updating the distance value recorded in the target grid; otherwise, recording the determined current distance value of the target grid in the target grid; the target grids include: the matching grids to which the points corresponding to the frame of the environment point cloud belong in the grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent condition; the points corresponding to the frame of the environment point cloud are: the points of the target global point cloud corresponding to the frame of the environment point cloud in the preset global coordinate system;

[0275] The map determination module 1230 is used to determine the current grid map recording the distance value as the scene map of the scene in response to the smart mobile device passing through all areas within the scene.

[0276] As can be seen from the above, by applying the solution provided by the embodiment of the present application, in order to construct a scene map of an unfamiliar scene entered by a smart mobile device, the smart mobile device is usually equipped with various detection sensors, such as laser radar, image acquisition equipment, etc. After the smart mobile device enters the scene, the smart mobile device can move in the scene. During the movement, the scene can be detected based on the detection sensor carried by the smart mobile device, and each frame of environmental point cloud located in a preset local coordinate system can be generated, and the scene map of the scene can be constructed using the above-mentioned frame of environmental point cloud. In this way, when constructing the scene map of the scene currently located by the smart mobile device, the frame of environmental point cloud generated by the environmental detection of the scene and located in the above-mentioned local coordinate system can be obtained first during the movement of the smart mobile device in the scene. Then, the distance value update process can be performed for each frame of environmental point cloud in sequence according to the generation order of each frame of environmental point cloud, that is, according to the generation order of each frame of environmental point cloud, each frame of environmental point cloud is used in sequence to update the distance value of each grid record of the preset grid map. Among them, for each frame of environmental point cloud, the above distance value update process includes: first, each point of the target global point cloud corresponding to the frame of environmental point cloud in the preset global coordinate system is used as each point corresponding to the frame of environmental point cloud. After that, the matching grids to which each point corresponding to the frame of environmental point cloud belongs in the above grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent condition are all determined as target grids. Then, based on the frame of environmental point cloud, the current distance value of each target grid is determined. Then, for each target grid, if the target grid records a distance value, the distance value recorded by the target grid is updated based on the determined current distance value of the target grid; if the target grid does not record a distance value, the determined current distance value of the target grid is recorded in the target grid. When the above distance value update is performed for each frame of environmental point cloud, it can be considered that the update of the above grid map by the frame of environmental point cloud is completed. Finally, in response to the intelligent mobile device moving through all areas within the above scene, the current grid map recording the distance value is determined as the scene map of the scene.

[0277] Based on this, the solution provided by the embodiment of the present application is applied, and the environment point cloud of each frame in the above-mentioned local coordinate system is generated by the intelligent mobile device for environmental detection of the current scene, so as to gradually update the distance value recorded by each grid in the preset grid map, and complete the construction of the scene map of the scene. In addition, the scene map can also provide a basis for the subsequent intelligent mobile device to locate, navigate and perform various tasks in the scene.

[0278] Optionally, in a specific implementation, the distance value updating module 1220 is specifically configured to:

[0279] Based on the target global pose corresponding to the frame environment point cloud in the global coordinate system, the frame environment point cloud is converted into the target global point cloud in the global coordinate system, and the normal vector of each point of the target global point cloud is determined; wherein, if the frame environment point cloud is the first frame environment point cloud, the target global pose is: the set pose in the global coordinate system; if the frame environment point cloud is an environment point cloud other than the first frame environment point cloud, the target global pose is determined based on the pose of the smart mobile device in the global coordinate system when the environment point cloud is generated;

[0280] Determine the grids to which each point of the target global point cloud belongs in the grid map as each matching grid, and set the current distance value of each matching grid to a specified value;

[0281] For each matching grid, a grid whose distance from the matching grid along the normal vector direction of the point corresponding to the matching grid does not exceed a preset distance is determined as an adjacent grid, and the distance value between the adjacent grid and the matching grid closest to it is determined as the current distance value of the adjacent grid.

[0282] Optionally, in a specific implementation, the device further includes: a posture determination module for determining, for each frame of environment point cloud except the first frame of environment point cloud, a target global posture corresponding to the frame of environment point cloud in the global coordinate system; the posture determination module includes:

[0283] A posture acquisition submodule, used to acquire the posture of the intelligent mobile device in the global coordinate system when generating the frame environment point cloud, as the initial posture corresponding to the frame environment point cloud;

[0284] A candidate information determination submodule, configured to determine each candidate angle based on an initial angle included in the initial posture and a preset angle search window, and to determine each candidate position based on an initial position included in the initial posture and a preset position search window;

[0285] A candidate posture determination submodule is used to determine each candidate posture based on each candidate angle and each candidate position; wherein each candidate posture includes: a candidate angle and a candidate position, and different candidate postures include different candidate angles and / or candidate positions;

[0286] A candidate pose scoring submodule, for each candidate pose, based on the candidate pose, converting the frame environment point cloud into an initial global point cloud in the global coordinate system, and calculating the score of the candidate pose based on the initial global point cloud and the distance values ​​of each grid record of the grid map;

[0287] The global pose determination submodule is used to determine the candidate pose whose score meets the preset requirements as the target global pose corresponding to the frame environment point cloud in the global coordinate system.

[0288] Optionally, in a specific implementation, the candidate pose scoring submodule is specifically used to:

[0289] Determine the grids to which each point of the initial global point cloud belongs in the grid map as the designated grid, and determine the maximum value of the distance values ​​recorded in each grid of the grid map;

[0290] For each designated grid, if the designated grid records a distance value, the difference between the distance value recorded in the designated grid and the maximum value is calculated; otherwise, the difference between the designated value and the maximum value is calculated;

[0291] The sum of all the differences is calculated as the score of the candidate pose.

[0292] Optionally, in a specific implementation, the distance value updating module 1220 includes:

[0293] An uncertainty calculation submodule, for calculating the uncertainty of the target global pose based on the scores of each candidate pose except the target global pose and the target global pose for each frame of the environment point cloud except the first frame of the environment point cloud;

[0294] The weight calculation submodule is used to calculate the current weight of the target grid based on the normal vector of the target grid and the uncertainty for each frame of the environment point cloud except the first frame of the environment point cloud; wherein, if the target grid is the matching grid, the normal vector of the target grid is: the normal vector of the point belonging to the target grid in the target global point cloud corresponding to the frame of the environment point cloud in the preset global coordinate system; if the target grid is the adjacent grid, the normal vector of the target grid is: the normal vector of the matching grid closest to the target grid;

[0295] A distance value updating submodule is used to calculate a new distance value of the target grid for each frame of the environment point cloud except the first frame of the environment point cloud by using the current distance value of the target grid, the current weight of the target grid, the distance value recorded by the target grid, and the weight recorded by the target grid, and record the new distance value in the target grid;

[0296] The device also includes:

[0297] A first weight determination module is used to determine the weight of each target grid for the first frame environment point cloud in response to obtaining the target global point cloud corresponding to the frame environment point cloud in a preset global coordinate system, and record the weight of each target grid in the target grid;

[0298] The second weight determination module is used to update the weight recorded in the target grid using the current weight of the target grid in response to recording the new distance value in the target grid for each frame of the environment point cloud except the first frame of the environment point cloud.

[0299] Optionally, in a specific implementation, the uncertain calculation submodule is specifically used to:

[0300] The uncertainty of the target global pose is calculated using a first formula; wherein the first formula includes:

[0301]

[0302]

[0303] Where Pi is the i-th candidate pose among all candidate poses except the target global pose, P best is the target global pose, n is the number of candidate poses other than the target global pose, cov x is the uncertainty of the target global pose in the X direction, score Pi is the score of the i-th candidate pose, Pi x is the X-direction component of the i-th candidate pose, is the X-direction component of the target global pose, cov y is the uncertainty of the target global pose in the Y direction, Pi y is the Y direction component of the i-th candidate pose, is the Y component of the target global pose.

[0304] Optionally, in a specific implementation, the weight calculation submodule is specifically used to:

[0305] The current weight of the target grid is calculated using the second formula; wherein the second formula includes:

[0306]

[0307] Among them, n j is the normal vector of the jth target grid, w(p) j is the current weight of the j-th target grid, n jx is the X-direction component of the normal vector of the j-th target grid, n jy is the Y-direction component of the normal vector of the j-th target grid.

[0308] Optionally, in a specific implementation, the distance value updating submodule is specifically used to:

[0309] The new distance value of the target grid is calculated using the third formula; wherein the third formula includes:

[0310]

[0311] in, is the new distance value of the jth target grid, W(p) j is the weight of the j-th target grid record, DF(p) j is the distance value recorded by the jth target grid, df(p) j is the current distance value of the j-th target grid.

[0312] The present application also provides an electronic device, such as Fig.13 As shown, including:

[0313] A memory 131, used for storing computer programs;

[0314] The processor 132 is used to implement the steps of any scene map construction method based on grid distance values ​​provided in the above-mentioned embodiments of the present application when executing the program stored in the memory 131.

[0315] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 132, the communication interface, and the memory 131 communicate with each other via the communication bus.

[0316] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0317] The communication interface is used for communication between the above electronic device and other devices.

[0318] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0319] The above-mentioned processor 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 gate or transistor logic devices, discrete hardware components.

[0320] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned scene map construction methods based on raster distance values ​​are implemented.

[0321] In another embodiment provided by the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any step of the above-mentioned scene map construction method based on grid distance values.

[0322] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.

[0323] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0324] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0325] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A scene map construction method based on grid distance value, characterized in that: The method comprises: Obtaining each frame of environmental point cloud generated by performing environmental detection on the scene currently located by the smart mobile device and located in a preset local coordinate system; According to the generation order of each frame environment point cloud, the distance value update process is performed for each frame environment point cloud in turn; wherein the distance value update process includes: based on the frame environment point cloud, determining the current distance value of each target grid of the preset grid map; for each target grid, if the target grid records a distance value, then based on the determined current distance value of the target grid, the distance value recorded by the target grid is updated; otherwise, the determined current distance value of the target grid is recorded in the target grid; the target grids include: the matching grids to which the points corresponding to the frame environment point cloud belong in the grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent condition; the points corresponding to the frame environment point cloud are: the points of the target global point cloud corresponding to the frame environment point cloud in the preset global coordinate system; In response to the intelligent mobile device passing through all areas within the scene, the current grid map recording the distance values ​​is determined as the scene map of the scene.

2. The method according to claim 1, characterized in that The step of determining the current distance value of each target grid of the grid map based on the frame environment point cloud includes: Based on the target global pose corresponding to the frame environment point cloud in the global coordinate system, the frame environment point cloud is converted into the target global point cloud in the global coordinate system, and the normal vector of each point of the target global point cloud is determined; wherein, if the frame environment point cloud is the first frame environment point cloud, the target global pose is: the set pose in the global coordinate system; if the frame environment point cloud is an environment point cloud other than the first frame environment point cloud, the target global pose is determined based on the pose of the smart mobile device in the global coordinate system when the environment point cloud is generated; Determine the grids to which each point of the target global point cloud belongs in the grid map as each matching grid, and set the current distance value of each matching grid to a specified value; For each matching grid, a grid whose distance from the matching grid along the normal vector direction of the point corresponding to the matching grid does not exceed a preset distance is determined as an adjacent grid, and the distance value between the adjacent grid and the matching grid closest to it is determined as the current distance value of the adjacent grid.

3. The method according to claim 2, characterized in that For each frame of environment point cloud except the first frame of environment point cloud, a method for determining the target global pose corresponding to the frame of environment point cloud in the global coordinate system includes: Acquire the position and posture of the intelligent mobile device in the global coordinate system when generating the frame environment point cloud as the initial position and posture corresponding to the frame environment point cloud; Determine each candidate angle based on an initial angle included in the initial posture and a preset angle search window, and determine each candidate position based on an initial position included in the initial posture and a preset position search window; Determine each candidate pose based on each candidate angle and each candidate position; wherein each candidate pose includes: a candidate angle and a candidate position, and different candidate poses include different candidate angles and / or candidate positions; For each candidate pose, based on the candidate pose, the frame environment point cloud is converted into an initial global point cloud in the global coordinate system, and based on the initial global point cloud and the distance values ​​of each grid record of the grid map, the score of the candidate pose is calculated; The candidate pose whose score meets the preset requirement is determined as the target global pose corresponding to the frame environment point cloud in the global coordinate system.

4. The method according to claim 3, characterized in that The step of calculating the score of the candidate pose based on the initial global point cloud and the distance values ​​of each grid record of the grid map comprises: Determine the grids to which each point of the initial global point cloud belongs in the grid map as the designated grid, and determine the maximum value of the distance values ​​recorded in each grid of the grid map; For each designated grid, if the designated grid records a distance value, the difference between the distance value recorded in the designated grid and the maximum value is calculated; otherwise, the difference between the designated value and the maximum value is calculated; The sum of all the differences is calculated as the score of the candidate pose.

5. The method according to claim 3, characterized in that: For each frame of the environment point cloud except the first frame of the environment point cloud, updating the distance value recorded by the target grid based on the determined current distance value of the target grid includes: Calculating the uncertainty of the target global pose based on the scores of each candidate pose except the target global pose and the target global pose; Based on the normal vector of the target grid and the uncertainty, the current weight of the target grid is calculated; wherein, if the target grid is the matching grid, the normal vector of the target grid is: the normal vector of the point belonging to the target grid in the target global point cloud corresponding to the frame environment point cloud in the preset global coordinate system; if the target grid is the adjacent grid, the normal vector of the target grid is: the normal vector of the matching grid closest to the target grid; Calculate a new distance value of the target grid using the current distance value of the target grid, the current weight of the target grid, the distance value recorded by the target grid, and the weight recorded by the target grid, and record the new distance value in the target grid; The method further comprises: For the first frame environment point cloud, in response to obtaining a target global point cloud corresponding to the frame environment point cloud in a preset global coordinate system, determining the weight of each target grid, and recording the weight of each target grid in the target grid; For each frame of the environment point cloud except the first frame of the environment point cloud, in response to recording the new distance value into the target grid, the weight recorded in the target grid is updated using the current weight of the target grid.

6. The method according to claim 5, characterized in that The calculating the uncertainty of the target global pose based on the scores of each candidate pose except the target global pose and the target global pose comprises: The uncertainty of the target global pose is calculated using a first formula; wherein the first formula includes: Where Pi is the i-th candidate pose among all candidate poses except the target global pose, P best is the target global pose, n is the number of candidate poses other than the target global pose, cov x is the uncertainty of the target global pose in the X direction, score Pi is the score of the i-th candidate pose, Pi x is the X-direction component of the i-th candidate pose, is the X-direction component of the target global pose, cov y is the uncertainty of the target global pose in the Y direction, Pi y is the Y direction component of the i-th candidate pose, is the Y component of the target global pose.

7. The method according to claim 6, characterized in that The calculating the current weight of the target grid based on the normal vector of the target grid and the uncertainty includes: The current weight of the target grid is calculated using the second formula; wherein the second formula includes: Among them, n j is the normal vector of the jth target grid, w(p) j is the current weight of the j-th target grid, n jx is the X-direction component of the normal vector of the j-th target grid, n jy is the Y-direction component of the normal vector of the j-th target grid.

8. The method according to any one of claims 5 to 7, characterized in that: The method of calculating a new distance value of the target grid by using the current distance value of the target grid, the current weight of the target grid, the distance value recorded by the target grid, and the weight recorded by the target grid comprises: The new distance value of the target grid is calculated using the third formula; wherein the third formula includes: in, is the new distance value of the jth target grid, W(p) j is the weight of the j-th target grid record, DF(p) j is the distance value recorded by the jth target grid, df(p) j is the current distance value of the j-th target grid.

9. A smart mobile device, characterized in that: include: detection sensors and processors; The detection sensor is used to detect the environment of the scene and generate each frame of the environment point cloud in a preset local coordinate system when the smart mobile device moves in the scene. The processor is used to execute the method according to any one of claims 1 to 8 based on the environmental point cloud of each frame.

10. A scene map construction device based on grid distance value, characterized in that: The device comprises: A point cloud acquisition module is used to acquire each frame of environmental point cloud generated by performing environmental detection on the scene where the smart mobile device is currently located and located in a preset local coordinate system; The distance value updating module is used to execute the distance value updating process for each frame of the environment point cloud in turn according to the generation order of each frame of the environment point cloud; wherein the distance value updating process includes: based on the frame of the environment point cloud, determining the current distance value of each target grid of the preset grid map; for each target grid, if the target grid records a distance value, then based on the determined current distance value of the target grid, updating the distance value recorded in the target grid; otherwise, recording the determined current distance value of the target grid into the target grid; the target grids include: the matching grids to which the points corresponding to the frame of the environment point cloud belong in the grid map, and the adjacent grids whose positional relationship with any matching grid meets the adjacent condition; the points corresponding to the frame of the environment point cloud are: the points of the target global point cloud corresponding to the frame of the environment point cloud in the preset global coordinate system; The map determination module is used to determine the current grid map recording the distance value as the scene map of the scene in response to the intelligent mobile device passing through all areas within the scene.

11. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-8 when executing a program stored in a memory.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.