An Interaction Method, Device, and Storage Medium for a Floor Sweeping Robot
Through the terminal interaction with the sweeping robot, recording and updating the sweeping trajectory, the sweeping robot is solved, saving time and resources, and improving user experience.
Patent Information
- Application Number
- CN202310202226.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2043-03-03
AI Technical Summary
Existing sweeping robots need to re-clean after discovering the missing sweeping area, resulting in wasted time and resources, and the collision noise causes inconvenience to users.
The terminal establishes communication with the sweeping robot, judges its working status and switches to the moving mode, records the movement trajectory of the missed sweep area, uploads it to the terminal to confirm and save, updates the sweep track to avoid collision areas, and achieves purposeful cleaning.
Save time and resources, reduce collision noise, and improve user experience.
Smart Images

Figure CN116250764B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of floor cleaning robots, and particularly relates to an interaction method, device and storage medium for a floor cleaning robot. Background Art
[0002] Great progress has been made in various related technologies of robots. For home intelligent robots, floor cleaning robots are becoming more and more popular among families. After the current floor cleaning robot is turned on, it will automatically clean the ground along a pre-set cleaning trajectory in a planned manner. After a single cleaning is completed, if the user finds that there are still areas that have been missed, the floor cleaning robot needs to be started again, and all areas need to be cleaned again according to the specified cleaning trajectory. When the missed area is small or there are several obstacles, re-cleaning not only easily wastes time and consumes resources, but also the collision noise generated during this process will bring an inconvenient experience to the user. Summary of the Invention
[0003] The purpose of the present invention is to provide an interaction method, device and storage medium for a floor cleaning robot to solve one or more technical problems existing in the prior art, and at least provide a beneficial choice or create conditions.
[0004] The solution of the present invention to solve its technical problems is: to provide an interaction method, device and storage medium for a floor cleaning robot.
[0005] According to an embodiment of the first aspect of the present invention, an interaction method for a floor cleaning robot includes:
[0006] The terminal obtains a user instruction, establishes communication with the floor cleaning robot, and the floor cleaning robot obtains a control instruction sent by the terminal;
[0007] Judge whether the floor cleaning robot is in a working state, where the working state includes a cleaning mode and a moving mode. If so, judge whether the floor cleaning robot is in the cleaning mode. If so, the floor cleaning robot switches to the moving mode;
[0008] In the moving mode, according to the control instruction, the floor cleaning robot moves, records and generates a moving trajectory to the missed cleaning area;
[0009] The floor cleaning robot uploads the moving trajectory to the terminal for confirmation, and confirms whether to save the moving trajectory. If so, the terminal saves the moving trajectory, and the floor cleaning robot switches to the cleaning mode.
[0010] Further, an interaction method for a floor cleaning robot further includes:
[0011] In the cleaning mode, obtain the actual cleaning trajectory of the floor cleaning robot in the missed cleaning area, and divide the actual cleaning trajectory into several sub-trajectories;
[0012] Obtain the number of collisions corresponding to the floor sweeping robot in several sub-trajectories, select the maximum number of collisions, and determine whether it is greater than the set collision threshold;
[0013] If so, take the cleaning area at the sub-trajectory corresponding to the maximum number of collisions as the regular cleaning area, and upload the regular cleaning area to the terminal for confirmation;
[0014] According to the regular cleaning area, the terminal updates the set cleaning trajectory of the missed cleaning area to avoid the regular cleaning area.
[0015] Furthermore, the control instruction includes a trajectory switching instruction and a trajectory movement instruction.
[0016] Furthermore, the floor sweeping robot moves according to the control instruction specifically including:
[0017] When the control instruction is a trajectory switching instruction, the trajectory switching instruction includes a missed cleaning area and a set cleaning trajectory;
[0018] Obtain the forward direction, forward speed, and current cleaning trajectory of the floor sweeping robot at present, and plan the optimal movement trajectory from the current cleaning trajectory to the set cleaning trajectory according to the set cleaning trajectory.
[0019] Furthermore, the floor sweeping robot moves according to the control instruction specifically further including:
[0020] When the control instruction is a trajectory movement instruction, the trajectory movement instruction includes a direction instruction and an angle instruction;
[0021] Establish a global coordinate system In the global coordinate system Obtain the control point o of the floor sweeping robot, and according to the angle instruction, the floor sweeping robot adjusts the forward direction, obtains the forward direction, uses the forward direction as the i-axis, and rotates the i-axis clockwise by 90° to make axis, and establish a robot coordinate system
[0022] In the robot coordinate system According to the direction instruction, the floor sweeping robot moves in a straight line, where the direction instruction includes a movement duration and a movement speed.
[0023] Furthermore, the judgment of whether the floor sweeping robot is in a working state further includes:
[0024] When the floor sweeping robot is not in a working state, the floor sweeping robot works in a moving mode.
[0025] Further, when the floor cleaning robot is not in the working state and is in the moving mode, according to the control instruction, the specific movement of the floor cleaning robot further includes
[0026] When the control instruction is a trajectory switching instruction, establish a global coordinate system In the global coordinate system obtain the control point o and the forward direction of the current floor cleaning robot. The trajectory switching instruction includes an area with missed cleaning and a set cleaning trajectory;
[0027] Select the trajectory point closest to the control point in the set cleaning trajectory. According to the trajectory point, the forward direction and the control point, obtain the rotation angle and the moving distance. The floor cleaning robot spins around the control point by the rotation angle and linearly moves to the trajectory point according to the moving distance.
[0028] Further, the floor cleaning robot uploading the moving trajectory to the terminal for confirmation further includes:
[0029] Obtain the trajectory start point and the trajectory end point of the moving trajectory. According to the trajectory start point and the trajectory end point, construct a start circle area and an end circle area with the set distance as the radius;
[0030] Traverse the moving trajectory database of the terminal to obtain the corresponding start points and corresponding end points of several moving trajectories in the moving trajectory database;
[0031] Judge whether there is a corresponding start point in the start area and whether there is a corresponding end point in the end area. If so, the terminal displays that a similar trajectory exists and deletes the prompt of the moving trajectory.
[0032] According to an embodiment of the second aspect of the present invention, an electronic device includes:
[0033] A memory for storing a program; a processor for executing the program stored in the memory. When the processor executes the program stored in the memory, the processor is used to execute an interaction method of a floor cleaning robot according to any one of the embodiments of the first aspect of the present invention.
[0034] According to an embodiment of the third aspect of the present invention, a storage medium includes: storing computer-executable instructions, and the computer-executable instructions are used to execute an interaction method of a floor cleaning robot according to any one of the embodiments of the first aspect of the present invention.
[0035] The beneficial effects of the present invention are as follows: By establishing a communication connection between the terminal and the floor cleaning robot, the user can interact with the floor cleaning robot through the terminal. The terminal controls the movement of the floor cleaning robot according to the user's instructions, and purposefully controls the floor cleaning robot to switch modes and clean the areas that have been missed, thus avoiding restarting the floor cleaning robot and sweeping all areas again according to the specified cleaning trajectory, saving time and resources and bringing convenience to the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 FIG. 6 is a schematic flowchart of an interaction method for a floor cleaning robot provided by an embodiment of the present invention;
[0037] Figure 2 FIG. 10 is a schematic diagram of the cleaning trajectory and movement trajectory of a floor cleaning robot provided by an embodiment of the present invention;
[0038] Figure 3 FIG. 14 is a schematic diagram of terminal control provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be construed as a limitation of the present invention.
[0040] It should be noted that although the functional modules are divided in the system schematic diagram, in some cases, the steps shown or described may be executed differently from the module division in the system or the sequence in the flowchart. The terms "first", "second", etc. in the description of the specification, claims and the above drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.
[0041] In the description of the present invention, it should be noted that unless otherwise clearly defined, terms such as "set", "installed", "connected", etc. should be understood in a broad sense. Those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific content of the technical solution.
[0042] Referring to Figure 1 , in some embodiments of the present invention, an interaction method for a floor cleaning robot includes the following steps:
[0043] S100. The terminal obtains a user instruction, establishes communication with the floor cleaning robot, and the floor cleaning robot obtains the control instruction sent by the terminal.
[0044] In this embodiment, according to the obtained user instructions, the terminal sends control instructions to the sweeping robot. The sweeping robot receives the control instructions. Among them, the user instructions include the user instruction to establish a communication connection between the terminal and the sweeping robot and the user instruction to let the terminal send control instructions. According to the user instruction to establish a communication connection, a communication connection between the terminal and the sweeping robot is established to enable wireless communication between the terminal and the sweeping robot.
[0045] Among them, the terminal may include devices such as mobile phones, computers, or tablet computers. A touch screen and an APP are installed on the terminal. The touch screen can obtain user instructions and process them through the APP. According to the user instructions, the APP sends control instructions to the sweeping robot in the form of data packets. The control instructions can be sent to the sweeping robot by means of Bluetooth, infrared, WIFI, etc.
[0046] S200, determine whether the sweeping robot is in a working state, where the working state includes a cleaning mode and a moving mode. If so, determine whether the sweeping robot is in the cleaning mode. If so, the sweeping robot switches to the moving mode.
[0047] In this embodiment, the sweeping robot determines whether it is in a working state. In this embodiment, the working state of the sweeping robot includes: a moving mode and a cleaning mode, these two modes.
[0048] When the sweeping robot is in a working state, then determine whether the sweeping robot is working in the cleaning mode. If the sweeping robot is working in the cleaning mode, then the sweeping robot switches to working in the moving mode. If the sweeping robot is not working in the cleaning mode, then the sweeping robot is working in the moving mode.
[0049] Through double judgment and self-check to confirm the working state of the sweeping robot itself, and set the sweeping robot to work in the moving mode, which is convenient for the subsequent user to perform targeted movement control on the sweeping robot through the terminal, and reduce the behavior of the sweeping robot still performing cleaning during the movement, so as to prevent wasting time and consuming resources.
[0050] Optionally, in S200, the sweeping robot's determination of whether it is in a working state further includes the following steps:
[0051] S210, if the sweeping robot is not in a working state, the sweeping robot directly enters the moving mode for cleaning work.
[0052] S300, in the moving mode, according to the control instructions, the sweeping robot moves, records and generates a movement trajectory to the missed cleaning area.
[0053] In this embodiment, it is confirmed that the floor cleaning robot is in the moving mode. The floor cleaning robot moves purposefully according to the received control instructions, so that the user can interact with the floor cleaning robot through the terminal.
[0054] The floor cleaning robot moves purposefully to the missed cleaning area according to the received control instructions. The floor cleaning robot records the moving process and generates a moving trajectory.
[0055] The user remotely controls the floor cleaning robot through the terminal to purposefully control the floor cleaning robot to clean the missed cleaning area, thus avoiding restarting the floor cleaning robot and sweeping all areas again according to the specified cleaning trajectory, saving time and resources and bringing convenience to the user.
[0056] S400. The floor cleaning robot uploads the moving trajectory to the terminal for confirmation to confirm whether to save the moving trajectory. If so, the terminal saves the moving trajectory and the floor cleaning robot switches to the cleaning mode.
[0057] In this embodiment, the floor cleaning robot uploads the moving trajectory obtained in S300 to the terminal. The terminal receives the moving trajectory sent by the floor cleaning robot. The terminal obtains the user selection instruction and confirms whether to save the moving trajectory through the user selection instruction. When the user confirms that the moving trajectory needs to be saved, the terminal stores the moving trajectory in the moving trajectory database. When the user does not need to save the moving trajectory, the terminal deletes the moving trajectory to reduce the computing amount and storage amount of the terminal. When the floor cleaning robot reaches the missed cleaning area, it switches to the cleaning mode to work to clean the missed cleaning area.
[0058] The present invention establishes a communication connection between the terminal and the floor cleaning robot to enable the user to interact with the floor cleaning robot through the terminal. The terminal controls the movement of the floor cleaning robot through the user instruction, purposefully controls the floor cleaning robot to switch modes and clean the missed cleaning area, thus avoiding restarting the floor cleaning robot and sweeping all areas again according to the specified cleaning trajectory, saving time and resources and bringing convenience to the user.
[0059] Refer to Figure 2 , in some embodiments of the present invention, an interaction method for a floor cleaning robot further includes the following steps:
[0060] S500. In the cleaning mode and within the missed cleaning area, obtain the actual cleaning trajectory of the floor cleaning robot, divide the obtained actual cleaning trajectory to obtain several sub-trajectories.
[0061] In this embodiment, after the floor cleaning robot reaches the missed cleaning area, it switches to the cleaning mode. During the cleaning process, the floor cleaning robot records the cleaning trajectory. After the cleaning is completed, the actual cleaning trajectory is obtained.
[0062] The actual cleaning trajectory is segmented to obtain several sub-trajectories. That is to say, the actual cleaning trajectory is segmented into N segments to obtain N sub-trajectories, and the N sub-trajectories can form the actual cleaning trajectory. In this embodiment, the straight-line trajectory and the turning trajectory in the actual cleaning trajectory are segmented. That is, the N sub-trajectories include: L straight-line sub-trajectories and W turning sub-trajectories. For these two trajectory types, N = L + W. Since the sweeping robot has fewer collisions during straight-line cleaning, and the sweeping robot will continuously spin and collide with obstacles to avoid them, therefore, in the actual cleaning trajectory, the turning trajectory has more collision times. Through the above settings, it is convenient to calculate the number of collisions in the later stage and reduce the computing amount of the sweeping robot.
[0063] In this embodiment, the segmentation method can also be to equally divide the actual cleaning trajectory or segment it according to the number of trajectory points, etc. The trajectory segmentation method is not limited in this invention.
[0064] S600. According to several sub-trajectories, obtain the corresponding number of collisions of the sweeping robot. According to the corresponding number of collisions, select the maximum value among the corresponding number of collisions, and determine whether the maximum number of collisions is greater than the set number threshold.
[0065] In this embodiment, according to the several sub-trajectories obtained through S400, obtain the number of collisions of the scanning machine in each sub-trajectory, obtain several numbers of collisions, select the maximum value from the several numbers of collisions, and determine whether this value is greater than the set number threshold.
[0066] That is to say, for the N sub-trajectories, there are N corresponding numbers of collisions. Select the maximum value from the N numbers of collisions and compare it with the set number threshold. For example, the number of collisions of the straight-line sub-trajectory L1 is 2 times, the number of collisions of the straight-line sub-trajectory L2 is 1 time, the number of collisions of the straight-line sub-trajectory L3 is 0 time, the number of collisions of the turning sub-trajectory W1 is 3 times, the number of collisions of the turning sub-trajectory W2 is 6 times, and the number of collisions of the turning sub-trajectory W3 is 9 times. Then the maximum value among the N numbers of collisions is 9 times, and compare 9 times with the set number threshold.
[0067] S700. If so, use the cleaning area at the sub-trajectory corresponding to this number as the regular cleaning area and upload this area to the terminal for the user to confirm.
[0068] In this embodiment, when the set number threshold is less than the maximum number of collisions, determine the sub-trajectory corresponding to this maximum value, and set the cleaning area corresponding to this sub-trajectory as the regular cleaning area. The sweeping robot uploads the cleaning area corresponding to this sub-trajectory to the terminal for the user to confirm.
[0069] For example: the maximum number of collisions is 9 times, and the set number threshold is 5 times. Since the set number threshold is less than the maximum number of collisions, the sub-trajectory corresponding to the maximum number of collisions is the turning sub-trajectory W3. In the missed cleaning area, the cleaning area at the turning sub-trajectory W3 is set as the regular cleaning area, and the sweeping robot uploads the turning sub-trajectory W3 and the regular cleaning area to the terminal. The terminal obtains the user selection instruction and confirms to use it as the regular cleaning area.
[0070] S800. Through the regular cleaning area, the terminal modifies the set cleaning trajectory of the missed cleaning area to update the set cleaning trajectory and avoid the regular cleaning area.
[0071] In this embodiment, through the regular cleaning area, according to the sub-trajectory of this area, the terminal modifies the set cleaning trajectory and updates the cleaning trajectory at the missed cleaning area, so that the sweeping robot does not move according to the sub-trajectory corresponding to the regular cleaning area, thereby reducing the number of collisions and avoiding the regular cleaning area.
[0072] It should be noted that the priority of the updated set cleaning trajectory is higher than that of the initial set cleaning trajectory, and the initial set cleaning trajectory is not deleted or overwritten. When the user needs to clean the regular cleaning trajectory, the initial set cleaning trajectory is called through the terminal, and according to the initial set cleaning trajectory, the sweeping robot cleans the regular cleaning area, or after the sweeping robot passes through the set time period, the initial set cleaning trajectory is called to clean the regular cleaning area.
[0073] For example: if the cleaning area at the turning sub-trajectory W3 is set as the regular cleaning area, a straight trajectory is set between the straight sub-trajectory L1 connected to one end of the turning sub-trajectory W3 and the straight sub-trajectory L2 connected to the other end of the turning sub-trajectory W3, that is, the turning sub-trajectory W3 is set as a straight trajectory.
[0074] The present invention divides the cleaning trajectory into several sub-trajectories, determines the regular cleaning area according to the number of collisions of the sweeping robot in these sub-trajectories, reduces the cleaning of this area, avoids the regular cleaning area, and reduces the situation where when the sweeping robot is trapped by some obstacles, it needs to collide out multiple times or move out of this cleaning area through various obstacle avoidance methods, thereby reducing the number of collisions of the sweeping robot and avoiding the inconvenient experience brought to the user by the collision noise caused during this process.
[0075] In some embodiments of the present invention, the control instructions include two types of instructions: a trajectory switching instruction and a trajectory moving instruction.
[0076] It should be noted that when the sweeping robot does not receive a control instruction within the set time period, the sweeping robot defaults to switching to the cleaning mode.
[0077] In some embodiments of the present invention, in S300, the floor cleaning robot moves according to the control instruction, which specifically includes the following steps:
[0078] S310, when the input to the floor cleaning robot is a trajectory switching instruction, the trajectory switching instruction includes information on the missed cleaning area and information on the set cleaning trajectory.
[0079] S311, obtain the forward direction, forward speed and current cleaning trajectory of the current floor cleaning robot, and use the set cleaning trajectory information obtained in S310 to plan the optimal movement trajectory, so as to enable the floor cleaning robot to move from the current cleaning trajectory to the set cleaning trajectory.
[0080] In this embodiment, when the floor cleaning robot is performing normal cleaning work according to the current cleaning trajectory and receives a trajectory switching instruction, where the trajectory switching instruction includes information on the missed cleaning area and information on the set cleaning trajectory.
[0081] At this time, the priority of the set cleaning trajectory is higher than that of the current cleaning trajectory. Obtain the forward direction, forward speed and current cleaning trajectory of the floor cleaning robot on the current cleaning trajectory. According to the forward direction, forward speed, current cleaning trajectory and set cleaning trajectory information, plan the optimal movement trajectory, so as to enable the floor cleaning robot to move from the current cleaning trajectory to the set cleaning trajectory and reach the missed cleaning area.
[0082] Among them, the method for planning the optimal movement trajectory includes: fitting with a cubic B-spline curve, an ant colony algorithm or a genetic algorithm. There is no limitation on the method for planning the optimal movement trajectory in this embodiment.
[0083] In the working state of the floor cleaning robot of the present invention, the user sends a trajectory switching instruction through the terminal. According to the position relationship of the current floor cleaning robot, the current cleaning trajectory and the set cleaning trajectory information, the optimal movement trajectory is planned, so as to enable the floor cleaning robot to move from the current cleaning trajectory to the set cleaning trajectory quickly, without stagnation and smoothly in a short time, and reach the missed cleaning area purposefully, saving time and resources, realizing human-computer interaction. Compared with the method of scheduling the cleaning area of the floor cleaning robot through the terminal or other methods in the prior art, the switching of the cleaning trajectory of the present invention can quickly reach the area expected to be cleaned by the user, save time and provide great convenience to the user.
[0084] Refer to Figures 2 to 3 , in some embodiments of the present invention, in S300, the floor cleaning robot moves according to the control instruction, which specifically further includes the following steps:
[0085] S320, when the input to the floor cleaning robot is a trajectory movement instruction, the trajectory switching instruction includes: a direction instruction and an angle instruction.
[0086] In this embodiment, the trajectory movement instruction sent by the terminal includes: a direction instruction and an angle instruction.
[0087] It should be noted that a touch screen is installed on the terminal, and direction adjustment buttons and an angle adjustment knob are provided on the touch screen. The direction adjustment buttons include: a forward button, a backward button, a left button, and a right button, these four types of buttons. The angle adjustment knob is a 360° steering wheel. By the direction adjustment buttons on the touch screen, user instructions are obtained, and the terminal sends the direction instruction to the sweeping robot in the form of a data packet; by the angle adjustment knob on the touch screen, user instructions are obtained, and the terminal sends the angle instruction to the sweeping robot in the form of a data packet.
[0088] S321, establish a global coordinate system Obtain the control point o of the sweeping robot, in the global coordinate system Under this, according to the angle instruction, the sweeping robot spins around the control point o, adjusts the forward direction of the sweeping robot, takes the forward direction as the i-axis, and rotates the i-axis clockwise by 90° to make the axis, and establish a robot coordinate system
[0089] In this embodiment, establish a global coordinate system and a robot coordinate system In the global coordinate system Under this, according to the obtained control point o of the sweeping robot, according to the angle instruction sent by the terminal, the sweeping robot spins around the control point o, adjusts the forward direction of the sweeping robot. The coordinate of the control point o of the sweeping robot in the global coordinate system will not change, but because the forward direction changes, so the robot coordinate system will change and will be continuously updated. Among them, the angle instruction includes the spin angle of the sweeping robot.
[0090] S322, in the robot coordinate system Under this, the sweeping robot moves linearly according to the direction instruction, where the direction instruction includes information on the movement duration and information on the movement speed.
[0091] In this embodiment, the sweeping robot moves linearly in the robot coordinate system under this, by the direction instruction, where the direction instruction includes information on the movement duration T and information on the movement speed v. The direction instruction includes: a forward instruction, a backward instruction, a left instruction, and a right instruction, these four types of instructions.
[0092] In this embodiment, the terminal issues a forward instruction, in the robot coordinate system Under the forward instruction, the sweeping robot moves linearly along the positive direction of the i-axis at a moving speed v for a moving duration T; the terminal issues a rightward instruction. In the robot coordinate system Under the rightward instruction, the sweeping robot moves along the positive direction of the axis at a moving speed v for a moving duration T; the terminal issues a backward instruction. In the robot coordinate system Under the backward instruction, the sweeping robot moves linearly along the negative direction of the i-axis at a moving speed v for a moving duration T; the terminal issues a leftward instruction. In the robot coordinate system Under the leftward instruction, the sweeping robot moves along the negative direction of the axis at a moving speed v for a moving duration T.
[0093] In some embodiments of the present invention, when the sweeping robot is not in a working state in S210, in S300, the specific steps for the sweeping robot to move according to the control instruction further include the following steps:
[0094] S330, when the input to the sweeping robot is a trajectory switching instruction, in the global coordinate system the sweeping robot obtains its current forward direction and the control point o. The trajectory switching instruction includes information on the missed sweeping area and information on the set cleaning trajectory.
[0095] S331, select the trajectory point closest to the control point from the set cleaning trajectory. Through this trajectory point, the forward direction obtained in S330, and the control point o, calculate the rotation angle and the moving distance. According to the rotation angle, the sweeping robot spins around the control point, and then according to the moving distance, the sweeping robot moves linearly to the trajectory point.
[0096] In this embodiment, since the sweeping robot is not in a working state, the sweeping robot is not moving for cleaning but staying at a certain position. Therefore, the sweeping robot directly enters the moving mode, reducing redundant step processes, accelerating the running speed, and obtaining the current control point o and the forward direction of the sweeping robot in the global coordinate system where the trajectory switching instruction includes information on the missed sweeping area and information on the set cleaning trajectory.
[0097] The set cleaning trajectory is composed of several trajectory points. Select the trajectory point p closest to the control point o from the set cleaning trajectory, calculate the straight-line distance op between the control point o and the trajectory point p. The straight-line distance op is the moving distance of the sweeping robot. Make a vector vector as the required forward direction of the sweeping robot. According to the current forward direction of the sweeping robot, according to the vector Based on the control point o, the trajectory point p of the current floor cleaning robot, and the forward direction of the current floor cleaning robot, the rotation angle α is calculated, and the rotation angle α is the angle at which the floor cleaning robot spins around the control point.
[0098] When the floor cleaning robot is not in the working state, the user sends a trajectory switching instruction through the terminal. Based on the control point o, the trajectory point p of the current floor cleaning robot, and the forward direction of the current floor cleaning robot, the floor cleaning robot can quickly move from the current cleaning trajectory to the set cleaning trajectory within a short time, purposefully reach the missed cleaning area, save time and resources, and achieve human-machine interaction. Compared with the method in the prior art that requires making an appointment for the cleaning area of the floor cleaning robot through the terminal or other methods, the switching of the cleaning trajectory in the present invention can quickly reach the area that the user expects to clean, save time, and provide great convenience to the user.
[0099] It should be noted that when the floor cleaning robot is not in the working state and the terminal sends a trajectory movement instruction, the movement control process of the floor cleaning robot is as shown in the process from S320 to S322. Therefore, in the present invention, the movement control process of the floor cleaning robot in this state will not be elaborated further.
[0100] Refer to Figure 2 , in some embodiments of the present invention, in S400, when the floor cleaning robot uploads the movement trajectory to the terminal for confirmation, the following steps are further included:
[0101] S410, based on the movement trajectory, obtain the trajectory start point and the trajectory end point, and use the trajectory start point and the trajectory end point as the centers to construct a start circle domain and an end circle domain with a set distance as the radius.
[0102] In this embodiment, with the set distance as the radius and using the trajectory start point as the center, a start circle domain D1 is constructed; with the set distance as the radius and using the trajectory end point as the center, an end circle domain D2 is constructed.
[0103] S420, traverse the movement trajectory database on the terminal to obtain the corresponding start points and corresponding end points of several movement trajectories in the movement trajectory database.
[0104] In this embodiment, there are several movement trajectories in the movement trajectory database. For each movement trajectory, the corresponding start point is obtained to get the corresponding start point; for each movement trajectory, the corresponding end point is obtained to get the corresponding end point.
[0105] For example: there are m movement trajectories in the movement trajectory database. The start point of movement trajectory Q1 is s1 and the end point is e1; the start point of movement trajectory Q2 is s2 and the end point is e2, and so on. The start point of movement trajectory Q m is s m , and the end point is e m .
[0106] S430 determines whether the corresponding starting point falls within the starting point circular region and whether the corresponding ending point falls within the ending point circular region. If so, the terminal displays a prompt indicating the existence of a similar trajectory and deletes the movement trajectory.
[0107] In this embodiment, it is determined whether the corresponding starting point falls within the starting point circular region D1, and it is determined whether the corresponding ending point falls within the ending point circular region D2. After the determination, when both the starting point circular region D1 and the ending point circular region D2 have corresponding starting points and ending points falling therein, the terminal deletes the movement trajectory and displays a prompt indicating the existence of a similar trajectory and the deletion of the movement trajectory. Otherwise, the terminal displays a confirmation save window.
[0108] For example: If the starting point s1 of the movement trajectory Q1 falls within the starting point circular region D1, but the ending point e1 does not fall within the ending point circular region D2, then the terminal only displays a confirmation save window. If the starting point s2 of the movement trajectory Q2 falls within the starting point circular region D1 and the ending point e2 falls within the ending point circular region D2, then the terminal deletes the movement trajectory Q2 and displays a prompt indicating the existence of a similar trajectory and the deletion of the movement trajectory Q2.
[0109] By constructing the starting point circular region D1 and the ending point circular region D2, it is determined whether the movement trajectories in the movement trajectory database have the same starting and ending points as the obtained movement trajectory, thereby simply determining whether there is a similar path. If so, the movement trajectory is deleted, reducing duplicate movement trajectories, thereby reducing the storage burden of the terminal and reducing the amount of computation.
[0110] According to an embodiment of the second aspect of the present invention, an electronic device includes:
[0111] A memory for storing programs; a processor for executing the programs stored in the memory. When the processor executes the programs stored in the memory, the processor is used to execute an interaction method of a floor cleaning robot according to any one of the first aspect.
[0112] The processor and the memory can be connected through a bus or other means.
[0113] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs, such as the interaction method for a floor cleaning robot described in the embodiments of the present invention. The processor realizes the interaction method of a floor cleaning robot according to the embodiments of the first aspect of the present invention by running the non-transitory software programs and instructions stored in the memory.
[0114] The memory may include a program storage area and a parameter storage area. Among them, the program storage area can store the operating system and application programs required for at least one function; the parameter storage area can store the interactive method for a floor cleaning robot described above. In addition, the memory may include high-speed random access memory and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely provided with respect to the processor, and these remote memories can be connected to the processor through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0115] According to an embodiment of the third aspect of the present invention, a storage medium, characterized by comprising: computer-executable instructions stored thereon, and the computer-executable instructions are used to execute the interactive method for a floor cleaning robot as in the first aspect of the present invention.
[0116] The non-transitory software program and instructions required to implement the above terminal selection method are stored in the memory, and when executed by one or more processors, they execute the interactive method for a floor cleaning robot as in the first aspect of the present invention.
[0117] Those of ordinary skill in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or can be implemented as hardware, or can be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, parameter structures, program modules, or other data. The computer storage medium includes but is not limited to RAM, ROM, EEPROM, flash memory, or other memory technologies, CD-ROM, digital versatile disk (DVD), or other optical disk storage, magnetic cassette, tape, magnetic disk storage, or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, the communication medium generally includes computer-readable instructions, parameter structures, program modules, or other data such as modulated parameter signals like carrier waves or other transmission mechanisms, and can include any information delivery medium.
[0118] The above has specifically described the preferred embodiments of the present invention. However, the present invention is not limited to the described embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. An interaction method for a floor cleaning robot, characterized in that, Including: The terminal obtains a user instruction, establishes communication with the sweeping robot, and the sweeping robot obtains the control instruction sent by the terminal; Judge whether the sweeping robot is in a working state, where the working state includes a cleaning mode and a moving mode. If so, judge whether the sweeping robot is in the cleaning mode. If so, the sweeping robot switches to the moving mode; In the moving mode, according to the control instruction, the sweeping robot moves, records and generates a moving trajectory to the missed cleaning area; The sweeping robot uploads the moving trajectory to the terminal for confirmation, and confirms whether to save the moving trajectory. If so, the terminal saves the moving trajectory, and the sweeping robot switches to the cleaning mode; The interaction method further includes: In the cleaning mode, obtain the actual cleaning trajectory of the sweeping robot in the missed cleaning area, and divide the actual cleaning trajectory into several sub-trajectories; Obtain the number of collisions corresponding to the sweeping robot in several sub-trajectories, select the maximum number of collisions and judge whether it is greater than the set collision threshold; If so, take the cleaning area at the sub-trajectory corresponding to the maximum number of collisions as the regular cleaning area, and upload the regular cleaning area to the terminal for confirmation; According to the regular cleaning area, the terminal updates the set cleaning trajectory of the missed cleaning area to avoid the regular cleaning area.
2. The interactive method of a floor sweeping robot according to claim 1, wherein, The control instruction includes a trajectory switching instruction and a trajectory moving instruction.
3. An interaction method of a floor sweeping robot according to claim 2, characterized in that, The specific moving of the sweeping robot according to the control instruction includes: When the control instruction is a trajectory switching instruction, the trajectory switching instruction includes a missed cleaning area and a set cleaning trajectory; Obtain the forward direction, forward speed and current cleaning trajectory of the sweeping robot at present, and plan the optimal moving trajectory from the current cleaning trajectory to the set cleaning trajectory according to the set cleaning trajectory.
4. An interaction method for a floor cleaning robot according to claim 2, wherein, The specific moving of the sweeping robot according to the control instruction further includes: When the control instruction is a trajectory moving instruction, the trajectory moving instruction includes a direction instruction and an angle instruction; Establish a global coordinate system In the global coordinate system Obtain the control point o of the floor cleaning robot. According to the angle instruction, the floor cleaning robot adjusts its forward direction, obtains the forward direction, and uses the forward direction as axis, and Rotate the axis clockwise by 90° as axis to establish a robot coordinate system In the robot coordinate system under which, according to the direction instruction, the sweeping robot moves in a straight line, where the direction instruction includes a movement duration and a movement speed.
5. The interactive method of a floor sweeping robot according to claim 2, characterized in that, The judgment of whether the sweeping robot is in a working state further includes: When the sweeping robot is not in a working state, the sweeping robot works in the moving mode.
6. The interactive method of a floor sweeping robot according to claim 5, characterized in that, When the sweeping robot is not in a working state, in the moving mode, the specific moving of the sweeping robot according to the control instruction further includes When the control instruction is a trajectory switching instruction, establish a global coordinate system In the global coordinate system obtain the control point O and the forward direction of the current floor cleaning robot, and the trajectory switching instruction includes an area missed by cleaning and a set cleaning trajectory; Select the trajectory point closest to the control point in the set cleaning trajectory, obtain the rotation angle and moving distance according to the trajectory point, forward direction and control point, the sweeping robot spins around the control point by the rotation angle, and linearly moves to the trajectory point according to the moving distance.
7. An interaction method for a floor cleaning robot according to claim 1, characterized in that, The uploading of the moving trajectory of the sweeping robot to the terminal for confirmation further includes: Obtain the trajectory start point and trajectory end point of the moving trajectory, and construct a start circle area and an end circle area with the set distance as the radius according to the trajectory start point and trajectory end point; Traverse the moving trajectory database of the terminal, and obtain the corresponding start points and corresponding end points of several moving trajectories in the moving trajectory database; Judge whether the start circle area has a corresponding start point and whether the end circle area has a corresponding end point. If so, the terminal displays that a similar trajectory exists and deletes the prompt of the moving trajectory.
8. An electronic device, characterized in that, Including: A memory for storing programs; A processor for executing the programs stored in the memory, and when the processor executes the programs stored in the memory, the processor is used to execute an interaction method of a floor cleaning robot according to any one of claims 1 to 7.
9. A storage medium, characterized in that, Comprising: Computer-executable instructions are stored, and the computer-executable instructions are used to execute an interaction method of a floor cleaning robot according to any one of claims 1 to 7.
Citation Information
Patent Citations
Supplementary sweeping method based on sweeper, sweeper, electronic equipment and medium
CN112294207A