Indoor relocation method, device, equipment and storage medium
By constructing and updating local exploration maps in smart devices and matching them with spatial maps, the problem of low indoor relocation accuracy and efficiency of smart devices is solved and efficient indoor positioning is achieved.
Patent Information
- Application Number
- CN202210130486.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-11
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-02-11
AI Technical Summary
The accuracy and efficiency of indoor relocation of smart devices in the existing technology are low, mainly due to incomplete data and low relocation efficiency caused by the global traversal matching method.
By constructing an initial exploration map of the target space, the smart device collects point cloud data of the target area in real time during movement, updates the local exploration map, and matches the local exploration map with the spatial map to determine pose information and avoid global searches.
It improves the accuracy and efficiency of indoor relocation of smart devices, updates the map in real time to adapt to environmental changes, and reduces the false matching rate during the relocation process.
Smart Images

Figure CN114543808B
Abstract
Description
Technical Field
[0001] The present application relates to the field of relocation technology, and in particular to an indoor relocation method, device, equipment and storage medium. Background Art
[0002] In the related art, when relocating a movable device indoors, the relocation is usually performed by globally traversing and matching the indoor base map. For example, the movable device collects point cloud data indoors at the current position, and then globally traverses the indoor base map based on the point cloud data to traverse the position that matches the collected point cloud data, thereby determining the current position and posture of the movable device. Obviously, the existing relocation method has a low relocation efficiency because it requires a global traversal and matching of the indoor base map. In addition, the data based on the global traversal is only one frame of point cloud data or a small number of frames of point cloud data, which makes the data based on the relocation incomplete, resulting in a low accuracy of the relocation result. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an indoor repositioning method, device, equipment and storage medium, which are helpful to solve the problems of low accuracy and low efficiency in repositioning of smart devices in the prior art.
[0004] To solve the above technical problems, the embodiments of the present application are implemented as follows:
[0005] On the one hand, an embodiment of the present application provides an indoor relocation method, which is applied to a smart device; the method comprises:
[0006] Constructing an initialization exploration map corresponding to a target space; the target space includes a plurality of regions, each of which is separated by obstacles;
[0007] Controlling the smart device to move in a target area within the target space, and collecting target point cloud data of the target area during the movement of the smart device;
[0008] Updating the initialized exploration map according to the target point cloud data to generate a local exploration map corresponding to the target area;
[0009] The local exploration map is matched with a spatial map corresponding to the target space, and the position information of the smart device in the target space is determined according to the matching result.
[0010] On the other hand, an embodiment of the present application provides an indoor repositioning device, comprising:
[0011] A construction module, used to construct an initialization exploration map corresponding to a target space; the target space includes a plurality of regions, each of which is separated by obstacles;
[0012] An acquisition module, used for acquiring target point cloud data of the target area;
[0013] A generating module, configured to update the initialization exploration map according to the target point cloud data to generate a local exploration map corresponding to the target area;
[0014] A matching module is used to match the local exploration map with a spatial map corresponding to the target space, and determine the position information of the smart device on the spatial map according to the matching result.
[0015] On the other hand, an embodiment of the present application provides an indoor repositioning device, including a processor and a memory electrically connected to the processor, the memory storing a computer program, and the processor being used to call and execute the computer program from the memory to implement the indoor repositioning method described in the above aspect.
[0016] On the other hand, an embodiment of the present application provides a storage medium for storing a computer program, wherein the computer program can be executed by a processor to implement the indoor repositioning method described in the above aspect.
[0017] The technical solution of the embodiment of the present application is adopted, by constructing an initialization exploration map corresponding to the target space, wherein the target space includes multiple areas, and each area is separated by obstacles. Then the intelligent device is controlled to move in the target area in the target space, and during the movement of the intelligent device, the target point cloud data of the target area is collected. Then the initialization exploration map is updated according to the target point cloud data to generate a local exploration map corresponding to the target area. The local exploration map is matched with the spatial map corresponding to the target space, and the position and posture information of the intelligent device in the target space is determined according to the matching result. It can be seen that the technical solution realizes the effect of actively exploring the indoor space by controlling the intelligent device to collect the target point cloud data of the target area in real time while moving, and updating the initialization exploration map in real time, thereby avoiding the situation that the base map (i.e., the spatial map) is inaccurate when the environment in the target space changes, thereby improving the accuracy of repositioning in the space; and, the position and posture information of the intelligent device is relocated by the matching result between the local exploration map and the base map, so that there is no need to search the space globally when relocating the intelligent device, thereby improving the efficiency of repositioning the intelligent device in the space. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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 recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 is a schematic flow chart of an indoor relocation method according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of initializing an exploration map in an indoor relocation method according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a probability grid map in an indoor relocation method according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of a local exploration map in an indoor relocation method according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of a space map in an indoor relocation method according to an embodiment of the present application;
[0024] Figure 6 is a schematic flow chart of an indoor relocation method according to another embodiment of the present application;
[0025] Figure 7 is a schematic flow chart of an indoor relocation method according to another embodiment of the present application;
[0026] Figure 8 is a schematic block diagram of an indoor relocation device according to an embodiment of the present application;
[0027] Fig. 9 It is a schematic block diagram of an indoor relocation device according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] The purpose of the embodiments of the present application is to provide an indoor repositioning method, device, equipment and storage medium, which are helpful to solve the problems of low accuracy and low efficiency in repositioning of smart devices in the prior art.
[0029] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0030] Figure 1 FIG. 1 is a schematic flow chart of an indoor relocation method according to an embodiment of the present application, and the method is applied to a smart device. Figure 1 As shown, the method includes:
[0031] S102, constructing an initial exploration map corresponding to the target space, wherein the target space includes multiple areas, each of which is separated by obstacles.
[0032] In one embodiment, the initialization exploration map corresponding to the target space may be a probability grid map. The probability grid map may grid the map and draw the map color of the corresponding grid according to the probability of the existence of obstacles in each grid. For example, the higher the probability value of the existence of obstacles in the grid, the darker the color of the grid in the map; the lower the probability value of the existence of obstacles in the grid, the lighter the color of the grid in the map.
[0033] At the initial position of the smart device, the smart device can collect the first frame of point cloud data of the target space, and according to the first frame of point cloud data, an initial exploration map corresponding to the target space can be constructed, that is, the first frame of point cloud data is converted into a probability grid map. Figure 2 As shown, Figure 2 Figure a in the figure is the first frame of point cloud data collected. Figure 2 Figure b in FIG. 1 is a probability grid map generated based on the first frame of radar point cloud data, i.e., the initial exploration map. The initial exploration map includes unexplored areas and explored areas, and the explored areas include explored obstacle areas and explored obstacle-free areas. It should be noted that the obstacle areas and obstacle-free areas in this embodiment refer to the probability values of the existence of obstacles. The location of the obstacle and the probability value corresponding to the grid can be determined through the probability grid map.
[0034] S104, controlling the smart device to move in a target area in the target space, and collecting target point cloud data of the target area during the movement of the smart device.
[0035] Optionally, when collecting target point cloud data, since there is an unexplored area in the target area, the moving path of the smart device can be determined according to the unexplored area in the target space, so as to control the smart device to continue exploring the unexplored area based on the moving path. The process of how to control the smart device to move in the target area will be described in the following embodiments.
[0036] S106, updating the initialization exploration map according to the target point cloud data to generate a local exploration map corresponding to the target area.
[0037] In this step, since the smart device collects target point cloud data during movement, that is, each time the target point cloud data is collected, the initial exploration map will be updated in real time according to the collected target point cloud data, so as to achieve the effect of continuously improving the local exploration map. Among them, if the smart device collects target point cloud data multiple times, the initial exploration map can be updated according to the target point cloud data collected for the first time. For the target point cloud data collected for the second, third, and other subsequent times, the map is updated on the basis of the exploration map obtained after the previous update, so that after the target point cloud data is collected, the exploration map obtained by the last update is the local exploration map.
[0038] S108, matching the local exploration map with the space map corresponding to the target space, and determining the position information of the smart device in the target space according to the matching result.
[0039] Optionally, a radar device is installed on the smart device in this embodiment, wherein the radar device may be a laser radar. The radar device is used to transmit a radar beam and receive a radar beam reflected from an obstacle, based on which target point cloud data of obstacles in the target area can be collected by the radar device.
[0040] The technical solution of the embodiment of the present application is adopted, by constructing an initialization exploration map corresponding to the target space, wherein the target space includes multiple areas, and each area is separated by obstacles. Then the intelligent device is controlled to move in the target area in the target space, and during the movement of the intelligent device, the target point cloud data of the target area is collected. Then the initialization exploration map is updated according to the target point cloud data to generate a local exploration map corresponding to the target area. The local exploration map is matched with the spatial map corresponding to the target space, and the position and posture information of the intelligent device in the target space is determined according to the matching result. It can be seen that the technical solution realizes the effect of actively exploring the indoor space by controlling the intelligent device to collect the target point cloud data of the target area in real time while moving, and updating the initialization exploration map in real time, thereby avoiding the situation that the base map (i.e., the spatial map) is inaccurate when the environment in the target space changes, thereby improving the accuracy of repositioning in the space; and, the position and posture information of the intelligent device is relocated by the matching result between the local exploration map and the base map, so that there is no need to search the space globally when relocating the intelligent device, thereby improving the efficiency of repositioning the intelligent device in the space.
[0041] In one embodiment, when the smart device moves in the target space, it collects point cloud data while moving. Therefore, S104-S106 can be implemented by executing the following steps A1-A4 to generate a local exploration map corresponding to the target area:
[0042] Step A1: when the smart device is located in a first area, first point cloud data of the first area is collected, and an initial exploration map is updated according to the first point cloud data to obtain a first exploration map.
[0043] In this embodiment, the target area includes a first area, and the first area is the area where the smart device is currently located.
[0044] Step A2, determining whether the first exploration map meets the space exploration completion condition.
[0045] Among them, the space exploration completion condition includes at least one of the following: the number of explored target areas is greater than or equal to a first preset threshold, and the total exploration area of the explored target areas is greater than or equal to a second preset threshold.
[0046] Optionally, the first preset threshold can be determined according to the total number of areas on the spatial map, wherein the first preset threshold is less than the total number of areas. The size of the first preset threshold depends on whether the relative position relationship between all areas can be determined based on the local exploration map. Of course, the larger the first preset threshold, the higher the accuracy of determining the relative position relationship between all areas based on the local exploration map. In practical applications, the first preset threshold can be determined comprehensively based on the accuracy and exploration efficiency. For example, when the total number of areas on the spatial map is 3, after exploring 2 areas in the target space, the relative position relationship between the 3 areas can be determined, so only 2 areas can be explored, that is, the first preset threshold is 2.
[0047] Optionally, a second preset threshold may be pre-set according to the actual area corresponding to the target space. For example, if the total explored area of the explored target area is determined to be S 总探索 , the actual area corresponding to the target space is S 实际 , it is preset that when the total exploration area accounts for 60% of the actual area, the space exploration completion condition is met, and the second preset threshold is 0.6S 实际 .
[0048] Step A3: If the first exploration map meets the spatial exploration completion condition, the first exploration map is determined to be a local exploration map.
[0049] Step A4: If the first exploration map does not meet the space exploration completion conditions, control the smart device to move from the first area to the second area, collect second point cloud data of the second area, and update the first exploration map according to the second point cloud data until the updated exploration map meets the space exploration completion conditions.
[0050] In this step, the target area also includes a second area, and the second area is an area to be explored other than the first area. If the first exploration map does not meet the space exploration completion condition, the smart device will be controlled to move from the current area to another area to continue exploring the target space. In this embodiment, the second area can be understood as one area or multiple areas. If the updated exploration map meets the space exploration completion condition after exploring the first second area, the exploration of other areas will be stopped; if the updated exploration map does not meet the space exploration completion condition after exploring the first second area, the smart device will be controlled to move from the first second area to the second second area for exploration until the updated exploration map meets the space exploration completion condition.
[0051] In one embodiment, when the obstacle is a passable passage, the smart device can be controlled to move from the first area to the second area in the following manner: first, the second area to be explored in the spatial map is determined based on the area of each area in the spatial map, and then the passable passage between the first area and the second area is identified, and the location information of the passable passage is determined. Then, based on the location information of the passable passage, the smart device is controlled to move to the second area through the passable passage.
[0052] In this embodiment, when determining the second area, the area that is larger than the first area and has the smallest area among all areas that are larger than the first area can be used as the second area according to the area area of each area in the spatial map. For example, there are 4 areas on the spatial map, and the area areas corresponding to each area are sorted from small to large as S1, S2, S3, and S4. The area of the first area is S, and S may be any one of S1, S2, S3, and S4. If, through comparison, it is determined that S is approximately equal to S1 (that is, the first area may be the area corresponding to the area S1), S is greater than S2, and S is respectively smaller than S3 and S4, then the second area is selected from other areas except for the areas S1 and S2, and since S3 is smaller than S4, that is, S3 is the smallest area among other areas, the area S3 is determined to be the second area. It should be noted that due to certain errors in obtaining or calculating the area of the region, the area of each region predetermined on the spatial map may not be completely equal to the area of the first region obtained by exploration. Therefore, when matching the area of the region, the match can be considered successful within a certain error range. For example, if S is not equal to S1, but the difference between the two is within a certain error range, the region corresponding to the area S1 can be considered to be the first region.
[0053] Optionally, the passable passage may be a door frame. After determining the second area to be explored, the passable passage between the first area and the second area may be identified in the following manner: using a visual sensor installed on the smart device to identify and capture an image of the passable passage (e.g., a door frame) between the areas, and then processing the image through an image processing function of the visual sensor to determine the location information of the door frame on the first exploration map, wherein the location information may be relative coordinate information of the door frame on the first exploration map, including the coordinates of the two end points of the door frame on the first exploration map.
[0054] In this embodiment, when the first exploration map does not meet the spatial exploration completion conditions, the smart device is controlled to move to the second area, and second point cloud data of the second area is collected to update the first exploration map, thereby ensuring that the explored local exploration map meets the spatial exploration completion conditions, avoiding the problem of low matching accuracy with the spatial map due to failure to meet the completion conditions of the exploration target space, and thereby improving the accuracy of matching the local exploration map with the spatial map.
[0055] In one embodiment, when the smart device is located in the first area, the initial exploration map is updated by collecting the first point cloud data of the first area until the exploration of the first area is completed. Whether the exploration in the first area is completed can be determined based on the preset area exploration completion condition, specifically as follows:
[0056] Step B1, when the smart device is located at a first exploration position in a first area, first point cloud data of the first area is collected, and an initialization exploration map is updated according to the first point cloud data to obtain an area exploration submap.
[0057] Step B2, determining whether the first area meets the area exploration completion condition.
[0058] Among them, the area exploration completion condition may include at least one of the following: there is no unexplored area in the current exploration area, and the exploration area in the current exploration area is greater than or equal to a third preset threshold.
[0059] Optionally, the target space includes at least one region larger than the first region. The third preset threshold may be determined in the following manner: first, all regions having a region area larger than the first region are determined, and then the region with the smallest region area among all the regions is determined as the second region.
[0060] Secondly, the area of the second region is multiplied by the preset ratio to obtain a third preset threshold. The third preset threshold can be determined by formula (1):
[0061] S T =λS2 (1)
[0062] Among them, S T is the third preset threshold, S2 is the area of the second region, and λ is the preset ratio.
[0063] Step B3: If the first area meets the area exploration completion condition, the area exploration sub-graph is determined to be the first exploration map.
[0064] Step B4: If the first area does not meet the area exploration completion conditions, the smart device is controlled to move within the first area, and continues to collect first point cloud data of the first area during the movement, and updates the area exploration submap according to the collected first point cloud data until the first area meets the area exploration completion conditions, thereby obtaining a first exploration map.
[0065] In this embodiment, when the first area explored by the smart device does not meet the area exploration completion conditions, the smart device is controlled to continue exploring in the first area, and the first point cloud data of the first area is collected in real time to update the area exploration submap, thereby ensuring that the smart device can complete the exploration of the first area and build an accurate first exploration map to prevent changes in the environment of the first area of the target space. For example, when the environment becomes more complex, it cannot be accurately matched with the spatial map.
[0066] In one embodiment, after executing step B2, if it is determined that the first area does not meet the area exploration completion condition, the smart device is controlled to move in the first area, and the first point cloud data of the first area is continuously collected during the movement. Specifically, the second exploration position in the first area is first determined based on the unexplored area in the first area, and then the smart device is controlled to move from the first exploration position to the second exploration position, and the first point cloud data of the first area is collected when the smart device is located at the second exploration position.
[0067] Figure 3 is a schematic diagram of a probability grid map in an indoor relocation method according to an embodiment of the present application, such as Figure 3 As shown, when determining the second exploration position, the intersection of the grid corresponding to the unexplored area and the grid corresponding to the explored barrier-free area in the initial exploration map (i.e., the probability grid map) is determined as the second exploration position, where the white grid is the explored barrier-free area, the black grid is the explored obstacle area, and the gray grid is the unexplored area. The size of a single grid can be preset, for example, the size of a single grid is set to a side length of 0.5 meters. The smaller the size of the grid, the higher the accuracy of the probability grid map.
[0068] In this embodiment, when the exploration map is initialized as a probabilistic grid map, the second exploration position is determined based on the adjacent grids between the unexplored area and the explored barrier-free area, so as to control the smart device to continue exploring the first area according to the second exploration position, so that the smart device can accurately move to the unexplored area, and then obtain the first point cloud data in the unexplored area, thereby avoiding the situation where there is an unexplored area in the first area.
[0069] In one embodiment, when executing S108, the position information of the smart device on the space map may be determined by the following steps:
[0070] First, first feature information of a first key position on the local exploration map and second feature information of a second key position on the spatial map are determined.
[0071] The first characteristic information or the second characteristic information includes at least one of the following: position orientation, position size, and position shape. Position orientation may be the orientation of the key position (i.e., the first key position or the second key position) relative to the smart device; position size may be the length of the key position, for example, when the obstacle is a door frame, the first characteristic information or the second characteristic information may be the length of the door frame; position shape may be the shape corresponding to the key position, for example, if the key position is a table, the position shape of the key position may be a square, a circle, or the like.
[0072] In this embodiment, the key position (i.e., the first key position or the second key position) can be the position corresponding to the obstacle in each area on the local exploration map or the spatial map, or the position corresponding to at least one navigable passage between the areas (when the obstacle is a navigable passage) on the local exploration map or the spatial map.
[0073] Optionally, when the first key position is the position corresponding to at least one traversable passage between the regions on the local exploration map, if there are multiple regions in the target space, there are multiple first key positions on the local exploration map. The second key position may be the position corresponding to a key obstacle on the space map, such as the position corresponding to the traversable passage, tables and chairs in each region, doors, potted plants on the space map, etc.
[0074] Secondly, the first feature information and the second feature information are matched, and a first mapping relationship between the first key position and the second key position is determined according to the matching result.
[0075] Thirdly, according to the first mapping relationship between the first key position and the second key position and the position information of the smart device on the local exploration map, the position information of the smart device on the spatial map is determined.
[0076] Among them, the position and posture information of the smart device on the local exploration map includes the relative position and posture information of the smart device in the current exploration area. Optionally, it can be determined in the following way: the smart device conducts exploration in the current exploration area (such as the first area), and when the smart device moves in the current exploration area, the point cloud data of the current exploration area is collected during the movement, and the initialization exploration map is updated according to the collected point cloud data. Optionally, the updated initialization exploration map is a probability grid map. Then, by matching the point cloud data collected in real time with the probability grid map, the relative position and posture information of the smart device in the current exploration area can be determined according to the matching result. The relative position and posture information can be characterized as any of the following: distance information and / or orientation information relative to a specified obstacle in the current exploration area, and coordinate information in a specified coordinate system.
[0077] In this embodiment, by controlling the intelligent device to move while collecting point cloud data of the current exploration area, the point cloud data collected in real time is matched with the probability grid map, and then the relative position information of the intelligent device in the current exploration area can be determined according to the matching result. Further, the first feature information of the first key position on the local exploration map and the second feature information of the second key position on the spatial map are extracted, and then the first feature information and the second feature information are matched to determine the mapping relationship between the local exploration map and the spatial map. According to the relative position information of the intelligent device in the current exploration area and the mapping relationship between the local exploration map and the spatial map, the position of the local exploration map corresponding to the spatial map can be accurately determined, thereby facilitating the determination of the position information of the intelligent device on the spatial map and achieving the effect of accurate repositioning of the intelligent device.
[0078] In one embodiment, the first key position and the second key position include a plurality of each other; when determining the first mapping relationship between the first key position and the second key position, the following steps C1-C3 may be performed:
[0079] Step C1, determining a first relative position relationship between each first key position according to first feature information corresponding to each first key position.
[0080] For example, a local exploration map includes multiple areas, and there are multiple first key positions. Figure 4 is a schematic diagram of a local exploration map in an indoor relocation method according to an embodiment of the present application, such as Figure 4 As shown, the first key position is the position of the navigable passage (such as door frame) between the areas on the local exploration map, such as Figure 4 Line segment M on the local exploration map shown i M i+1 , including M1M2 and M3M4. Since the smart device collects target point cloud data while moving, the coordinates of each endpoint of the first key position relative to the smart device are obtained based on the collected target point cloud data, that is, the coordinates in the local coordinate system. Before extracting the first feature information, the coordinates of the first key position in the local coordinate system can be converted into coordinates in the global coordinate system with the initial exploration position of the smart device as the origin, so as to facilitate the subsequent extraction of the first feature information of the first key position. The specific conversion process is detailed in formula (2):
[0081]
[0082] Among them, i is an endpoint of a first key position on the local exploration map, is the coordinate of an endpoint in the global coordinate system, and g represents the global coordinate system; is the coordinate of the endpoint in the local coordinate system, and l represents the local coordinate system.
[0083] It can be seen that after the coordinates of each endpoint of the first key position in the global coordinate system are obtained by formula (2), the first feature information may include the endpoint coordinates of the first key position and the corresponding coordinate vector. The endpoint coordinates of the first key position are M1(x1, y1), M2(x2, y2), M3(x3, y3), and M4(x4, y4). The coordinate vector corresponding to the first key position M1M2 is The coordinate vector corresponding to the first key position M3M4 is
[0084] Furthermore, the first relative posture relationship of each first key position can be determined according to the coordinate vector of each first key position, as shown in formula (3):
[0085]
[0086] Among them, R 13 is the rotation matrix between the first key positions M1M2 and M3M4, T 13 is the displacement relationship between the first key positions M1M2 and M3M4, is the coordinate vector corresponding to the first key position M1M2, The coordinate vector corresponding to the first key position M3M4.
[0087] Figure 5 is a schematic diagram of a space map in an indoor relocation method according to an embodiment of the present application, such as Figure 5 As shown, the spatial map includes multiple second key positions. When the first key position is Figure 4 When exploring the accessible passages on the map, the second key position is Figure 5 The position line segment N corresponding to the traversable passages between all areas on the mid-space map i N i+1 , including N1N2, N3N4, N5N6, N7N8 and N9N 10 The second feature information is the coordinates of the two endpoints corresponding to each second key position, and the coordinate vector corresponding to each second key position. The coordinates include N i (x i ,y i ) and N i+1 (x i+1 ,y i+1 ), i is an integer greater than or equal to 0, and the coordinate vector is The second relative position relationship between the second key positions can be determined by formula (4) (the following only lists the second relative position relationship between two second key positions):
[0088]
[0089] Among them, R 24 is the rotation matrix between the second key positions N1N2 and N3N4, T 24 is the displacement relationship between the second key positions N1N2 and N3N4, The coordinate vector corresponding to the second key position N1N2, is the coordinate vector corresponding to the second key position N3N4.
[0090] Step C2, for the first target key position among the multiple first key positions, determine the second target key position in the spatial map that matches the first target key position. In this step, the first target key position can be any first key position in the local exploration map. When determining the second target key position that matches the first target key position, the first feature information corresponding to the first target key position can be compared with the second feature information corresponding to each second key position. If the feature information matches, the matching second key position is determined to be the second target key position. For example, the position size corresponding to the first target key position (i.e., the corresponding line segment length on the local exploration map) and the position size corresponding to each second key position (i.e., the corresponding line segment length on the spatial map) are compared to determine that the second key position with the same position size is the second target key position.
[0091] It should be noted that when comparing the first feature information corresponding to the first target key position with the second feature information corresponding to each second key position, there may be multiple second feature information corresponding to the second key positions that match the first feature information corresponding to the first target key position. Therefore, the second target key positions that match the first target key position may include one or more.
[0092] Step C3, determining a first mapping relationship between each first key position and each second key position according to the first relative position and posture relationship and a second mapping relationship between the first target key position and the second target key position.
[0093] In this step, when determining the second target key position in the spatial map that matches the first target key position, it is necessary to first determine the first target key position (for example, M1M2) and the second target key position N on the spatial map. i N i+1 The second mapping relationship between them (which can also be understood as a posture conversion relationship); assuming that the second target key position is determined to be N1N2, the posture conversion relationship between the second target key position N1N2 and the first target key position M1M2 is shown in formula (5):
[0094]
[0095] Secondly, according to the second mapping relationship between the first target key position and the second target key position, other first key positions are mapped to the space map to obtain the third key position.
[0096] When mapping each first key position to the spatial map, taking the first key position M3M4 as an example, the first key position M3M4 can be substituted into the above-mentioned posture conversion relationship (i.e., formula (5)) to obtain the third key position N corresponding to the first key position M3M4. z N z+1 , where z is an integer greater than or equal to 0 and not equal to i, see formula (6) for details:
[0097]
[0098] Then, according to the first relative position relationship between each first key position, it is determined whether there is a second key position that matches the third key position in the spatial map. When the second key position matches the third key position, the following conditions should be met: the feature information (such as position orientation, position size and / or position shape) corresponding to the second key position and the third key position are consistent. For example, all the second key positions N i N i+1 Respectively with the third key position N z N z+1 Specifically, each second key position N i N i+1 The position size (such as line segment N i N i+1 length) and the third key position N z N z+1 The position size (such as line segment N z N z+1 length) to determine the length of the third key position N z N z+1 Match the second key position N i N i+1 .
[0099] All second key positions are mapped to the spatial map according to the second mapping relationship shown in formula (5). For each third key position after mapping, if a second key position matching one of the third key positions can be found on the spatial map, it means that the currently determined second target key position matches the first target key position. At this time, the first mapping relationship between each first key position and each second key position can be determined according to the second mapping relationship between the first target key position and the second target key position, that is, the mapping relationship between the local exploration map and the spatial map.
[0100] If all the second key positions Ni N i+1 Respectively with the third key position N z N z+1 After comparison, it is found that any second key position NiNi+1 does not match the third key position N z N z+1 If the second target key position currently determined does not match the first target key position, then the second target key position corresponding to the first target key position can be re-determined.
[0101] In one embodiment, if the second target key position corresponding to the first target key position includes multiple, the first mapping relationship between each first key position and each second key position also includes multiple mapping relationships accordingly. Furthermore, when determining the posture information of the smart device on the spatial map according to the first mapping relationship, the candidate posture information of the smart device on the spatial map can be determined for each first mapping relationship, and then for any candidate posture information, a traversal search is performed within the preset area range corresponding to the candidate posture information, and the probability score corresponding to each candidate position information is determined according to the search results; and then the candidate posture information corresponding to the highest value in the probability score is determined as the posture information of the smart device on the spatial map. Among them, the probability score is used to characterize the probability that the candidate posture information belongs to the finally determined posture information. The preset area range can be a preset distance range, a preset angle range and / or the range of the corresponding target area.
[0102] In this embodiment, when determining the candidate posture information of the smart device on the spatial map for each first mapping relationship, the posture conversion relationship of the smart device relative to each first key position can be determined based on the posture information of the smart device on the local exploration map; and then, based on the posture conversion relationship and each first mapping relationship, the posture information of the smart device on the local exploration map is mapped to the spatial map to obtain multiple candidate posture information of the smart device on the spatial map.
[0103] Assume that the first mapping relationship includes the following two mapping relationships, where the symbol “→” represents the mapping relationship between key positions:
[0104] The first type: M1M2→N1N2, M3M4→N3N4;
[0105] The second type: M1M2→N7N8, M3M4→N9N 10 .
[0106] For the above two mapping relationships, two candidate posture information can be determined. For example, for the first mapping relationship, first calculate the first posture conversion relationship of the smart device relative to the first key position M1M2, M3M4, and then map the posture information of the smart device on the local exploration map to the spatial map based on the posture conversion relationship and the first mapping relationship to obtain candidate posture information. The second position conversion relationship between the candidate posture information and the second key position N1N2, N3N4 should be the same as the first posture conversion relationship. Similarly, if it is for the second mapping relationship, the determined candidate posture information is the same as the second key position N7N8, N9N 10 The second position transformation relationship should be the same as the first position transformation relationship.
[0107] Optionally, when performing a traversal search within the preset area corresponding to the candidate posture information and determining the probability scores corresponding to each candidate posture information according to the search results, point cloud data may be first collected within the preset area, and then a preset area map corresponding to the preset area is generated according to the collected point cloud data, and then the preset area map is compared with the corresponding area map on the spatial map, and the matching rate between the preset area map and the corresponding area map is determined according to the comparison result; the probability score corresponding to the candidate position information is calculated according to the matching rate. Among them, the preset area map and the corresponding area map can both be probability grid maps. Therefore, the probability grid map corresponding to the preset area can be compared with the probability grid map in the corresponding area on the spatial map to determine the matching rate (i.e., the overlap rate) between the two probability grid maps, and then the probability score corresponding to the candidate posture information is determined according to the matching rate.
[0108] Optionally, when determining the matching rate between the two probability grid maps, specific grids (such as grids with darker colors, grids in which the probability value of obstacles existing in the grids reaches a certain threshold, etc.) can be screened out from the probability grid maps for comparison, and the matching rate between the specific grids can be determined.
[0109] Optionally, the matching rate corresponding to each specific grid can be calculated respectively, and then the probability score corresponding to the current candidate pose information can be calculated according to the matching rate corresponding to each specific grid. For example, the probability score corresponding to the candidate pose information can be calculated by formula (7):
[0110]
[0111] Wherein, O is the matching rate corresponding to each specific grid, and n is the total number of specific grids.
[0112] Furthermore, the candidate posture information with the highest probability score is determined as the posture information of the smart device on the space map.
[0113] In this embodiment, through the above matching process, an accurate mapping relationship between the local exploration map and the space map can be determined, thereby facilitating improving the accuracy of indoor repositioning.
[0114] Figure 6 is a schematic flow chart of an indoor relocation method according to another embodiment of the present application. In this embodiment, the target space is an indoor space, each area in the target space is a room, and the obstacles between the areas are doors between the rooms. Figure 5 As shown in Figure 1, in the spatial map of the indoor space, each room has been pre-divided according to the location of the door frame. Figure 6 As shown, the indoor relocation method includes:
[0115] S601, constructing an initial exploration map corresponding to the indoor space.
[0116] At the initial position of the smart device, the smart device can collect the first frame of point cloud data of the indoor space, and based on the first frame of point cloud data, an initialization exploration map corresponding to the indoor space can be constructed, that is, the first frame of point cloud data is converted into a probability grid map.
[0117] S602: When the smart device is located in a first room in the indoor space, first point cloud data of the first room is collected, and an initial exploration map is updated according to the first point cloud data to obtain a first exploration map.
[0118] Among them, the target area includes the first room.
[0119] S603, determining whether the first exploration map meets the space exploration completion condition. If yes, execute S604; if no, execute S605.
[0120] Among them, the space exploration completion condition includes at least one of the following: the number of explored target areas is greater than or equal to a first preset threshold, and the total exploration area of the explored target areas is greater than or equal to a second preset threshold.
[0121] S604: Determine that the first exploration map is a local exploration map of the indoor space.
[0122] S605, control the smart device to move from the first room to the second room, and collect second point cloud data of the second room, update the first exploration map according to the second point cloud data, until the updated exploration map meets the space exploration completion conditions, and generate a local exploration map corresponding to the target area.
[0123] Among them, the target area also includes the second room.
[0124] S606, determining first characteristic information of the door frame on the local exploration map and second characteristic information of the door frame on the spatial map.
[0125] The first characteristic information or the second characteristic information includes at least one of the following: position orientation, position size, and position shape.
[0126] S607: Determine a first relative position relationship between the door frames on the local exploration map according to the first feature information corresponding to each door frame on the local exploration map.
[0127] S608: For the first target door frame on the local exploration map, determine a second target door frame in the spatial map that matches the first target door frame.
[0128] S609: Determine a mapping relationship between the local exploration map and the space map according to the first relative position and posture relationship and the mapping relationship between the first target door frame and the second target door frame.
[0129] S610: Determine the position and posture information of the smart device on the spatial map according to the mapping relationship between the local exploration map and the spatial map and the position and posture information of the smart device on the local exploration map.
[0130] In this step, how to determine the position information of the smart device on the space map has been described in detail in the above embodiments and will not be repeated here.
[0131] In this embodiment, when it is determined that the first exploration map does not meet the space exploration completion conditions, the intelligent device is controlled to actively explore the next room of the target space to ensure that the space exploration completion conditions are met, thereby avoiding the problem of being unable to match the space map due to failure to meet the completion conditions for exploring the target space, thereby improving the accuracy of matching the local exploration map with the space map. In addition, by extracting the first feature information of the door frame (first key position) on the local exploration map and the second feature information of the door frame (second key position) on the space map, the first feature information and the second feature information are matched to determine the mapping relationship between the local exploration map and the space map, so as to facilitate matching of the feature information on the local exploration map and the space map, so as to accurately determine the location of the local exploration map corresponding to the space map, thereby accurately determining the position information of the intelligent device on the space map, and achieving the effect of accurate repositioning of the intelligent device.
[0132] Figure 7 FIG. 1 is a schematic flow chart of an indoor relocation method according to another embodiment of the present application. In this embodiment, the target space is an indoor space, each area in the target space is a room, and the obstacles between the areas are doors between the rooms. Figure 7 As shown, the indoor relocation method includes:
[0133] S701, when the smart device is located at a first exploration position in a first room, first point cloud data of the first room is collected, and an initialization exploration map is updated according to the first point cloud data to obtain a regional exploration submap; the target area includes the first room.
[0134] S702, determine whether the first room meets the area exploration completion condition. If yes, execute S703; if no, execute S704.
[0135] Among them, the conditions for completing area exploration include at least one of the following: there is no unexplored area in the current exploration area (that is, in the current exploration room), and the exploration area in the current exploration area is greater than or equal to a third preset threshold.
[0136] S703: Determine the regional exploration sub-map as the first exploration map.
[0137] S704, control the smart device to move in the first room, and continue to collect first point cloud data of the first room during the movement, update the regional exploration submap according to the collected first point cloud data, until the first room meets the regional exploration completion conditions, and obtain the first exploration map.
[0138] S705, determining whether the first exploration map meets the space exploration completion condition. If yes, execute S706; if no, execute S707.
[0139] The space exploration completion condition includes at least one of the following: the number of explored rooms is greater than or equal to a first preset threshold, and the total exploration area of the explored rooms is greater than or equal to a second preset threshold.
[0140] S706: Determine that the first exploration map is a local exploration map.
[0141] S707, control the smart device to move from the first room to the second room, collect second point cloud data of the second room, and update the first exploration map according to the second point cloud data until the updated exploration map meets the space exploration completion condition, thereby obtaining a local exploration map.
[0142] In this embodiment, the second room to be explored in the space map is determined based on the area of each room in the space map; the door frame between the first room and the second room is identified, and the position information of the door frame is determined; and then, based on the position information of the door frame, the smart device is controlled to move to the second room through the location of the door frame.
[0143] It should be noted that this embodiment only uses the first room and the second room for exemplary explanation. When the indoor space includes multiple rooms that are larger than the currently explored room, and these multiple rooms are all unexplored rooms, it is necessary to repeat S701-S707, that is, actively explore the third room, the fourth room and other multiple rooms, until the number of rooms explored by the smart device is greater than or equal to the first preset threshold, and / or the total exploration area of the explored rooms is greater than or equal to the second preset threshold.
[0144] It can be seen that by controlling the smart device to actively explore in the first room to update the regional exploration sub-map, the regional exploration completion conditions of the first room of the smart device are ensured, and an accurate first exploration map is constructed. Furthermore, by judging whether the first exploration map meets the spatial exploration completion conditions, and controlling the smart device to continue to actively explore to update the first exploration map when the spatial exploration completion conditions are not met, it is ensured that the spatial exploration completion conditions are met, which not only achieves the effect of actively exploring the indoor space, but also avoids the problem that the local exploration map cannot be matched with the spatial map due to failure to meet the completion conditions of the exploration target space, thereby improving the accuracy of matching the local exploration map with the spatial map.
[0145] In summary, specific embodiments of the present subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recorded in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing can be advantageous.
[0146] The above is the indoor repositioning method provided in the embodiment of the present application. Based on the same idea, the embodiment of the present application also provides an indoor repositioning device. Figure 8 is a schematic block diagram of an indoor relocation device according to an embodiment of the application, such as Figure 8 As shown, the device is applied to a smart device; the device comprises:
[0147] A construction module 810 is used to construct an initial exploration map corresponding to a target space; the target space includes a plurality of regions, each of which is separated by obstacles;
[0148] An acquisition module 820 is used to acquire target point cloud data of the target area;
[0149] A generating module 830, configured to update the initialization exploration map according to the target point cloud data to generate a local exploration map corresponding to the target area;
[0150] The matching module 840 is used to match the local exploration map with the space map corresponding to the target space, and determine the position information of the smart device on the space map according to the matching result.
[0151] The device of the embodiment of the present application is used to construct an initialization exploration map corresponding to the target space, wherein the target space includes multiple areas, and each area is separated by obstacles. Collect the target point cloud data of the target area. Then update the initialization exploration map according to the target point cloud data to generate a local exploration map corresponding to the target area. Match the local exploration map with the spatial map corresponding to the target space, and determine the position and posture information of the smart device in the target space according to the matching result. It can be seen that by controlling the smart device to collect the target point cloud data of the target area in real time while moving, and updating the initialization exploration map in real time, the effect of actively exploring the indoor space is achieved, avoiding the situation where the base map (i.e., the spatial map) is inaccurate when the environment in the target space changes, thereby improving the accuracy of repositioning in the space; and, by repositioning the position and posture information of the smart device through the matching result between the local exploration map and the base map, it is no longer necessary to perform a global search of the space when repositioning the smart device, thereby improving the efficiency of repositioning the smart device in the space.
[0152] In one embodiment, the indoor relocation device further comprises a power module, wherein the power module is used to drive the smart device to move to a target area in the target space;
[0153] Correspondingly, the acquisition module 820 is also used to acquire target point cloud data of the target area during the movement of the smart device.
[0154] In one embodiment, the acquisition module 820 includes:
[0155] a collection unit, configured to collect first point cloud data of a first area when the smart device is located in the first area, and update the initialization exploration map according to the first point cloud data to obtain a first exploration map; the target area includes the first area;
[0156] The generation module 830 includes:
[0157] A judging unit, configured to judge whether the first exploration map satisfies a space exploration completion condition; the space exploration completion condition comprises at least one of the following: the number of the explored target areas is greater than or equal to a first preset threshold, and the total explored area of the explored target areas is greater than or equal to a second preset threshold;
[0158] a first determining unit, configured to determine that the first exploration map is the local exploration map;
[0159] A control and acquisition unit is used to control the smart device to move from the first area to the second area, and to acquire second point cloud data of the second area, and to update the first exploration map according to the second point cloud data until the updated exploration map meets the space exploration completion condition; the target area also includes the second area.
[0160] In one embodiment, the control and acquisition unit is also used to, when the smart device is located at the first exploration position in the first area, collect the first point cloud data of the first area, update the initialized exploration map according to the first point cloud data, and obtain an area exploration sub-map; determine whether the first area meets the area exploration completion condition; the area exploration completion condition includes at least one of the following: there is no unexplored area in the current exploration area, and the exploration area in the current exploration area is greater than or equal to a third preset threshold; if so, determine that the area exploration sub-map is the first exploration map; if not, control the smart device to move within the first area, and continue to collect the first point cloud data of the first area during the movement, and update the area exploration sub-map according to the collected first point cloud data until the first area meets the area exploration completion condition, and obtain the first exploration map.
[0161] In one embodiment, the control and acquisition unit is also used to determine a second exploration position within the first area based on the unexplored area existing in the first area; control the smart device to move from the first exploration position to the second exploration position; and when the smart device is located at the second exploration position, collect the first point cloud data of the first area.
[0162] In one embodiment, the obstacle is a navigable passage;
[0163] The control and acquisition unit is also used to determine the second area to be explored in the spatial map according to the area of each area in the spatial map; identify the passable passage between the first area and the second area, and determine the location information of the passable passage; and control the smart device to move to the second area through the passable passage according to the location information.
[0164] In one embodiment, the matching module 840 includes:
[0165] A second determining unit is used to determine first feature information of a first key position on the local exploration map and second feature information of a second key position on the spatial map; the first feature information or the second feature information includes at least one of the following: position orientation, position size, and position shape;
[0166] a matching unit, configured to match the first feature information with the second feature information, and determine a first mapping relationship between the local exploration map and the spatial map according to a matching result;
[0167] The third determining unit is used to determine the position and posture information of the smart device on the spatial map according to the first mapping relationship and the position and posture information of the smart device on the local exploration map.
[0168] In one embodiment, the first key position and the second key position respectively include a plurality of;
[0169] The matching unit is further used to determine a first relative posture relationship between each of the first key positions based on the first feature information respectively corresponding to each of the first key positions; determine a second target key position in the spatial map that matches the first target key position for a first target key position among multiple first key positions; and determine a first mapping relationship between the local exploration map and the spatial map based on the first relative posture relationship and a second mapping relationship between the first target key position and the second target key position.
[0170] In one embodiment, the matching unit is also used to map the other first key positions to the spatial map according to the second mapping relationship to obtain a third key position; based on the first relative posture relationship, determine whether the second key position and the third key position match in the spatial map; if so, determine the first mapping relationship between each first key position and each second key position based on the second mapping relationship; if not, re-determine the second target key position corresponding to the first target key position.
[0171] In one embodiment, the second target key position corresponding to the first target key position includes a plurality of;
[0172] The third determination unit is further used to determine, for each of the first mapping relationships, a plurality of candidate posture information of the smart device on the spatial map; for any of the candidate posture information, perform a traversal search within a preset area corresponding to the candidate posture information, and determine the probability scores corresponding to each of the candidate position information according to the search results; and determine the candidate posture information corresponding to the highest value among the probability scores as the posture information of the smart device on the spatial map.
[0173] In one embodiment, the third determination unit is also used to determine the posture conversion relationship of the smart device relative to each of the first key positions based on the posture information of the smart device on the local exploration map; based on the posture conversion relationship and the first mapping relationship, the posture information of the smart device on the local exploration map is mapped to the spatial map to obtain the candidate posture information of the smart device on the spatial map.
[0174] In one embodiment, the third determination unit is also used to control the smart device to move within the preset area, and collect point cloud data within the preset area during the movement; generate a preset area map corresponding to the preset area based on the point cloud data; compare the preset area map with the corresponding area map on the spatial map, and determine the matching rate between the preset area map and the corresponding area map based on the comparison result; and calculate the probability score corresponding to the candidate posture information based on the matching degree.
[0175] Based on the same idea, the embodiment of the present application also provides an indoor relocation device, such as Fig. 9 As shown. The indoor repositioning device may have relatively large differences due to different configurations or performances, and may include one or more processors 901 and memory 902, and one or more storage applications or data may be stored in the memory 902. Among them, the memory 902 can be a temporary storage or a permanent storage. The application stored in the memory 902 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the indoor repositioning device. Furthermore, the processor 901 can be configured to communicate with the memory 902 to execute a series of computer executable instructions in the memory 902 on the indoor repositioning device. The indoor repositioning device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input and output interfaces 905, and one or more keyboards 906.
[0176] Specifically in this embodiment, the indoor relocation device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the indoor relocation device, and the one or more programs are configured to be executed by one or more processors, including the following computer executable instructions:
[0177] Constructing an initialization exploration map corresponding to a target space; the target space includes a plurality of regions, each of which is separated by obstacles;
[0178] Controlling the smart device to move in a target area within the target space, and collecting target point cloud data of the target area during the movement of the smart device;
[0179] Updating the initialized exploration map according to the target point cloud data to generate a local exploration map corresponding to the target area;
[0180] The local exploration map is matched with a spatial map corresponding to the target space, and the position information of the smart device on the spatial map is determined according to the matching result.
[0181] An embodiment of the present application also proposes a storage medium, which stores one or more computer programs. The one or more computer programs include instructions. When the instructions are executed by an electronic device including multiple applications, the electronic device can perform the various processes of the above-mentioned indoor repositioning method embodiment and achieve the same technical effect. To avoid repetition, they are not repeated here.
[0182] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0183] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0184] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0185] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0186] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0188] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0189] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0190] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0191] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0192] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0193] Each embodiment in this specification is described in a progressive 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.
[0194] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. An indoor repositioning method, characterized in that: Applied to smart devices; the method comprises: Constructing an initialization exploration map corresponding to a target space; the target space includes a plurality of regions, each of which is separated by obstacles; Controlling the smart device to move in a target area within the target space, and collecting target point cloud data of the target area during the movement of the smart device; Updating the initialized exploration map according to the target point cloud data to generate a local exploration map corresponding to the target area; Matching the local exploration map with a spatial map corresponding to the target space, and determining the position information of the smart device on the spatial map according to the matching result; The controlling the smart device to move in a target area within the target space, and collecting target point cloud data of the target area during the movement of the smart device; updating the initialization exploration map according to the target point cloud data to generate a local exploration map corresponding to the target area, includes: when the smart device is located in a first area, collecting first point cloud data of the first area, and updating the initialization exploration map according to the first point cloud data to obtain a first exploration map; the target area includes the first area; judging whether the first exploration map satisfies a spatial exploration completion condition; the spatial exploration completion condition includes at least one of the following: the number of the explored target areas is greater than or equal to a first preset threshold, and the total exploration area of the explored target areas is greater than or equal to a second preset threshold; if so, determining that the first exploration map is the local exploration map.
2. The method according to claim 1, characterized in that: If the first exploration map does not meet the space exploration completion condition, control the smart device to move from the first area to the second area, collect second point cloud data of the second area, and update the first exploration map according to the second point cloud data until the updated exploration map meets the space exploration completion condition; the target area also includes the second area.
3. The method according to claim 2, characterized in that The collecting first point cloud data of the first area and updating the initialized exploration map according to the first point cloud data to obtain a first exploration map includes: When the smart device is located at a first exploration position within the first area, collecting the first point cloud data of the first area, updating the initialized exploration map according to the first point cloud data, and obtaining an area exploration sub-map; Determine whether the first area meets the area exploration completion condition; the area exploration completion condition includes at least one of the following: there is no unexplored area in the current exploration area, and the exploration area in the current exploration area is greater than or equal to a third preset threshold; If yes, determining that the regional exploration sub-map is the first exploration map; If not, control the smart device to move within the first area, and continue to collect the first point cloud data of the first area during the movement, update the area exploration submap according to the collected first point cloud data, until the first area meets the area exploration completion condition, and obtain the first exploration map.
4. The method according to claim 3, characterized in that The controlling the smart device to move within the first area and continuing to collect the first point cloud data of the first area during the movement includes: Determine a second exploration position within the first area according to the unexplored area existing within the first area; Controlling the smart device to move from the first exploration position to the second exploration position; When the smart device is located at the second exploration position, the first point cloud data of the first area is collected.
5. The method according to claim 2, characterized in that: The obstacle is a passable passage; The controlling the smart device to move from the first area to the second area includes: Determining the second area to be explored in the spatial map according to the area of each area in the spatial map; Identifying the passable passage between the first area and the second area, and determining location information of the passable passage; According to the location information, the smart device is controlled to move to the second area through the passable passage.
6. The method according to claim 1, characterized in that The matching of the local exploration map with the spatial map corresponding to the target space, and determining the position information of the smart device on the spatial map according to the matching result, includes: Determine first feature information of a first key position on the local exploration map, and second feature information of a second key position on the spatial map; the first feature information or the second feature information includes at least one of the following: position orientation, position size, and position shape; Matching the first feature information with the second feature information, and determining a first mapping relationship between the first key position and the second key position according to the matching result; The position information of the smart device on the spatial map is determined according to the first mapping relationship and the position information of the smart device on the local exploration map.
7. The method according to claim 6, characterized in that The first key position and the second key position respectively include a plurality of; The matching the first feature information and the second feature information, and determining a first mapping relationship between the first key position and the second key position according to the matching result, includes: Determining a first relative position relationship between the first key positions according to the first feature information respectively corresponding to the first key positions; For a first target key position among the plurality of first key positions, determining a second target key position in the spatial map that matches the first target key position; The first mapping relationship between each of the first key positions and each of the second key positions is determined according to the first relative position relationship and the second mapping relationship between the first target key position and the second target key position.
8. The method according to claim 7, characterized in that The determining, according to the first relative position relationship and the second mapping relationship between the first target key position and the second target key position, the first mapping relationship between each of the first key positions and each of the second key positions includes: According to the second mapping relationship, mapping the other first key positions to the spatial map to obtain a third key position; According to the first relative position relationship, determining whether the second key position matches the third key position in the spatial map; If yes, determining the first mapping relationship between each of the first key positions and each of the second key positions according to the second mapping relationship; If not, re-determine the second target key position corresponding to the first target key position.
9. The method according to claim 7 or 8, characterized in that: The second target key position corresponding to the first target key position includes a plurality of second target key positions; The determining, according to the first mapping relationship and the position information of the smart device on the local exploration map, the position information of the smart device on the spatial map includes: For each of the first mapping relationships, respectively determine a plurality of candidate position information of the smart device on the spatial map; For any of the candidate posture information, perform a traversal search within a preset area corresponding to the candidate posture information, and determine the probability score corresponding to each of the candidate posture information according to the search results; The candidate posture information corresponding to the highest value in the probability scores is determined as the posture information of the smart device on the spatial map.
10. The method according to claim 9, characterized in that The determining, for each of the first mapping relationships, a plurality of candidate posture information of the smart device on the space map, includes: Determining, according to the posture information of the smart device on the local exploration map, a posture conversion relationship of the smart device relative to each of the first key positions; According to the posture conversion relationship and the first mapping relationship, the posture information of the smart device on the local exploration map is mapped to the spatial map to obtain the candidate posture information of the smart device on the spatial map.
11. The method according to claim 9, characterized in that The traversal search is performed within a preset area corresponding to the candidate posture information, and the probability score corresponding to each candidate posture information is determined according to the search results, including: Controlling the smart device to move within the preset area, and collecting point cloud data within the preset area during the movement; Generating a preset area map corresponding to the preset area range according to the point cloud data; Comparing the preset area map with the corresponding area map on the spatial map, and determining a matching rate between the preset area map and the corresponding area map according to the comparison result; According to the matching rate, the probability score corresponding to the candidate posture information is calculated.
12. An indoor repositioning device, characterized in that: Applied to a smart device, the device comprises: A construction module, used to construct an initialization exploration map corresponding to a target space; the target space includes a plurality of regions, each of which is separated by obstacles; A collection module, used to control the smart device to move in a target area within the target space, and to collect target point cloud data of the target area during the movement of the smart device; A generating module, configured to update the initialization exploration map according to the target point cloud data to generate a local exploration map corresponding to the target area; A matching module, used to match the local exploration map with a spatial map corresponding to the target space, and determine the position information of the smart device on the spatial map according to the matching result; The controlling the smart device to move in a target area within the target space, and collecting target point cloud data of the target area during the movement of the smart device; updating the initialization exploration map according to the target point cloud data to generate a local exploration map corresponding to the target area, includes: when the smart device is located in a first area, collecting first point cloud data of the first area, and updating the initialization exploration map according to the first point cloud data to obtain a first exploration map; the target area includes the first area; judging whether the first exploration map satisfies a spatial exploration completion condition; the spatial exploration completion condition includes at least one of the following: the number of the explored target areas is greater than or equal to a first preset threshold, and the total exploration area of the explored target areas is greater than or equal to a second preset threshold; if so, determining that the first exploration map is the local exploration map.
13. The indoor relocation device according to claim 12, characterized in that: Also included is a power module, the power module is used to drive the smart device to move in a target area within the target space; The acquisition module is also used to acquire target point cloud data of the target area during the movement of the smart device.
14. An indoor relocation device, characterized in that: It comprises a processor and a memory electrically connected to the processor, the memory stores a computer program, and the processor is used to call and execute the computer program from the memory to implement the indoor repositioning method according to any one of claims 1 to 11.
15. A storage medium, characterized in that: The storage medium is used to store a computer program, and the computer program can be executed by a processor to implement the indoor repositioning method according to any one of claims 1 to 11.
