Disclosure of Invention
The embodiment of the application provides a map construction method and a sweeping method of a sweeping robot, so as to solve or alleviate at least one problem in the related art.
In a first aspect, an embodiment of the present application provides a map construction method, including:
constructing an initial map of the area to be cleaned according to the house type map data of the area to be cleaned;
and adding corresponding obstacles in the initial map according to the obstacle information edited by the user to construct a cleaning map, wherein the cleaning map is used for enabling the sweeping robot to clean the area to be cleaned according to the cleaning map.
In one embodiment, adding corresponding obstacles in an initial map according to obstacle information edited by a user includes:
determining the corresponding position of the obstacle on the initial map according to the position information of the obstacle edited by the user;
adding an obstacle at a corresponding position on the initial map according to at least one of a type, a size, and a shape of the obstacle edited by the user.
In one embodiment, the method further comprises:
acquiring a cleaning record chart constructed by the sweeping robot in the cleaning process;
and matching the cleaning record map with the cleaning map, and calibrating and updating the cleaning map.
In one embodiment, matching the sweep log map with the sweep map, and calibrating and updating the sweep map, includes:
acquiring a cleaned area in a cleaning record map;
extracting an unmatched area if the outline of the cleaned area is unmatched with the outline of at least one obstacle in the cleaning map;
and updating the unmatched area into the cleaning map.
In a second aspect, an embodiment of the present application provides a cleaning method for a cleaning robot, including:
receiving a cleaning map of an area to be cleaned, wherein the cleaning map is constructed according to the map construction method of the embodiment of the application;
and cleaning the area to be cleaned according to the cleaning map.
In one embodiment, the method further comprises:
in the cleaning process of the cleaning robot, a cleaning record map is constructed and used for matching, calibrating and updating the cleaning map.
In a third aspect, an embodiment of the present application provides a map building apparatus, including:
the initial map building module is used for building an initial map of the area to be cleaned according to the house type map data of the area to be cleaned;
and the cleaning map building module is used for adding corresponding obstacles in the initial map according to the obstacle information edited by the user so as to build a cleaning map, and the cleaning map is used for enabling the sweeping robot to clean the area to be cleaned according to the cleaning map.
In one embodiment, the sweep map construction module includes:
the position determining unit is used for determining the corresponding position of the obstacle on the initial map according to the position information of the obstacle edited by the user;
and the adding unit is used for adding the obstacles at the corresponding positions on the initial map according to at least one of the types, the sizes and the shapes of the obstacles edited by the user.
In one embodiment, the apparatus further comprises:
the cleaning record map acquisition module is used for acquiring a cleaning record map constructed by the sweeping robot in the cleaning process;
and the calibration module is used for matching the cleaning record map with the cleaning map and calibrating and updating the cleaning map.
In one embodiment, the calibration module comprises:
a cleaned area acquisition unit for acquiring a cleaned area in the cleaning record map;
an extraction unit for extracting an unmatched area if the outline of the cleaned area is unmatched with the outline of at least one obstacle in the cleaning map;
and the updating unit is used for updating the unmatched area into the cleaning map.
In a fourth aspect, an embodiment of the present application provides a cleaning device of a cleaning robot, including:
a receiving module for receiving a cleaning map of an area to be cleaned, the cleaning map being constructed by the map construction apparatus of any one of claims 7 to 10;
and the cleaning module is used for cleaning the area to be cleaned according to the cleaning map.
In one embodiment, the apparatus further comprises:
and the cleaning record map building module is used for building a cleaning record map in the cleaning process of the cleaning robot, and the cleaning record map is used for matching, calibrating and updating the cleaning map.
In a fifth aspect, an embodiment of the present application provides a map building apparatus, including: a first memory and a first processor. Wherein the first memory and the first processor are in communication with each other through the internal connection path, the first memory is used for storing instructions, the first processor is used for executing the instructions stored in the first memory, and when the first processor executes the instructions stored in the first memory, the first processor is caused to execute the map building method in any one of the above aspects.
In a sixth aspect, an embodiment of the present application provides a sweeping robot, including: a second memory and a second processor. The second memory and the second processor are communicated with each other through the internal connection path, the second memory is used for storing instructions, the second processor is used for executing the instructions stored in the second memory, and when the second processor executes the instructions stored in the second memory, the second processor is enabled to execute the cleaning method of the sweeping robot in any one of the above aspects.
In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program runs on a computer, the method in any one of the above-mentioned aspects is executed.
The advantages or beneficial effects in the above technical solution at least include: the construction time of the sweeping robot for sweeping the map can be saved, and the sweeping efficiency of the sweeping robot is improved. In addition, the user can edit the obstacle information in the process of constructing the cleaning map, so that the cleaning map is more in line with the actual scene, the precision of the cleaning map is improved, the cleaning effect of the cleaning robot can be improved, and the user can obtain good use experience in the process of editing the obstacle information.
The foregoing summary is provided for the purpose of description only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present application will be readily apparent by reference to the drawings and following detailed description.
Detailed Description
In the following, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present application. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.
Fig. 1 shows a flowchart of a mapping method according to an embodiment of the present application. The map construction method can be applied to Application programs (APP) on terminal equipment, and the terminal equipment can be intelligent equipment such as a mobile phone and a tablet personal computer and can communicate with a sweeping robot.
As shown in fig. 1, a map construction method according to an embodiment of the present application may include:
step S101: and constructing an initial map of the area to be cleaned according to the house type map data of the area to be cleaned. It can be understood that the house type graph can be a plane space layout graph of a house, namely, a graph describing the use function, the corresponding position and the size of each independent space isolated by the wall can visually display the trend layout of the house.
In one example, a photo or a scan file of the house layout may be obtained by a camera of the smart device to obtain the house layout data; or, an electronic document of the house type map stored in the intelligent device can be acquired to acquire the house type map data; alternatively, the user inputs or selects the parameters of the house pattern (including parameters of house pattern, area, orientation, etc. of the house pattern) through the application program to acquire the data of the house pattern. Wherein, the initial map constructed by the application program can be visually displayed on the intelligent device.
Step S102: and adding corresponding obstacles in the initial map according to the obstacle information edited by the user to construct a cleaning map, wherein the cleaning map is used for enabling the sweeping robot to clean the area to be cleaned according to the cleaning map.
In one example, the obstacle may be furniture, an appliance, or the like, and the obstacle information may be position information of the obstacle, and may also be a type and/or a shape and/or a size of the obstacle, or the like. The obstacle information can be edited by a user in an application program, the application program generates a corresponding obstacle pattern according to the obstacle information edited by the user, and the user can add the obstacle pattern to a corresponding position in the initial map in a dragging mode, so that the cleaning map is generated. And cleaning a virtual wall comprising a wall body and a barrier in the map so as to facilitate the sweeping robot to plan a moving path. Therefore, the user can flexibly set the obstacle information according to the actual application scene so as to enable the cleaning map to meet the will of the user.
Preferably, the constructed backup of the cleaning map is stored in the application. When the sweeping robot needs to clean an area to be cleaned, the application program sends the sweeping map to the sweeping robot, and the sweeping robot can plan a cleaning path of the area to be cleaned according to the sweeping map and then performs cleaning operation.
It should be noted that, in the related art, the sweeping map of the sweeping robot needs to be constructed by the sweeping robot in the sweeping process, and the sweeping robot needs to scan the area to be swept in detail before sweeping each time, so that the construction rate of the sweeping map is slow, and the sweeping efficiency of the sweeping robot is low. In addition, the sweeping robot has low precision of a sweeping map constructed, and is not beneficial to constructing a virtual wall in any direction according to specific obstacles. According to the map construction method, the sweeping robot can directly acquire the constructed sweeping map from the application program before each sweeping operation, so that the time for the sweeping robot to construct the map before each sweeping operation is saved, and the sweeping efficiency of the sweeping robot is improved. In addition, the user can edit the obstacle information in the process of constructing the cleaning map, so that the cleaning map is more in line with the actual scene, the precision of the cleaning map is improved, the cleaning effect of the cleaning robot can be improved, and the user can obtain good use experience in the process of editing the obstacle information.
In one embodiment, as shown in fig. 2, step S102 may include:
step S201: and determining the corresponding position of the obstacle on the initial map according to the position information of the obstacle edited by the user. The initial map may include a coordinate system, and the position information of the obstacle may be determined by inputting an abscissa and an ordinate of the obstacle.
Step S202: adding an obstacle at a corresponding position on the initial map according to at least one of a type, a size, and a shape of the obstacle edited by the user.
In one example, as shown in fig. 10, an initial map and an obstacle information editing bar are included in a display interface of an application program, wherein the obstacle information editing bar is used for editing obstacle information. The obstacle information editing column comprises various preset obstacles, such as furniture such as a sofa, a chair, a window, a tea table and the like or household appliances, and a user can edit the size by selecting the obstacle category to determine the type and the size of the obstacle. Further, the obstacle information editing column further comprises a custom function, and a user can edit the shape, the size and the type of the obstacle by clicking the custom function. The application program can display the corresponding obstacle icon according to the obstacle information edited by the user, wherein the obstacle icon can display different colors according to the type of the obstacle icon. As shown in fig. 11, the user may drag the obstacle icon to a corresponding position in the initial map to determine the position information of the obstacle, and display the obstacle icon at the corresponding position on the initial map to complete the construction of the cleaning map.
In one embodiment, as shown in fig. 3, the method may further include:
step S301: and acquiring a cleaning record chart constructed in the cleaning process of the cleaning robot. The cleaning record chart is automatically constructed by the cleaning robot in the cleaning process and is sent to the application program.
Step S302: and matching the cleaning record map with the cleaning map, and calibrating and updating the cleaning map.
In one example, the updated cleaning map is backed up and stored in the application as the cleaning map for the next cleaning operation performed by the cleaning robot. Through optimizing many times to cleaning the map, can further promote the precision of cleaning the map to make the map of cleaning accord with the actual scene in the region of waiting to clean more, thereby further improve the effect of cleaning of robot of sweeping the floor.
In one embodiment, as shown in fig. 4, step S302 may include:
step S401: acquiring a cleaned area in a cleaning record map;
step S402: extracting an unmatched area if the outline of the cleaned area is unmatched with the outline of at least one obstacle in the cleaning map;
step S403: and updating the unmatched area into the cleaning map.
In one example, the cleaning log map includes movable area information of the sweeping robot, and the cleaned area in the cleaning log map can be obtained according to the movable area information of the sweeping robot. The outline of the swept area is compared to the obstacle outline of the sweep map. If the outline of the cleaned area does not match the outline of the obstacle in the cleaning map, the unmatched area in the cleaned area is extracted and replaced into the cleaning map to complete the calibration and optimization of the cleaning map.
Fig. 5 shows a cleaning method of the cleaning robot according to an embodiment of the application.
As shown in fig. 5, the method may include:
step S501: receiving a cleaning map of an area to be cleaned, wherein the cleaning map can be constructed according to any map construction method in the embodiment of the application;
step S502: and cleaning the area to be cleaned according to the cleaning map. The sweeping robot can plan a moving path according to a sweeping map so as to carry out sweeping operation.
In one embodiment, the method may further comprise:
in the cleaning process of the cleaning robot, a cleaning record map is constructed and used for matching, calibrating and updating the cleaning map.
The cleaning record map may be constructed by any map construction method of the sweeping robot in the prior art. For example, the construction of the cleaning record map is performed by a Visual simultaneous localization and mapping (VSLAM) technique or a simultaneous localization and mapping (SLAM) technique.
The technical framework of the VSLAM mainly comprises five processes of sensor data preprocessing, front end, rear end, loop detection and graph building. Among them, the front end is also called Visual Odometer (VO). It is mainly studied how to quantitatively estimate the motion of an inter-frame camera from adjacent frame images. The motion trail of the camera carrier (such as a robot) is formed by connecting the motion trails of the adjacent frames in series, and the problem of positioning is solved. And then, according to the estimated position of the camera at each moment, calculating the position of a space point of each pixel to obtain the map. In VSLAM, the front end is primarily concerned with computer vision related algorithms. The typical practice is generally as follows: firstly, extracting each frame of image feature point, carrying out coarse feature point matching on adjacent frames, then removing unreasonable matching pairs by using RANSAC (random sample consensus) algorithm, and then obtaining position and attitude information. The back end is mainly used for optimizing the result of the front end to obtain the optimal pose estimation. There are two main approaches: one is optimization based on filter theory, and its idea is to linearize the state estimation model, approximate its noise with gaussian distribution, and then update according to prediction by kalman filter. The other is nonlinear optimization (graph optimization). The basic idea is that optimized variables are used as nodes of the graph, error terms are used as edges of the graph, and after initial values are given, iterative optimization updating can be carried out. Due to the sparsity of the graph optimization, the calculation amount can be reduced while the accuracy is ensured. The loop detection is mainly aimed at enabling the robot to recognize the place where the robot has been and thus solving the problem of position drift over time. Visual loop detection is generally accomplished by determining similarity between images, which is the same reason we use the eyes to determine two identical locations. Because image information is rich, VSLAM has a great advantage in loop back detection. When loop detection is successful, the corresponding relation between the current image and the image which has been seen in the past is established, and the back-end optimization algorithm can readjust the track and the map according to the information, so that the accumulated error is eliminated to the maximum extent. SLAM builds different maps according to different sensor types and application requirements. Common are 2D grid maps, 2D topological maps, 3D point cloud maps, and the like.
Fig. 6 is a block diagram showing a structure of a map construction apparatus according to an embodiment of the present application.
As shown in fig. 6, the apparatus may include:
the initial map building module 610 is used for building an initial map of the area to be cleaned according to the house type map data of the area to be cleaned;
and a cleaning map building module 620, configured to add a corresponding obstacle to the initial map according to the obstacle information edited by the user, so as to build a cleaning map, where the cleaning map is used for enabling the sweeping robot to clean the area to be cleaned according to the cleaning map.
In one embodiment, as shown in FIG. 6, sweep map building module 620 includes:
a position determining unit 621, configured to determine a corresponding position of the obstacle on the initial map according to the position information of the obstacle edited by the user;
an adding unit 622 for adding an obstacle at a corresponding position on the initial map according to at least one of the type, size and shape of the obstacle edited by the user.
In one embodiment, as shown in fig. 6, the apparatus further comprises:
a cleaning record map obtaining module 630, configured to obtain a cleaning record map constructed by the sweeping robot in the cleaning process;
and the calibration module 640 is used for matching the cleaning record map with the cleaning map, and calibrating and updating the cleaning map.
In one embodiment, as shown in fig. 6, the calibration module 640 includes:
a cleaned area acquisition unit 641 configured to acquire a cleaned area in the cleaning log;
an extracting unit 642 for extracting an unmatched area in case that the contour of the cleaned area is unmatched with the contour of the at least one obstacle in the cleaning map;
an updating unit 643, configured to update the unmatched area into the cleaning map.
Fig. 7 shows a block diagram of a cleaning device of a cleaning robot according to an embodiment of the present application. As shown in fig. 7, the apparatus may include:
the receiving module 710 is configured to receive a cleaning map of an area to be cleaned, where the cleaning map is constructed according to a map construction method of an embodiment of the present application;
and a cleaning module 720, configured to clean the area to be cleaned according to the cleaning map.
In one embodiment, as shown in fig. 7, the apparatus further comprises:
and the cleaning record map building module 730 is used for building a cleaning record map in the cleaning process of the cleaning robot, and the cleaning record map is used for matching, calibrating and updating the cleaning map.
The functions of each module in each apparatus in the embodiment of the present application may refer to corresponding descriptions in the above method, and are not described herein again.
Fig. 8 shows a block diagram of a map construction apparatus according to an embodiment of the present application. As shown in fig. 8, the map building apparatus includes: a first memory 810 and a first processor 820, the first memory 810 having stored therein computer programs operable on the first processor 820. The first processor 820 implements the map construction method in the above-described embodiment when executing the computer program. The number of the first memory 810 and the first processor 820 may be one or more.
The map building apparatus further includes:
the first communication interface 830 is configured to communicate with an external device for data interactive transmission.
If the first memory 810, the first processor 820 and the first communication interface 830 are implemented independently, the first memory 810, the first processor 820 and the first communication interface 830 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 8, but this does not indicate only one bus or one type of bus.
Optionally, in a specific implementation, if the first memory 810, the first processor 820 and the first communication interface 830 are integrated on a chip, the first memory 810, the first processor 820 and the first communication interface 830 may complete mutual communication through an internal interface.
Fig. 9 shows a block diagram of a sweeping robot according to an embodiment of the present application. As shown in fig. 9, the sweeping robot includes: a second memory 910 and a second processor 920, the second memory 910 having stored therein computer programs operable on the second processor 920. The second processor 920 implements the map construction method in the above-described embodiment when executing the computer program. The number of the second memory 910 and the second processor 920 may be one or more.
This robot of sweeping floor still includes:
and a second communication interface 930, configured to communicate with an external device for data interactive transmission.
If the second memory 910, the second processor 920 and the second communication interface 930 are implemented independently, the second memory 910, the second processor 920 and the second communication interface 930 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 9, but this does not indicate only one bus or one type of bus.
Optionally, in a specific implementation, if the second memory 910, the second processor 920 and the second communication interface 930 are integrated on a chip, the second memory 910, the second processor 920 and the second communication interface 930 may complete communication with each other through an internal interface.
Embodiments of the present application provide a computer-readable storage medium, which stores a computer program, and when the program is executed by a processor, the computer program implements the method provided in the embodiments of the present application.
The embodiment of the present application further provides a chip, where the chip includes a processor, and is configured to call and execute the instruction stored in the memory from the memory, so that the communication device in which the chip is installed executes the method provided in the embodiment of the present application.
An embodiment of the present application further provides a chip, including: the system comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method provided by the embodiment of the application.
It should be understood that the processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be an advanced reduced instruction set machine (ARM) architecture supported processor.
Further, optionally, the memory may include a read-only memory and a random access memory, and may further include a nonvolatile random access memory. The memory may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may include a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available. For example, Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the present application are generated in whole or in part when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
According to the technical scheme of the embodiment of the application, the sweeping robot can directly acquire the constructed sweeping map from the application program before each sweeping operation, so that the time for constructing the map before each sweeping operation is saved, and the sweeping efficiency of the sweeping robot is improved. In addition, the user can edit the obstacle information in the process of constructing the cleaning map, so that the cleaning map is more in line with the actual scene, the precision of the cleaning map is improved, the cleaning effect of the cleaning robot can be improved, and the user can obtain good use experience in the process of editing the obstacle information.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process. And the scope of the preferred embodiments of the present application includes other implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the method of the above embodiments may be implemented by hardware that is configured to be instructed to perform the relevant steps by a program, which may be stored in a computer-readable storage medium, and which, when executed, includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module may also be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various changes or substitutions within the technical scope of the present application, and these should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.