Obstacle avoidance method of sweeping robot, sweeping robot and storage medium
By using collision sensors in sweeping robots to obtain obstacle coordinates and generate virtual walls, the problem of unstable obstacle avoidance along the edge of traditional sweeping robots is solved, effectively identifying and avoiding obstacles on low reflective surfaces is achieved, and equipment costs are reduced.
Patent Information
- Application Number
- CN202411134454.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-01
AI Technical Summary
The existing sweeping robots have height restrictions and blind spots along the edge obstacle avoidance sensors, which cannot effectively identify and avoid obstacles with low reflection surfaces, resulting in high costs and unstable obstacle avoidance.
The coordinates of the obstacle are obtained through the collision sensor, the collision coordinate curve is determined, and a virtual wall is generated in the electronic map, so that the sweeping robot can bypass the obstacles during the cleaning process.
It improves the stability of the sweeping robot to avoid obstacles along the edge, and at the same time reduces the cost of equipment, and realizes effective obstacle avoidance of obstacles made of different reflective materials.
Smart Images

Figure CN118873048A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular to an obstacle avoidance method for a sweeping robot, a sweeping robot, and a storage medium. Background Art
[0002] As an intelligent device serving humans, users usually control the movement of robots when they perform certain tasks. The sweeping robot performs tasks in a certain area. Before the task is completed, the sweeping robot cannot cross the execution area. For example, the execution area of the sweeping robot can be limited by using the obstruction signal generated by the virtual wall generation device, or a certain robot-recognizable pattern can be used to form a virtual obstacle boundary to limit the sweeping robot from crossing the domain, thereby enabling the sweeping robot to avoid obstacles.
[0003] At present, existing sweeping robots usually use edge obstacle avoidance sensors for edge obstacle avoidance, but edge obstacle avoidance sensors have height restrictions. For example, laser radar can only scan obstacles that are higher than its scanning plane, and cannot avoid obstacles that are lower than its scanning plane. Other TOF, line laser sensors, etc. also have blind spots to varying degrees. For example, infrared edge obstacle avoidance sensors have certain requirements for the material of the edge surface, cannot sense obstacles on low-reflective surfaces, and the distance for edge obstacle avoidance for obstacles with different reflective materials is unstable. In summary, existing edge obstacle avoidance sensors require additional material and labor costs, and have blind spots for obstacle materials or obstacle heights, resulting in the inability of sweeping robots to stably avoid obstacles along the edge. Summary of the invention
[0004] The embodiments of the present application provide an obstacle avoidance method for a sweeping robot, a sweeping robot, and a storage medium. The coordinates of a collision point are determined by a collision sensor, and a collision coordinate curve is determined based on the coordinates of the collision point. A virtual wall is then generated in an electronic map, so that the sweeping robot can avoid obstacles according to the virtual wall during the cleaning process. The present application can improve the stability of the sweeping robot in avoiding obstacles along the edge, while reducing the cost of the sweeping robot.
[0005] The embodiments of the present application provide the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides an obstacle avoidance method for a sweeping robot, which is applied to the sweeping robot, the sweeping robot includes a collision sensor, and the method includes:
[0007] Obtain an electronic map of the target cleaning area;
[0008] During the cleaning process, the collision sensor is used to obtain the coordinates of the collision point and mark the collision point on the electronic map;
[0009] According to the coordinates of the collision point, a collision coordinate curve is determined;
[0010] According to the collision coordinate curve, a virtual wall is generated in the electronic map, so that the sweeping robot can avoid obstacles according to the virtual wall during the next cleaning process.
[0011] In some embodiments, the cleaning robot includes a laser radar, and the method further includes:
[0012] Determine whether this cleaning is the first cleaning of the target cleaning area;
[0013] If this cleaning is the first cleaning of the target cleaning area, the target cleaning area is scanned by the laser radar of the sweeping robot and the geometric information of the target cleaning area is obtained;
[0014] Generate point cloud data of the target cleaning area based on geometric information;
[0015] The target cleaning area is mapped according to the point cloud data to obtain an electronic map, wherein the electronic map includes a plane rectangular coordinate system of the target cleaning area.
[0016] In some embodiments, the method further comprises:
[0017] If this cleaning is not the first cleaning of the target cleaning area, when the distance between the cleaning robot and the virtual wall is a preset distance, the cleaning robot is controlled to decelerate in a direction close to the virtual wall;
[0018] During the deceleration process, it is determined based on the electronic map whether the sweeping robot collides with an obstacle corresponding to the collision point at the coordinates of the collision point;
[0019] If the cleaning robot does not collide with the obstacle corresponding to the collision point at the coordinates of the collision point, the collision point and the virtual wall corresponding to the collision point are deleted on the electronic map.
[0020] In some embodiments, obtaining the coordinates of the collision point through the collision sensor includes:
[0021] When the collision sensor detects that the sweeping robot collides with an obstacle, the collision point is determined;
[0022] According to the electronic map and the collision point, the coordinates of the collision point are determined.
[0023] In some embodiments, determining a collision coordinate curve according to the coordinates of the collision point includes:
[0024] Obtain the coordinate system curve fitting model;
[0025] The coordinates of the collision point are fitted into a collision coordinate curve through the coordinate system curve fitting model.
[0026] In some embodiments, generating a virtual wall in an electronic map according to the collision coordinate curve includes:
[0027] Get the side brush length of the sweeping robot;
[0028] According to the collision coordinate curve and the side brush length of the sweeping robot, a virtual wall is determined and generated in the electronic map, wherein the collision coordinate curve is parallel to the virtual wall, and the distance between the collision coordinate curve and the virtual wall is equal to the side brush length.
[0029] In some embodiments, the method further comprises:
[0030] If the robot vacuum cleaner collides with a new obstacle during the next cleaning process, the coordinates of the collision point corresponding to the obstacle are determined according to the position of the obstacle;
[0031] According to the collision point coordinates, the collision point coordinates on the electronic map are refitted to obtain an optimized collision coordinate curve;
[0032] According to the optimized collision coordinate curve, an optimized virtual wall is determined, and the optimized virtual wall is updated in the electronic map.
[0033] In some embodiments, the method further comprises:
[0034] Determine whether the cleaning is completed, including:
[0035] Get the cleaning trajectory of the sweeping robot;
[0036] Through the laser radar of the sweeping robot, it is determined whether the target cleaning area scanned by the laser radar is covered by the cleaning track;
[0037] If the target cleaning area scanned by the laser radar is covered by the cleaning track, it is determined that the cleaning is completed;
[0038] If there is a target cleaning area scanned by the laser radar that is not covered by the cleaning track, it is determined that the cleaning is not completed, and the cleaning robot is controlled to clean the area not covered by the cleaning track.
[0039] In a second aspect, an embodiment of the present application provides a sweeping robot, comprising:
[0040] at least one processor; and
[0041] a memory communicatively connected to at least one processor; wherein,
[0042] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the obstacle avoidance method of the cleaning robot as described in the first aspect.
[0043] In a third aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a sweeping robot to execute the obstacle avoidance method of the sweeping robot as in the first aspect.
[0044] The beneficial effects of the embodiments of the present application are as follows: Different from the prior art, the embodiments of the present application provide an obstacle avoidance method for a sweeping robot, which is applied to the sweeping robot, and the sweeping robot includes a collision sensor, and the method includes: obtaining an electronic map of the target cleaning area; during the cleaning process, obtaining the coordinates of the collision point through the collision sensor, and marking the collision point in the electronic map; determining the collision coordinate curve according to the coordinates of the collision point; generating a virtual wall in the electronic map according to the collision coordinate curve, so that the sweeping robot can bypass obstacles according to the virtual wall during the next cleaning process. The coordinates of the collision point are determined by the collision sensor, and the collision coordinate curve is determined according to the coordinates of the collision point, and then a virtual wall is generated in the electronic map, so that the sweeping robot can bypass obstacles according to the virtual wall during the cleaning process. The present application can improve the stability of the sweeping robot in avoiding obstacles along the edge, and at the same time reduce the cost of the sweeping robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] One or more embodiments are exemplarily described by corresponding drawings, which do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and the figures in the drawings do not constitute proportional limitations unless otherwise stated.
[0046] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0047] Figure 2 It is a structural schematic diagram of a sweeping robot provided in an embodiment of the present application;
[0048] Figure 3 is a schematic diagram of an electronic map provided in an embodiment of the present application;
[0049] Figure 4 It is a flowchart of an obstacle avoidance method for a sweeping robot provided in an embodiment of the present application;
[0050] Figure 5 It is a flowchart of determining whether the current cleaning is the first cleaning of the target cleaning area provided by an embodiment of the present application;
[0051] Figure 6 yes Figure 4 A detailed flow chart of step S402 in FIG.
[0052] Figure 7 yes Figure 4 A detailed flow chart of step S403 in FIG.
[0053] Figure 8 yes Figure 4 A detailed flow chart of step S404 in FIG.
[0054] Fig. 9 is a schematic diagram of a side brush of a sweeping robot provided in an embodiment of the present application;
[0055] Fig.10 is a schematic diagram of the positional relationship between a virtual wall and an obstacle provided in an embodiment of the present application;
[0056] Fig.11 It is a schematic diagram of a process for optimizing a virtual wall of an electronic map provided by an embodiment of the present application;
[0057] Fig.12 is a schematic diagram of a process for determining an optimized virtual wall provided by an embodiment of the present application;
[0058] Fig.13 It is a structural schematic diagram of a sweeping robot provided in an embodiment of the present application.
[0059] Description of Figure Numbers:
[0060] Label name Label name 100 Application Scenario 10 Sweeping Robot 20 server 101 Controller 102 Collision Sensor 103 LiDAR 104 Inertial Measurement Unit 111 processor 112 Memory DETAILED DESCRIPTION
[0061] In order to facilitate the understanding of the present application, the present application is described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is described as "fixed to" another element, it can be directly on the other element, or there can be one or more centered elements therebetween. When an element is described as "connected to" another element, it can be directly connected to the other element, or there can be one or more centered elements therebetween. The terms "vertical", "horizontal", "left", "right" and similar expressions used in this specification are for illustrative purposes only.
[0062] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in this specification and in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0063] The technical solution of the present application is described in detail below in conjunction with the accompanying drawings:
[0064] See also Figure 1 , Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0065] like Figure 1 As shown, the application environment 100 includes: a sweeping robot 10 and a server 20, wherein the server can be connected to multiple sweeping robots. In this embodiment, a sweeping robot is used as an example, and the sweeping robot 10 is connected to the server 20 through network communication, wherein the network includes a wired network and / or a wireless network. It can be understood that the network includes wireless networks such as 2G, 3G, 4G, 5G, wireless LAN, Bluetooth, etc., and can also include wired networks such as serial cables and network cables.
[0066] In the embodiment of the present application, the sweeping robot 10 is connected to the server 20 in communication, and the sweeping robot is used to receive control instructions issued by the server 20, for example, receiving a mapping command sent by the server, and mapping the target cleaning area according to the mapping command to obtain an electronic map of the target cleaning area, or receiving a cleaning command sent by the server, and cleaning the target cleaning area according to the cleaning command, or receiving a movement command sent by the server, wherein the movement command includes a cleaning track, and moving and cleaning according to the cleaning track. The sweeping robot is also used to upload the electronic map of the target cleaning area to the server.
[0067] In the embodiment of the present application, the server 20 is connected to the sweeping robot 10 in communication, and the server is used to send control instructions to the sweeping robot 10, for example, sending a mapping instruction to the sweeping robot so that the sweeping robot maps the target cleaning area according to the mapping command to obtain an electronic map of the target cleaning area, or sending a cleaning command to the sweeping robot so that the sweeping robot cleans the target cleaning area according to the cleaning command, or sending a moving command to the sweeping robot, wherein the moving command includes a cleaning trajectory so that the sweeping robot moves and cleans according to the cleaning trajectory. The server 20 can also be used to receive the electronic map of the target cleaning area sent by the sweeping robot 10 and store the electronic map. The number of the servers 20 is multiple, and the multiple servers can constitute a server cluster, for example: the server cluster includes: a first server, a second server, ..., an Nth server, or the server cluster can be a cloud computing service center, which includes several servers. The servers in the embodiment of the present application include but are not limited to: tower servers, rack servers, blade servers, and cloud servers. Preferably, the server is a cloud server (Elastic Compute Service, ECS).
[0068] See also Figure 2, Figure 2 It is a structural schematic diagram of a sweeping robot provided in an embodiment of the present application;
[0069] like Figure 2 As shown, the cleaning robot 10 includes a controller 101, a collision sensor 102, a laser radar 103, and an inertial measurement unit 104;
[0070] In an embodiment of the present application, the controller 101 is connected to the collision sensor 102, the laser radar 103 and the inertial measurement unit 104 respectively, and the controller is used to control the collision sensor 102, the laser radar 103 and the inertial measurement unit 104, for example, to control the opening and closing of the collision sensor, the laser radar and the inertial measurement unit, or to control the laser radar to map the target cleaning area to obtain an electronic map of the target cleaning area. In an embodiment of the present application, the controller can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component or any combination of these components. The controller can also be any traditional processor, controller, microcontroller or state machine. The controller may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP and / or any other such configuration, or a combination of one or more of a microcontroller unit (MCU), a field-programmable gate array (FPGA), or a system on chip (SoC).
[0071] In an embodiment of the present application, a collision sensor 102 is connected to a controller 101, and the collision sensor is composed of a collision plate, an infrared transmitter, and a photodiode. The collision plate is installed at the front end of the sweeping robot, and an infrared transmitter is installed on each side of the robot body near the collision plate. In a state where no collision occurs, the infrared rays emitted by the infrared transmitter can be received by the photodiode through a special small hole. When the infrared rays are successfully received by the photodiode, it indicates that there is no obstacle in front of the sweeping robot at this time; and when the sweeping robot collides with an obstacle, the collision plate moves backward and blocks the small hole. At this time, the photodiode cannot receive infrared rays, indicating that there is an obstacle in the collision direction, and sends a collision signal to the controller, so that the controller controls the sweeping robot to make obstacle avoidance movements.
[0072] In an embodiment of the present application, a laser radar 103 is connected to a controller 101. The laser radar is used to measure the distance between the sweeping robot and objects in the target cleaning area according to a measurement command sent by the controller. The ranging principle is mainly divided into two types: geometric ranging and ToF (Time of flight) ranging. Geometric ranging is to calculate the distance based on the geometric quantitative relationship formed by the emission and refraction of light, wherein the geometric ranging includes triangulation ranging; ToF (Time of flight) ranging is to calculate the distance between the sweeping robot and objects in the target cleaning area based on the flight time and flight speed of light. The laser radar is also used to construct an electronic map of the target cleaning area according to the mapping command sent by the controller. Specifically, the laser radar consists of three parts: a light source, a beam manipulation and a detector. The laser beam emitted by the light source is deflected by an angle after the beam manipulation, and the detector receives the beam and hits the target object to generate a partial echo of the emission / scattering. The distance from the laser radar to the target point / line is calculated according to the ranging principle. By continuously scanning the objects in the target cleaning area, the geometric information of all points / lines on the object can be obtained, and the point cloud data of the target cleaning area can be generated. After imaging and processing the point cloud data, a two-dimensional / three-dimensional image is generated, that is, an electronic map of the target cleaning area. In the embodiment of the present application, the laser radar includes but is not limited to pulse laser radar, continuous wave laser radar and other radars.
[0073] See also Figure 3 , Figure 3 is a schematic diagram of an electronic map provided in an embodiment of the present application;
[0074] like Figure 3 As shown in the figure, the laser radar can be used to obtain an electronic map of the target cleaning area. Figure 3 Taking the electronic map in as an example, the target cleaning area includes 5 rooms. After the laser radar obtains the electronic map, the sweeping robot will upload the electronic map to the server, so that the server plans the cleaning route of the sweeping robot according to the electronic map.
[0075] In an embodiment of the present application, an inertial measurement unit 104 is connected to a controller 101. The inertial measurement unit (IMU) is composed of a gyroscope and an accelerometer. The gyroscope is used to measure the angular velocity of the sweeping robot, integrate the angular velocity, and then calculate the current position of the sweeping robot in real time; the accelerometer is used to measure the acceleration of the sweeping robot. The linear acceleration can be measured using the a=F / M principle. The linear acceleration is integrated once to obtain the velocity, and the velocity is integrated twice to obtain the displacement. Combined with the direction information measured by the gyroscope and the displacement information measured by the accelerometer, the position information of the sweeping robot relative to the initial point can be obtained in real time, so as to monitor the position and cleaning trajectory of the sweeping robot when the sweeping robot is cleaning.
[0076] It can be understood that the sweeping robot also includes a communication module and a storage module, wherein the communication module is communicatively connected to the server and is used to receive control instructions sent by the server, for example: receiving a mapping command sent by the server, and mapping the target cleaning area according to the mapping command to obtain an electronic map of the target cleaning area, or receiving a cleaning command sent by the server, and cleaning the target cleaning area according to the cleaning command, or receiving a moving command sent by the server, wherein the moving command includes a cleaning trajectory, and moving and cleaning according to the cleaning trajectory. In an embodiment of the present application, the communication module can realize communication with the Internet, wherein the communication module includes but is not limited to WIFI module, ZigBee module, NB_IoT module, 4G module, 5G module, Bluetooth module and other communication units; the storage module includes but is not limited to: FLASH flash memory, NAND flash memory, vertical NAND flash memory (VNAND), NOR flash memory, resistive random access memory (RRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), spin transfer torque random access memory (STT-RAM) and other devices. One or more.
[0077] See also Figure 4 , Figure 4 It is a flowchart of an obstacle avoidance method for a sweeping robot provided in an embodiment of the present application;
[0078] The obstacle avoidance method of the sweeping robot is applied to the sweeping robot, wherein the sweeping robot includes a collision sensor.
[0079] like Figure 4 As shown, the obstacle avoidance method of the sweeping robot includes:
[0080] Step S401: Obtain an electronic map of the target cleaning area;
[0081] Specifically, before the sweeping robot cleans the target cleaning area, an electronic map of the target cleaning area is obtained, wherein, if this cleaning is the first cleaning of the target cleaning area, it is necessary to map the target cleaning area through the laser radar in the sweeping robot to obtain the electronic map of the target cleaning area; if this cleaning is not the first cleaning of the target cleaning area, the electronic map of the target cleaning area uploaded in the last cleaning is directly obtained from the server.
[0082] Please refer to Figure 5 , Figure 5 This is a flow chart of determining whether the current cleaning is the first cleaning of the target cleaning area provided in the embodiment of the present application.
[0083] like Figure 5 As shown, the process of determining whether this cleaning is the first cleaning of the target cleaning area includes:
[0084] Step S501: obtaining the number of times the sweeping robot cleans the target cleaning area;
[0085] Specifically, the sweeping robot records the number of sweeping times each time it sweeps, and obtains the number of sweeping times of the target sweeping area by the current sweeping robot. The number of sweeping times is used to determine whether this sweeping is the first sweep of the target sweeping area in the following steps.
[0086] Step S502: determining whether this cleaning is the first cleaning of the target cleaning area;
[0087] Specifically, according to the number of times the sweeping robot sweeps the target sweeping area, it is determined whether this sweeping is the first sweeping of the target sweeping area. If the number of times the sweeping robot sweeps the target sweeping area is zero, it means that this sweeping is the first sweeping of the target sweeping area, and the process proceeds to step S503; if the number of times the sweeping robot sweeps the target sweeping area is not zero, it means that this sweeping is not the first sweeping of the target sweeping area, and the process proceeds to step S505. It can be understood that when this sweeping is the first sweeping of the target sweeping area, it is necessary to map the target sweeping area. In subsequent sweeping, the virtual wall in the electronic map can be optimized and updated in real time, that is, subsequent sweeping only needs to use the electronic map optimized after the last sweeping. This method can improve the sweeping efficiency of the sweeping robot.
[0088] Step S503: Scanning the target cleaning area through the laser radar of the cleaning robot and obtaining geometric information of the target cleaning area;
[0089] Specifically, if this cleaning is the first cleaning of the target cleaning area, the laser radar of the sweeping robot is used to scan the target cleaning area and obtain the geometric information of the target cleaning area, wherein the laser radar is composed of three parts: a light source, a beam steering and a detector. The laser beam emitted by the light source is angled after beam steering, and the detector receives the beam and hits the target object to generate a partial echo of the emission / scattering. The distance from the laser radar to the target point / line is calculated according to the laser ranging principle. By continuously scanning the objects in the target cleaning area, the geometric information of all points / lines on the surface of the object can be obtained, wherein the geometric information includes the coordinate points on the surface of the object.
[0090] Step S504: generating point cloud data of the target cleaning area according to the geometric information;
[0091] Specifically, point cloud data refers to a set of vectors in a three-dimensional coordinate system. The geometric information scanned by the laser radar is recorded in the form of points. The set of geometric information of multiple points is the point cloud data of the target cleaning area, where the point cloud data includes the three-dimensional coordinates of each point. In some embodiments, the point cloud data also includes color information (RGB) or reflection intensity information (Intensity). Using the principle of laser ranging, the surface of the object is scanned to obtain a large number of coordinate points on the surface of the object to form point cloud data.
[0092] Step S505: Mapping the target cleaning area according to the point cloud data to obtain an electronic map;
[0093] Specifically, after acquiring the point cloud data, a mapping operation is performed on the target cleaning area based on the point cloud data. The mapping operation refers to converting the point cloud data into a three-dimensional model / plane projection map by using point cloud data processing software to obtain an electronic map, wherein the point cloud data processing software includes but is not limited to Bentley Pointools, Open3D, PCL and other software.
[0094] In an embodiment of the present application, since the obstacles in the target cleaning area may change, if this cleaning is not the first cleaning, it is necessary to detect whether the obstacles in the target cleaning area are still located at the collision point recorded on the electronic map. The specific steps of the detection are steps S506 to S511.
[0095] Step S506: When the distance between the cleaning robot and the virtual wall is a preset distance, the cleaning robot is controlled to decelerate in a direction approaching the virtual wall;
[0096] Specifically, if this cleaning is not the first cleaning of the target cleaning area, then during the movement of the sweeping robot, if the distance between the sweeping robot and the virtual wall is a preset distance, the sweeping robot is controlled to decelerate in the direction approaching the virtual wall. It should be noted that the preset distance can be set according to actual conditions. For example, the preset distance is set to 10 centimeters. In an embodiment of the present application, the sweeping robot is controlled to decelerate in the direction approaching the virtual wall until it reaches the position of the virtual wall on the electronic map. This can avoid excessive collision between the sweeping robot and obstacles, causing damage to the sweeping robot.
[0097] Step S507: during the deceleration process, judging whether the sweeping robot collides with an obstacle corresponding to the collision point at the coordinates of the collision point according to the electronic map;
[0098] Specifically, since the obstacles in the target cleaning area may change, it is necessary to determine whether the sweeping robot collides with the obstacle corresponding to the collision point at the coordinates of the collision point according to the electronic map during the deceleration process. If the collision sensor detects that the sweeping robot collides with the obstacle at the coordinates of the obstacle, step S509 is entered; if the collision sensor detects that the sweeping robot does not collide with the obstacle at the coordinates of the obstacle, step S508 is entered.
[0099] Step S508: deleting the collision point and the virtual wall corresponding to the collision point on the electronic map;
[0100] Specifically, if the collision sensor detects that the sweeping robot does not collide with an obstacle at the coordinates of the collision point, it means that there is no obstacle at the coordinates of the collision point. In this case, the collision point and the virtual wall corresponding to the collision point need to be deleted from the electronic map to update the electronic map.
[0101] Step S509: Do not update the electronic map;
[0102] Specifically, if the collision sensor detects that the cleaning robot collides with an obstacle at the coordinates of the collision point, it means that the obstacle is still located at the collision point marked on the electronic map, and the electronic map does not need to be updated.
[0103] Step S402: During the cleaning process, the coordinates of the collision point are obtained through the collision sensor, and the collision point is marked on the electronic map;
[0104] For details, please refer to Figure 6 , Figure 6 yes Figure 4 A detailed flow chart of step S402 in FIG.
[0105] like Figure 6As shown, step S402: during the cleaning process, the coordinates of the collision point are obtained through the collision sensor, and the collision point is marked on the electronic map, including:
[0106] Step S421: When the collision sensor detects that the sweeping robot collides with an obstacle, a collision point is determined;
[0107] Specifically, a collision sensor is used to detect whether the sweeping robot collides with an obstacle. The collision sensor consists of a collision plate, an infrared transmitter and a photodiode. The collision plate is installed at the front end of the sweeping robot, and an infrared transmitter is installed on each side of the robot body near the collision plate. In the absence of a collision, the infrared rays emitted by the infrared transmitter can be received by the photodiode through a special small hole. When the infrared rays are successfully received by the photodiode, it indicates that the sweeping robot has not collided with an obstacle in front of it. When the sweeping robot collides with an obstacle, the collision plate moves backward and blocks the small hole. At this time, the photodiode cannot receive infrared rays, which means that there is an obstacle in the collision direction, and the collision point is then determined.
[0108] Step S422: determining the coordinates of the collision point according to the electronic map and the collision point;
[0109] Specifically, according to the electronic map and the collision point, the collision point is marked on the electronic map. Since a plane rectangular coordinate system of the target cleaning area is built on the electronic map, the coordinates of the collision point can be determined through the plane rectangular coordinate system.
[0110] Step S403: determining a collision coordinate curve according to the coordinates of the collision point;
[0111] For details, please refer to Figure 7 , Figure 7 yes Figure 4 A detailed flow chart of step S403 in FIG.
[0112] like Figure 7 As shown, step S403: determining the collision coordinate curve according to the coordinates of the collision point, including:
[0113] Step S431: obtaining a coordinate system curve fitting model;
[0114] Specifically, a coordinate system curve fitting model is obtained, wherein the coordinate system curve fitting model is used to fit multiple collision points into a collision coordinate curve, and the coordinate system curve fitting model includes but is not limited to a least squares fitting model, a curve fitting model based on local weighted regression, and a polynomial curve fitting model.
[0115] Step S432: fitting the coordinates of the collision point into a collision coordinate curve through a coordinate system curve fitting model;
[0116] Specifically, after the cleaning is completed, the sweeping robot will mark all the collision points in the cleaning on the electronic map, and fit the coordinates of the collision points into a collision coordinate curve through a coordinate system curve fitting model. The collision coordinate curve is used to generate a virtual wall in subsequent steps.
[0117] Step S404: generating a virtual wall in the electronic map according to the collision coordinate curve, so that the sweeping robot can avoid obstacles according to the virtual wall during the next sweeping process;
[0118] For details, please refer to Figure 8 , Figure 8 yes Figure 4 A detailed flow chart of step S404 in FIG.
[0119] like Figure 8 As shown, step S404: generating a virtual wall in the electronic map according to the collision coordinate curve, so that the sweeping robot can avoid obstacles according to the virtual wall during the next sweeping process, including:
[0120] Step S441: obtaining the length of the side brush of the sweeping robot;
[0121] For details, please refer to Fig. 9 , Fig. 9 is a schematic diagram of a side brush of a sweeping robot provided in an embodiment of the present application; Fig. 9 As shown, the sweeping robot includes side brushes, which are generally installed on both sides of the front of the sweeping robot to clean the target cleaning area during the movement of the sweeping robot; the side brush length of the sweeping robot is obtained, wherein the side brush length is the length of the side brush protruding from the sweeping robot, and the side brush length can be set according to actual needs, for example, the side brush length is set to 1.5cm to 2cm.
[0122] Step S442: determining a virtual wall according to the collision coordinate curve and the length of the side brush of the sweeping robot and generating the virtual wall in the electronic map;
[0123] Specifically, according to the collision coordinate curve and the side brush length of the sweeping robot, a virtual wall is determined and generated in the electronic map, wherein the collision coordinate curve is parallel to the virtual wall, and the distance between the collision coordinate curve and the virtual wall is equal to the side brush length. The purpose is to enable the side brush of the sweeping robot to clean the edge of the obstacle, so as to improve the cleaning efficiency of the sweeping robot and ensure that the edges of the obstacle can be cleaned by the sweeping robot.
[0124] In an embodiment of the present application, the present application replaces the functions of hardware structure sensors, such as edge sensors and obstacle avoidance sensors, through software learning algorithms. That is, in terms of hardware, the present application only needs to use collision sensors, without the need to use edge sensors or other obstacle avoidance sensors to avoid obstacles, thereby improving the stability of the edge obstacle avoidance of the sweeping robot and reducing the hardware cost of the sweeping robot.
[0125] Please refer to Fig.10 , Fig.10 is a schematic diagram of the positional relationship between a virtual wall and an obstacle provided in an embodiment of the present application;
[0126] like Fig.10 As shown, the electronic map includes two obstacles, namely obstacle A and obstacle B, wherein obstacle B may also be an actual wall in the target cleaning area. The sweeping robot generates virtual walls corresponding to obstacle A and obstacle B in the electronic map according to the positions of the obstacles, wherein the distance between the obstacle and the virtual wall is the side brush length of the sweeping robot. It can be understood that the sweeping robot cleans along the virtual wall during the cleaning process. The reason for setting the distance between the obstacle and the virtual wall as the side brush length is to enable the area between the virtual wall and the actual obstacle to be cleaned by the side brush of the sweeping robot.
[0127] Please refer to Fig.11 , Fig.11 It is a schematic diagram of a process for optimizing a virtual wall of an electronic map provided by an embodiment of the present application;
[0128] like Fig.11 As shown, the process of optimizing the virtual wall of the electronic map includes:
[0129] Step S1101: If the sweeping robot collides with a new obstacle during the next cleaning process, the coordinates of the collision point corresponding to the obstacle are determined according to the position of the obstacle;
[0130] Specifically, since the obstacles in the target cleaning area may change, the electronic map needs to be updated in real time for each cleaning. The updated electronic map after the last cleaning is obtained. If the sweeping robot collides with a new obstacle during the next cleaning process, the coordinates of the collision point corresponding to the obstacle are determined based on the position of the obstacle, where the new obstacle refers to an obstacle that is not marked in the electronic map.
[0131] Step S1102: refitting the coordinates of all collision points on the electronic map according to the collision point coordinates to obtain an optimized collision coordinate curve;
[0132] Specifically, a coordinate system curve fitting model is obtained, wherein the coordinate system curve fitting model is used to fit multiple collision points into a collision coordinate curve, and the coordinate system curve fitting model includes but is not limited to a least squares fitting model, a curve fitting model based on local weighted regression, and a polynomial curve fitting model. After the current cleaning is completed, the sweeping robot will mark the coordinates of all collision points in this cleaning on the electronic map, and refit the coordinates of all collision points on the electronic map through the coordinate system curve fitting model to obtain an optimized collision coordinate curve, which is used to generate a virtual wall in subsequent steps.
[0133] Step S1103: determining an optimized virtual wall according to the optimized collision coordinate curve, and updating the optimized virtual wall in the electronic map;
[0134] Specifically, according to the collision coordinate curve and the side brush length of the sweeping robot, a virtual wall is determined and generated in the electronic map, wherein the collision coordinate curve is parallel to the virtual wall, and the distance between the collision coordinate curve and the virtual wall is equal to the side brush length. The purpose is to enable the side brush of the sweeping robot to clean the edge of the obstacle, so as to improve the cleaning efficiency of the sweeping robot and ensure that the edges of the obstacle can be cleaned by the sweeping robot.
[0135] In the embodiment of the present application, by updating the electronic map after each cleaning, the present application can improve the cleaning efficiency of the sweeping robot and reduce the probability of the sweeping robot colliding with obstacles.
[0136] Please refer to Fig.12 , Fig.12 This is a flow chart of determining whether the cleaning is completed, provided in an embodiment of the present application;
[0137] like Fig.12 As shown, the process of determining whether the cleaning is completed includes:
[0138] Step S1201: Acquire the cleaning trajectory of the sweeping robot;
[0139] Specifically, the cleaning trajectory of the sweeping robot is obtained. In an embodiment of the present application, the sweeping robot will record the current cleaning trajectory during the cleaning process, wherein the cleaning trajectory includes but is not limited to a user-defined cleaning trajectory, a bow-shaped cleaning trajectory, and a random cleaning trajectory.
[0140] Step S1202: using the laser radar of the sweeping robot, determining whether the target cleaning area scanned by the laser radar is covered by the cleaning track;
[0141] Specifically, through the laser radar of the sweeping robot, it is determined whether the target cleaning area scanned by the laser radar is covered by the cleaning track. If the target cleaning area scanned by the laser radar is covered by the cleaning track, step S1203 is entered; if the target cleaning area scanned by the laser radar is not covered by the cleaning track, step S1204 is entered.
[0142] Step S1203: Determine that the cleaning is completed;
[0143] Specifically, if the target cleaning area scanned by the laser radar is covered by the cleaning track, it is determined that the cleaning is completed, the sweeping robot automatically stops the cleaning, and uploads the updated electronic map to the cloud server.
[0144] Step S1204: determining that the current cleaning is not completed, and controlling the cleaning robot to clean the area not covered by the cleaning track;
[0145] Specifically, if the target cleaning area scanned by the laser radar is not covered by the cleaning track, it is determined that the current cleaning is not completed, and the cleaning robot is controlled to clean the area not covered by the cleaning track.
[0146] In an embodiment of the present application, the present application embodiment provides an obstacle avoidance method for a sweeping robot, which is applied to the sweeping robot, the sweeping robot includes a collision sensor, and the method includes: obtaining an electronic map of the target cleaning area; during the cleaning process, obtaining the coordinates of the collision point through the collision sensor, and marking the collision point in the electronic map; determining the collision coordinate curve according to the coordinates of the collision point; generating a virtual wall in the electronic map according to the collision coordinate curve, so that the sweeping robot can bypass the obstacle according to the virtual wall during the next cleaning process. The coordinates of the collision point are determined by the collision sensor, the collision coordinate curve is determined according to the coordinates of the collision point, and then a virtual wall is generated in the electronic map, so that the sweeping robot can bypass the obstacle according to the virtual wall during the cleaning process. The present application can improve the stability of the sweeping robot's obstacle avoidance along the edge, while reducing the cost of the sweeping robot.
[0147] Please refer to Fig.13 , Fig.13 A schematic diagram of the structure of a sweeping robot provided in an embodiment of the present application;
[0148] like Fig.13 As shown, the cleaning robot 10 includes one or more processors 111 and a memory 112. Fig.13 A processor 111 is taken as an example.
[0149] The processor 111 and the memory 112 may be connected via a bus or other means. Fig.13 The example of connecting through bus is taken in the following.
[0150] The processor 111 is used to provide computing and control capabilities to control the sweeping robot 10 to perform corresponding tasks, for example, to control the sweeping robot 10 to perform the obstacle avoidance method of the sweeping robot in any of the above-mentioned method embodiments, the obstacle avoidance method of the sweeping robot comprising: obtaining an electronic map of the target cleaning area; during the cleaning process, obtaining the coordinates of the collision point through a collision sensor, and marking the collision point in the electronic map; determining a collision coordinate curve according to the coordinates of the collision point; and generating a virtual wall in the electronic map according to the collision coordinate curve, so that the sweeping robot can bypass obstacles according to the virtual wall during the next cleaning process.
[0151] The coordinates of the collision point are determined by the collision sensor, and the collision coordinate curve is determined based on the coordinates of the collision point, and then a virtual wall is generated in the electronic map, so that the sweeping robot can avoid obstacles according to the virtual wall during the cleaning process. This application can improve the stability of the sweeping robot in avoiding obstacles along the edge, while reducing the cost of the sweeping robot.
[0152] The processor 111 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0153] The memory 112, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the program instructions / modules corresponding to the obstacle avoidance method of the sweeping robot in the embodiment of the present application. The processor 111 can implement the obstacle avoidance method of the sweeping robot in any of the following method embodiments by running the non-transitory software programs, instructions and modules stored in the memory 112. Specifically, the memory 112 may include a volatile memory (VM), such as a random access memory (RAM); the memory 112 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD) or other non-transitory solid-state storage device; the memory 112 may also include a combination of the above-mentioned types of memory.
[0154] The memory 112 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 112 may optionally include a memory remotely arranged relative to the processor 111, and these remote memories may be connected to the processor 111 via 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.
[0155] One or more modules are stored in the memory 112, and when executed by one or more processors 111, the obstacle avoidance method of the sweeping robot in any of the above method embodiments is executed, for example, the above described Figure 4 The steps shown can also be implemented Figure 2 The functions of each module or unit.
[0156] In the embodiment of the present application, the sweeping robot 10 may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output. The sweeping robot 10 may also include other components for realizing the functions of the device, which will not be described in detail here.
[0157] The embodiment of the present application also provides a non-volatile computer-readable storage medium, such as a memory including a program code, and the program code can be executed by a processor to complete the obstacle avoidance method of the sweeping robot in the above embodiment. For example, the non-volatile computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CDROM), a magnetic tape, a floppy disk, and an optical data storage device.
[0158] The embodiment of the present application also provides a computer program product, which includes one or more program codes, and the program codes are stored in a non-volatile computer-readable storage medium. The processor of the sweeping robot reads the program code from the non-volatile computer-readable storage medium, and the processor executes the program code to complete the method steps of the obstacle avoidance method of the sweeping robot provided in the above embodiment.
[0159] A person skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be accomplished by hardware or by hardware associated with a program code, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0160] Through the description of the above implementation methods, a person of ordinary skill in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, can also be implemented by hardware. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the non-volatile computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as mentioned above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An obstacle avoidance method for a sweeping robot, characterized in that: Applied to a sweeping robot, the sweeping robot includes a collision sensor, and the method includes: Obtain an electronic map of the target cleaning area; During the cleaning process, the coordinates of the collision point are obtained through the collision sensor, and the collision point is marked in the electronic map; Determining a collision coordinate curve according to the coordinates of the collision point; A virtual wall is generated in the electronic map according to the collision coordinate curve, so that the cleaning robot can avoid obstacles according to the virtual wall during the next cleaning process.
2. The method according to claim 1, characterized in that: The cleaning robot includes a laser radar, and the method further includes: Determine whether this cleaning is the first cleaning of the target cleaning area; If this cleaning is the first cleaning of the target cleaning area, the target cleaning area is scanned by the laser radar of the cleaning robot, and geometric information of the target cleaning area is obtained; Generating point cloud data of the target cleaning area according to the geometric information; The target cleaning area is mapped according to the point cloud data to obtain an electronic map, wherein the electronic map includes a plane rectangular coordinate system of the target cleaning area.
3. The method according to claim 1, characterized in that The method further comprises: If the current cleaning is not the first cleaning of the target cleaning area, when the distance between the cleaning robot and the virtual wall is a preset distance, the cleaning robot is controlled to decelerate in a direction approaching the virtual wall; During the deceleration process, judging, according to the electronic map, whether the cleaning robot collides with an obstacle corresponding to the collision point at the coordinates of the collision point; If the cleaning robot does not collide with the obstacle corresponding to the collision point at the coordinates of the collision point, the collision point and the virtual wall corresponding to the collision point are deleted from the electronic map.
4. The method according to claim 1, characterized in that: The step of obtaining the coordinates of the collision point through the collision sensor includes: When the collision sensor detects that the cleaning robot collides with an obstacle, determining the collision point; The coordinates of the collision point are determined according to the electronic map and the collision point.
5. The method according to claim 1, characterized in that Determining the collision coordinate curve according to the coordinates of the collision point includes: Obtain the coordinate system curve fitting model; The coordinates of the collision points are fitted into a collision coordinate curve through a coordinate system curve fitting model.
6. The method according to claim 1, characterized in that Generating a virtual wall in the electronic map according to the collision coordinate curve includes: Obtaining the length of the side brush of the sweeping robot; According to the collision coordinate curve and the side brush length of the sweeping robot, a virtual wall is determined and generated in the electronic map, wherein the collision coordinate curve is parallel to the virtual wall, and the distance between the collision coordinate curve and the virtual wall is equal to the side brush length.
7. The method according to claim 6, characterized in that The method further comprises: If the cleaning robot collides with a new obstacle during the next cleaning process, the coordinates of the collision point corresponding to the obstacle are determined according to the position of the obstacle; refitting the coordinates of all collision points on the electronic map according to the collision point coordinates to obtain an optimized collision coordinate curve; An optimized virtual wall is determined according to the optimized collision coordinate curve, and the optimized virtual wall is updated in the electronic map.
8. The method according to claim 1, characterized in that The method further comprises: Determine whether the cleaning is completed, including: Obtaining a cleaning trajectory of the cleaning robot; By using the laser radar of the sweeping robot, it is determined whether the target cleaning area scanned by the laser radar is covered by the cleaning track; If the target cleaning area scanned by the laser radar is covered by the cleaning track, it is determined that the cleaning is completed; If there is a target cleaning area scanned by the laser radar that is not covered by the cleaning track, it is determined that the cleaning is not completed, and the cleaning robot is controlled to clean the area not covered by the cleaning track.
9. A sweeping robot, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the obstacle avoidance method of the cleaning robot as described in any one of claims 1-8.
10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer storage medium stores a computer program or instruction. When the computer program or instruction is executed, the obstacle avoidance method of the sweeping robot as described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Walking control method of robot and robot
CN119575968A
Cleaning robot control method and apparatus, electronic device, and storage medium
WO2026214708A1
