Mobile device and mapping method thereof, and computer-readable storage medium
By calculating the norm of the spatial position corresponding to the exploration boundary and the location of the mobile device in the drawing construction method of mobile devices, and selecting the spatial position with the smallest norm as the target position, the problem of large amount of calculation in the self-exploration drawing construction process of mobile devices is solved, and the effect of quickly determining the target boundary position and improving the efficiency of mapping construction is achieved.
Patent Information
- Application Number
- CN202110669120.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-16
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-06-16
AI Technical Summary
In the process of self-exploration mapping construction of mobile devices, the calculation of path cost involves the acquisition of a large amount of spatial scene information, resulting in a large amount of calculation of the determination of the target boundary position and affecting the efficiency of mapping construction.
By obtaining a map of the space where the mobile device is located, determining the exploration boundary, and calculating the norm of the multiple spatial positions and the mobile device position corresponding to the exploration boundary, selecting the spatial position with the smallest norm as the target position, the mobile device moves to the target position and updates the map.
No path cost calculation and comparison is required, which reduces the calculation amount of the target position determination process, improves the mapping efficiency of mobile devices, and allows mobile devices to quickly complete map construction of undetected areas.
Smart Images

Figure CN115480563B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of map construction technology, and in particular to a map construction method for a mobile device, a mobile device and a computer-readable storage medium. Background Art
[0002] With the development of economy and technology, the application of autonomous mobile devices (such as mobile air conditioners, mobile robots, etc.) is becoming more and more widespread. Mobile devices generally explore the map of the space they are in, plan paths based on the map, and move autonomously along the planned path. Mobile devices realize self-exploration and mapping based on the principle of boundary exploration. After collecting the map of its environment at a certain location, it moves to the boundary position that can be explored at that location to further explore and build the map.
[0003] At present, in the process of self-exploration and mapping of devices, maps are built in real time during movement, and then the path cost required from each boundary point on the map exploration boundary to the device location is analyzed in combination with the determined map information. After comparing all the path costs of the boundary points, the target boundary location that the device needs to reach can be determined. However, the calculation of the path cost involves the acquisition of a lot of relevant scene information in space, which results in a large amount of calculation in the process of determining the target boundary location during the self-exploration and mapping of devices, making it impossible to quickly determine the target boundary location, which seriously affects the mapping efficiency of mobile devices. Summary of the invention
[0004] The main purpose of the present invention is to provide a mapping method for a mobile device, a mobile device and a computer-readable storage medium, aiming to improve the mapping efficiency of the mobile device.
[0005] To achieve the above object, the present invention provides a mapping method for a mobile device, the mapping method for a mobile device comprising the following steps:
[0006] Acquire a map of the space where the mobile device is located, and determine an exploration boundary of the map; the exploration boundary is a boundary formed on the map between an explored area and an unexplored area of the mobile device in the space;
[0007] Determine norm values corresponding to a plurality of spatial positions corresponding to the exploration boundary and the position of the mobile device, respectively, to obtain a plurality of norm values;
[0008] determining one of the plurality of spatial positions as a target position according to the plurality of norm values;
[0009] The mobile device is controlled to move toward the target location and the map is updated.
[0010] Optionally, the step of determining one of the multiple spatial positions as a target position according to the multiple norm values includes:
[0011] The spatial position corresponding to the smallest norm value among the multiple norm values is determined as the target position.
[0012] Optionally, the step of determining norm values corresponding to a plurality of spatial positions corresponding to the exploration boundary and the position of the mobile device respectively comprises:
[0013] Obtaining the centroid coordinates corresponding to each of the spatial positions and the origin coordinates corresponding to the position of the mobile device;
[0014] The 1-norm between each of the centroid coordinates and the origin coordinates is calculated to obtain the corresponding norm value.
[0015] Optionally, the map is a grid map, the grid map includes a plurality of grids and state information corresponding to each grid, the state information includes a first state and a second state, the first state is that the position corresponding to the grid in the space allows the mobile device to move, and the second state is that it is not determined whether the position corresponding to the grid in the space allows the mobile device to move, and the step of determining the exploration boundary of the map includes:
[0016] Determining one of the plurality of grids as a first target grid;
[0017] Determine a second target grid from a plurality of grids located in the neighborhood of the first target grid; the state information corresponding to the second target grid is the first state;
[0018] If there is a third target grid among the multiple grids located in the neighborhood of the second target grid, the second target grid is determined to be a boundary position; the state information corresponding to the third target grid is the second state;
[0019] The exploration boundary is determined according to the boundary position.
[0020] Optionally, after the step of determining the second target grid as a boundary position, the method further includes:
[0021] Counting the number of the determined boundary positions;
[0022] When the number is less than the set value, returning to the step of determining one of the plurality of grids as the first target grid;
[0023] When the number is greater than or equal to a set value, the step of determining the exploration boundary according to the boundary position is performed.
[0024] Optionally, the step of determining one of the plurality of grids as a first target grid comprises:
[0025] If there is a determined boundary position, the previously determined boundary position is determined as the first target grid.
[0026] Optionally, after the step of controlling the mobile device to move to the target location and updating the map, the method further includes:
[0027] Returning to execute the step of determining the exploration boundary of the map;
[0028] Defining a first reference position as the target position determined before the map is updated, one of the multiple spatial positions as the first reference position, defining a norm value corresponding to the first reference position as a reference norm value, and determining one of the multiple spatial positions as the target position according to the multiple norm values comprises:
[0029] If there are several target norm values among the multiple norm values that are smaller than the reference norm value, determining the spatial position corresponding to the target norm value with the smallest value as the second reference position, and obtaining the first path length and the second path length;
[0030] When the first path length is greater than the second path length, determining the second reference position as the target position;
[0031] When the first path length is less than the second path length, determining the first reference position as the target position;
[0032] The first path length is a path length required for the mobile device to move to the first reference position, and the second path length is a path length required for the mobile device to move to the second reference position.
[0033] Optionally, the step of obtaining the first path length and the second path length includes:
[0034] Acquire a traversable area in the space; the traversable area is an area in the space where no obstacles exist;
[0035] In the passable area, determining the shortest path for the mobile device to move to the first reference position as a first path, and determining the shortest path for the mobile device to move to the second reference position as a second path;
[0036] The length of the first path is determined as the first path length, and the length of the second path is determined as the second path length.
[0037] In addition, in order to achieve the above-mentioned purpose, the present application also proposes a mobile device, which includes: a memory, a processor, and a mapping program of the mobile device stored in the memory and executable on the processor, and when the mapping program of the mobile device is executed by the processor, the steps of the mapping method of the mobile device as described in any one of the above items are implemented.
[0038] In addition, in order to achieve the above-mentioned purpose, the present application also proposes a computer-readable storage medium, on which a mapping program for a mobile device is stored. When the mapping program for the mobile device is executed by a processor, the steps of the mapping method for the mobile device as described in any of the above items are implemented.
[0039] The present invention proposes a mapping method for a mobile device. After identifying the exploration boundary formed on the map by the detected area and the undetected area of the space where the mobile device is located, the method analyzes the spatial position corresponding to the exploration boundary and the norm corresponding to the position of the mobile device, and uses the obtained multiple norms to analyze and obtain the target position on the exploration boundary that the mobile device needs to move to during the mapping process. Since the norm is determined by the spatial position and the position information of the mobile device, there is no need to calculate and compare the path cost, thereby effectively reducing the amount of calculation in the target position determination process during the device's self-exploration process, so as to quickly determine the target boundary position that the device needs to move to when mapping, so that the mobile device can quickly complete the map construction of the undetected area, and effectively improve the mapping efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of the hardware structure involved in the operation of a mobile device according to an embodiment of the present invention;
[0041] Figure 2 A schematic diagram of a flow chart of an embodiment of a method for building a map of a mobile device of the present invention;
[0042] Figure 3 A schematic diagram of a flow chart of another embodiment of a method for building a map of a mobile device of the present invention;
[0043] Figure 4 A schematic diagram of a flow chart of another embodiment of a method for building a map of a mobile device of the present invention;
[0044] Figure 5 A schematic diagram of the shortest path involved in the mapping method of a mobile device of the present invention.
[0045] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0046] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0047] The main solution of the embodiment of the present invention is: obtaining a map of the space where the mobile device is located, and determining the exploration boundary of the map; the exploration boundary is the boundary formed on the map between the detected area and the undetected area of the mobile device in the space; determining the norm values corresponding to multiple spatial positions corresponding to the exploration boundary and the position of the mobile device, so as to obtain multiple norm values; determining one of the multiple spatial positions as the target position according to the multiple norm values; controlling the mobile device to move to the target position and updating the map.
[0048] In the prior art, during the device's self-exploration and mapping process, the map is built in real time during movement, and then the path cost required to reach the device from each boundary point on the map exploration boundary is analyzed in combination with the determined map information. After comparing all the path costs of the boundary points, the target boundary position that the device needs to reach can be determined. However, the calculation of the path cost involves the acquisition of a lot of relevant scene information in space, which results in a large amount of calculation in the process of determining the target boundary position during the device's self-exploration and mapping process, making it impossible to quickly determine the target boundary position, which seriously affects the mapping efficiency of the mobile device.
[0049] The present invention provides the above-mentioned solution, aiming to improve the mapping efficiency of mobile devices.
[0050] An embodiment of the present invention provides a mobile device.
[0051] In this embodiment, the mobile device is a mobile air conditioner, which is a mobile device equipped with a heat pump system to process air.
[0052] In other embodiments, the mobile device may also be other autonomously movable devices that are not equipped with a heat pump system, such as an automatic transport robot. For example, when an air conditioner includes a fixed main unit equipped with a heat pump system and a movable sub-unit equipped with an air treatment function, the sub-unit in the air conditioner can be used as the mobile device here.
[0053] In the embodiment of the present invention, refer to Figure 1 The mobile device may include a motion module 1 , a detection module 2 and a navigation module 3 .
[0054] The motion module 1 includes relevant structures required for the movement of the mobile device, such as casters, a drive motor, and a transmission structure connecting the casters and the drive motor.
[0055] The detection module 2 is used to collect scene information of the space where the mobile device is located, so as to construct a map of the space where the mobile device is located based on the collected scene information. In an embodiment, the detection module 2 is a light detection module 2 (such as a laser radar). In other embodiments, the detection module 2 can also be set to other types of detection modules 2 according to actual needs, such as a camera.
[0056] The navigation module 3 is specifically used to locate the mobile device to provide location data support for the movement of the mobile device.
[0057] Furthermore, the mobile device may also include an air processing module 4 (such as a heat pump module, a purification module, an aromatherapy module, a sterilization module, a humidification module, a heating module and / or a dehumidification module, etc.), and the air processing module 4 can be used to adjust the air.
[0058] Furthermore, the mobile device further comprises a control device connected to the above-mentioned motion module 1, detection module 2 and navigation module 3. The control device can be used to control the operation of the above-mentioned components and also to obtain the operation data of the above-mentioned components.
[0059] In the embodiment of the present invention, refer to Figure 1 The control device includes: a processor 1001 (such as a CPU), a memory 1002, etc. The processor 1001 is in communication with the memory 1002. The memory 1002 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1002 can also be a storage device independent of the aforementioned processor 1001.
[0060] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0061] like Figure 1 As shown, the memory 1002 as a computer-readable storage medium may include a mapping program of the mobile device. Figure 1 In the device shown, the processor 1001 can be used to call the mapping program of the mobile device stored in the memory 1002, and execute the relevant steps of the mapping method of the mobile device in the following embodiments.
[0062] An embodiment of the present invention further provides a mapping method for a mobile device, which is applied to the above-mentioned mobile device, so that the above-mentioned mobile device can autonomously explore the space where it is located and construct a map corresponding to the space.
[0063] Reference Figure 2 , an embodiment of a mapping method of a mobile device of the present application is proposed. In this embodiment, the mapping method of the mobile device includes:
[0064] Step S10, obtaining a map of the space where the mobile device is located, and determining an exploration boundary of the map; the exploration boundary is a boundary formed on the map between an explored area and an unexplored area of the mobile device in the space;
[0065] The map here is specifically a map constructed by the mobile device at its current location based on the collected spatial scene information.
[0066] Since the detection range of the detection module used to collect scene information on the mobile device is limited, the spatial area covered by the detection range of the detection module is the detected area, and the spatial area that cannot be covered by the detection range of the detection module is the undetected area. This will cause two areas to be formed on the map constructed by the mobile device. One is the map area determined by the detection module based on the scene information of the area that can be detected (i.e., the map area corresponding to the detected area), and the other is the map area constructed by the scene information that the detection module cannot obtain (i.e., the map area corresponding to the undetected area). The boundary between the two areas is the exploration boundary here. Among them, since the map is collected by the mobile device at its current position, the location of the mobile device is within the detected area. The map information in the map area corresponding to the detected area has been determined, and the map information in the map area corresponding to the undetected area has not been determined.
[0067] In this embodiment, the exploration boundary on the map can be determined by analyzing the determined map information and the undetermined map information on the map. Specifically, the exploration boundary on the map can be determined by traversing the map information of each location on the map or searching and analyzing the map information according to preset search rules. In other embodiments, the map can also be output and displayed, and the unexplored area on the map can be determined based on the boundary feedback information input by the user after the map is displayed (for example, the user can mark the boundary of the area of the determined map information on the output map to form boundary feedback information, etc.).
[0068] Step S20, determining norm values corresponding to a plurality of spatial positions corresponding to the exploration boundary and the position of the mobile device, respectively, to obtain a plurality of norm values;
[0069] The distance between the spatial position represented by the norm and the mobile device. Specifically, the first position information corresponding to each spatial position in the multiple spatial positions corresponding to the exploration boundary can be obtained, and the second position information corresponding to the position of the mobile device can be obtained, and the norm value here is determined according to the first position information and the second position information. A norm value is determined for each spatial position. In this embodiment, the norm value is the 1-norm corresponding to the spatial position and the current position of the mobile device. In other embodiments, the norm value may also be the 2-norm, 3-norm, etc. corresponding to the spatial position and the current position of the mobile device.
[0070] The corresponding relationship between the spatial position corresponding to the exploration boundary, the current position of the mobile device and the norm value can be preset, and can be in the form of a mapping relationship, a calculation relationship or an algorithm model, etc. The norm value corresponding to the currently determined spatial position and the current position of the device can be determined through the preset corresponding relationship.
[0071] In this embodiment, a preset coordinate system is pre-set (it can be a spatial coordinate system of the space where the mobile device is located, or it can be a coordinate system corresponding to the map construction corresponding to the map), and the preset coordinate system can be a two-dimensional coordinate system or a three-dimensional coordinate system, and the coordinates on the preset coordinate system are used to represent the spatial position corresponding to the exploration boundary and the position information corresponding to the current position of the mobile device. Specifically, the coordinates of the spatial position corresponding to the exploration boundary on the preset coordinate system are defined as the first coordinates, and the coordinates of the current position of the mobile device on the preset coordinate system are defined as the second coordinates, and the norm value here can be calculated by the first coordinates and the second coordinates.
[0072] Step S30, determining one of the multiple spatial positions as a target position according to the multiple norm values;
[0073] Specifically, a norm value that satisfies a preset condition among multiple norm values may be determined as a target norm value, and a spatial position corresponding to the target norm value among multiple spatial positions may be determined as a target position. The preset condition is specifically a target condition that a norm value between a preset target position that a mobile device needs to reach and a current position of the mobile device needs to reach.
[0074] In this embodiment, the target condition is to minimize the norm value of the target position. Specifically, the spatial position corresponding to the norm value with the smallest value among the multiple norm values is determined as the target position. Specifically, the multiple spatial positions can be ranked in descending order based on the multiple norm values, and the spatial position ranked last is determined as the target position.
[0075] In other embodiments, the target condition may also be a preset norm value that the norm value of the target position needs to reach. Specifically, the numerical deviation (absolute value of the difference) between each norm value of the multiple norm values and the preset norm value is determined, and among the multiple spatial positions corresponding to the exploration boundary, the spatial position corresponding to the norm value with the smallest numerical deviation is determined as the target position.
[0076] Step S40: Control the mobile device to move toward the target location and update the map.
[0077] The path of the mobile device from its current location to the target location can be a path determined based on the user input command, or a path calculated based on the collected scene information (such as obstacle information, human body information in the space (such as human body position and / or human body thermal comfort, etc.) and / or the time period in which the mobile device is currently operating, etc.) and preset path planning rules (such as avoiding obstacles, staying away from or approaching the human body, preset operating areas and / or time periods allowed for operation in different areas, etc.). For example, the mobile device can be controlled to move in a straight line toward the target location, and if an obstacle is encountered, the moving direction is changed or the target location is re-determined, or the mobile device can move along the shortest path to avoid obstacles.
[0078] The map obtained by the mobile device at the current position is defined as the first map. When the mobile device moves from the current position to the target position, the mobile device is controlled to collect scene information in real time or at set intervals and build a second map based on the collected scene information. The first map and the second map are merged to obtain an updated map. Specifically, the areas with the same scene information in the first map and the second map are analyzed as overlapping areas, and the two maps are merged based on the overlapping areas, thereby completing the map update. In other words, the map constructed later contains all the map information of the map constructed earlier.
[0079] When the mobile device is a mobile air conditioner, during the movement of the mobile air conditioner, the mobile air conditioner can turn on air treatment functions (such as heat exchange, sterilization, cleaning, purification, dehumidification, humidification and / or fragrance adjustment, etc.) to adjust the indoor ambient air to meet the comfort of indoor users while building a scene map of the space.
[0080] In this embodiment, a mapping method for a mobile device is proposed. After identifying the exploration boundary formed on the map by the detected area and the undetected area of the space where the mobile device is located, the method analyzes the norm corresponding to the spatial position corresponding to the exploration boundary and the position of the mobile device, and obtains the target position on the exploration boundary that the mobile device needs to move to during the mapping process through the obtained multiple norms. Since the norm is determined by the spatial position and the position information of the mobile device, there is no need to calculate and compare the path cost, thereby effectively reducing the amount of calculation in the target position determination process during the device's self-exploration process, so as to quickly determine the target boundary position that the device needs to move to when mapping, so that the mobile device can quickly complete the map construction of the undetected area, and effectively improve the mapping efficiency.
[0081] Among them, determining the spatial position with the smallest norm value as the target position is conducive to ensuring that the mobile device can quickly reach the boundary between the undetected area and the detected area, so as to further improve the mapping efficiency of the device.
[0082] Furthermore, in this embodiment, the process of determining the norm values corresponding to the multiple spatial positions corresponding to the exploration boundary and the position of the mobile device is as follows: obtaining the center of mass coordinates corresponding to each of the spatial positions and the origin coordinates corresponding to the position of the mobile device; calculating the 1-norm between each of the center of mass coordinates and the origin coordinates to obtain the corresponding norm value.
[0083] Here, the centroid coordinates are specifically the average values of the coordinates corresponding to each spatial position in their respective dimensions. Taking the current position of the mobile device as the starting point, the 1-norm represents the sum of the absolute values of the difference between the centroid corresponding to the spatial position and the starting point in different directions of the preset coordinate system.
[0084] In this embodiment, the 1-norm calculated by the centroid coordinates and the origin coordinates can accurately characterize the distance between each spatial position corresponding to the exploration boundary and the current position of the mobile device (i.e., the straight-line distance between the two positions). The distance between the target position determined based on the norm value and the current position of the mobile device can be minimized, thereby further improving the mapping efficiency of the mobile device.
[0085] Further, based on the above embodiment, another embodiment of the mapping method of the mobile device of the present application is proposed. In this embodiment, the map is a grid map, and the grid map includes multiple grids and status information corresponding to each grid, and the status information includes a first state and a second state, the first state is that the position corresponding to the grid in the space allows the mobile device to move, and the second state is that the position corresponding to the grid in the space is not determined whether the mobile device is allowed to move. In addition, in this embodiment, the status information also includes a third state, and the third state is that the position corresponding to the grid in the space does not allow the mobile device to move. Based on this, the status information of the grid corresponding to the above-mentioned detected area on the map is the first state or the third state, and the status information of the grid corresponding to the undetected area on the map is the second state.
[0086] Based on this, refer to Figure 3 , the step of determining the exploration boundary of the map comprises:
[0087] Step S11, determining one of the plurality of grids as a first target grid;
[0088] The first target grid may be selected arbitrarily, or one of the grids on the grid map may be selected as the first target grid according to a preset rule.
[0089] Step S12, determining a second target grid from a plurality of grids located in the neighborhood of the first target grid; the state information corresponding to the second target grid is the first state;
[0090] Specifically, some or all of the eight grids in the neighborhood of the first target grid can be selected as the first target grid set, and the state information of each grid in the first target grid set can be traversed. In this embodiment, the second target grid is determined in the eight grids corresponding to the eight neighborhoods of the first target grid. It is determined whether the state information obtained by the traversal is the first state. If so, the grid corresponding to the first state is used as the second target grid; if not, the grid whose state information is other than the first state is saved in the non-boundary grid set. Among them, if the state information of all grids in the first target grid set is information other than the first state, any grid or the grid corresponding to the third state is used as the new first target grid, and the execution of step S11 is returned.
[0091] Step S13: if there is a third target grid among the multiple grids located in the neighborhood of the second target grid, the second target grid is determined to be a boundary position; and the state information corresponding to the third target grid is the second state;
[0092] Specifically, some or all of the eight grids in the neighborhood of the second target grid can be selected as the second target grid set, and the state information of each grid in the second target grid set can be traversed. In this embodiment, the third target grid is determined in the four grids corresponding to the four neighborhoods of the second target grid. It is determined whether the state information obtained by the traversal is the second state. If so, the grid corresponding to the second state is used as the third target grid; if not, the grid whose state information is other than the second state is saved in the non-boundary grid set. Among them, if the state information of all grids in the second target grid set is information other than the second state, any grid or the grid corresponding to the first state is used as the new first target grid, and the execution of step S11 is returned.
[0093] If there are multiple operations of identifying boundary positions (for example, when steps S11 to S13 are executed in a loop), the grids in the non-boundary grid set will no longer be processed in the subsequent operations of identifying boundary positions.
[0094] Step S14: determining the exploration boundary according to the boundary position.
[0095] If the currently determined boundary position is one, the exploration boundary here is determined according to the boundary position and the preset boundary extension rule, with the line connecting the boundary position and the current position of the mobile device as the radius, and the extension line passing through the boundary position and perpendicular to the radius is determined as the boundary position.
[0096] If there are more than one boundary positions currently determined, a line connecting the multiple boundary positions may be determined as the exploration boundary.
[0097] In this embodiment, the corresponding spatial position where the mobile device is allowed to move and the adjacent spatial position where it is not determined whether the mobile device is allowed to move is determined as the boundary position, thereby ensuring that the subsequent exploration boundary determined based on the boundary position is the boundary corresponding to the explored area and the unexplored area, and the mobile device is allowed to pass based on the target position information determined based on the boundary, ensuring that the mobile device can reach the exploration boundary to detect more undetected spatial scene information.
[0098] Among them, in this embodiment, different states in the state information can be characterized by different characteristic values, and the characteristic values here can be defined as cost values, and each grid corresponds to a cost value. Specifically, the cost value corresponding to the first state is 0, the cost value corresponding to the second state is -1, and the cost value corresponding to the third state is 100. Based on this, the above-mentioned third target grid and the second target grid can be determined by each corresponding cost value. Specifically, if there is a grid with a cost value of 0 in the field of the first target grid, the grid is determined as the second target grid, and if there is a grid with a cost value of -1 in the field of the second target grid, it indicates that the second target grid is a boundary position.
[0099] Furthermore, in this embodiment, after step S13, the following steps are further included:
[0100] Step S131, counting the number of the determined boundary positions;
[0101] When the number is less than the set value, return to step S11 and define the current first target grid as the identified grid; when the number is greater than or equal to the set value, execute the step of determining the exploration boundary according to the boundary position.
[0102] The set value may be a preset default parameter, or may be determined according to the current operation of the mobile device. For example, when the mobile device is a mobile air conditioner, the air treatment mode currently running in the mobile air conditioner may be obtained, and the corresponding preset value may be obtained based on the air treatment mode as the set value here, and different air treatment modes correspond to different set values.
[0103] Based on this, step S11 may include: determining other grids other than the identified grid as the first target grid in the multiple grids. The other grids here may be determined based on a pre-defined rule, and may be grids other than the identified grid and located in the neighborhood of the first target grid, or grids other than the identified grid and other than the above-mentioned non-boundary grid set, or grids other than the identified grid and whose status information has not been obtained, and so on.
[0104] In this embodiment, the exploration boundary is determined according to the determined boundary positions only when there are enough determined boundary positions, thereby ensuring the accuracy of the target positions subsequently determined on the exploration boundary, and further improving the efficiency of map exploration.
[0105] In this embodiment, in order to improve the efficiency of determining the boundary and enable the mobile device to quickly reach the search boundary, step S11 includes: if there is a determined boundary position, the previously determined boundary position is determined as the first target grid. For example, after the first boundary position is determined based on the above steps S12 to S13, if the total number of boundary positions is less than the set value at this time, the step S11 can be returned to be executed, the first boundary position is used as the first target grid, and the second boundary position is determined according to steps S12 and S13. If the total number of boundary positions is less than the set value at this time, the step S11 can be returned to be executed, and the second boundary position is used as the new boundary position. If the total number of boundary positions is greater than or equal to the set value at this time, the search boundary can be determined according to all currently determined numbers. In the process of cyclically executing steps S10 to S40, the number of boundary positions can be reset to zero at the beginning of each cycle, and the first first target grid in each cycle can be the last boundary position determined in the previous cycle.
[0106] Furthermore, if the location of the mobile device is the starting location of its mapping process, the grid corresponding to the location of the mobile device is determined as the first target grid; if the location of the mobile device is other than the starting location, the previously determined boundary location can be determined as the first target grid when there is a determined boundary location. Specifically, after the mapping mode of the mobile device is started, the first location where the mobile device starts to collect scene information and build a map can be determined as the starting location of the mobile device. At this time, there is no determined boundary location, and the starting position can be used as the first target grid. Here, using the starting position as the first target grid can ensure that the search boundary that is close to the mobile device can be quickly searched to further improve the mapping efficiency of the mobile device.
[0107] Further, based on the above embodiment, another embodiment of the mapping method of the mobile device of the present application is proposed. In this embodiment, after step S40, the method further includes: returning to execute the step of determining the exploration boundary of the map.
[0108] After step S40, the step of determining the exploration boundary of the map can be returned to be executed until the end condition of map construction is reached. That is, in the process of self-exploration and mapping of the mobile device, the process of moving the mobile device to the target position and obtaining the map, determining the exploration boundary of the map, and determining the next target position of the mobile device based on the spatial position corresponding to the exploration boundary and the norm value of the current position of the mobile device is cyclically executed until the preset end condition is reached. Among them, the end condition here can be that the area of the map area with determined scene information on the map is greater than or equal to the set area, there is no area on the map with undetermined scene information, the end instruction input by the user is received, or the duration of map construction is greater than or equal to the preset duration, etc. Based on this, the continuous mapping and determination of the target position during the movement of the mobile device can ensure that the determined target position can match the actual map construction situation of the mobile device, ensure the accuracy of the control of the device movement based on the target position when the mobile device autonomously moves and maps, and ensure that the mobile device can quickly reach the position corresponding to the exploration boundary during the mapping process. In addition, since the determination of each target position in the moving process is determined by the norm value without the need for path cost calculation, the global mapping efficiency of the mobile device can be further improved.
[0109] It should be noted that, in other embodiments, after step S40, other methods other than the norm may be used to determine the next target position of the mobile device according to actual needs.
[0110] Based on the cyclic process here, the first reference position is defined as the target position determined before the map is updated, one of the multiple spatial positions is defined as the first reference position, and the norm value corresponding to the first reference position is defined as the reference norm value. Figure 4 , the step of determining one of the multiple spatial positions as the target position according to the multiple norm values comprises:
[0111] Step S31, if there are several target norm values among the multiple norm values that are smaller than the reference norm value, determine the spatial position corresponding to the target norm value with the smallest value as the second reference position, and obtain the first path length and the second path length;
[0112] In addition, if there is no target norm value less than the reference norm value among the multiple norm values, the first reference position may be determined as the target position.
[0113] Step S32, when the first path length is greater than the second path length, determining the second reference position as the target position;
[0114] Step S33, when the first path length is less than the second path length, determining the first reference position as the target position;
[0115] The first path length is the path length required for the mobile device to move to the first reference position, and the second path length is the path length required for the mobile device to move to the second reference position.
[0116] The first path for the mobile device to move from its current location to the first location and / or the second path for the mobile device to move from its current location to the second location may be a path determined based on a user input instruction, or may be a path calculated based on the collected scene information (such as obstacle information, human body information in the space (such as human body position and / or human body thermal comfort, etc.) and / or the time period in which the mobile device is currently operating, etc.) and preset path planning rules (such as avoiding obstacles, staying away from or approaching the human body position, preset operating areas and / or time periods in which different areas are allowed to operate, etc.). The length of the first path is the first path length here, and the length of the second path is the second path length here.
[0117] When the target position is the second reference position, step S40 includes controlling the mobile device to move along the second path to the second reference position and updating the map; when the target position is the first reference position, step S40 includes controlling the mobile device to move along the first path to the first reference position and updating the map.
[0118] Here, if the norm of the currently determined target position is smaller than the norm of the previously determined target position, and the distance between the currently determined target position and the current position of the mobile space is closer than the distance between the previously determined target position, then the actual paths required for the mobile device to move from its current position to the two target positions are further compared. Since the actual moving path of the mobile device generally requires rules based on the obstacle situation or user needs in the space, the target position with a shorter actual moving path is used as the target position that the mobile device ultimately needs to reach, which can ensure that the mobile device can reach the exploration boundary of the map as soon as possible while meeting obstacle avoidance, user needs, etc. And here the path comparison only involves two target positions, and there is no need to compare the paths of each position of the exploration boundary corresponding to the two maps before and after, thereby effectively reducing the amount of data processing in the mapping process and further improving the mapping efficiency.
[0119] Furthermore, in this embodiment, the specific process of obtaining the first path length and the second path length is as follows:
[0120] Step S311, obtaining a passable area in the space; the passable area is an area in the space where no obstacles exist;
[0121] In this embodiment, the passable area can be obtained by analyzing the currently acquired map. The specific map is the above-mentioned grid map, and based on the state information corresponding to each grid in the grid map, it can be determined that the area where the grid with the state information of the first state is located is the passable area.
[0122] In other embodiments, the traversable area may not be determined by a previously acquired map, but may be determined by analyzing data detected by other detection modules (such as a camera) on the mobile device, or by obtaining parameters input by a user.
[0123] Step S312, in the passable area, determining that the shortest path for the mobile device to move to the first reference position is a first path, and determining that the shortest path for the mobile device to move to the second reference position is a second path;
[0124] Specifically, multiple first alternative paths for the mobile device to move from its current position to the first reference position can be determined in the passable area according to preset calculation rules and / or user instructions. The first alternative path can be a straight path or a curved path. The path lengths corresponding to the multiple first alternative paths are compared, and the first alternative path with the shortest length is determined to be the first path here.
[0125] Specifically, multiple second alternative paths for the mobile device to move from its current position to the second reference position can be determined in the passable area according to preset calculation rules and / or user instructions. The second alternative paths can be straight paths or curved paths. The path lengths corresponding to the multiple second alternative paths are compared, and the second alternative path with the shortest length is determined to be the second path here.
[0126] In this embodiment, the first path and the second path here can be obtained based on map analysis. Specifically, taking the first path as an example, the grid corresponding to the location of the mobile device is determined in the map as the first grid, and the grid corresponding to the first reference position is determined as the second grid. Among all the line segments (which can be straight line segments or broken line segments) connecting the first grid and the second grid and whose state information corresponding to the grids passed is the first state information, the line segment with the least number of grids passed is determined as the first path. The second path can also be determined in a similar manner here.
[0127] For example, Figure 5 The figure shows a local area of the grid map, where each grid corresponds to a spatial position in the space where the mobile device is located. Grid 1 represents the location of the mobile device, grid 2 represents the first reference position or the second reference position, and the state information corresponding to the multiple grids covered by the shaded area A are all in the third state (which can be considered as the location of the obstacle). Figure 5As shown in (b), when there is no shaded area A between grid 1 and grid 2, the shortest path between grid 1 and grid 2 is S1, as shown in Figure 5 As shown in (a), when there is a shaded area A between grid 1 and grid 2, the shortest path between grid 1 and grid 2 is S2.
[0128] Step S313: determining the length of the first path as the first path length, and determining the length of the second path as the second path length.
[0129] In this embodiment, through the above method, it can be ensured that the determined first path length and second path length are the lengths of the shortest paths for the mobile device to avoid obstacles and move to the corresponding boundary positions. Based on this, it is ensured that the mobile device can quickly reach the exploration boundary in the mapping process, thereby collecting more scene information that has not yet been collected to update the map, ensuring that the mapping efficiency is effectively improved.
[0130] In other embodiments, the first path and the second path may not be the shortest paths for the mobile device to move to the first reference position or the second reference position in the passable area. For example, a human activity area or an operating area of the mobile device specified by a user is determined in the passable area, and the shortest path for the mobile device to move to the first reference position or the second reference position is determined in the human activity area or the specified area.
[0131] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a mapping program for a mobile device is stored. When the mapping program for the mobile device is executed by a processor, the relevant steps of any embodiment of the mapping method for the mobile device as described above are implemented.
[0132] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0133] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0135] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A mapping method for a mobile device, characterized in that: The mapping method of the mobile device comprises the following steps: Acquire a map of the space where the mobile device is located, and determine an exploration boundary of the map; the exploration boundary is a boundary formed on the map between an explored area and an unexplored area of the mobile device in the space; Determine norm values corresponding to a plurality of spatial positions corresponding to the exploration boundary and the position of the mobile device, respectively, to obtain a plurality of norm values; determining one of the plurality of spatial positions as a target position according to the plurality of norm values; Controlling the mobile device to move toward the target location and updating the map; Returning to execute the step of determining the exploration boundary of the map; Defining a first reference position as the target position determined before the map is updated, one of the multiple spatial positions as the first reference position, defining a norm value corresponding to the first reference position as a reference norm value, and determining one of the multiple spatial positions as the target position according to the multiple norm values comprises: If there are several target norm values among the multiple norm values that are smaller than the reference norm value, the spatial position corresponding to the target norm value with the smallest value is determined as the second reference position, and a first path length required for the mobile device to move to the first reference position and a second path length required for the mobile device to move to the second reference position are obtained; When the first path length is greater than the second path length, determining the second reference position as the target position; When the first path length is less than the second path length, the first reference position is determined to be the target position.
2. The method for building a map of a mobile device according to claim 1, wherein: The step of determining the norm values corresponding to the plurality of spatial positions corresponding to the exploration boundary and the position of the mobile device respectively comprises: Obtaining the centroid coordinates corresponding to each of the spatial positions and the origin coordinates corresponding to the position of the mobile device; The 1-norm between each of the centroid coordinates and the origin coordinates is calculated to obtain the corresponding norm value.
3. The mapping method for a mobile device according to claim 1, wherein: The map is a grid map, the grid map includes a plurality of grids and state information corresponding to each grid, the state information includes a first state and a second state, the first state is that the position corresponding to the grid in the space allows the mobile device to move, and the second state is that it is not determined whether the position corresponding to the grid in the space allows the mobile device to move, and the step of determining the exploration boundary of the map includes: Determining one of the plurality of grids as a first target grid; Determine a second target grid from a plurality of grids located in the neighborhood of the first target grid; the state information corresponding to the second target grid is the first state; If there is a third target grid among the multiple grids located in the neighborhood of the second target grid, the second target grid is determined to be a boundary position; the state information corresponding to the third target grid is the second state; The exploration boundary is determined according to the boundary position.
4. The method for building a map of a mobile device according to claim 3, wherein: After the step of determining the second target grid as a boundary position, the method further includes: Counting the number of the determined boundary positions; When the number is less than the set value, returning to the step of determining one of the plurality of grids as the first target grid; When the number is greater than or equal to a set value, the step of determining the exploration boundary according to the boundary position is performed.
5. The method for building a map of a mobile device according to claim 4, wherein: The step of determining one of the plurality of grids as a first target grid comprises: If there is a determined boundary position, the previously determined boundary position is determined as the first target grid.
6. The mapping method for a mobile device according to any one of claims 1 to 5, characterized in that: The step of obtaining the first path length and the second path length comprises: Acquire a traversable area in the space; the traversable area is an area in the space where no obstacles exist; In the passable area, determining the shortest path for the mobile device to move to the first reference position as a first path, and determining the shortest path for the mobile device to move to the second reference position as a second path; The length of the first path is determined as the first path length, and the length of the second path is determined as the second path length.
7. A mobile device, characterized in that: The mobile device comprises: a memory, a processor, and a mapping program of the mobile device stored in the memory and executable on the processor. When the mapping program of the mobile device is executed by the processor, the steps of the mapping method of the mobile device as described in any one of claims 1 to 6 are implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a mapping program for a mobile device, and when the mapping program for the mobile device is executed by a processor, the steps of the mapping method for a mobile device according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Boundary exploration autonomous mapping method based on curve fitting and target point neighborhood planning
CN110531760A
Mapping method and device and intelligent robot
CN110967029A