Cleaning robot moving method, electronic device and storage medium
By configuring multiple point laser sensors and line laser sensors on the sweeping robot, it can detect the distance of obstacles in real time and perform deceleration and rotation operations, which solves the problems of low moving efficiency and collision risk of sweeping robots on uneven walls in the existing technology. Enables more efficient and safer edge operations.
Patent Information
- Application Number
- CN202011179766.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-29
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-10-29
AI Technical Summary
Existing sweeping robots rely on single-point laser sensors when operating along edges, making it difficult to effectively handle uneven walls, resulting in low efficiency and the risk of collisions.
It uses multiple point laser sensors and line laser sensors to detect the distance of obstacles in real time and avoid collisions through deceleration and rotation operations to ensure precise control of the robot and irregular obstacles.
It improves the moving efficiency and safety of the sweeping robot on uneven walls and effectively avoids the risk of collision with the wall.
Smart Images

Figure CN114510015B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a sweeping robot moving method, an electronic device and a storage medium. Background Art
[0002] The sweeping robots in the prior art mainly rely on the configured single-point laser sensors to obtain information about the surrounding walls. The sweeping robots also mainly rely on the configured single-point laser sensors when performing edge operations. However, since this edge-following method can only achieve the effect of a single point edge-following, this edge-following method is not efficient for uneven walls, and the sweeping robots still have the risk of colliding with the wall. Summary of the invention
[0003] In view of the above, the present invention provides a sweeping robot moving method, an electronic device and a storage medium, the purpose of which is to solve the technical problem in the prior art that the sweeping robot has the risk of colliding with the wall when moving along the edge.
[0004] To achieve the above object, the present invention provides a method for moving a sweeping robot, the method comprising:
[0005] Based on a first preset number of point laser sensors pre-configured in the moving direction of the sweeping robot, real-time detection is performed to determine whether there are obstacles in the moving direction of the robot;
[0006] When an obstacle is detected in the moving direction of the robot, the distance between the robot and the obstacle is acquired in real time based on the first preset number of point laser sensors, and whether the distance is equal to a first preset value is determined in real time;
[0007] When the distance between the robot and the obstacle is equal to a first preset value, based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle, performing an edge operation on the robot, wherein at least one line laser sensor of the second preset number of line laser sensors emits a linear laser in a direction perpendicular to the ground;
[0008] When the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, a deceleration operation is performed on the robot, wherein the second preset value is greater than the first preset value.
[0009] Preferably, the first preset number of point laser sensors are located on both sides of the center of the driving wheel axle of the robot, and the second preset number of line laser sensors are located on both sides of the center of the driving wheel axle of the robot.
[0010] Preferably, when the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, performing a deceleration operation on the robot comprises:
[0011] When the line laser sensor located in front of the center of the driving wheel shaft of the robot detects the obstacle, the robot is subjected to a rightward rotation deceleration operation;
[0012] When the obstacle is detected by the line laser sensor located at the rear side of the center of the driving wheel shaft of the robot, a left rotation deceleration operation is performed on the robot.
[0013] Preferably, the second preset number is greater than 2, and at least one line laser sensor among the second preset number of line laser sensors emits a linear laser in a direction parallel to the ground.
[0014] Preferably, the performing the edge operation on the robot based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle comprises:
[0015] Based on the second preset number of line laser sensors, the distance between the robot and each edge reference point of the obstacle is read, where each edge reference point is a projection point when the linear laser emitted by each line laser sensor in a direction perpendicular to the ground measures the distance to the obstacle;
[0016] Filtering out a minimum distance from the distances between the robot and each reference point along the edge of the obstacle, and determining a difference between the minimum distance obtained by filtering out and a first preset value;
[0017] When the minimum distance obtained by screening is greater than or equal to the first preset value, the robot is operated to approach the obstacle; when the minimum distance obtained by screening is less than the first preset value, the robot is operated to move away from the obstacle.
[0018] To achieve the above object, the present invention further provides an electronic device, which includes: a memory and a processor, wherein the memory stores a sweeping robot movement program, and the sweeping robot movement program is executed by the processor to implement the following steps:
[0019] Based on a first preset number of point laser sensors pre-configured in the moving direction of the sweeping robot, real-time detection is performed to determine whether there are obstacles in the moving direction of the robot;
[0020] When an obstacle is detected in the moving direction of the robot, the distance between the robot and the obstacle is acquired in real time based on the first preset number of point laser sensors, and whether the distance is equal to a first preset value is determined in real time;
[0021] When the distance between the robot and the obstacle is equal to a first preset value, based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle, performing an edge operation on the robot, wherein at least one line laser sensor of the second preset number of line laser sensors emits a linear laser in a direction perpendicular to the ground;
[0022] When the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, a deceleration operation is performed on the robot, wherein the second preset value is greater than the first preset value.
[0023] Preferably, the first preset number of point laser sensors are located on both sides of the center of the driving wheel axle of the robot, and the second preset number of line laser sensors are located on both sides of the center of the driving wheel axle of the robot.
[0024] Preferably, when the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, performing a deceleration operation on the robot comprises:
[0025] When the line laser sensor located in front of the center of the driving wheel shaft of the robot detects the obstacle, the robot is subjected to a rightward rotation deceleration operation;
[0026] When the obstacle is detected by the line laser sensor located at the rear side of the center of the driving wheel shaft of the robot, a left rotation deceleration operation is performed on the robot.
[0027] Preferably, the performing the edge operation on the robot based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle comprises:
[0028] Based on the second preset number of line laser sensors, the distance between the robot and each edge reference point of the obstacle is read, where each edge reference point is a projection point when the linear laser emitted by each line laser sensor in a direction perpendicular to the ground measures the distance to the obstacle;
[0029] Filtering out a minimum distance from the distances between the robot and each reference point along the edge of the obstacle, and determining a difference between the minimum distance obtained by filtering out and a first preset value;
[0030] When the minimum distance obtained by screening is greater than or equal to the first preset value, the robot is operated to approach the obstacle; when the minimum distance obtained by screening is less than the first preset value, the robot is operated to move away from the obstacle.
[0031] To achieve the above objectives, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a sweeping robot movement program, and when the sweeping robot movement program is executed by a processor, any step in the sweeping robot movement method described above is implemented.
[0032] The sweeping robot moving method, electronic device and storage medium proposed in the present invention can detect the surface of irregular objects by configuring multiple line laser sensors and point laser sensors in the direction of travel of the sweeping robot, thereby accurately controlling the distance between the sweeping robot and irregular obstacles and avoiding the risk of the sweeping robot bumping into the edge. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of a preferred embodiment of the electronic device of the present invention;
[0034] Figure 2 for Figure 1 Module diagram of a preferred embodiment of the mobile program of the sweeping robot;
[0035] Figure 3 This is a flow chart of a preferred embodiment of the sweeping robot moving method of the present invention;
[0036] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention 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 invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0038] Reference Figure 1 FIG. 2 is a schematic diagram of a preferred embodiment of the electronic device 1 of the present invention.
[0039] The electronic device 1 includes but is not limited to: a memory 11, a processor 12, a display 13 and a network interface 14. The electronic device 1 is connected to a network via the network interface 14. The network may be a wireless or wired network such as the Internet, a 4G network, a 5G network, Bluetooth, Wi-Fi, or a call network.
[0040] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a hard disk or memory of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped with the electronic device 1. Of course, the memory 11 can also include both the internal storage unit of the electronic device 1 and its external storage device. In this embodiment, the memory 11 is generally used to store the operating system and various application software installed on the electronic device 1, such as the program code of the sweeping robot mobile program 10, etc. In addition, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
[0041] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 12 is generally used to control the overall operation of the electronic device 1, such as performing control and processing related to data interaction or communication. In this embodiment, the processor 12 is used to run the program code stored in the memory 11 or process data, such as running the program code of the sweeping robot movement program 10.
[0042] The display 13 may be referred to as a display screen or a display unit. In some embodiments, the display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an organic light-emitting diode (OLED) touch device, etc. The display 13 is used to display information processed in the electronic device 1 and to display a visual working interface, such as displaying the results of data statistics.
[0043] The network interface 14 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface). The network interface 14 is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0044] Figure 1Only the electronic device 1 having components 11 - 14 and the cleaning robot movement program 10 is shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0045] Optionally, the electronic device 1 may further include a user interface, which may include a display, an input unit such as a keyboard, and an optional user interface may further include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0046] The electronic device 1 may further include a radio frequency (RF) circuit, a sensor, an audio circuit, etc., which will not be described in detail here.
[0047] In the above embodiment, the processor 12 can implement the following steps when executing the sweeping robot movement program 10 stored in the memory 11:
[0048] Based on a first preset number of point laser sensors pre-configured in the moving direction of the sweeping robot, real-time detection is performed to determine whether there are obstacles in the moving direction of the robot;
[0049] When an obstacle is detected in the moving direction of the robot, the distance between the robot and the obstacle is acquired in real time based on the first preset number of point laser sensors, and whether the distance is equal to a first preset value is determined in real time;
[0050] When the distance between the robot and the obstacle is equal to a first preset value, based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle, performing an edge operation on the robot, wherein at least one line laser sensor of the second preset number of line laser sensors emits a linear laser in a direction perpendicular to the ground;
[0051] When the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, a deceleration operation is performed on the robot, wherein the second preset value is greater than the first preset value.
[0052] The storage device may be the memory 11 of the electronic device 1 , or may be other storage devices that are communicatively connected to the electronic device 1 .
[0053] For a detailed description of the above steps, please refer to the following Figure 2Program module diagram of the embodiment of the sweeping robot mobile program 10 and Figure 3 Description of a flowchart of an embodiment of a method for moving a sweeping robot.
[0054] In other embodiments, the robot vacuum cleaner mobile program 10 may be divided into multiple modules, which are stored in the memory 11 and executed by the processor 12 to implement the present invention. The module referred to in the present invention refers to a series of computer program instruction segments that can implement specific functions.
[0055] Reference Figure 2 As shown, Figure 1 FIG. 1 is a program module diagram of an embodiment of a robot vacuum cleaner mobile program 10. In this embodiment, the robot vacuum cleaner mobile program 10 can be divided into: a detection module 110, a determination module 120, a first movement module 130 and a second movement module 140.
[0056] The detection module 110 is used to detect in real time whether there are obstacles in the moving direction of the robot based on a first preset number of point laser sensors pre-configured in the moving direction of the cleaning robot.
[0057] In this embodiment, in order to enable the sweeping robot to move parallel to the wall, or along the wall of furniture such as a wardrobe or table, a first preset number of point laser sensors can be pre-configured in the direction of travel of the sweeping robot to detect in real time whether there are obstacles in the direction of movement of the robot, so as to effectively control the distance between the sweeping robot and the wall when it moves forward. The first preset number is greater than or equal to 1, and the specific number can be configured according to actual needs. Furthermore, in order to accurately detect the distance to the wall, the first preset number of point laser sensors are located on both sides of the center of the driving wheel axle of the robot.
[0058] The judgment module 120 is used to obtain the distance between the robot and the obstacle in real time based on the first preset number of point laser sensors when an obstacle is detected in the moving direction of the robot, and to judge in real time whether the distance is equal to a first preset value.
[0059] In this embodiment, when the point laser sensor detects that there is an obstacle in the moving direction of the sweeping robot, the distance between the robot and the obstacle is obtained in real time according to a first preset number of point laser sensors, and it is determined in real time whether the distance is equal to a first preset value. When the obstacle (e.g., a wall) is a flat wall, multiple point laser sensors obtain the distance between the sweeping robot and the wall almost at the same time. When the wall is uneven, there will be a point laser sensor that first receives the echo signal to obtain the distance to the wall. Therefore, the distance obtained by the point laser sensor that first receives the echo signal can be used as the distance between the sweeping robot and the obstacle. Specifically, the distance between the sweeping robot and the obstacle can be determined according to the product of the laser round-trip time of the point laser sensor and the speed of light. The first preset value can be set according to the actual scene. For example, the first preset value is 5 cm.
[0060] The first moving module 130 is used to perform edge operation on the robot based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle when the distance between the robot and the obstacle is equal to a first preset value, wherein at least one line laser sensor among the second preset number of line laser sensors emits a linear laser in a direction perpendicular to the ground.
[0061] In this embodiment, since the point laser distance sensor can only obtain the spacing at the same height as the point laser distance sensor, there is still a risk of collision with the wall at positions other than the shell at the same height as the point light source distance sensor on the sweeping robot. Therefore, when the distance between the sweeping robot and the obstacle is equal to the first preset value, the robot can be operated along the edge according to the second preset number of line laser sensors pre-configured in the moving direction of the sweeping robot and the distance between the robot and the obstacle, wherein at least one of the second preset number of line laser sensors emits a linear laser in a direction perpendicular to the ground. Furthermore, in order to accurately detect the distance to the irregular wall, the second preset number of line laser sensors are located on both sides of the center of the driving wheel axle of the robot. The detection range of the line laser sensor can be a 90-degree line laser.
[0062] Further, performing edge operation on the robot includes:
[0063] Based on the second preset number of line laser sensors, the distance between the robot and each edge reference point of the obstacle is read, where each edge reference point is a projection point when the linear laser emitted by each line laser sensor in a direction perpendicular to the ground measures the distance to the obstacle;
[0064] Filtering out a minimum distance from the distances between the robot and each reference point along the edge of the obstacle, and determining a difference between the minimum distance obtained by filtering out and a first preset value;
[0065] When the minimum distance obtained by screening is greater than or equal to the first preset value, the robot is operated to approach the obstacle, and when the minimum distance obtained by screening is less than the first preset value, the robot is operated to move away from the obstacle. By screening the minimum distance from the distances between the edge reference points of the sweeping robot and the obstacle, and performing the edge operation based on the comparison between the minimum distance and the first preset value, the sweeping robot can be effectively ensured to move along an uneven wall surface, preventing the sweeping robot from bumping into something.
[0066] In one embodiment, the second preset number is greater than 2, and at least one line laser sensor in the second preset number of line laser sensors emits a linear laser in a direction parallel to the ground.
[0067] The second moving module 140 performs a deceleration operation on the robot when the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, wherein the second preset value is greater than the first preset value.
[0068] In this embodiment, when the distance between the cleaning robot and the obstacle is greater than a first preset value and less than a second preset value, a deceleration operation is performed on the cleaning robot, wherein the second preset value is greater than the first preset value. The deceleration operation on the robot includes:
[0069] When the line laser sensor located in front of the center of the driving wheel shaft of the robot detects the obstacle, the robot is subjected to a rightward rotation deceleration operation;
[0070] When the obstacle is detected by the line laser sensor located at the rear side of the center of the driving wheel shaft of the robot, a left rotation deceleration operation is performed on the robot.
[0071] In one embodiment, the directions of the point laser sensor and the line laser sensor can also be set. For example, when the point laser sensor (point laser is emitted in the vertical direction) and the line laser sensor (line laser is emitted in the vertical direction) are used, the distance information of a line perpendicular to the ground on the surface of the object and the distance information of a point outside the line can be obtained. The distance information on the horizontal direction of the object surface is discontinuous, with only two points in the horizontal direction, and the distance information on the vertical direction of the object surface is continuous. The robot's route is relatively smooth, and it can maintain a relatively small safety distance from the object.
[0072] Line laser sensors (emitting line lasers horizontally) and line laser sensors (emitting line lasers vertically) can obtain distance information of a line on the surface of an object parallel to the ground + distance information of a line on the surface of an object perpendicular to the ground. If the horizontal distance information on the surface of an object is continuous and the vertical distance information on the surface of an object is continuous, the robot's route is relatively smooth and it can maintain a relatively minimum safe distance from the object.
[0073] When the line laser sensor emits a line laser in the horizontal direction, it can obtain the distance information of a line on the surface of the object parallel to the ground. When the line laser sensor emits a line laser in the vertical direction, it can obtain the distance information of a line on the surface of the object perpendicular to the ground.
[0074] In addition, the present invention also provides a method for moving a sweeping robot. Figure 3 , which is a schematic diagram of a method flow of an embodiment of a sweeping robot moving method of the present invention. When the processor 12 of the electronic device 1 executes the sweeping robot moving program 10 stored in the memory 11, the sweeping robot moving method implements the following steps:
[0075] Step S10: Based on a first preset number of point laser sensors pre-configured in the moving direction of the sweeping robot, detect in real time whether there are obstacles in the moving direction of the robot.
[0076] In this embodiment, in order to enable the sweeping robot to move parallel to the wall, or along the wall of furniture such as a wardrobe or table, a first preset number of point laser sensors can be pre-configured in the direction of travel of the sweeping robot to detect in real time whether there are obstacles in the direction of movement of the robot, so as to effectively control the distance between the sweeping robot and the wall when it moves forward. The first preset number is greater than or equal to 1, and the specific number can be configured according to actual needs. Furthermore, in order to accurately detect the distance to the wall, the first preset number of point laser sensors are located on both sides of the center of the driving wheel axle of the robot.
[0077] Step S20: When an obstacle is detected in the moving direction of the robot, the distance between the robot and the obstacle is acquired in real time based on the first preset number of point laser sensors, and it is determined in real time whether the distance is equal to a first preset value.
[0078] In this embodiment, when the point laser sensor detects that there is an obstacle in the moving direction of the sweeping robot, the distance between the robot and the obstacle is obtained in real time according to a first preset number of point laser sensors, and it is determined in real time whether the distance is equal to a first preset value. When the obstacle (e.g., a wall) is a flat wall, multiple point laser sensors obtain the distance between the sweeping robot and the wall almost at the same time. When the wall is uneven, there will be a point laser sensor that first receives the echo signal to obtain the distance to the wall. Therefore, the distance obtained by the point laser sensor that first receives the echo signal can be used as the distance between the sweeping robot and the obstacle. Specifically, the distance between the sweeping robot and the obstacle can be determined according to the product of the laser round-trip time of the point laser sensor and the speed of light. The first preset value can be set according to the actual scene. For example, the first preset value is 5 cm.
[0079] Step S30: When the distance between the robot and the obstacle is equal to a first preset value, an edge operation is performed on the robot based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle, wherein at least one line laser sensor among the second preset number of line laser sensors emits a linear laser in a direction perpendicular to the ground.
[0080] In this embodiment, since the point laser distance sensor can only obtain the spacing at the same height as the point laser distance sensor, there is still a risk of collision with the wall at positions other than the shell at the same height as the point light source distance sensor on the sweeping robot. Therefore, when the distance between the sweeping robot and the obstacle is equal to the first preset value, the robot can be operated along the edge according to the second preset number of line laser sensors pre-configured in the moving direction of the sweeping robot and the distance between the robot and the obstacle, wherein at least one of the second preset number of line laser sensors emits a linear laser in a direction perpendicular to the ground. Furthermore, in order to accurately detect the distance to the irregular wall, the second preset number of line laser sensors are located on both sides of the center of the driving wheel axle of the robot. The detection range of the line laser sensor can be a 90-degree line laser.
[0081] Further, performing edge operation on the robot includes:
[0082] Based on the second preset number of line laser sensors, the distance between the robot and each edge reference point of the obstacle is read, where each edge reference point is a projection point when the linear laser emitted by each line laser sensor in a direction perpendicular to the ground measures the distance to the obstacle;
[0083] Filtering out a minimum distance from the distances between the robot and each reference point along the edge of the obstacle, and determining a difference between the minimum distance obtained by filtering out and a first preset value;
[0084] When the minimum distance obtained by screening is greater than or equal to the first preset value, the robot is operated to approach the obstacle, and when the minimum distance obtained by screening is less than the first preset value, the robot is operated to move away from the obstacle. By screening the minimum distance from the distances between the edge reference points of the sweeping robot and the obstacle, and performing the edge operation based on the comparison between the minimum distance and the first preset value, the sweeping robot can be effectively ensured to move along an uneven wall surface, preventing the sweeping robot from bumping into something.
[0085] In one embodiment, the second preset number is greater than 2, and at least one line laser sensor in the second preset number of line laser sensors emits a linear laser in a direction parallel to the ground.
[0086] Step S40: When the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, performing a deceleration operation on the robot, wherein the second preset value is greater than the first preset value.
[0087] In this embodiment, when the distance between the cleaning robot and the obstacle is greater than a first preset value and less than a second preset value, a deceleration operation is performed on the cleaning robot, wherein the second preset value is greater than the first preset value. The deceleration operation on the robot includes:
[0088] When the line laser sensor located in front of the center of the driving wheel shaft of the robot detects the obstacle, the robot is subjected to a rightward rotation deceleration operation;
[0089] When the obstacle is detected by the line laser sensor located at the rear side of the center of the driving wheel shaft of the robot, a left rotation deceleration operation is performed on the robot.
[0090] In one embodiment, the directions of the point laser sensor and the line laser sensor can also be set. For example, when the point laser sensor (point laser is emitted in the vertical direction) and the line laser sensor (line laser is emitted in the vertical direction) are used, the distance information of a line perpendicular to the ground on the surface of the object and the distance information of a point outside the line can be obtained. The distance information on the horizontal direction of the object surface is discontinuous, with only two points in the horizontal direction, and the distance information on the vertical direction of the object surface is continuous. The robot's route is relatively smooth, and it can maintain a relatively small safety distance from the object.
[0091] Line laser sensors (emitting line lasers horizontally) and line laser sensors (emitting line lasers vertically) can obtain distance information of a line on the surface of an object parallel to the ground + distance information of a line on the surface of an object perpendicular to the ground. If the horizontal distance information on the surface of an object is continuous and the vertical distance information on the surface of an object is continuous, the robot's route is relatively smooth and it can maintain a relatively minimum safe distance from the object.
[0092] When the line laser sensor emits a line laser in the horizontal direction, it can obtain the distance information of a line on the surface of the object parallel to the ground. When the line laser sensor emits a line laser in the vertical direction, it can obtain the distance information of a line on the surface of the object perpendicular to the ground.
[0093] In addition, the embodiment of the present invention also proposes a computer-readable storage medium, which can be any one or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, etc. The computer-readable storage medium includes a sweeping robot mobile program 10, and the sweeping robot mobile program 10 implements the following operations when executed by a processor:
[0094] Based on a first preset number of point laser sensors pre-configured in the moving direction of the sweeping robot, real-time detection is performed to determine whether there are obstacles in the moving direction of the robot;
[0095] When an obstacle is detected in the moving direction of the robot, the distance between the robot and the obstacle is acquired in real time based on the first preset number of point laser sensors, and whether the distance is equal to a first preset value is determined in real time;
[0096] When the distance between the robot and the obstacle is equal to a first preset value, based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle, performing an edge operation on the robot, wherein at least one line laser sensor of the second preset number of line laser sensors emits a linear laser in a direction perpendicular to the ground;
[0097] When the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, a deceleration operation is performed on the robot, wherein the second preset value is greater than the first preset value.
[0098] The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the specific implementation of the above-mentioned sweeping robot moving method, and will not be described in detail here.
[0099] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, an electronic device, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0101] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A sweeping robot moving method, applied to an electronic device, It is characterized in that The method comprises: Based on a first preset number of point laser sensors pre-configured in the moving direction of the sweeping robot, real-time detection is performed to determine whether there are obstacles in the moving direction of the robot; When an obstacle is detected in the moving direction of the robot, the distance between the robot and the obstacle is acquired in real time based on the first preset number of point laser sensors, and whether the distance is equal to a first preset value is determined in real time; When the distance between the robot and the obstacle is equal to a first preset value, performing an edge operation on the robot based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle, wherein the second preset number is greater than 2, at least one of the second preset number of line laser sensors emits a linear laser in a direction perpendicular to the ground, and at least one of the second preset number of line laser sensors emits a linear laser in a direction parallel to the ground; When the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, a deceleration operation is performed on the robot, wherein the second preset value is greater than the first preset value.
2. The method for moving a sweeping robot according to claim 1, It is characterized in that The first preset number of point laser sensors are located on both sides of the center of the driving wheel axle of the robot, and the second preset number of line laser sensors are located on both sides of the center of the driving wheel axle of the robot.
3. The sweeping robot moving method according to claim 2, It is characterized in that When the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, performing a deceleration operation on the robot includes: When the line laser sensor located in front of the center of the driving wheel shaft of the robot detects the obstacle, the robot is subjected to a rightward rotation deceleration operation; When the obstacle is detected by the line laser sensor located at the rear side of the center of the driving wheel shaft of the robot, a left rotation deceleration operation is performed on the robot.
4. The method for moving a sweeping robot according to claim 1, It is characterized in that The performing edge operation on the robot based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle comprises: Based on the second preset number of line laser sensors, the distance between the robot and each edge reference point of the obstacle is read, where each edge reference point is a projection point when the linear laser emitted by each line laser sensor in a direction perpendicular to the ground measures the distance to the obstacle; Filtering out a minimum distance from the distances between the robot and each reference point along the edge of the obstacle, and determining a difference between the minimum distance obtained by filtering out and a first preset value; When the minimum distance obtained by screening is greater than or equal to a first preset value, the robot is operated to approach the obstacle; when the minimum distance obtained by screening is less than the first preset value, the robot is operated to move away from the obstacle.
5. An electronic device, the electronic device include: A memory and a processor, wherein the memory stores a sweeping robot movement program, and the sweeping robot movement program is executed by the processor to implement the following steps: Based on a first preset number of point laser sensors pre-configured in the moving direction of the sweeping robot, real-time detection is performed to determine whether there are obstacles in the moving direction of the robot; When an obstacle is detected in the moving direction of the robot, the distance between the robot and the obstacle is acquired in real time based on the first preset number of point laser sensors, and whether the distance is equal to a first preset value is determined in real time; When the distance between the robot and the obstacle is equal to a first preset value, performing an edge operation on the robot based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle, wherein the second preset number is greater than 2, at least one of the second preset number of line laser sensors emits a linear laser in a direction perpendicular to the ground, and at least one of the second preset number of line laser sensors emits a linear laser in a direction parallel to the ground; When the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, a deceleration operation is performed on the robot, wherein the second preset value is greater than the first preset value.
6. The electronic device as claimed in claim 5, It is characterized in that The first preset number of point laser sensors are located on both sides of the center of the driving wheel axle of the robot, and the second preset number of line laser sensors are located on both sides of the center of the driving wheel axle of the robot.
7. The electronic device as claimed in claim 6, It is characterized in that When the distance between the robot and the obstacle is greater than a first preset value and less than a second preset value, performing a deceleration operation on the robot includes: When the line laser sensor located in front of the center of the driving wheel shaft of the robot detects the obstacle, the robot is subjected to a rightward rotation deceleration operation; When the obstacle is detected by the line laser sensor located at the rear side of the center of the driving wheel shaft of the robot, a left rotation deceleration operation is performed on the robot.
8. The electronic device as claimed in claim 5, It is characterized in that The performing edge operation on the robot based on a second preset number of line laser sensors pre-configured in the moving direction of the robot and the distance between the robot and the obstacle comprises: Based on the second preset number of line laser sensors, the distance between the robot and each edge reference point of the obstacle is read, where each edge reference point is a projection point when the linear laser emitted by each line laser sensor in a direction perpendicular to the ground measures the distance to the obstacle; Filtering out a minimum distance from the distances between the robot and each reference point along the edge of the obstacle, and determining a difference between the minimum distance obtained by filtering out and a first preset value; When the minimum distance obtained by screening is greater than or equal to the first preset value, the robot is operated to approach the obstacle; when the minimum distance obtained by screening is less than the first preset value, the robot is operated to move away from the obstacle.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a sweeping robot movement program. When the sweeping robot movement program is executed by a processor, the steps of the sweeping robot movement method according to any one of claims 1 to 4 can be implemented.
