Method, device, computer equipment and storage medium for deduplicating cleaning area of sweeping machine
By obtaining the trajectory coordinates in the cleaning area coordinate system of the sweeper and detecting the cleaned area, the problem of the sweeper consuming a lot of computing power is solved, and the precise deduplication and calculation simplification of the cleaning area is achieved, and the hardware cost is reduced.
Patent Information
- Application Number
- CN202010961428.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-14
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-09-14
AI Technical Summary
The sweeper needs to calculate the cleaning area during the cleaning process. The existing technology consumes a lot of computing power, resulting in high hardware costs and inability to meet the calculation requirements under low hardware costs.
By obtaining the track coordinates in the cleaning area coordinate system, check whether it is a cleaned area, and increase the cleaning area when needed, avoid repeated calculations and reduce hardware computing capabilities requirements.
It realizes accurate calculation and deduplication of the cleaning area, simplifies the calculation process, reduces the computing capability requirements for the hardware, and avoids incorrect calculations.
Smart Images

Figure CN112069283B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot control technology, and in particular to a method, device, computer equipment and storage medium for deduplicating the cleaning area of a sweeping machine. Background Art
[0002] When sweeping the floor, the sweeper needs to calculate the cleaned area, distinguish between the cleaned area and the uncleaned area in the current area, and remove the repeated calculation of the cleaned area, so as to accurately calculate the cleaned area. The sweeper's cleaning area deduplication algorithm consumes a lot of computing power. The larger the cleaning area, the higher the slam map resolution, the greater the computing power required, and the higher the hardware performance requirements. This results in a high hardware cost for the sweeper, and when the hardware cost is low, the sweeper's computing power cannot meet the requirements of the above calculations. Summary of the invention
[0003] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for deduplication of the cleaning area of a sweeping machine in order to address the above technical problems.
[0004] A method for deduplicating the cleaning area of a sweeping machine, comprising:
[0005] Obtain at least one trajectory coordinate in the sweeping area coordinate system before the sweeper moves to the current position;
[0006] Based on each of the trajectory coordinates, acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0007] Detecting whether each of the first areas has been calculated as a cleaned area;
[0008] When the first region is not calculated as a cleaned region, the area of the first region is increased to the cleaned area.
[0009] In one embodiment, after the step of detecting whether each of the first areas has been calculated as a cleaned area, the step further includes:
[0010] When the first area has been calculated as a cleaned area, the cleaned area is not increased.
[0011] In one embodiment, the step of acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system based on each of the trajectory coordinates comprises:
[0012] Normalizing each of the trajectory coordinates to obtain at least one normalized coordinate;
[0013] Based on the normalized coordinates, at least one first region corresponding to the normalized coordinates is acquired.
[0014] In one embodiment, before the step of obtaining at least one trajectory coordinate in the cleaning area coordinate system before the sweeping machine moves to the current position, the step further includes:
[0015] Get the length and width of the total area to be cleaned;
[0016] Obtain the length and width of the sweeper;
[0017] According to the ratio of the length of the total cleaning area to the length of the sweeping machine, an equivalent length is obtained, and according to the ratio of the width of the total cleaning area to the width of the sweeping machine, an equivalent width is obtained;
[0018] Based on the equivalent length and the equivalent width, obtaining the origin of the cleaning area coordinate system;
[0019] The cleaning area coordinate system is established based on the origin of the cleaning area coordinate system.
[0020] In one embodiment, the step of obtaining at least one trajectory coordinate in the cleaning area coordinate system before the sweeping machine moves to the current position includes:
[0021] Obtain at least one trajectory coordinate in the trajectory coordinate system before the sweeping machine moves to the current position;
[0022] According to the conversion relationship between the trajectory coordinate system and the cleaning area coordinate system, the trajectory coordinates of the trajectory coordinate system are converted into the trajectory coordinates in the cleaning area coordinate system.
[0023] In one of the embodiments, in the cleaning area coordinate system, the length and width of each of the first regions are equal to the length and width of the sweeping machine.
[0024] In one embodiment, the step of acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system based on each of the trajectory coordinates comprises:
[0025] Based on each of the trajectory coordinates, acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0026] Detecting whether there are a plurality of the trajectory coordinates in the first area;
[0027] When there are a plurality of trajectory coordinates in the first area, when the first area is not calculated as a cleaned area, the step of increasing the area of the first area on the cleaned area includes:
[0028] When the first region is not calculated as a cleaned region, the area of the first region is increased only once to the cleaned area.
[0029] A device for de-weighting the cleaning area of a sweeping machine, comprising:
[0030] A trajectory coordinate acquisition module, used to acquire at least one trajectory coordinate in the cleaning area coordinate system before the sweeper moves to the current position;
[0031] A first region acquisition module, configured to acquire, based on each of the trajectory coordinates, at least one first region corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0032] A cleaned area detection module, used to detect whether each of the first areas has been calculated as a cleaned area;
[0033] The cleaned area increasing module is used to increase the area of the first area to the cleaned area when the first area is not calculated as the cleaned area.
[0034] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the following steps when executing the computer program:
[0035] Obtain at least one trajectory coordinate in the sweeping area coordinate system before the sweeper moves to the current position;
[0036] Based on each of the trajectory coordinates, acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0037] Detecting whether each of the first areas has been calculated as a cleaned area;
[0038] When the first region is not calculated as a cleaned region, the area of the first region is increased to the cleaned area.
[0039] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0040] Obtain at least one trajectory coordinate in the sweeping area coordinate system before the sweeper moves to the current position;
[0041] Based on each of the trajectory coordinates, acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0042] Detecting whether each of the first areas has been calculated as a cleaned area;
[0043] When the first region is not calculated as a cleaned region, the area of the first region is increased to the cleaned area.
[0044] The above-mentioned method, device, computer equipment and storage medium for deduplicating the cleaning area of a sweeping machine realize the calculation of the cleaning area and effectively deduplicate the cleaning area by obtaining the first area corresponding to the trajectory coordinates in the cleaning area coordinate system and detecting whether the first area has been calculated as the cleaned area. The calculation process is simple and the requirements on the computing power of the hardware are effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A schematic diagram of a flow chart of a method for deduplicating the cleaning area of a sweeping machine in one embodiment;
[0046] Figure 2 It is a structural block diagram of a device for de-duplicating the cleaning area of a sweeping machine in one embodiment;
[0047] Figure 3 is an internal structure diagram of a computer device in one embodiment;
[0048] Figure 4 Schematic diagram of the total cleaning area in a cleaning area coordinate system in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] Embodiment 1
[0051] like Figure 1 As shown, a method for deduplicating the cleaning area of a sweeping machine is provided, comprising:
[0052] Step 110, obtaining at least one trajectory coordinate in the cleaning area coordinate system before the sweeping machine moves to the current position.
[0053] Specifically, the cleaning area coordinate system is a coordinate system established based on the length and width of the sweeping robot, and the trajectory coordinates are the coordinates on the cleaning area coordinate system. Specifically, the trajectory coordinates are the coordinates of the position of the trajectory passed by the sweeping robot in the cleaning area coordinate system.
[0054] The sweeping machine moves during the cleaning process. In this embodiment, at least one trajectory coordinate before the sweeping machine moves to the current position is obtained. These trajectory coordinates are the coordinates along the movement trajectory of the sweeping machine to the current position and are closest to the current position in terms of movement time.
[0055] In this embodiment, step 110 includes obtaining a path trajectory of the sweeping machine before it moves to the current position; parsing the path trajectory to obtain at least one trajectory coordinate in the sweeping area coordinate system.
[0056] In this embodiment, the path trajectory is the motion trajectory of the sweeping machine. The path trajectory of the sweeping machine can be first obtained, and then the path trajectory can be parsed to obtain at least one trajectory coordinate in the sweeping area coordinate system before the sweeping machine moves to the current position. For example, the path trajectory is parsed to obtain multiple trajectory coordinates according to a preset time interval. Multiple trajectory coordinates can be obtained by obtaining a trajectory coordinate at each preset time interval on the path trajectory.
[0057] It should be understood that the way the sweeping machine obtains coordinates can be based on infrared sensors, ultrasonic detectors, etc., that is, the technical means for the sweeping machine to obtain the position are existing technologies and are not described in detail in this application.
[0058] Step 120: Based on each of the trajectory coordinates, obtain at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system.
[0059] Specifically, the first area is an area within the cleaning area coordinate system, and within the cleaning area coordinate system, it is divided into a plurality of areas of equal area, and the length and width of each area are equal. In this embodiment, the area where the trajectory coordinates fall is the first area, or the area where the trajectory coordinates are located is the first area. By obtaining the trajectory coordinates, it is possible to obtain in which area the trajectory coordinates are located, thereby obtaining at least one first area.
[0060] Step 130 , detecting whether each of the first areas has been calculated as a cleaned area.
[0061] Specifically, the cleaned area is an area where the sweeper has moved and cleaned, and the area is also an area in the cleaning area coordinate system.
[0062] In this step, it is detected whether the first area has been included in the cleaned areas and has been counted as the cleaned areas.
[0063] Step 140: When the first area is not calculated as a cleaned area, the area of the first area is increased to the cleaned area.
[0064] In this step, when the first area is not counted as a cleaned area, the area of the first area is added when calculating the cleaned area. In one embodiment, when the first area is not calculated as a cleaned area, the counter counter used to calculate the cleaned area is increased by 1. In this embodiment, the cleaned area is calculated by the counter counter. For example, the area of each area in the cleaned area coordinate system is an equivalent area, and the equivalent area can be equal to the area of the sweeper. Then, the cleaned area of the cleaned area is the product of the equivalent area and the value of the counter. In this way, the quick calculation of the cleaned area can be achieved.
[0065] Since the area of the first area is added to the cleaned area only if the first area is not calculated as the cleaned area, it is possible to effectively avoid repeated calculation of the area of the area within the cleaned area coordinate system, thereby effectively removing duplication.
[0066] In the above embodiment, by obtaining the first area corresponding to the trajectory coordinates in the cleaning area coordinate system, and detecting whether the first area has been calculated as the cleaned area, the calculation of the cleaning area is realized, and effective deduplication can be achieved. Since there is no need to use SLAM mapping, there is no need to calculate the deduplicated cleaning area through SLAM mapping, which makes the deduplication calculation process of the cleaning area simple and effectively reduces the requirements on the computing power of the hardware.
[0067] In one embodiment, after the step of detecting whether each first area has been calculated as a cleaned area, the method further includes: step 150, when the first area has been calculated as a cleaned area, not increasing the cleaned area.
[0068] In this embodiment, when the first area has been listed as a cleaned area and has been counted as a cleaned area, the cleaned area is not increased to avoid erroneous calculation of the cleaned area.
[0069] In one embodiment, when the first area is calculated as a cleaned area, the value of the counter counter is kept unchanged. In other words, when the first area is calculated as a cleaned area, the counter counter is not incremented by 1.
[0070] It should be understood that, in the above embodiment, to determine whether the first area is a cleaned area, it can be determined based on the path trajectory passed by the sweeping machine and the sweeping action on the path trajectory. For example, if the path trajectory passes through the first area and the sweeping action is performed in the first area, then the first area is a cleaned area; and when the path trajectory passes through the first area and the sweeping action is not performed in the first area, then the first area is an uncleaned area.
[0071] In one embodiment, the step of obtaining at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system based on each of the trajectory coordinates includes: normalizing each of the trajectory coordinates to obtain at least one normalized coordinate; and obtaining at least one first area corresponding to each of the normalized coordinates based on each of the normalized coordinates.
[0072] In this embodiment, normalization is performed on each trajectory coordinate, so that it is possible to more accurately determine whether the path coordinate falls within the first area. Specifically, each trajectory coordinate includes a horizontal axis coordinate and a vertical axis coordinate. For example, the horizontal axis coordinate is the X-axis coordinate, and the vertical axis coordinate is the Y-axis coordinate. The horizontal axis coordinate and the vertical axis coordinate of the trajectory coordinate are normalized. That is, when the value of the horizontal axis coordinate is between two integers, the value of the horizontal axis coordinate is rounded up, and when the value of the vertical axis coordinate is between two integers, the value of the vertical axis coordinate is rounded up. For example, the four trajectory coordinates are A1 (0.1, 0.1), A2 (0.6, 0.1), A3 (0.2, 0.6) and A4 (0.9, 0.9), and the normalized coordinates are A1 (1, 1), A2 (1, 1), A3 (1, 1) and A4 (1, 1), respectively. A1 (1, 1), A2 (1, 1), A3 (1, 1) and A4 (1, 1) can be further normalized to the area coordinate A (1, 1). For example, A1(1.1, 0.1), A2(0.6, 0.1), A3(0.2, 0.6), and A4(0.9, 0.9), the normalized coordinates are A1(2, 1), A2(1, 1), A3(1, 1), and A4(1, 1); and A1(2, 1), A2(1, 1), A3(1, 1), and A4(1, 1) can be further normalized to the regional coordinates A(2, 1) and B(1, 1).
[0073] By normalizing the trajectory coordinates to obtain normalized coordinates, it is possible to more accurately determine whether the coordinates fall within the first area through the normalized coordinates, thereby quickly and accurately acquiring the first area.
[0074] In one embodiment, before the step of obtaining at least one trajectory coordinate in the cleaning area coordinate system before the sweeping machine moves to the current position, the step also includes: obtaining the length and width of the total cleaning area; obtaining the length and width of the sweeping machine; obtaining an equivalent length based on the ratio of the length of the total cleaning area to the length of the sweeping machine, and obtaining an equivalent width based on the ratio of the width of the total cleaning area to the width of the sweeping machine; obtaining the origin of the cleaning area coordinate system based on the equivalent length and the equivalent width; and establishing the cleaning area coordinate system based on the origin of the cleaning area coordinate system.
[0075] In this embodiment, the equivalent length is equal to the ratio of the length of the total cleaning area to the length of the sweeping machine, and the equivalent width is equal to the ratio of the width of the total cleaning area to the width of the sweeping machine. The unit length of the cleaning area coordinate system and the origin of the cleaning area coordinate system are calculated based on the equivalent length and the equivalent width, thereby establishing the cleaning area coordinate system.
[0076] In one embodiment, based on the origin of the cleaning area coordinate system, the cleaning area coordinate system is established with the length of the sweeping machine as the unit length of the horizontal axis and the width of the sweeping machine as the unit length of the vertical axis. In this embodiment, in the cleaning area coordinate system, the unit length of the horizontal axis is the length of the sweeping machine, the unit length of the vertical axis is the width of the sweeping machine, and the cleaning area coordinate system is divided into a number of regions based on the unit length of the horizontal axis and the unit length of the vertical axis, and the area of each region is equal to the coverage area of the sweeping machine.
[0077] In one embodiment, the trajectory coordinate system is converted into a cleaning area coordinate system, and the origin coordinates of the cleaning area coordinate system are the geometric midpoint of the total cleaning area.
[0078] In this embodiment, the length of the horizontal axis of the cleaning area coordinate system is the equivalent length, and the length of the vertical axis of the cleaning area coordinate system is the equivalent width. Specifically, the midpoint of the horizontal axis and the midpoint of the vertical axis are the geometric midpoints of the total cleaning area. In this embodiment, the cleaning area coordinate system is established with the midpoint of the horizontal axis and the midpoint of the vertical axis as the origin of the cleaning area coordinate system.
[0079] In one embodiment, the step of obtaining at least one trajectory coordinate in the cleaning area coordinate system before the sweeping machine moves to the current position includes: obtaining at least one trajectory coordinate in the trajectory coordinate system before the sweeping machine moves to the current position; and converting the trajectory coordinates of the trajectory coordinate system into trajectory coordinates in the cleaning area coordinate system according to the conversion relationship between the trajectory coordinate system and the cleaning area coordinate system.
[0080] Specifically, the trajectory coordinate system is a coordinate system for locating the position of the sweeping machine's motion trajectory, and the trajectory coordinate system is based on the coordinate system established after the sweeping machine scans and locates the area in which it is located during the initialization process. It should be understood that during the initialization process, the sweeping machine moves in the total cleaning area and detects obstacles and the boundaries of the total cleaning area with infrared sensors or ultrasonic detectors, thereby determining the length and width of the total cleaning area, and establishing the trajectory coordinate system based on this.
[0081] In this embodiment, after the trajectory coordinates are acquired, the trajectory coordinates of the trajectory coordinate system are converted into trajectory coordinates in the cleaning area coordinate system through the conversion relationship between the trajectory coordinate system and the cleaning area coordinate system.
[0082] In one embodiment, the trajectory coordinates of the trajectory coordinate system are converted into trajectory coordinates in the cleaning area coordinate system according to the origin coordinates of the cleaning area coordinate system.
[0083] For example, a coordinate point in the trajectory coordinate system is (X 转化前 , Y 转化前 ), the origin of the clean area coordinate system is (X0, Y0), and the corresponding coordinate point of the clean area coordinate system (X 转化后 , Y 转化后 ), the conversion relationship is:
[0084] X 转化后 =X 转化前 +X O , Y 转化后 =Y 转化前 +Y O
[0085] In this way, after obtaining the trajectory coordinates of the trajectory coordinate system, the trajectory coordinates of the trajectory coordinate system are converted into the trajectory coordinates in the cleaning area coordinate system according to the relationship between the origin coordinates of the cleaning area coordinate system and the trajectory coordinates of the trajectory coordinate system, so that the sweeping machine can quickly obtain the trajectory coordinates in the cleaning area coordinate system.
[0086] In one embodiment, in the cleaning area coordinate system, the length and width of each of the first regions are equal to the length and width of the sweeper.
[0087] In this embodiment, in the cleaning area coordinate system, one unit length of the horizontal axis is the equivalent length, and one unit length of the vertical axis is the equivalent width. The cleaning area coordinate system can be divided into several areas through the equivalent length and equivalent width. The length and width of each area are equal to the length and width of the sweeper.
[0088] In one embodiment, the step of acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system based on each of the trajectory coordinates includes: acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system based on each of the trajectory coordinates; detecting whether there are multiple trajectory coordinates in the first area; when there are multiple trajectory coordinates in the first area, when the first area is not calculated as a cleaned area, the step of increasing the area of the first area to the cleaned area includes: when the first area is not calculated as a cleaned area, increasing the area of the first area only once to the cleaned area.
[0089] In this embodiment, when there are multiple track coordinates in the first area, it indicates that the sweeper has passed through the first area multiple times and cleaned multiple times, or cleaned at multiple coordinate points in the first area. Therefore, when counting whether the first area is a cleaned area, it is counted only once, and when increasing the cleaned area, the area of the first area is only increased once. In one embodiment, when there are multiple track coordinates in the first area, and when the first area is not calculated as a cleaned area, the area of the first area is only increased once in the cleaned area, and the counter is incremented by 1.
[0090] Embodiment 2:
[0091] In this embodiment, a method for deduplicating the cleaning area of a sweeping machine is provided, comprising:
[0092] Step 1: Set parameters:
[0093] See also Figure 4 , the length of the sweeper is L1, and the width is W1. It should be understood that L1 and W1 can be selected with different values according to different business requirements.
[0094] The length of the entire cleaning space is L2, and the width is W2. Then L2 and width W2 are the length and width after L1 and W1 are converted.
[0095] Conversion relationship: L=L2 / L1, W=W2 / W1.
[0096] Step 2: Set the origin coordinates of the cleaning area coordinate system: X0=L / 2, Y0=W / 2.
[0097] Step 3: Analyze the sweeping path trajectory points A1, A2, A3 and A4, which represent the coordinates of the path points that the sweeping machine has walked through in sequence.
[0098] Step 4: Convert A1, A2, A3 and A4 between coordinate systems respectively, from the trajectory coordinate system to the cleaning area coordinate system. The conversion formula is:
[0099] X 转化后 =X 转化前 +X O , Y 转化后 =Y 转化前 +Y O
[0100] After conversion, the coordinates of A1, A2, A3 and A4 in the cleaned area coordinate system are: A1(X1,Y1), A2(X2,Y2), A3(X3,Y3) and A4(X4,Y4)
[0101] Step 5: Normalize the coordinates of the path points: perform "round up" operation on the X and Y coordinates. Get the normalized coordinates A1 (X A ,Y A )、A2(X A ,Y A )、A3(X A ,Y A ) and A4(X A ,Y A ).
[0102] Step 6: First determine the A area (X A ,Y A ) has been calculated for the cleaning area, that is, whether the normalized coordinate points have fallen into area A. If area A has not been calculated, counter is incremented by 1. Counter is the number of valid coordinate points after deduplication. If area A has been calculated, counter remains unchanged. The normalized coordinates of A1, A2, A3, and A4 all fall into area A, so counter is only incremented by 1.
[0103] Step 7: When it is necessary to count the cleaning area after deduplication, the cleaning area after deduplication S=counter*W1*L1.
[0104] Through the above algorithm, a small amount of RAM (Random Access Memory) storage space can be used instead of the computing power of the MCU (Microcontroller Unit) to calculate the deduplication cleaning area, which greatly reduces the consumption of MCU computing power. In addition, it can also calculate the deduplication area cleaned by the sweeper in real time, efficiently and accurately.
[0105] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0106] Embodiment 3
[0107] like Figure 2 As shown, a device for de-duplicating the cleaning area of a sweeping machine is provided, comprising:
[0108] The trajectory coordinate acquisition module 210 is used to acquire at least one trajectory coordinate in the cleaning area coordinate system before the sweeping machine moves to the current position;
[0109] A first region acquisition module 220, configured to acquire, based on each of the trajectory coordinates, at least one first region corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0110] A cleaned area detection module 230, used to detect whether each of the first areas has been calculated as a cleaned area;
[0111] The cleaned area increasing module 240 is configured to increase the area of the first area to the cleaned area when the first area is not calculated as the cleaned area.
[0112] In one embodiment, Figure 2 As shown, the cleaning area deweighting device of the sweeping machine also includes:
[0113] The deduplication module 250 is configured to not increase the cleaned area when the first area has been calculated as a cleaned area.
[0114] In one embodiment, the first region acquisition module includes:
[0115] A normalized coordinate acquisition unit is used to normalize the coordinates of each trajectory to obtain at least one
[0116] Normalized coordinates;
[0117] The first region acquisition unit is configured to acquire, based on each of the normalized coordinates, at least one first region corresponding to each of the normalized coordinates.
[0118] In one embodiment, the cleaning area de-weighting device of the sweeping machine further includes:
[0119] A module for obtaining the length and width of the total cleaning area is used to obtain the length and width of the total cleaning area;
[0120] A sweeper size acquisition module, used to acquire the length and width of the sweeper;
[0121] An equivalent length and width acquisition module, used to obtain an equivalent length according to the ratio of the length of the total cleaning area to the length of the sweeping machine, and to obtain an equivalent width according to the ratio of the width of the total cleaning area to the width of the sweeping machine;
[0122] A cleaning coordinate origin acquisition module, used to acquire the origin of the cleaning area coordinate system based on the equivalent length and the equivalent width;
[0123] A cleaning coordinate system establishing module is used to establish the cleaning area coordinate system based on the origin of the cleaning area coordinate system.
[0124] In one embodiment, the trajectory coordinate acquisition module includes:
[0125] A trajectory coordinate acquisition unit, used to acquire at least one trajectory coordinate in the trajectory coordinate system before the sweeping machine moves to the current position;
[0126] The trajectory coordinate conversion unit is used to convert the trajectory coordinates of the trajectory coordinate system into the trajectory coordinates in the cleaning area coordinate system according to the conversion relationship between the trajectory coordinate system and the cleaning area coordinate system.
[0127] In one embodiment, the trajectory coordinate system is converted into a cleaning area coordinate system, and the origin coordinates of the cleaning area coordinate system are the geometric midpoint of the total cleaning area.
[0128] In one embodiment, in the cleaning area coordinate system, the length and width of each of the first regions are equal to the length and width of the sweeper.
[0129] In one embodiment, the first region acquisition module includes:
[0130] A first region acquisition unit, configured to acquire, based on each of the trajectory coordinates, at least one first region corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0131] A first area detection unit, used for detecting whether there are a plurality of the track coordinates in the first area;
[0132] The deduplication unit is further configured to, when there are a plurality of the trajectory coordinates in the first area and when the first area is not calculated as a cleaned area, increase the area of the first area only once to the cleaned area.
[0133] Embodiment 4
[0134] In this embodiment, a computer device is provided, and the computer device is deployed on a sweeping robot, or in other words, the computer device is a sweeping robot. Figure 3As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server or terminal through a network connection. When the computer program is executed by the processor, a method for deduplicating the cleaning area of a sweeping machine is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the housing of the sweeping machine, or an external keyboard, touchpad or mouse, etc.
[0135] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0136] Embodiment 5
[0137] In this embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0138] Obtain at least one trajectory coordinate in the sweeping area coordinate system before the sweeper moves to the current position;
[0139] Based on each of the trajectory coordinates, acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0140] Detecting whether each of the first areas has been calculated as a cleaned area;
[0141] When the first region is not calculated as a cleaned region, the area of the first region is increased to the cleaned area.
[0142] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0143] When the first area has been calculated as a cleaned area, the cleaned area is not increased.
[0144] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0145] Normalizing each of the trajectory coordinates to obtain at least one normalized coordinate;
[0146] Based on the normalized coordinates, at least one first region corresponding to the normalized coordinates is acquired.
[0147] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0148] Get the length and width of the total area to be cleaned;
[0149] Obtain the length and width of the sweeper;
[0150] According to the ratio of the length of the total cleaning area to the length of the sweeping machine, an equivalent length is obtained, and according to the ratio of the width of the total cleaning area to the width of the sweeping machine, an equivalent width is obtained;
[0151] Based on the equivalent length and the equivalent width, obtaining the origin of the cleaning area coordinate system;
[0152] The cleaning area coordinate system is established based on the origin of the cleaning area coordinate system.
[0153] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining at least one trajectory coordinate in the trajectory coordinate system before the sweeping machine moves to the current position; and converting the trajectory coordinates of the trajectory coordinate system into trajectory coordinates in the cleaning area coordinate system according to the conversion relationship between the trajectory coordinate system and the cleaning area coordinate system.
[0154] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0155] Based on each of the trajectory coordinates, acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0156] Detecting whether there are a plurality of the trajectory coordinates in the first area;
[0157] When there are a plurality of the trajectory coordinates in the first area, and when the first area is not calculated as a cleaned area, the area of the first area is increased only once to the cleaned area.
[0158] Embodiment 6
[0159] In this embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0160] Obtain at least one trajectory coordinate in the sweeping area coordinate system before the sweeper moves to the current position;
[0161] Based on each of the trajectory coordinates, acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0162] Detecting whether each of the first areas has been calculated as a cleaned area;
[0163] When the first region is not calculated as a cleaned region, the area of the first region is increased to the cleaned area.
[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0165] When the first area has been calculated as a cleaned area, the cleaned area is not increased.
[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0167] Normalizing each of the trajectory coordinates to obtain at least one normalized coordinate;
[0168] Based on the normalized coordinates, at least one first region corresponding to the normalized coordinates is acquired.
[0169] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0170] Get the length and width of the total area to be cleaned;
[0171] Obtain the length and width of the sweeper;
[0172] According to the ratio of the length of the total cleaning area to the length of the sweeping machine, an equivalent length is obtained, and according to the ratio of the width of the total cleaning area to the width of the sweeping machine, an equivalent width is obtained;
[0173] Based on the equivalent length and the equivalent width, obtaining the origin of the cleaning area coordinate system;
[0174] The cleaning area coordinate system is established based on the origin of the cleaning area coordinate system.
[0175] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0176] Obtain at least one trajectory coordinate in the trajectory coordinate system before the sweeper moves to the current position; and convert the trajectory coordinates of the trajectory coordinate system into trajectory coordinates in the sweeping area coordinate system according to the conversion relationship between the trajectory coordinate system and the sweeping area coordinate system.
[0177] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0178] Based on each of the trajectory coordinates, acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system;
[0179] Detecting whether there are a plurality of the trajectory coordinates in the first area;
[0180] When there are a plurality of the trajectory coordinates in the first area, and when the first area is not calculated as a cleaned area, the area of the first area is increased only once to the cleaned area.
[0181] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0182] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0183] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for deduplicating the cleaning area of a sweeping machine, characterized in that: include: Obtain at least one trajectory coordinate in the sweeping area coordinate system before the sweeper moves to the current position; Based on each of the trajectory coordinates, obtaining at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system, wherein the cleaning area coordinate system is a coordinate system established based on the length and width of the cleaning robot, and the cleaning area coordinate system is divided into a plurality of areas of equal area; Detecting whether each of the first areas has been calculated as a cleaned area includes: when the path track of the sweeping machine passes through the first area and a sweeping action is performed in the first area, the first area is a cleaned area; when the path track of the sweeping machine passes through the first area and no sweeping action is performed in the first area, the first area is an uncleaned area; When the first area is not calculated as a cleaned area, the area of the first area is increased to the cleaned area; Wherein, after the step of detecting whether each of the first areas has been calculated as a cleaned area, the method further includes: When the first area has been calculated as a cleaned area, the cleaned area is not increased; After acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system based on each of the trajectory coordinates, the method further includes: Detecting whether there are a plurality of the trajectory coordinates in the first area; When there are a plurality of trajectory coordinates in the first area, when the first area is not calculated as a cleaned area, the step of increasing the area of the first area on the cleaned area includes: When the first region is not calculated as a cleaned region, the area of the first region is increased only once to the cleaned area.
2. The method according to claim 1, characterized in that The step of acquiring at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system based on each of the trajectory coordinates comprises: Normalizing each of the trajectory coordinates to obtain at least one normalized coordinate; Based on the normalized coordinates, at least one first region corresponding to the normalized coordinates is acquired.
3. The method according to claim 1, characterized in that Before the step of obtaining at least one trajectory coordinate in the cleaning area coordinate system before the sweeping machine moves to the current position, the following step is further included: Get the length and width of the total area to be cleaned; Obtain the length and width of the sweeper; According to the ratio of the length of the total cleaning area to the length of the sweeping machine, an equivalent length is obtained, and according to the ratio of the width of the total cleaning area to the width of the sweeping machine, an equivalent width is obtained; Based on the equivalent length and the equivalent width, obtaining the origin of the cleaning area coordinate system; The cleaning area coordinate system is established based on the origin of the cleaning area coordinate system.
4. The method according to claim 3, characterized in that The step of obtaining at least one trajectory coordinate in the sweeping area coordinate system before the sweeping machine moves to the current position comprises: Obtain at least one trajectory coordinate in the trajectory coordinate system before the sweeping machine moves to the current position; According to the conversion relationship between the trajectory coordinate system and the cleaning area coordinate system, the trajectory coordinates of the trajectory coordinate system are converted into the trajectory coordinates in the cleaning area coordinate system.
5. The method according to claim 1, characterized in that: In the cleaning area coordinate system, the length and width of each of the first regions are equal to the length and width of the sweeping machine.
6. A device for de-weighting the cleaning area of a sweeping machine, characterized in that: include: A trajectory coordinate acquisition module, used to acquire at least one trajectory coordinate in the cleaning area coordinate system before the sweeper moves to the current position; A first area acquisition module, used for acquiring, based on each of the trajectory coordinates, at least one first area corresponding to each of the trajectory coordinates in the cleaning area coordinate system, and further used for detecting whether there are multiple trajectory coordinates in the first area, the cleaning area coordinate system is a coordinate system established based on the length and width of the sweeping robot, and the cleaning area coordinate system is divided into multiple areas of equal area; A cleaned area detection module, used to detect whether each of the first areas has been calculated as a cleaned area, including: if the path trajectory of the sweeping machine passes through the first area and the sweeping action is performed in the first area, then the first area is a cleaned area; When the path track of the sweeping machine passes through the first area and no sweeping action is performed in the first area, the first area is an uncleaned area; a cleaned area increasing module, configured to increase the area of the first area to the cleaned area when the first area is not calculated as the cleaned area, A deduplication module is used for not increasing the cleaned area when the first area has been calculated as a cleaned area, and is also used for increasing the area of the first area only once to the cleaned area when there are multiple trajectory coordinates in the first area and when the first area has not been calculated as a cleaned area.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
