Grid map construction method and device based on observation direction and intelligent mobile equipment

By adopting a raster map construction method based on the observation direction in smart mobile devices and updating the average observation direction, the accuracy problem of map construction in unfamiliar scenes by smart mobile devices is solved, and the movement fluency and work efficiency of the device are improved.

CN118565457APending Publication Date: 2024-08-30HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technology makes it difficult to construct accurate scene maps for smart mobile devices in unfamiliar scenes, affecting movement fluency and work efficiency.

Method used

A grid map construction method based on the observation direction is adopted to gradually construct the scene map by obtaining the environmental point cloud and updating the average observation direction in the grid map, taking into account the observability of each grid to improve the matching robustness.

Benefits of technology

It realizes accurate map construction of smart mobile devices in unfamiliar scenes, improves the foundation of positioning and navigation, and enhances the operating efficiency of the device in the scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118565457A
    Figure CN118565457A
Patent Text Reader

Abstract

The embodiment of the invention provides a grid map construction method and device based on an observation direction 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, an observation direction updating process is executed for each frame of environment point cloud in sequence, and the observation direction updating process comprises the following steps: based on the frame of environment point cloud, determining the current observation direction of each matched grid of a preset grid map; for each matching grid, if the matching grid records the average observation direction, updating the average observation direction recorded by the matching grid based on the current observation direction; otherwise, recording the current observation direction into the matching 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 average observation direction as a scene map of the scene. By applying the scheme provided by the embodiment of the invention, the scene map of the strange scene entered by the intelligent mobile equipment 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 grid map based on observation direction. Background Art

[0002] With the continuous development of artificial intelligence technology, smart mobile devices, such as sweeping robots, are being used more and more widely in various work and life scenarios of people. The accuracy of the scene map of the scene constructed by the smart mobile device will directly affect the movement smoothness and work efficiency of the smart mobile device.

[0003] Typically, a smart mobile device generally uses the detection sensors it carries to conduct environmental detection of the scene in which it is located to construct a scene map of the scene. Therefore, it is particularly important to propose a map construction method for constructing a scene map of the above scene by detecting the environment of the scene in which 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 intelligent mobile device for constructing a grid map based on an observation direction, so as to realize the construction of a scene map of the scene by detecting the environment of the scene where the intelligent 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 grid map based on an observation direction, the method comprising:

[0006] When the smart mobile device moves in the current scene, obtain each frame of environmental point cloud generated by environmental detection of the scene and located in a preset local coordinate system;

[0007] According to the generation order of each frame of environmental point cloud, the observation direction update process is performed for each frame of environmental point cloud in turn; wherein the observation direction update process includes: based on the frame of environmental point cloud, determining the current observation direction of each matching grid of the preset grid map; for each matching grid, if the matching grid records an average observation direction, then based on the determined current observation direction of the matching grid, updating the average observation direction recorded by the matching grid; otherwise, the determined current observation direction of the matching grid is used as the average observation direction and recorded in the matching grid; wherein the respective matching grids are: the grids to which the respective points of the target global point cloud corresponding to the frame of environmental point cloud in the preset global coordinate system belong in the grid map;

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

[0009] Optionally, in a specific implementation, determining the current observation direction of each matching grid of a preset 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; 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 the respective points of the target global point cloud belong in the grid map as respective matching grids, and calculate the current observation direction of each matching grid based on the position included in the target global pose and the position of each matching grid in the grid map.

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

[0013] 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;

[0014] Based on the initial pose, the frame environment point cloud is matched with the grid map to obtain the target global pose corresponding to the frame environment point cloud in the global coordinate system.

[0015] Optionally, in a specific implementation, matching the frame environment point cloud with the grid map based on the initial pose to obtain the target global pose corresponding to the frame environment point cloud in the global coordinate system includes:

[0016] 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;

[0017] 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;

[0018] 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 candidate position included in the candidate pose and the position of the target grid in the grid map to which each point of the initial global point cloud belongs in the grid map, the score of the candidate pose is calculated;

[0019] The candidate pose whose score meets the preset requirement is determined as the target global pose corresponding to the environmental data in the global coordinate system.

[0020] Optionally, in a specific implementation, determining each candidate angle based on the initial angle included in the initial posture and a preset angle search window includes:

[0021] Based on an initial angle included in the initial posture, a preset angle search window, and an angle search step, each candidate angle located within the angle search window and including the initial angle is determined.

[0022] Optionally, in a specific implementation, before determining each candidate angle located within the angle search window and including the initial angle based on the initial angle included in the initial posture, a preset angle search window, and an angle search step, the method further includes:

[0023] The angle search step is calculated based on the resolution of the grid map and the specified maximum distance; wherein 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.

[0024] Optionally, in a specific implementation, the calculating the angle search step length based on a preset grid map resolution and a specified maximum distance includes:

[0025] The angle search step length is calculated using the first formula; wherein the first formula is:

[0026]

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

[0028] Optionally, in a specific implementation, determining each candidate position based on the initial position included in the initial posture and a preset position search window includes:

[0029] Based on the initial position in the initial posture, a preset position search window and a position search step, each candidate position located in the position search window and including the initial position is determined.

[0030] Optionally, in a specific implementation, the calculating the score of the candidate pose based on the candidate position included in the candidate pose and the position of the grids to which each point of the initial global point cloud belongs in the grid map includes:

[0031] Determine the target grids to which each point of the initial global point cloud belongs in the grid map;

[0032] Based on the candidate positions included in the candidate poses and the position of each target grid in the grid map, a current observation direction of each target grid is calculated, and based on the current observation direction of each target grid and the average observation direction recorded by the target grid, a candidate observation direction of the target grid is calculated;

[0033] For each target grid, calculate the angle between the current observation direction of the target grid and the candidate observation direction of the target grid, and calculate the initial score of the target grid based on the angle;

[0034] Based on the calculated initial scores of all target grids, the score of the candidate pose is determined.

[0035] Optionally, in a specific implementation, the calculating the initial score of the target grid based on the angle includes:

[0036] If the angle is greater than a preset angle threshold, the product of the probability value recorded by the target grid and the first value is calculated as the initial score of the target grid; wherein the first value is a positive number less than 1;

[0037] If the angle is not greater than the preset angle threshold, the product of the probability value recorded by the target grid and the second value is calculated as the initial score of the target grid; wherein the first value is a positive number greater than 1;

[0038] The method further comprises:

[0039] For each frame of the environment point cloud, in response to converting the frame of the environment point cloud into a target global point cloud in the global coordinate system, the probability value of each grid record in the grid map is updated.

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

[0041] 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.

[0042] The processor is used to execute any of the observation direction-based grid map construction methods provided in the first aspect above based on the environment point clouds of each frame.

[0043] In a third aspect, an embodiment of the present application provides a grid map construction device based on observation direction, the device comprising:

[0044] A point cloud acquisition module is used to acquire each frame of environmental point cloud generated by environmental detection of the scene and located in a preset local coordinate system when the intelligent mobile device moves in the current scene;

[0045] The observation direction update module is used to execute the observation direction update 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 observation direction update process includes: based on the frame of the environment point cloud, determining the current observation direction of each matching grid of the preset grid map; for each matching grid, if the matching grid records an average observation direction, then based on the determined current observation direction of the matching grid, updating the average observation direction recorded in the matching grid; otherwise, the determined current observation direction of the matching grid is used as the average observation direction and recorded in the matching grid; wherein the respective matching grids are: the grids to which the respective points of the target global point cloud corresponding to the frame of the environment point cloud in the preset global coordinate system belong in the grid map;

[0046] The map determination module is used to determine the current grid map recording the average observation direction as the scene map of the scene in response to the intelligent mobile device passing through all areas in the scene.

[0047] Optionally, in a specific implementation, the observation direction updating module is specifically used to:

[0048] 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; 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;

[0049] Determine the grids to which the respective points of the target global point cloud belong in the grid map as respective matching grids, and calculate the current observation direction of each matching grid based on the position included in the target global pose and the position of each matching grid in the grid map.

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

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

[0052] The point cloud matching submodule is used to match the frame environment point cloud with the grid map based on the initial pose to obtain the target global pose corresponding to the frame environment point cloud in the global coordinate system.

[0053] Optionally, in a specific implementation, the point cloud matching submodule includes:

[0054] A candidate information determination unit, 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;

[0055] A candidate posture determination unit, 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;

[0056] A candidate pose scoring unit is used to convert the frame environment point cloud into an initial global point cloud in the global coordinate system for each candidate pose based on the candidate pose, and calculate the score of the candidate pose based on the candidate position included in the candidate pose and the position of the target grid to which each point of the initial global point cloud belongs in the grid map;

[0057] The posture determination unit is used to determine the candidate posture whose score meets the preset requirement as the target global posture corresponding to the environmental data in the global coordinate system.

[0058] Optionally, in a specific implementation manner, the candidate information determining unit includes:

[0059] The candidate angle determination subunit is used to determine each candidate angle located in the angle search window and including the initial angle based on the initial angle included in the initial posture, a preset angle search window and an angle search step.

[0060] Optionally, in a specific implementation, the device further includes:

[0061] A step length determination module is used to calculate the angle search step length based on the resolution of the grid map and a specified maximum distance before determining each candidate angle located within the angle search window and including the initial angle based on the initial angle included in the initial posture, a preset angle search window and an angle search step length; wherein 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.

[0062] Optionally, in a specific implementation, the step length determination module is specifically used to:

[0063] The angle search step length is calculated using the first formula; wherein the first formula is:

[0064]

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

[0066] Optionally, in a specific implementation manner, the candidate information determining unit includes:

[0067] The candidate posture determination subunit is used to determine each candidate position located in the position search window and including the initial position based on the initial position in the initial posture, a preset position search window and a position search step.

[0068] Optionally, in a specific implementation, the candidate pose scoring unit includes:

[0069] A grid determination subunit, used to determine the target grids to which each point of the initial global point cloud belongs in the grid map;

[0070] An observation direction calculation subunit, used to calculate the current observation direction of each target grid based on the candidate position included in the candidate posture and the position of each target grid in the grid map, and calculate the candidate observation direction of the target grid based on the current observation direction of each target grid and the average observation direction recorded by the target grid;

[0071] A grid scoring subunit, for calculating, for each target grid, an angle between a current observation direction of the target grid and a candidate observation direction of the target grid, and calculating an initial score of the target grid based on the angle;

[0072] The candidate pose scoring subunit is used to determine the score of the candidate pose based on the calculated initial scores of all target grids.

[0073] Optionally, in a specific implementation, the grid scoring subunit is specifically used to:

[0074] If the angle is greater than a preset angle threshold, the product of the probability value recorded by the target grid and the first value is calculated as the initial score of the target grid; wherein the first value is a positive number less than 1;

[0075] If the angle is not greater than the preset angle threshold, the product of the probability value recorded by the target grid and the second value is calculated as the initial score of the target grid; wherein the first value is a positive number greater than 1;

[0076] The device also includes:

[0077] The probability value updating module is used to update the probability value of each grid record in the grid map in response to converting the frame environment point cloud into the target global point cloud in the global coordinate system for each frame environment point cloud.

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

[0079] Memory, used to store computer programs;

[0080] The processor is used to implement the grid map construction method based on observation direction as described in any one of the first aspects above when executing the program stored in the memory.

[0081] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the method for constructing a grid map based on the observation direction described in any one of the first aspects above is implemented.

[0082] 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 observation direction-based grid map construction methods described in the first aspect.

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

[0084] 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 observation direction 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 average observation direction of each grid record of the preset grid map. Among them, for each frame of environmental point cloud, the above observation direction update process includes: based on the frame of environmental point cloud, determining the current observation direction of each matching grid of the preset grid map, and each matching grid is: the grid to which each point of the target global point cloud corresponding to the frame of environmental point cloud in the preset global coordinate system belongs in the grid map. Then, for each matching grid, if the matching grid records the average observation direction, the average observation direction recorded by the matching grid is updated based on the determined current observation direction of the matching grid; if the matching grid does not record the average observation direction, the determined current observation direction of the matching grid is recorded in the matching grid. When the above observation direction update process is executed 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 in the above scene, the grid map currently recording the average observation direction is determined as the scene map of the scene.

[0085] Based on this, the solution provided by the embodiment of the present application is applied, and the frame environmental point cloud generated by the intelligent mobile device for the current scene under the above-mentioned local coordinate system is used to gradually update the average observation direction 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.

[0086] Furthermore, the solution provided by the embodiment of the present application is different from the related art on map construction, in which the observation direction of the grid is only applied to the laser point of the current frame, and the observation direction of the grid is not integrated and used in the grid map. In the solution provided by the embodiment of the present application, by recording the average observation direction of each grid in the grid map, it is possible to obtain which grids in the grid map can be observed by the smart mobile device at the current position, and which grids cannot be observed. Therefore, in the matching process, the observability of each grid is considered, and then, false matches are filtered out to improve the robustness of the matching.

[0087] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] 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.

[0089] Figure 1 A schematic diagram of a flow chart of a method for constructing a grid map based on observation direction provided in an embodiment of the present application;

[0090] Figure 2 A schematic diagram of a current observation direction and a recorded average observation direction of a matching grid provided in an embodiment of the present application;

[0091] Figure 3 A schematic diagram of a scene map constructed using a robot as an intelligent mobile device provided in an embodiment of the present application is shown;

[0092] Figure 4 A flowchart of a specific implementation method of step 1021 provided in an embodiment of the present application;

[0093] Figure 5 A flowchart of a specific implementation method of step 4012 provided in an embodiment of the present application;

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

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

[0096] Figure 8A 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;

[0097] Fig. 9 A flowchart of a specific implementation method of S504 provided in an embodiment of the present application;

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

[0099] Fig.11 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;

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

[0101] Fig.13 A schematic diagram of a grid map construction device based on observation direction provided in an embodiment of the present application

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

[0103] 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.

[0104] 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.

[0105] In order to solve the above technical problems, an embodiment of the present application provides a grid map construction method based on observation direction.

[0106] The method can be applied to various application scenarios for constructing scene maps of scenes where smart mobile devices are located, such as constructing indoor maps of homes cleaned by cleaning robots, and constructing indoor maps of factory buildings where inspection robots work.

[0107] In addition, a detection sensor can be installed on the smart mobile device to detect the environment of the scene where the smart mobile device is located to generate an environmental point cloud for each frame. Among them, the smart mobile device can be equipped with various detection sensors as long as the detection sensor can generate an environmental point cloud. For example, the smart mobile device can be equipped with a laser radar as a detection sensor, or an image acquisition device such as a monocular camera. As for a monocular camera, due to its low cost, the cost of the smart mobile device can be further reduced by installing a monocular camera as a detection sensor, and it is more conducive to applying this method in low-cost smart mobile devices.

[0108] Among them, when the smart mobile device is equipped with a detection sensor and a data processing module, the smart mobile device can execute the method by the data processing module carried by itself without the help of other devices; when the detection sensor carried by the smart mobile device has a data processing function, the smart mobile device can execute the method by the data processing module with data processing function in the detection sensor carried by itself without the help of other devices; and in some cases, considering the data processing capabilities of the smart mobile device and the detection sensor carried by it, the method can be executed with the help of other devices such as a management platform. The above-mentioned management platform and other devices can communicate with the smart mobile device equipped with the detection sensor and have data processing capabilities to provide map construction services for the smart mobile device. In addition, the above-mentioned management platform and other devices used to execute the method can be an independent electronic device or a device cluster composed of multiple electronic devices, hereinafter referred to as electronic device.

[0109] 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.

[0110] A method for constructing a grid map based on observation direction provided in an embodiment of the present application may include the following steps:

[0111] When the smart mobile device moves in the current scene, obtain each frame of environmental point cloud generated by environmental detection of the scene and located in a preset local coordinate system;

[0112] According to the generation order of each frame of environmental point cloud, the observation direction update process is performed for each frame of environmental point cloud in turn; wherein the observation direction update process includes: based on the frame of environmental point cloud, determining the current observation direction of each matching grid of the preset grid map; for each matching grid, if the matching grid records an average observation direction, then based on the determined current observation direction of the matching grid, updating the average observation direction recorded by the matching grid; otherwise, the determined current observation direction of the matching grid is used as the average observation direction and recorded in the matching grid; wherein the respective matching grids are: the grids to which the respective points of the target global point cloud corresponding to the frame of environmental point cloud in the preset global coordinate system belong in the grid map;

[0113] In response to the intelligent mobile device passing through all areas within the scene, the current grid map recording the average observation direction is determined as the scene map of the scene.

[0114] 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 observation direction 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 average observation direction of each grid record of the preset grid map. Among them, for each frame of environmental point cloud, the above observation direction update process includes: based on the frame of environmental point cloud, determining the current observation direction of each matching grid of the preset grid map, and each matching grid is: the grid to which each point of the target global point cloud corresponding to the frame of environmental point cloud in the preset global coordinate system belongs in the grid map. Then, for each matching grid, if the matching grid records the average observation direction, the average observation direction recorded by the matching grid is updated based on the determined current observation direction of the matching grid; if the matching grid does not record the average observation direction, the determined current observation direction of the matching grid is recorded in the matching grid. When the above observation direction update process is executed 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 in the above scene, the grid map currently recording the average observation direction is determined as the scene map of the scene.

[0115] Based on this, the solution provided by the embodiment of the present application is applied, and the frame environmental point cloud generated by the intelligent mobile device for the current scene under the above-mentioned local coordinate system is used to gradually update the average observation direction 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.

[0116] Furthermore, the solution provided by the embodiment of the present application is different from the related art on map construction, in which the observation direction of the grid is only applied to the laser point of the current frame, and the observation direction of the grid is not integrated and used in the grid map. In the solution provided by the embodiment of the present application, by recording the average observation direction of each grid in the grid map, it is possible to obtain which grids in the grid map can be observed by the smart mobile device at the current position, and which grids cannot be observed. Therefore, in the matching process, the observability of each grid is considered, and then, false matches are filtered out to improve the robustness of the matching.

[0117] Below, in conjunction with the accompanying drawings, a grid map construction method based on observation direction provided in an embodiment of the present application is specifically described.

[0118] Figure 1 A flowchart of a method for constructing a grid map based on observation direction provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method may include the following steps S101-S103.

[0119] S101: When the smart mobile device moves in a current scene, obtain each frame of environmental point cloud generated by environmental detection of the scene and located in a preset local coordinate system.

[0120] Typically, a smart mobile device can start the scene map construction process when entering a certain scene. Therefore, in order to realize the construction of the scene map of the scene where the smart mobile device is located, the smart mobile device needs to enter the scene first. Among them, the smart mobile device can be brought into the scene by carrying, controlling the movement of the smart mobile device, etc. And, as mentioned above, the embodiment of the present application does not limit the application scenario of the method, that is, for various scenes where smart mobile devices are located, the solution provided in the embodiment of the present application can be used to construct scene maps.

[0121] After the smart mobile device enters the scene, it can move in the scene, and during the movement, the detection sensor carried by the smart mobile device starts the scene detection function, performs environmental detection on the scene, and generates an environmental point cloud through the environmental detection, and then, the environmental point cloud can be used to construct a scene map of the scene. The generated environmental point cloud is a point cloud located in a preset local coordinate system.

[0122] That is to say, when constructing a scene map for the scene currently located by the smart mobile device, the frame environment point cloud generated by the detection sensor carried by the smart mobile device for the scene and located in the preset local coordinate system can be obtained first while the smart mobile device is moving in the current scene. Different detection sensors may use different local coordinate systems.

[0123] For example, if the smart mobile device is equipped with a monocular camera as a detection sensor, the camera coordinate system of the monocular camera can be collected as the local coordinate system; and if the smart mobile device is equipped with a lidar as a detection sensor, the radar coordinate system of the lidar can be used as the local coordinate system.

[0124] Among them, the above-mentioned detection sensor performs environmental detection on the scene where the smart mobile device is currently located to generate an environmental point cloud. This method is related to the type and working mode of the above-mentioned detection sensor, and each environmental detection by the above-mentioned detection sensor can generate a frame of environmental point cloud. That is, each time the above-mentioned detection sensor generates a frame of environmental point cloud, it means that the above-mentioned detection sensor completes an environmental detection of the scene where the smart mobile device is currently located.

[0125] For example, when the detection sensor carried by the above-mentioned smart mobile device is an image acquisition device such as a monocular camera, the image acquisition device realizes environmental detection of the scene by acquiring the scene image of the scene currently located by the smart mobile device, and each time the image acquisition device performs environmental detection, it is the process of acquiring a frame of scene image of the scene, and the detection result of each environmental detection is a frame of scene image acquired of the scene, and then, a frame of environmental data can be generated based on the acquired frame of scene image. At this time, the preset local coordinate system is the camera coordinate system of the above-mentioned image acquisition device. In other words, each frame of environmental point cloud is generated based on a frame of image of the scene acquired by the above-mentioned image acquisition device, and is a point cloud located in the camera coordinate system of the above-mentioned image acquisition device.

[0126] Generally, in the related technologies for constructing a scene map of the scene currently located by a smart mobile device, the detection sensors carried by the smart mobile device are often various high-end detection sensors, such as TOF cameras, laser radars, depth cameras, etc. However, since the embodiment of the present application ultimately achieves recording the average observation direction of each grid in the scene map, and each frame image captured by the monocular camera can realize recording the average observation direction in each grid of the above-mentioned scene map, therefore, in the embodiment of the present application, the smart mobile device can be equipped with a monocular camera as a detection sensor. In this way, without reducing the accuracy of the obtained scene map, the performance requirements of the image acquisition device carried by the smart mobile device as a detection sensor can be significantly reduced, the cost of the smart mobile device can be reduced, and it is more conducive to the application of the solution provided by the embodiment of the present application in low-cost smart mobile devices.

[0127] For another example, when the detection sensor carried by the above-mentioned smart mobile device is a laser radar, the laser radar can transmit radar signals and receive echo signals of the radar signals, and the process of transmitting the above-mentioned radar signals and receiving echo signals is the process of the laser radar detecting the environment of the scene where the smart mobile device is currently located, and the laser radar can directly generate the environment contour point cloud of the above-mentioned scene according to the transmission of the above-mentioned radar signals and the reception of the echo signals, and output the above-mentioned environment contour point cloud. Among them, the above-mentioned environment contour point cloud is located in the radar coordinate system of the laser radar and serves as the environment point cloud of the scene where the smart mobile device is currently located. In other words, at this time, the preset local coordinate system is the radar coordinate system of the laser radar.

[0128] Among them, each time a frame of environmental point cloud is generated, the frame of environmental point cloud can be immediately obtained, and the observation direction update process can be immediately performed on 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 observation direction update process can be performed on each frame of environmental point cloud in the order in which each frame of environmental point cloud is generated.

[0129] S102: according to the generation order of each frame of the environment point cloud, the observation direction update process is performed for each frame of the environment point cloud in turn; wherein the observation direction update process includes: based on the frame of the environment point cloud, determining the current observation direction of each matching grid of the preset grid map; for each matching grid, if the matching grid records an average observation direction, then based on the determined current observation direction of the matching grid, updating the average observation direction recorded in the matching grid; otherwise, taking the determined current observation direction of the matching grid as the average observation direction and recording it in the matching grid;

[0130] Wherein, each matching grid is: the grid to which each point of the target global point cloud corresponding to the frame environment point cloud in the preset global coordinate system belongs in the grid map;

[0131] After obtaining the above-mentioned environmental point clouds of each frame, the observation direction update process can be performed for each frame of environmental point cloud in turn according to the generation order of each frame of environmental point cloud.

[0132] That is to say, the observation direction 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 observation direction update process is executed for the second frame of the environment point cloud; after the execution is completed, the observation direction update process is executed for the third frame of the environment point cloud. The observation direction 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 observation direction update process is completed for a frame of the environment point cloud, the observation direction update process is executed for the next frame of the environment point cloud of the frame. Since when the observation direction update process is executed for each frame of the environment point cloud, it can be considered that the frame of the environment point cloud is used to complete an average observation direction update of the preset grid map. 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 gradual update of the above-mentioned grid map.

[0133] Among them, for each frame of environmental point cloud, the above observation direction updating process may include the following steps 1021-1022.

[0134] Step 1021: Based on the frame environment point cloud, determine the current observation direction of each matching grid of the preset grid map.

[0135] Step 1022: For each matching grid, if the matching grid records an average observation direction, the average observation direction recorded in the matching grid is updated based on the determined current observation direction of the matching grid; otherwise, the determined current observation direction of the matching grid is used as the average observation direction and recorded in the matching grid.

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

[0137] In this way, for each frame of the environment point cloud, the frame environment point cloud can be first converted into a target global point cloud in a preset global coordinate system, and the target global point cloud corresponding to the frame environment point cloud in the preset global coordinate system can be obtained. Furthermore, 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 target 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, 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.

[0138] For each frame of environmental point cloud, the current observation direction of each matching grid in the above grid map can be determined. For each matching grid, if the matching grid has already recorded the average observation direction, the average observation direction recorded in the matching grid can be updated based on the determined current observation direction of the matching grid. On the contrary, if the matching grid does not record the average observation direction, the determined current observation direction of the matching grid can be used as the average observation direction and recorded in the matching grid. After the above execution process is completed for all matching grids, it can be considered that the observation direction update process for the frame of environmental point cloud is completed.

[0139] Among them, for the above-mentioned first-frame environmental point cloud, when determining the current observation direction of each matching grid, since the average observation direction is not recorded in each grid of the above-mentioned grid map, for the above-mentioned first-frame environmental point cloud, the current observation direction of each matching grid can be directly used as the average observation direction and recorded in the matching grid.

[0140] For each frame of environmental point cloud except the first frame of environmental point cloud, there is already a grid recording the average observation direction 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 observation direction of each matching grid, for each matching grid, you can first check whether the average observation direction has been recorded in the matching grid. If the average observation direction has been recorded in the matching grid, then based on the determined current observation direction of the matching grid, the average observation direction recorded in the matching grid is updated; otherwise, the determined current observation direction of the matching grid is used as the average observation direction and recorded in the matching grid.

[0141] For example, Figure 2 is a schematic diagram of the current observation direction of a matching grid and the recorded average observation direction, where Figure 2 As shown, Figure 2The robot in the figure is an intelligent mobile device. The position of the robot is the position point in the grid map corresponding to the target global pose in the global coordinate system of a frame of environmental point cloud other than the first frame of environmental point cloud. The current observation direction vd of the grid is the current observation direction of a matching grid determined for the above frame of environmental point cloud, and the average observation direction VD of the grid is the average observation direction recorded by the matching grid.

[0142] Optionally, for each matching grid, if the matching grid records an average observation direction, the average observation direction recorded in the matching grid can be updated by using the current observation direction of the matching grid through the following formula (1).

[0143]

[0144] in, is the current observation direction of the ath matching grid determined for the kth frame environment point cloud, is the average observation direction of the a-th matching grid record, is the current weight of the a-th matching grid above, is the weight of the a-th matching grid record above, The new average observation direction is obtained by updating the average observation direction recorded in the a-th matching grid based on the current observation direction of the a-th matching grid.

[0145] Among them, for the k-th frame environment point cloud, the a-th matching grid determined is: for the k-th frame environment point cloud, based on the target global pose corresponding to the k-th frame environment point cloud in the above-mentioned global coordinate system, after converting the k-th frame environment point cloud into the target global point cloud in the above-mentioned global coordinate system, the a-th matching grid in the matching grids to which each point of the target global point cloud belongs in the grid map.

[0146] In order to realize the calculation of the above formula (1), it is necessary to first obtain the current weight and recorded weight of each matching grid, and the current weight and recorded weight of each matching grid are obtained as follows:

[0147] For each frame of environmental point cloud, after converting the frame of environmental point cloud into a target global point cloud in a global coordinate system, weights can be assigned to each point in the target global point cloud. The weight of each point in the target global point cloud is the current weight of the matching grid to which the point belongs in the above-mentioned grid map.

[0148] Optionally, a point cloud error model may be used to assign weights to each point of the target global point cloud.

[0149] Generally, according to relevant theories regarding point cloud error, such as point cloud error models, etc., the distance between the point cloud and the center of the detection sensor used to generate the point cloud can affect the error of the point cloud. Among them, for multiple point clouds generated by the same detection sensor, for each point cloud among the above-mentioned multiple point clouds, the farther the point cloud is from the center of the detection sensor, the greater the error of the point cloud. Correspondingly, for the same point cloud, the distance between the points in the point cloud and the center of the detection sensor used to generate the point cloud can also affect the error of the points in the point cloud. For each point in the point cloud, the farther the point is from the center of the above-mentioned detection sensor, the greater the error of the point. Based on this, for each frame of environmental point cloud, after obtaining the target global point cloud in the above-mentioned global coordinate system through point cloud conversion, the weights of each point of the above-mentioned target global point cloud can be determined based on a preset point cloud error model. Among the points of the target global point cloud, the points farther from the center of the above-mentioned detection sensor have smaller weights.

[0150] For example, the above-mentioned target global point cloud includes point 1 and point 2, the distance between point 1 and the center of the detection sensor is a1, the distance between point 2 and the center of the detection sensor is a2, and a1 < a2. Then, using the point cloud error model, among the weights obtained by assigning weights to point 1 and point 2, the weight of point 1 is greater than the weight of point 2.

[0151] For the first frame of environmental point cloud, when determining the weights of each matching grid, since no weights are recorded in each grid of the above-mentioned grid map, for the above-mentioned first frame of environmental point cloud, the weight of each matching grid can be directly recorded in the matching grid.

[0152] In this way, for the first frame of environmental point cloud, in response to converting this frame of environmental point cloud into a target global point cloud in the global coordinate system, the weights of each matching grid are determined, and the weight of each matching grid is recorded in the matching grid. For the first frame of environmental point cloud, when the observation direction update process is completed, both the average observation direction and the weight are recorded in each target grid.

[0153] Correspondingly, for each frame of environmental point cloud except the first frame of environmental point cloud, after obtaining the weights of each matching grid, for each matching grid, if no weight is recorded in the matching grid, the initial weight of the matching grid is recorded in the matching grid; if a weight is recorded in the matching grid, the current weight of the matching grid is used to update the weight recorded in the matching grid.

[0154] In this way, for each frame of environmental point cloud except the first frame of environmental point cloud, if the average observation direction is recorded in the matching grid, in response to recording the updated new average observation direction in the matching grid, the current weight of the matching grid can be used to update the weight recorded in the matching grid.

[0155] 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 average observation direction, or neither the weight nor the average observation direction will be recorded at the same time. There is no grid that only records the weight but not the average observation direction, nor is there a grid that only records the average observation direction but not the weight.

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

[0157]

[0158] in, is a new weight obtained by updating the weight of the a-th matching grid record based on the current weight of the a-th matching grid.

[0159] For the sake of clarity, the specific implementation method of the above observation direction update process will be illustrated below with examples.

[0160] S103: In response to the intelligent mobile device passing through all areas within the scene, determining the grid map currently recording the average observation direction as the scene map of the scene.

[0161] In order to construct a scene map of the scene where the smart mobile device is currently located, it is usually necessary to determine whether the smart mobile device has passed through all areas of the scene, thereby improving the coverage rate of the scene map obtained in the end, so that the scene map obtained in the end can cover as many areas of the scene as possible. Based on this, a region detection function can be set for the smart device to check whether there are areas in the scene that have not been passed through. Among them, when the smart mobile device moves in the scene, while the detection sensor it carries performs environmental detection, it can also record the areas that the smart mobile device has passed through in the scene during the above movement, so that, based on the above recorded area data, it can detect whether the smart mobile device has passed through all areas in the scene.

[0162] For example, the smart mobile device can record the image features of the scene images of the areas that have been passed during the movement as the scene information of the areas passed. When the smart mobile device moves from the current position to the next position, it can obtain the scene map of the area where the position is moved to, and by comparing the scene maps before and after the movement, it can be determined whether the area where the position is moved to is an area that has been passed. If yes, it moves from the current position to the next position again; if not, it can be confirmed that the area where the position is moved to is the first area passed, and then at the current position, the detection sensor carried is used to perform environmental detection to obtain an environmental point cloud. The cycle is repeated until the smart mobile device detects that no matter how it moves, the area where the next position is moved to belongs to the area that has been passed. At this time, it can be determined that the smart mobile device has passed through all areas in the scene.

[0163] When the smart mobile device has passed through all areas of the scene, it means that the smart mobile device has completed the environmental detection of the scene it is currently in. At this point, the smart mobile device can stop moving, and then stop the environmental detection of the scene, and at the same time 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 average observation direction can be determined as the scene map of the scene.

[0164] For example, Figure 3 The schematic diagram of a scene map constructed by using a robot as an intelligent mobile device provided in an embodiment of the present application is shown, wherein Figure 3 As shown, the scene map is a grid map. Figure 3 Each square in is a grid in the map, and the direction pointed by the arrow in each grid is the average observation direction recorded in the grid.

[0165] Based on this, the solution provided by the embodiment of the present application is applied, and the frame environmental point cloud generated by the intelligent mobile device for the current scene under the above-mentioned local coordinate system is used to gradually update the average observation direction 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.

[0166] Furthermore, the solution provided by the embodiment of the present application is different from the related art on map construction, in which the observation direction of the grid is only applied to the laser point of the current frame, and the observation direction of the grid is not integrated and used in the grid map. In the solution provided by the embodiment of the present application, by recording the average observation direction of each grid in the grid map, it is possible to obtain which grids in the grid map can be observed by the smart mobile device at the current position, and which grids cannot be observed. Therefore, in the matching process, the observability of each grid is considered, and then, false matches are filtered out to improve the robustness of the matching.

[0167] The following is an example of a specific implementation of the observation direction update process performed on each frame of the environment point cloud.

[0168] Optionally, in a specific implementation, such as Figure 4 As shown, the above step 1021, based on the frame environment point cloud, determines the current observation direction of each matching grid of the preset grid map, and can include the following steps S401-S402.

[0169] S401: 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 the target global point cloud in the global coordinate system;

[0170] 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.

[0171] In this specific implementation, for each frame of environment point cloud, the target global pose corresponding to the frame environment point cloud in the above-mentioned global coordinate system can be first determined, and based on the target global pose, the frame environment point cloud can be converted into the target global point cloud in the global coordinate system.

[0172] Generally, a posture may include: position and attitude, wherein the position corresponds to a position point in the coordinate system to which the posture belongs, i.e., the position can be used to indicate a position point with coordinates of the position in the coordinate system to which the posture belongs, and the attitude can be represented by the angle between the specified direction of the object with the posture and the specified coordinate axis of the coordinate system to which the posture belongs, i.e., the above attitude can be an angle. In this specific implementation, the posture corresponding to each frame of the environmental point cloud can be understood as the posture of the smart mobile device when the frame of the environmental point cloud is generated.

[0173] Among them, considering that when constructing a scene map of the scene where the smart mobile device is currently located, the smart device is usually located on the ground within the scene, therefore, the ground can be used as the horizontal plane of the above-mentioned global coordinate system. Therefore, the height coordinate of the smart mobile device in the vertical direction of the above-mentioned global coordinate system is 0, and the smart mobile device can be regarded as being located in the horizontal plane of the global coordinate system.

[0174] Based on this, in this specific implementation, for each frame environment point cloud, when obtaining the target global pose corresponding to the frame environment point cloud in the global coordinate system, the position in the target global pose can usually omit the height coordinate in the global coordinate system and be represented by a two-dimensional coordinate, and the two-dimensional coordinate corresponds to a position point in the horizontal plane of the global coordinate system. In addition, the posture in the target global pose is the angle between the orientation of the smart mobile device and the specified coordinate axis in the horizontal plane of the above-mentioned global coordinate system when generating the frame environment point cloud, that is, the posture in the target global pose is a specific angle.

[0175] For example, the above-mentioned global coordinate system is the world coordinate system, then the smart mobile device is located in the XOY plane (horizontal plane) of the world coordinate system, and the coordinate of the Z axis (vertical direction) is 0. Therefore, the position in the above-mentioned target global posture can be a two-dimensional coordinate in the form of (x-axis coordinate, y-axis coordinate). The position point corresponding to the two-dimensional coordinate in the XOY plane of the world coordinate system can be understood as the position of the smart mobile device in the XOY plane, and the posture 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.

[0176] For the first frame environment point cloud, the above target global pose is: the set pose in the global coordinate system. That is to say, for the first frame environment point cloud, a specific pose in the above global coordinate system can be pre-set as the set pose, so that the set pose can be directly used as the target global pose corresponding to the first frame environment point cloud in the global coordinate system.

[0177] Exemplarily, for the first frame environment point cloud, the set posture can be preset as A, which includes the position (0,0) and the angle α, and the position corresponds to the origin of the global coordinate system, that is, when the first frame environment point cloud is generated, the smart mobile device is located at the origin of the global coordinate system, and the angle α indicates that when the first frame environment point cloud is generated, the angle between the orientation of the smart mobile device and the specified coordinate axis in the horizontal plane of the global coordinate system is α. If the specified coordinate axis is the X-axis in the horizontal plane, the angle between the orientation of the smart mobile device and the X-axis of the global coordinate system is α when the first frame environment point cloud is generated.

[0178] Optionally, inertial measurement units, wheel speed meters, laser odometers, visual odometers, etc. can be used as positioning sensors and carried on smart mobile devices to determine the position and posture of the smart mobile device in the world coordinate system. Therefore, the world coordinate system can be set as the global coordinate system, and when the first frame of the environmental point cloud is generated, the position and posture determined by the positioning sensor carried by the smart mobile device at the same time as the first frame of the environmental point cloud is generated can be read as the above-mentioned set position and posture.

[0179] For example, when generating the first frame of the environmental point cloud, the inertial measurement unit carried by the smart mobile device determines that the posture B at the same time is, then the posture B can be directly used as the above-mentioned set posture.

[0180] 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.

[0181] 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 be called 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.

[0182] For example, the above-mentioned smart mobile device is equipped with an inertial measurement unit. For each frame of environmental point cloud except the first frame of environmental point cloud, the laser odometer can determine a posture at the same time when the frame of environmental point cloud is generated, and the posture can be used as the initial posture of the frame environment.

[0183] Optionally, in a specific implementation, for each frame environment point cloud except the first frame environment point cloud, a method for determining the target global pose corresponding to the frame environment point cloud in the global coordinate system may include the following steps 4011-4012.

[0184] Step 4011: obtaining 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;

[0185] Step 4012: Based on the initial pose, the frame environment point cloud is matched with the grid map to obtain the target global pose corresponding to the frame environment point cloud in the global coordinate system.

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

[0187] Furthermore, for each frame of environment point cloud except the first frame of environment point cloud, when the above-mentioned initial pose is obtained, the frame of environment point cloud can be matched with the above-mentioned grid map based on the initial pose to obtain the target global pose corresponding to the frame of environment point cloud in the global coordinate system.

[0188] For the sake of clarity, the specific implementation method of the above step 4012 will be explained with examples later.

[0189] S402: Determine the grids to which each point of the target global point cloud belongs in the grid map as each matching grid, and calculate the current observation direction of each matching grid based on the position included in the target global pose and the position of each matching grid in the grid map.

[0190] 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. Furthermore, for each matching grid, the current observation direction of the matching grid can be calculated based on the position included in the target global pose and the position of the matching grid in the grid map.

[0191] Among them, for each frame of the environment point cloud, since the above-mentioned target global pose is the pose in the above-mentioned global coordinate system, the position included in the above-mentioned target global pose corresponds to a position point in the above-mentioned grid map. Therefore, after determining the grids to which each point of the above-mentioned target global point cloud belongs in the above-mentioned grid map and obtaining each matching grid, for each matching grid, the current observation direction of the matching grid can be calculated based on the position point corresponding to the position included in the above-mentioned target global pose in the above-mentioned grid map and the position of the matching grid in the above-mentioned grid map.

[0192] That is to say, for each matching grid, the current observation direction of the matching grid can be understood as a vector, and the direction of the vector is: from the position of the matching grid in the grid map to the direction of the position corresponding to the position included in the above-mentioned target global posture in the above-mentioned grid map, and the distance of the vector is: the distance between the position of the matching grid in the grid map and the position corresponding to the position included in the above-mentioned target global posture in the above-mentioned grid map.

[0193] Optionally, for each matching grid, the current observation direction of the matching grid may be calculated by the following formula (3).

[0194]

[0195] in, is the current observation direction of the ath matching grid determined for the kth frame environment point cloud, is the position coordinate of the ath matching grid in the grid map, P k The coordinates of the position in the grid map included in the target global pose corresponding to the above-mentioned k-th frame environment point cloud in the above-mentioned global coordinate system.

[0196] Optionally, in a specific implementation, such as Figure 5 As shown, step 4012, based on the initial pose, matches the frame environment point cloud with the grid map to obtain the target global pose corresponding to the frame environment point cloud in the global coordinate system, which may include the following steps S501-S505.

[0197] S501: Determine various candidate angles based on an initial angle included in the initial posture and a preset angle search window.

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

[0199] In this specific implementation method, for each frame of environmental point cloud except the first frame of environmental point cloud, after obtaining the above-mentioned initial pose, 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.

[0200] For each frame of environmental point cloud except the first frame, the initial posture determined by the positioning sensor may have errors, taking into account the posture errors caused by equipment errors, temperature drift, etc., and the error may be an error in the initial position, an error in the initial angle, or an error in both the initial position and the 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 initial angle may be located, and the position range where the error in the initial position may be located. In this way, each candidate angle can be determined based on the initial angle and the angle search window, and each candidate position can be determined based on the initial position and the position search window.

[0201] 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.

[0202] 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.

[0203] For example, Figure 6 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 (-α, α).

[0204] 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.

[0205] For example, the position search window is a rectangular area with the initial position as the center, the first length as the long side length, and the second length as the short side length, wherein the first length is greater than the second length. For another example, the position search window is a positive direction area with a specified length with the initial position as the center.

[0206] For example, Figure 7As 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.

[0207] For the sake of clarity, the specific implementation of the above steps S501 and S502 will be described below with examples.

[0208] S503: Determine each candidate pose based on each candidate angle and each candidate position.

[0209] Each candidate posture includes: a candidate angle and a candidate position, and different candidate postures include different candidate angles and / or candidate positions.

[0210] For each frame of the environment point cloud except the first frame, after determining the above candidate angles and candidate positions, the candidate poses can be determined based on the candidate angles and candidate positions. Moreover, the determined candidate poses are poses in the above global coordinate system.

[0211] 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.

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

[0213] For example, for the environmental point cloud other than 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, 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.

[0214] 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 subsequent postures.

[0215] 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.

[0216] S504: 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 the score of the candidate pose is calculated based on the candidate positions included in the candidate pose and the positions of the target grids to which the points of the initial global point cloud belong in the grid map.

[0217] 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 data can be selected according to the score of each candidate pose.

[0218] In this way, for each candidate pose, the frame environment point cloud can be converted into an initial global point cloud in the global coordinate system based on the candidate pose. After that, the grids to which each point of the initial global point cloud belongs in the grid map are determined as the target grids. Then, the score of the candidate pose can be calculated based on the candidate positions included in the candidate pose and the positions of each target grid in the grid map.

[0219] For the sake of clarity, the specific implementation method of calculating the score of each candidate posture in the above step S504 will be described below with examples.

[0220] S505: Determine the candidate pose whose score meets the preset requirement as the target global pose corresponding to the environment data in the global coordinate system.

[0221] For each frame of the environment point cloud except the first frame, after calculating the scores of the above-mentioned 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.

[0222] Optionally, in a specific implementation, the above step S505 may include the following step 5051.

[0223] 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.

[0224] 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.

[0225] Optionally, in a specific implementation, the above step S501, based on the initial angle included in the initial posture and a preset angle search window, determines each candidate angle, and may include the following step 5011.

[0226] Step 5011: 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.

[0227] In this specific implementation, for each environmental data except the first environmental data, after obtaining the initial posture corresponding to the environmental data, each candidate angle can be determined based on the initial angle included in the initial posture, the preset angle search window and the angle search step. Wherein, each candidate angle is located within the angle search window, and each candidate angle includes the initial angle.

[0228] The angle search step may be gradually reduced or increased starting from the maximum or minimum value of the angle search window, so that the result of each reduction or increase is used as each candidate angle. When the result of each reduction or increase includes the initial angle, the initial angle is determined as the candidate angle, and when the result of each reduction or increase does not include the initial angle, the initial angle may be added to the candidate angle after the angle search step is gradually reduced or increased, that is, the initial angle is also determined as the candidate angle.

[0229] 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.

[0230] 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.

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

[0232] Optionally, in a specific implementation, when determining the above-mentioned candidate angles, before the above-mentioned step 5011, a grid map construction method based on observation direction provided by an embodiment of the present invention can also be performed as follows step 5010.

[0233] Step 5010: Calculate the angle search step size based on the resolution of the grid map and the specified maximum distance.

[0234] 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.

[0235] In this specific implementation, for each frame of the environment point cloud except the first frame of the environment point cloud, after obtaining the above initial pose and before determining each candidate angle, the distance between each point of the frame of the environment point cloud and the center of the detection sensor used to generate the frame of the 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.

[0236] 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.

[0237] Optionally, the above step 5010 may include the following step 1:

[0238] Step 1: Calculate the angle search step using the first formula; the first formula is:

[0239]

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

[0241] 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 8 The geometric relationship shown in Figure 8 The triangle shown is an isosceles triangle.

[0242] Optionally, in a specific implementation, the above step S502, based on the initial position included in the initial posture and a preset position search window, determines each candidate position, and may include the following step 5021.

[0243] Step 5021: 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.

[0244] In this specific implementation, for each frame of the environment point cloud except the first frame of the environment point cloud, after obtaining the above initial pose, 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.

[0245] 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.

[0246] For example, Figure 7 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 7 The positions of each grid in the position search window shown can be used as candidate positions.

[0247] For example, Figure 7 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 7 The positions of the grids marked with "x" in the position search window shown and the above initial positions are used as candidate positions.

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

[0249] Optionally, in a specific implementation, such as Fig. 9 As shown, in the above step S504, based on the candidate positions included in the candidate pose and the positions of the target grids to which the various points of the initial global point cloud belong in the grid map, the score of the candidate pose is calculated, which may include the following steps S5041-S5044.

[0250] S5041: Determine the target grids to which each point of the initial global point cloud belongs in the grid map.

[0251] S5042: Based on the candidate positions included in the candidate pose and the position of each target grid in the grid map, calculate the current observation direction of each target grid, and based on the current observation direction of each target grid and the average observation direction recorded by the target grid, calculate the candidate observation direction of the target grid.

[0252] In this specific implementation, for each frame of the environment point cloud except the first frame of the environment point cloud, each candidate pose can be obtained. Furthermore, for each candidate pose, after the frame of the environment point cloud is converted into an initial global point cloud in the global coordinate system based on the candidate pose, the grids to which each point of the initial global point cloud belongs in the grid map can be determined as each target grid.

[0253] Among them, since the candidate pose is a pose in the above-mentioned global coordinate system, the candidate position included in the candidate pose corresponds to a position point in the above-mentioned grid map. Therefore, after determining the above-mentioned target grids, for each target grid, the current observation direction of the target grid can be calculated based on the position point corresponding to the candidate position included in the candidate pose in the above-mentioned grid map and the position of the target grid in the above-mentioned grid map, and the candidate observation direction of the target grid can be calculated based on the current observation direction of the target grid and the average observation direction recorded by the target grid.

[0254] That is to say, for each target grid, the current observation direction of the target grid can be understood as a vector, and the direction of the vector is: from the position of the target grid in the grid map to the direction of the position point corresponding to the candidate position included in the candidate posture in the above grid map, and the distance of the vector is: the position of the target grid in the grid map, and the distance between the position point corresponding to the above candidate position in the above grid map.

[0255] Optionally, for each target grid, the current observation direction of the target grid can be calculated by the following formula (4).

[0256]

[0257] in, is the current observation direction of the bth target grid determined for the tth candidate pose, is the position coordinate of the bth target grid in the grid map, P t The coordinates of the candidate positions included in the tth candidate pose in the grid map.

[0258] Among them, for the t-th candidate pose, the b-th target grid determined is: based on the t-th candidate pose, after the frame environment point cloud is converted into the initial global point cloud in the above-mentioned global coordinate system, the b-th matching grid in each target grid to which each point of the initial global point cloud belongs in the grid map.

[0259] Furthermore, for each target grid, if the average observation direction is not recorded in the target grid, the current observation direction of the target grid can be used as the candidate observation direction of the target grid; if the average observation direction is already recorded in the target grid, the candidate observation direction of the target grid can be calculated based on the current observation direction of the target grid calculated above and the average observation direction recorded in the target grid.

[0260] Optionally, for each target grid, if the average observation direction has been recorded in the target grid, the candidate observation direction of the target grid can be calculated based on the calculated current observation direction of the target grid and the average observation direction recorded in the target grid by the following formula (5).

[0261]

[0262] in, is the current observation direction of the bth target grid determined for the tth candidate pose, is the average observation direction recorded in the bth target grid, is the current weight of the b-th target grid, is the weight of the bth target grid record above, Based on the current observation direction of the b-th target grid and the average observation direction recorded by the b-th target grid, the candidate observation direction of the b-th target grid is calculated.

[0263] In order to realize the calculation of the above formula (5), it is necessary to first obtain the current weight and recorded weight of each target grid. The current weight and recorded weight of each target grid are obtained in the same way as the current weight and recorded weight of each matching grid, which will not be repeated here.

[0264] S5043: For each target grid, calculate the angle between the current observation direction of the target grid and the candidate observation direction of the target grid, and calculate the initial score of the target grid based on the angle.

[0265] For each frame of the environment point cloud except the first frame, after obtaining each candidate pose, the current observation direction and candidate observation direction of each target grid can be determined for each candidate pose. Thus, for each of the above target grids, the angle between the current observation direction of the target grid and the candidate observation direction of the target grid can be calculated.

[0266] Among them, for each target grid, the larger the calculated angle is, the lower the observability of the target grid can be considered, and conversely, the smaller the calculated angle is, the higher the observability of the target grid can be considered. Therefore, for each target grid, the calculated angle can affect the observability of the target grid, and then affect the score of the target grid. Therefore, for each target grid, the initial score corresponding to the target grid can be calculated based on the calculated angle.

[0267] Optionally, in a specific implementation, in the above S5043, calculating the initial score corresponding to the target grid based on the angle may include the following steps 2-3.

[0268] Step 2: If the angle is greater than the preset angle threshold, the product of the probability value recorded by the target grid and the first value is calculated as the initial score of the target grid; wherein the first value is a positive number less than 1.

[0269] Step 3: If the angle is not greater than the preset angle threshold, the product of the probability value recorded by the target grid and the second value is calculated as the initial score of the target grid; wherein the first value is a positive number greater than 1.

[0270] In this specific implementation, the above-mentioned grid map can be a probability grid map, and each grid in the probability grid map records a probability value. The probability value recorded in each grid indicates the possibility that a specified object exists in the area corresponding to the grid in the scene, for example, the possibility of an obstacle, the possibility of a ceiling edge feature, etc. The higher the probability value recorded in each grid, the greater the possibility that the specified object exists in the area corresponding to the grid in the scene. Conversely, the lower the probability value recorded in each grid, the smaller the possibility that the specified object exists in the area corresponding to the scene. Among them, for the sake of simplicity, the possibility that a specified object exists in the area corresponding to the grid in the scene is referred to as the possibility that the grid exists

[0271] For the probability grid map, before the probability grid map is updated, each grid in the probability grid map records an initial probability value. For example, the initial probability value may be 0.5, indicating that the probability of the grid having a specified object or not having a specified object is the same.

[0272] In this way, when the probability grid map is updated using the above-mentioned environmental point cloud of each frame, for each point in the global point cloud corresponding to the environmental point cloud of the frame in the above-mentioned global coordinate system, it can be considered that the possibility of the existence of a specified object in the grid to which the point belongs in the probability grid map increases, thereby increasing the probability value recorded by the grid. Correspondingly, for other grids in the probabilistic post-grid map except the grids to which the various points of the above-mentioned global point cloud belong, it can be considered that the possibility of the existence of a specified object in the above-mentioned other grids decreases, thereby reducing the probability values ​​recorded by the above-mentioned other grids.

[0273] Therefore, for each target grid, if the calculated angle is greater than the preset angle threshold, it can be considered that the observability of the target grid is low, so the product of the probability value recorded by the target grid and the first value can be calculated, and the product is used as the initial score of the target grid. Among them, since the above-mentioned first value is a positive number less than 1, it is equivalent to multiplying a penalty term on the probability value recorded by the target grid, thereby further reducing the score of the target grid based on the probability value recorded by the target grid.

[0274] On the contrary, for each target grid, if the calculated angle is not greater than the preset angle threshold, it can be considered that the observability of the target grid is high, so the product of the probability value recorded by the target grid and the second value can be calculated, and the product is used as the initial score of the target grid. Among them, since the above second value is a positive number greater than 1, it is equivalent to multiplying the probability value recorded by the target grid by a bonus item, thereby further improving the score of the target grid based on the probability value recorded by the target grid.

[0275] Accordingly, in the specific implementation shown in the above steps 2-3, the grid map construction method based on the observation direction provided by the embodiment of the present invention may further include the following step 4:

[0276] Step 4: For each frame of the environment point cloud, in response to converting the frame of the environment point cloud into the target global point cloud in the global coordinate system, the probability value of each grid record in the grid map is updated.

[0277] For each frame of environmental point cloud, after converting the frame of environmental point cloud into the target global point cloud in the global coordinate system, the probability value of each grid record in the grid map is updated according to the matching grid to which each point of the target global point cloud belongs in the probability grid map.

[0278] In this way, in the constructed scene map, each grid not only records the average observation direction but also records the probability value, thereby enriching the information recorded in the above scene map and improving the matching accuracy.

[0279] S5044: Determine the score of the candidate pose based on the calculated initial scores of all target grids.

[0280] For each frame of the environment point cloud except the first frame, after obtaining each candidate pose, the initial score of each target grid can be calculated for each candidate pose. In this way, after calculating the initial scores of all target grids, the score of the candidate pose can be determined based on the calculated initial scores of all target grids.

[0281] For example, for each target grid, the product of the current weight of the target grid and the initial score of the target grid is calculated, and then the sum of all products is calculated as the score of the candidate posture. For another example, the sum of the initial scores of all target grids can be calculated as the score of the candidate posture.

[0282] 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, in which the specific implementation method of obtaining the environmental point clouds of each frame generated by environmental detection of the scene and located in a preset local coordinate system while the smart mobile device is moving in the current scene, is illustrated by way of example.

[0283] Optionally, when the detection sensor carried by the above-mentioned smart mobile device is an image acquisition device such as a monocular camera, the image acquisition device can acquire each frame of scene images of the scene currently located by the smart mobile device. In this way, for each frame of scene image acquired, the edge features of the ceiling area of ​​the frame of scene image can be extracted, and the extracted edge features can be converted into a local point cloud in a preset local coordinate system, and the local point cloud is the environmental point cloud generated based on the frame of scene image. Among them, the acquisition order of each frame of scene image is the generation order of each frame of environmental point cloud obtained based on each frame of scene image. In other words, the first frame of environmental point cloud is the local point cloud determined based on the first frame of image. The above-mentioned local coordinate system is the camera coordinate system of the above-mentioned image acquisition device for scene image acquisition.

[0284] Generally, depending on the performance of the smart mobile device, the edge features of the ceiling area of ​​each frame of the image may be extracted using a variety of different methods such as deep learning algorithms and traditional image processing algorithms. This embodiment of the present application does not specifically limit this.

[0285] For example, Fig.10 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.

[0286] In addition, considering the different acquisition angles of the above-mentioned image acquisition devices, the edge features of the ceiling area of ​​each frame of the image extracted above can be converted into an environmental point cloud in different ways, and the obtained environmental 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 vertically upward, such as Fig.11 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.

[0287] In this specific implementation, the edge features of the ceiling area of ​​each frame image are used to construct the scene map. Therefore, there is no need to track the feature points in each frame 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 image, the illumination changes 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 illumination changes have a small impact on the edge features of the ceiling area in the image. Therefore, compared with the related technology of map construction, which tracks, describes and matches the visual features of the 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 image, which is less affected by illumination changes and has higher robustness.

[0288] In this specific implementation method, the preset ceiling height and the target intrinsic reference model corresponding to each frame of image can be used to perform point cloud conversion on the edge features of each frame of image to obtain the local point cloud corresponding to each frame of image as the environment point cloud, and the above-mentioned local coordinate system is the target camera coordinate system corresponding to the above-mentioned target intrinsic reference model.

[0289] For different scenarios and different smart mobile devices, the image acquisition devices carried by different smart mobile devices can be installed at different positions of the smart mobile devices and have different acquisition viewing angles.

[0290] For example, Fig.11 As shown in , the intelligent mobile device is a robot, and the image acquisition device is a camera. Fig.11 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 camera collects the ceiling image vertically upward, and the collected image can be considered as a top view of the ceiling; Fig.11As 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.

[0291] Based on this, optionally, if the image acquisition device carried by the smart mobile device has an acquisition angle of view that is vertically upward, the target internal reference model can be determined to be 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 image can be directly converted into a point cloud 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 image in the camera coordinate system of the image acquisition device can be obtained as the environmental point cloud.

[0292] Optionally, 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 image will be deformed and there will be angle loss. Therefore, before using the preset ceiling height for point cloud conversion, each frame image needs to be converted into an image under the capture angle of the image acquisition device.

[0293] Therefore, for each frame of image captured by the image acquisition device carried by the smart mobile device, firstly, based on the tilt angle of the acquisition viewing angle of the image acquisition device, each frame of image is subjected to inverse perspective transformation to obtain an inverse perspective image under a vertical upward acquisition viewing angle, and the inverse perspective image can be understood as an image obtained by the image acquisition device performing image acquisition on the ceiling area under a vertical upward acquisition viewing angle. Afterwards, based on the conversion relationship between the image coordinate system of the frame image and the image coordinate system of the inverse perspective image, the target feature corresponding to the edge feature of each frame of image in the inverse perspective image is determined as the target feature of each frame of image. Moreover, for the inverse perspective image, it is equivalent to an image obtained by using a simulated camera with a vertical upward acquisition viewing angle to perform simulated image acquisition on 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. 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 image, and the local point cloud corresponding to each frame of the image in the camera coordinate system of the simulated camera can be obtained as the environmental point cloud. That is to say, in this specific implementation, when performing point cloud conversion on the edge features of each frame of the image, the edge features in the image coordinate system of the inverse perspective image are converted into point clouds in the camera coordinate system of the simulated camera used to simulate the acquisition of the inverse perspective image.

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

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

[0296] 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;

[0297] The processor 200 is used to execute a grid map construction method based on observation direction provided in an embodiment of the present application based on the environment point cloud of each frame.

[0298] 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 grid map construction method based on the observation direction provided in the embodiment of the present application based on the environmental point cloud of each frame generated by the above detection sensor 100, and construct a scene map of the scene currently located by the smart mobile device.

[0299] The above has detailed the specific implementation method of a grid map construction method based on observation direction provided in an embodiment of the present application. The processor 200 executes the various steps of a grid map construction method based on observation direction provided in an embodiment of the present application according to the above specific implementation method, which will not be repeated here.

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

[0301] Fig.13 A schematic diagram of a structure of a grid map construction device based on observation direction provided in an embodiment of the present application, such as Fig.13 As shown, the device may include the following modules:

[0302] The point cloud acquisition module 1310 is used to acquire each frame of environmental point cloud generated by environmental detection of the scene and located in a preset local coordinate system when the smart mobile device moves in the current scene;

[0303] The observation direction updating module 1320 is used to perform the observation direction 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 observation direction updating process includes: based on the frame of the environment point cloud, determining the current observation direction of each matching grid of the preset grid map; for each matching grid, if the matching grid records an average observation direction, then based on the determined current observation direction of the matching grid, updating the average observation direction recorded in the matching grid; otherwise, the determined current observation direction of the matching grid is used as the average observation direction and recorded in the matching grid; wherein the respective matching grids are: the grids to which the respective points of the target global point cloud corresponding to the frame of the environment point cloud in the preset global coordinate system belong in the grid map;

[0304] The map determination module 1330 is configured to determine the current grid map recording the average observation direction as the scene map of the scene in response to the intelligent mobile device passing through all areas within the scene.

[0305] 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 observation direction 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 average observation direction of each grid record of the preset grid map. Among them, for each frame of environmental point cloud, the above observation direction update process includes: based on the frame of environmental point cloud, determining the current observation direction of each matching grid of the preset grid map, and each matching grid is: the grid to which each point of the target global point cloud corresponding to the frame of environmental point cloud in the preset global coordinate system belongs in the grid map. Then, for each matching grid, if the matching grid records the average observation direction, the average observation direction recorded by the matching grid is updated based on the determined current observation direction of the matching grid; if the matching grid does not record the average observation direction, the determined current observation direction of the matching grid is recorded in the matching grid. When the above observation direction update process is executed 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 in the above scene, the grid map currently recording the average observation direction is determined as the scene map of the scene.

[0306] Based on this, the solution provided by the embodiment of the present application is applied, and the frame environmental point cloud generated by the intelligent mobile device for the current scene under the above-mentioned local coordinate system is used to gradually update the average observation direction 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.

[0307] Furthermore, the solution provided by the embodiment of the present application is different from the related art on map construction, in which the observation direction of the grid is only applied to the laser point of the current frame, and the observation direction of the grid is not integrated and used in the grid map. In the solution provided by the embodiment of the present application, by recording the average observation direction of each grid in the grid map, it is possible to obtain which grids in the grid map can be observed by the smart mobile device at the current position, and which grids cannot be observed. Therefore, in the matching process, the observability of each grid is considered, and then, false matches are filtered out to improve the robustness of the matching.

[0308] Optionally, in a specific implementation, the observation direction updating module 1320 is specifically used to:

[0309] 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; 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;

[0310] Determine the grids to which the respective points of the target global point cloud belong in the grid map as respective matching grids, and calculate the current observation direction of each matching grid based on the position included in the target global pose and the position of each matching grid in the grid map.

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

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

[0313] The point cloud matching submodule is used to match the frame environment point cloud with the grid map based on the initial pose to obtain the target global pose corresponding to the frame environment point cloud in the global coordinate system.

[0314] Optionally, in a specific implementation, the point cloud matching submodule includes:

[0315] A candidate information determination unit, 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;

[0316] A candidate posture determination unit, 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;

[0317] A candidate pose scoring unit is used to convert the frame environment point cloud into an initial global point cloud in the global coordinate system for each candidate pose based on the candidate pose, and calculate the score of the candidate pose based on the candidate position included in the candidate pose and the position of the target grid to which each point of the initial global point cloud belongs in the grid map;

[0318] The posture determination unit is used to determine the candidate posture whose score meets the preset requirement as the target global posture corresponding to the environmental data in the global coordinate system.

[0319] Optionally, in a specific implementation manner, the candidate information determining unit includes:

[0320] The candidate angle determination subunit is used to determine each candidate angle located in the angle search window and including the initial angle based on the initial angle included in the initial posture, a preset angle search window and an angle search step.

[0321] Optionally, in a specific implementation, the device further includes:

[0322] A step length determination module is used to calculate the angle search step length based on the resolution of the grid map and a specified maximum distance before determining each candidate angle located within the angle search window and including the initial angle based on the initial angle included in the initial posture, a preset angle search window and an angle search step length; wherein 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.

[0323] Optionally, in a specific implementation, the step length determination module is specifically used to:

[0324] The angle search step length is calculated using the first formula; wherein the first formula is:

[0325]

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

[0327] Optionally, in a specific implementation manner, the candidate information determining unit includes:

[0328] The candidate posture determination subunit is used to determine each candidate position located in the position search window and including the initial position based on the initial position in the initial posture, a preset position search window and a position search step.

[0329] Optionally, in a specific implementation, the candidate pose scoring unit includes:

[0330] A grid determination subunit, used to determine the target grids to which each point of the initial global point cloud belongs in the grid map;

[0331] An observation direction calculation subunit, used to calculate the current observation direction of each target grid based on the candidate position included in the candidate posture and the position of each target grid in the grid map, and calculate the candidate observation direction of the target grid based on the current observation direction of each target grid and the average observation direction recorded by the target grid;

[0332] A grid scoring subunit, for calculating, for each target grid, an angle between a current observation direction of the target grid and a candidate observation direction of the target grid, and calculating an initial score of the target grid based on the angle;

[0333] The candidate pose scoring subunit is used to determine the score of the candidate pose based on the calculated initial scores of all target grids.

[0334] Optionally, in a specific implementation, the grid scoring subunit is specifically used to:

[0335] If the angle is greater than a preset angle threshold, the product of the probability value recorded by the target grid and the first value is calculated as the initial score of the target grid; wherein the first value is a positive number less than 1;

[0336] If the angle is not greater than the preset angle threshold, the product of the probability value recorded by the target grid and the second value is calculated as the initial score of the target grid; wherein the first value is a positive number greater than 1;

[0337] The device also includes:

[0338] The probability value updating module is used to update the probability value of each grid record in the grid map in response to converting the frame environment point cloud into the target global point cloud in the global coordinate system for each frame environment point cloud.

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

[0340] A memory 141, for storing computer programs;

[0341] The processor 142 is used to implement the steps of any of the observation direction-based grid map construction methods provided in the above-mentioned embodiments of the present application when executing the program stored in the memory 141.

[0342] In addition, the electronic device may further include a communication bus and / or a communication interface, and the processor 142, the communication interface, and the memory 141 communicate with each other via the communication bus.

[0343] 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.

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

[0345] 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.

[0346] 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.

[0347] In another embodiment provided in the present application, a computer-readable storage medium is 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 grid map construction methods based on observation direction are implemented.

[0348] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the grid map construction methods based on observation direction in the above embodiments.

[0349] 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.

[0350] 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.

[0351] 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.

[0352] 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 method for constructing a grid map based on observation direction, characterized in that: The method comprises: When the smart mobile device moves in the current scene, obtain each frame of environmental point cloud generated by environmental detection of the scene and located in a preset local coordinate system; According to the generation order of each frame of environmental point cloud, the observation direction update process is performed for each frame of environmental point cloud in turn; wherein the observation direction update process includes: based on the frame of environmental point cloud, determining the current observation direction of each matching grid of the preset grid map; for each matching grid, if the matching grid records an average observation direction, then based on the determined current observation direction of the matching grid, updating the average observation direction recorded by the matching grid; otherwise, the determined current observation direction of the matching grid is used as the average observation direction and recorded in the matching grid; wherein the respective matching grids are: the grids to which the respective points of the target global point cloud corresponding to the frame of environmental point cloud in the preset global coordinate system belong in the grid map; In response to the intelligent mobile device passing through all areas within the scene, the current grid map recording the average observation direction 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 observation direction of each matching grid of the preset 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; 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 the respective points of the target global point cloud belong in the grid map as respective matching grids, and calculate the current observation direction of each matching grid based on the position included in the target global pose and the position of each matching grid in the grid map.

3. The method according to claim 1, characterized in that: For each frame environment point cloud except the first frame environment point cloud, a method for determining the target global pose corresponding to the frame 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; Based on the initial pose, the frame environment point cloud is matched with the grid map to obtain 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 matching of the frame environment point cloud with the grid map based on the initial pose to obtain the target global pose corresponding to the frame environment point cloud in the global coordinate system includes: 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 candidate position included in the candidate pose and the position of the target grid in the grid map to which each point of the initial global point cloud belongs in 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 environmental data in the global coordinate system.

5. The method according to claim 4, characterized in that The determining of each candidate angle based on the initial angle included in the initial posture and a preset angle search window includes: Based on an initial angle included in the initial posture, a preset angle search window, and an angle search step, each candidate angle located within the angle search window and including the initial angle is determined.

6. The method according to claim 5, characterized in that Before determining each candidate angle located within the angle search window and including the initial angle based on the initial angle included in the initial posture, a preset angle search window, and an angle search step, the method further includes: The angle search step is calculated based on the resolution of the grid map and the specified maximum distance; wherein 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.

7. The method according to claim 6, characterized in that The step of calculating the angle search step based on the preset grid map resolution and the specified maximum distance includes: The angle search step length is calculated using the first formula; wherein the first formula is: Among them, θ is the angle search step, r is the resolution of the preset grid map, and d max To specify the maximum distance.

8. The method according to claim 4, characterized in that The determining of each candidate position based on the initial position included in the initial posture and a preset position search window includes: Based on the initial position in the initial posture, a preset position search window and a position search step, each candidate position located in the position search window and including the initial position is determined.

9. The method according to claim 4, characterized in that The calculating the score of the candidate pose based on the candidate position included in the candidate pose and the position of the grids to which the points of the initial global point cloud respectively belong in the grid map comprises: Determine the target grids to which each point of the initial global point cloud belongs in the grid map; Based on the candidate positions included in the candidate poses and the position of each target grid in the grid map, a current observation direction of each target grid is calculated, and based on the current observation direction of each target grid and the average observation direction recorded by the target grid, a candidate observation direction of the target grid is calculated; For each target grid, calculate the angle between the current observation direction of the target grid and the candidate observation direction of the target grid, and calculate the initial score of the target grid based on the angle; Based on the calculated initial scores of all target grids, the score of the candidate pose is determined.

10. The method according to claim 9, characterized in that The calculating the initial score of the target grid based on the angle includes: If the angle is greater than a preset angle threshold, the product of the probability value recorded by the target grid and the first value is calculated as the initial score of the target grid; wherein the first value is a positive number less than 1; If the angle is not greater than the preset angle threshold, the product of the probability value recorded by the target grid and the second value is calculated as the initial score of the target grid; wherein the first value is a positive number greater than 1; The method further comprises: For each frame of the environment point cloud, in response to converting the frame of the environment point cloud into a target global point cloud in the global coordinate system, the probability value of each grid record in the grid map is updated.

11. 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 10 based on the environmental point cloud of each frame.

12. A grid map construction device based on observation direction, characterized in that: The device comprises: A point cloud acquisition module is used to acquire each frame of environmental point cloud generated by environmental detection of the scene and located in a preset local coordinate system when the intelligent mobile device moves in the current scene; The observation direction update module is used to execute the observation direction update 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 observation direction update process includes: based on the frame of the environment point cloud, determining the current observation direction of each matching grid of the preset grid map; for each matching grid, if the matching grid records an average observation direction, then based on the determined current observation direction of the matching grid, updating the average observation direction recorded in the matching grid; otherwise, the determined current observation direction of the matching grid is used as the average observation direction and recorded in the matching grid; wherein the respective matching grids are: the grids to which the respective points of the target global point cloud corresponding to the frame of the environment point cloud in the preset global coordinate system belong in the grid map; The map determination module is used to determine the current grid map recording the average observation direction as the scene map of the scene in response to the intelligent mobile device passing through all areas in the scene.

13. 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-10 when executing a program stored in a memory.

14. 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 10 is implemented.

Citation Information

Cited By

  • SLAM method and device under semi-dynamic environment change

    CN120252690A

  • SLAM method and device under semi-dynamic environment changes

    CN120252690B