Obstacle avoidance method and device, mobile purifier and computer readable storage medium
By obtaining obstacle distribution information and converting it into the coordinate system of the mobile purifier, the mobile purifier can plan the obstacle avoidance path, solving the problems of limited sensor detection range and high cost, and achieving more efficient obstacle avoidance and lower equipment costs.
Patent Information
- Application Number
- CN202311868201.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-01
AI Technical Summary
When avoiding obstacles, the mobile purifier is prone to collision with obstacles due to the limited detection range of sensors, and the obstacle avoidance method that relies on the camera equipment is costly.
The identification module obtains the distribution information of obstacles, determines the installation parameters of the identification module, calculates the transformation matrix, converts the distribution information into position information under the coordinate system of the mobile purifier, and plans the moving path based on this information to avoid collision.
It effectively reduces the collision risk between mobile purifiers and obstacles, while reducing equipment costs and improving cleaning efficiency.
Smart Images

Figure CN120233770A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of mobile purifiers, and more specifically, to an obstacle avoidance method, device, mobile purifier, and computer-readable storage medium. Background Art
[0002] In related technologies, mobile purifiers usually use the information obtained by sensors for obstacle avoidance. However, due to the limited detection range of sensors, mobile purifiers are prone to collide with obstacles. In other related technologies, mobile purifiers use the information obtained by camera devices for obstacle avoidance, resulting in a relatively high cost of mobile purifiers. Summary of the Invention
[0003] In view of the above problems, the present application provides an obstacle avoidance method, device, mobile purifier, and computer-readable storage medium, which can effectively reduce the collision between the mobile purifier and obstacles and effectively reduce the equipment cost of the mobile purifier.
[0004] In a first aspect, the present application provides an obstacle avoidance method applied to a mobile purifier. The mobile purifier includes an identification module for determining the distribution information of obstacles. The method includes: determining the installation parameters of the identification module; determining a transformation matrix according to the installation parameters; converting the distribution information into position information in the coordinate system of the mobile purifier according to the transformation matrix; and planning the movement path of the mobile purifier according to the position information to clean the cleaning area.
[0005] In a second aspect, the present application further provides an obstacle avoidance device applied to a mobile purifier. The mobile purifier includes an identification module for determining the distribution information of obstacles. The device includes: a first determination module for determining the installation parameters of the identification module; a second determination module for determining a transformation matrix according to the installation parameters; a third determination module for converting the distribution information into the obstacle position information in the robot coordinate system according to the transformation matrix; and a control module for planning the movement path of the mobile purifier according to the position information to clean the cleaning area.
[0006] In a third aspect, the present application further provides a mobile purifier, including a processor, a memory, and one or more application programs; the one or more application programs are stored in the memory and configured to be executed by the processor to implement the above obstacle avoidance method.
[0007] In a fourth aspect, the present application further provides a computer-readable storage medium, in which program code is stored. When the program code is run by a processor, the above obstacle avoidance method is executed.
[0008] The technical solution provided by this application, this obstacle avoidance method is applied to a mobile purifier. The mobile purifier includes an identification module for determining the distribution information of obstacles, including: determining the installation parameters of the identification module; determining a transformation matrix according to the installation parameters; converting the distribution information into position information in the coordinate system of the mobile purifier according to the transformation matrix; planning the movement path of the mobile purifier according to the position information to clean the cleaning area. Thus, the mobile purifier transforms the distribution information of the obstacles obtained by the identification module into position information in the coordinate system of the mobile purifier, so that the mobile purifier determines the position information of the obstacles in the cleaning area, and enables the mobile purifier to plan the movement path according to the position information of the obstacles, so as to avoid the situation that the mobile purifier collides with the obstacles in the cleaning area during the movement process. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of this application, rather than all embodiments. Based on the embodiments of this application, all other embodiments and drawings obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of this invention.
[0010] Figure 1 It is a schematic flowchart of an obstacle avoidance method provided by an embodiment of this application.
[0011] Figure 2 It is a schematic structural diagram of an identification module provided by an embodiment of this application.
[0012] Figure 3 It is a schematic structural diagram of a roll angle, a pitch angle, and a rotation angle provided by an embodiment of this application.
[0013] Figure 4 It is a schematic structural diagram of a mobile purifier provided by an embodiment of this application.
[0014] Figure 5 It is a schematic structural diagram of a grid point provided by an embodiment of this application.
[0015] Figure 6 It is a schematic structural diagram of an obstacle avoidance device provided by an embodiment of this application.
[0016] Figure 7 It is a schematic structural diagram of another mobile purifier provided by an embodiment of this application.
[0017] Figure 8 It is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] To make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0019] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. In the following description, the term "a plurality" refers to at least two.
[0020] In the following description, the terms "first / second" are merely used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0022] With the development of smart home technology, more and more users will choose a mobile purifier for cleaning. During the cleaning process of the mobile purifier, obstacle avoidance is performed by means of information obtained by a sensor, such as a wired laser sensor or a single-line lidar. However, the detection range of the sensor is limited. For example, the sensor cannot detect obstacles with a height and can only detect obstacles on the ground, resulting in the mobile purifier being prone to collide with obstacles with a height.
[0023] In order to reduce the situation of the mobile purifier colliding with obstacles with a height, in other related technologies, the mobile purifier can perform obstacle avoidance by means of information obtained by a camera device. However, the cost of the camera device is high, resulting in a high cost of the mobile purifier.
[0024] To improve the above problems, the present application provides an obstacle avoidance method, device, mobile purifier and computer-readable storage medium. The obstacle avoidance method is applied to a mobile purifier, and the mobile purifier includes an identification module for determining the distribution information of obstacles, including: determining the installation parameters of the identification module; determining a transformation matrix according to the installation parameters; converting the distribution information into position information in the coordinate system of the mobile purifier according to the transformation matrix; and planning the movement path of the mobile purifier according to the position information to perform cleaning on the cleaning area.
[0025] Thus, the mobile purifier transforms the distribution information of the obstacles obtained by the recognition module into the position information in the coordinate system of the mobile purifier, so that the mobile purifier can determine the position information of the obstacles in the cleaning area, and the mobile purifier plans the movement path according to the position information of the obstacles, so as to avoid the situation that the mobile purifier collides with the obstacles in the cleaning area during the movement process.
[0026] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an obstacle avoidance method provided by an embodiment of the present application. As Figure 1 shown, this method is applied to a mobile purifier, and this method may include steps 110 to 140. The following explains each step.
[0027] In step 110, the installation parameters of the recognition module are determined.
[0028] Among them, the mobile purifier is a floor sweeping robot or an air purifier. It can be understood that the present application is not limited to the mobile purifier being a floor sweeping robot or an air purifier. The mobile purifier indicates a device that can move autonomously in the cleaning area and can obtain the detection data of the cleaning area.
[0029] The cleaning area is the area that the mobile purifier can reach autonomously. For example, the cleaning area is the area of a residence. Another example is that the cleaning area is the area of a room.
[0030] The recognition module is a Time of Flight (ToF) sensor. It can be understood that the present application is not limited to the recognition module being a Time of Flight sensor. The recognition module is a device for obtaining the detection data of the obstacles, and the mobile purifier determines the distribution information of the obstacles according to the detection data obtained by the recognition module.
[0031] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of a recognition module provided by an embodiment of the present application. As Figure 2 shown, the mobile purifier 200 is provided with a recognition module 210, and the detection data obtained by the recognition module 210 is the data on the bottom plane of a square cone with a distance of h and a field of view (FOV) of θ.
[0032] The installation parameters include the position coordinates, roll angle, pitch angle, and yaw angle of the recognition module.
[0033] More specifically, the position coordinates are the position coordinates of the center of the recognition module in the coordinate system of the recognition module. The roll angle is the angle by which the thermoelectric thruster rotates around its own center, that is, the roll angle is the angle of rotation around the X-axis. The pitch angle is the angle at which the thermoelectric thruster is installed obliquely downward relative to the mobile purifier, that is, the pitch angle is the angle of rotation around the Y-axis. The rotation angle is the angle by which the thermoelectric thruster rotates around the mobile purifier, that is, the rotation angle is the angle of rotation around the Z-axis. Among them, the X-axis, Y-axis, and Z-axis are the corresponding X-axis, Y-axis, and Z-axis of the coordinate system of the recognition module.
[0034] More specifically, please refer to Figure 3 , Figure 3 FIG. is a schematic structural diagram of a roll angle, a pitch angle, and a rotation angle provided by an embodiment of the present application. Among them, angle r is the roll angle, angle p is the pitch angle, and angle y is the rotation angle.
[0035] After the mobile purifier determines the position coordinates, roll angle, pitch angle, and yaw angle corresponding to the recognition module, subsequent steps are performed to determine the transformation matrix based on the determined position coordinates, roll angle, pitch angle, and yaw angle, so as to determine the position information of the obstacle distribution information in the coordinate system of the mobile purifier through the transformation matrix, so that the mobile purifier can refer to the position information of the obstacles in the cleaning area to plan the movement path during the movement in the cleaning area, thereby avoiding collisions between the mobile purifier and the obstacles in the cleaning area.
[0036] In step 120, the transformation matrix is determined according to the installation parameters.
[0037] Among them, the transformation matrix is a homogeneous rotation transformation matrix. The homogeneous rotation transformation matrix includes the translation and rotation information between the coordinate system of the recognition module and the coordinate system of the mobile purifier. That is to say, through the installation parameters of the recognition module, the translation and rotation information between the coordinate system of the recognition module and the coordinate system of the mobile purifier is determined, so as to facilitate the subsequent steps of converting the obstacle distribution information in the coordinate system of the recognition module into the position information in the coordinate system of the mobile purifier through the transformation matrix, so that the mobile purifier can know the position information of the obstacles in the cleaning area in real time during the process of planning the movement path or moving, thereby avoiding collisions with the obstacles in time.
[0038] Further, in some embodiments, the step of determining the transformation matrix according to the installation parameters includes the following steps:
[0039] (1) Determine the rotation matrix according to the roll angle, pitch angle, and yaw angle;
[0040] (2) Determine the transformation matrix according to the rotation matrix and the position coordinates.
[0041] Among them, the step of determining the rotation matrix according to the roll angle, pitch angle, and yaw angle can obtain the rotation matrix according to the following formula:
[0042] R = R Z R Y R X ;
[0043] Among them, R is the rotation matrix; R Z is the rotation angle; R y is the pitch angle; R x is the roll angle.
[0044] The mobile purifier determines the rotation information of the coordinate system of the recognition module relative to the coordinate system of the mobile purifier according to the roll angle, pitch angle, and yaw angle of the recognition module, and then combines the position coordinates of the recognition module to obtain the translation information and rotation information of the coordinate system of the recognition module relative to the coordinate system of the mobile purifier. More specifically, the step of determining the transformation matrix according to the rotation matrix and the position coordinates can obtain the transformation matrix according to the following formula:
[0045]
[0046] Among them, H is the transformation matrix (i.e., the homogeneous rotation transformation matrix); R is the rotation matrix; d is the position coordinate.
[0047] In step 130, according to the transformation matrix, the distribution information is converted into the position information in the coordinate system of the mobile purifier.
[0048] Through the transformation matrix including the translation information and rotation information of the coordinate system of the recognition module relative to the coordinate system of the mobile purifier, the distribution information of the obstacles in the coordinate system of the recognition module is converted into the position information in the coordinate system of the mobile purifier.
[0049] More specifically, the step of converting the distribution information into the position information in the coordinate system of the mobile purifier according to the transformation matrix can obtain the position information in the coordinate system of the mobile purifier through the following formula:
[0050]
[0051] Among them, P r is the position information in the coordinate system of the mobile purifier, H is the transformation matrix (i.e., the homogeneous rotation transformation matrix), and P t is the distribution information of the obstacles determined by the recognition module.
[0052] The mobile purifier converts the detection data of the obstacle into distribution information in the coordinate system of the recognition module, and then, according to the transformation matrix, translates and rotates the distribution information in the coordinate system of the recognition module to obtain the position information of the distribution information in the coordinate system of the mobile purifier.
[0053] Among them, the detection data obtained by the recognition module is represented in the form of an array. For example, the detection data obtained by the recognition module is a 4*4 matrix, and the detection data includes a plurality of point cloud data (each element in the array corresponds to a point cloud data, and the value corresponding to each element in the array is the distance from the element to the recognition module).
[0054] The mobile purifier obtains the distribution information of the obstacle in the coordinate system of the recognition module according to the position information of the point cloud data and the distance information between the point cloud data and the recognition module. More specifically, in some embodiments, the method further includes the step of converting the first point cloud data into three-dimensional point cloud data in the coordinate system of the recognition module according to the distance information to obtain the distribution information of the obstacle.
[0055] Among them, the first point cloud data is any one of the plurality of point cloud data. That is, according to the position of each point cloud data in the detection data and the distance between the point cloud data and the recognition module, the position information of the point cloud data in the coordinate system of the recognition module is determined, and then the distribution information of the obstacle is obtained.
[0056] The mobile purifier obtains the detection data of the obstacle in the purification area through the recognition module, determines the distribution information of the obstacle in the coordinate system of the recognition module according to the detection data, and then, with the help of the transformation matrix, converts the distribution information of the obstacle in the coordinate system of the recognition module into the position information in the coordinate system of the mobile purifier. Furthermore, when the mobile purifier plans the cleaning path or moves, it can refer to the position information in the coordinate system of the mobile purifier to avoid the mobile purifier colliding with the obstacles in the cleaning area.
[0057] In actual use, due to the influence of factors such as interference, the detection data obtained by the recognition module fluctuates greatly. That is to say, there is still a certain difference between the obtained position information in the coordinate system of the mobile purifier and the actual situation of the obstacles in the cleaning area, that is, the current position information in the coordinate system of the mobile purifier cannot better reflect the actual position situation of the obstacles in the cleaning area.
[0058] Therefore, it is necessary to screen the position information in the coordinate system of the mobile purifier to complete the elimination of noise and mutation data to obtain position information closer to the actual situation of the obstacles in the cleaning area. More specifically, in some embodiments, the method further includes the step of determining target position data according to the position information.
[0059] Among the position information in the coordinate system of the mobile purifier obtained through the transformation matrix, by screening out the target position data, the actual position of the obstacle can be obtained more accurately, so that the mobile purifier plans and adjusts the moving path of the mobile purifier according to the target position data, and more effectively avoids the situation of the mobile purifier colliding with the obstacles in the cleaning area.
[0060] Furthermore, in some embodiments, the position information includes information of multiple obstacle points, and the information of the obstacle points includes the signal strength corresponding to the obstacle points. The step of determining the target position data according to the position information may include the step: when the signal strength corresponding to the first obstacle point is greater than the first preset threshold, determining the first obstacle point as the target obstacle point to obtain the target position data.
[0061] Among them, the first obstacle point is any one of the multiple obstacle points. From the above description, it can be seen that the mobile purifier obtains the detection data of the obstacles in the purification area through the recognition module. The detection data contains multiple point cloud data. According to the multiple point cloud data, the obstacle distribution information in the coordinate system of the recognition module can be obtained. It can be understood that the obstacle distribution information is also composed of multiple points. Then, through the transformation matrix, the multiple points in the coordinate system of the recognition module are converted into the position information in the coordinate system of the mobile purifier. It can be understood that the position information in the coordinate system of the mobile purifier is also composed of multiple points.
[0062] The obstacle point is any one of the multiple points included in the position information in the coordinate system of the mobile purifier. The first obstacle point is any one of the multiple points included in the position information in the coordinate system of the mobile purifier.
[0063] The position information also includes the information respectively corresponding to the multiple obstacle points. In the embodiments of the present application, the information respectively corresponding to the multiple obstacle points includes the signal strength respectively corresponding to the obstacle points. When the mobile purifier determines that the signal strength corresponding to the obstacle point is greater than the first preset threshold, the obstacle point is determined as the target obstacle point to determine the target position data according to the target obstacle point. Among them, the signal strength corresponding to the obstacle point being greater than the first preset threshold indicates that the obstacle point excludes environmental interference.
[0064] In some embodiments, the information of the obstacle point also includes the height corresponding to the obstacle point. The step of determining the target position data according to the position information may include the step: when the height corresponding to the first obstacle point is greater than the second preset threshold, determining the first obstacle point as the target obstacle point to obtain the target position data.
[0065] The height corresponding to the obstacle point indicates the height between the obstacle point and the ground of the cleaning area. When the mobile purifier determines that the height corresponding to the obstacle point is greater than the second preset threshold, it determines the obstacle point as the target obstacle point, so as to screen the target obstacle point according to the dual conditions of the signal strength and the corresponding height corresponding to the obstacle point, and then determine the target position data. Among them, it is stipulated that the height corresponding to the obstacle point is greater than the second preset threshold to exclude the interference of the ground of the cleaning area on the movement of the mobile purifier, and can also exclude the influence of some short obstacles on the movement of the mobile purifier.
[0066] Exemplarily, the value of the second preset threshold is 10 cm. When the mobile purifier determines that the height corresponding to the obstacle point is greater than 10 cm, it determines the obstacle point with a corresponding height greater than 10 cm as the target obstacle point.
[0067] In order to further reduce factors such as interference, there is still a certain difference between the position information obtained in the coordinate system of the mobile purifier and the actual situation of the obstacles in the cleaning area. In some embodiments, the information of the obstacle point further includes the frequency of continuous appearance of the obstacle point. The step of determining the target position data according to the position information may include the step: when the frequency of continuous appearance of the first obstacle point is greater than the third preset threshold, determining the first obstacle point as the target obstacle point to obtain the target position data.
[0068] The mobile purifier counts the frequency of the appearance of the obstacle point. If the mobile purifier determines that a certain obstacle point is not detected in a certain time, it will restart counting the frequency of the appearance of the obstacle point. When the mobile purifier determines that the frequency of continuous appearance of the obstacle point is greater than the third preset threshold, it determines the obstacle point as the target obstacle point to improve the stability of the position information. That is to say, only when the mobile purifier determines that the frequency of continuous appearance of the obstacle point is greater than the third preset threshold, will the mobile purifier determine that there is an obstacle at the position corresponding to the obstacle point.
[0069] Determine the target obstacle point according to the signal strength, height and continuous appearance frequency corresponding to the obstacle point, so as to determine the target position data according to the target obstacle point, so that the mobile purifier plans and adjusts the movement path according to the target position data, so as to better avoid the collision between the mobile purifier and the obstacles in the cleaning area.
[0070] In step 140, plan the movement path of the mobile purifier according to the position information to perform cleaning processing on the cleaning area.
[0071] The mobile purifier plans the movement path in the cleaning area according to the determined position information (target position information) to avoid the situation that the mobile purifier collides with the obstacles in the cleaning area during the movement process, so as to complete the cleaning processing of the cleaning area.
[0072] In actual use, while the mobile purifier plans a movement path according to the actual situation of obstacles in the cleaning area, the size information of the mobile purifier itself will also affect the normal movement of the mobile purifier. In some embodiments, the steps of planning the movement path of the mobile purifier according to the position information to clean the cleaning area include: planning the movement path of the mobile purifier according to the position information and the size information of the mobile purifier.
[0073] Among them, the size information is information such as the radius of the mobile purifier. The mobile purifier plans the movement path of the mobile purifier according to the position information and information such as the radius of the mobile purifier to avoid the mobile purifier colliding with obstacles in the cleaning area due to the influence of its own size information. Specifically, the mobile purifier performs dilation processing on the obstacles according to the size information and retains the quantity obtained through the dilation processing for a preset time period. In subsequent applications, the global planning module and the local planning module set a movement path with higher feasibility by means of the quantity obtained through the dilation processing to effectively avoid obstacles in the cleaning area.
[0074] Exemplarily, the radius of the mobile purifier is R. If the distance between the mobile purifier and an obstacle in the cleaning area is less than the radius R, the situation where the mobile purifier collides with the obstacle will occur.
[0075] By the recognition module, the distribution of obstacles in the cleaning area is determined. Then, combined with the transformation matrix and the distribution of obstacles in the coordinate system of the recognition module, the position information in the coordinate system of the mobile purifier is obtained. Then, combined with the position information and the size information of the mobile purifier, the mobile purifier expands in the position information in combination with the size information to avoid the distance between the obstacles in the cleaning area and the mobile purifier being less than the size information, thereby avoiding the situation where the mobile purifier collides with the obstacles in the cleaning area during the movement along the movement path with higher feasibility.
[0076] The application scenario of the obstacle avoidance method will be described in detail below. Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a mobile purifier provided by an embodiment of the present application. As Figure 4 shown, Figure 4 the mobile purifier in
[0077] includes a global planning module 220, a local planning module 230, and a speed processing module 240.
[0078] The local planning module 230 is used to extract a smaller movement path from the globally optimal movement path, and combine the map information of the cleaning area and the position information of the obstacles determined in the above embodiments to obtain the speed information of the mobile purifier.
[0079] The speed processing module 240 is used to perform smoothing processing on the speed information obtained by the local planning module 230, so that the chassis of the mobile purifier moves according to the smoothed speed information.
[0080] In some embodiments, the global planning module 220 plans the global movement path of the mobile purifier from the starting point to the ending point according to the position information of the obstacles determined in the above embodiments and the map information of the cleaning area (for example, the distribution information of the walls in the cleaning area), etc.
[0081] It can be understood that there may be multiple globally optimal movement paths determined by the global planning module 220. In order to determine the globally optimal movement path (the globally optimal movement path is the optimal path for the mobile purifier to move from the starting point to the ending point) among multiple globally optimal movement paths, the global planning module 220 combines a search algorithm to determine the globally optimal movement path.
[0082] In some embodiments, the global planning module 220 combines the A* search algorithm (i.e., the search algorithm is the A* search algorithm) to determine the globally optimal movement path. In some embodiments, the global planning module 220 combines Dijkstra's algorithm (i.e., the search algorithm is Dijkstra's algorithm) to determine the globally optimal movement path.
[0083] The following takes the global planning module 220 combining the A* search algorithm to determine the globally optimal movement path as an example to illustrate the process of the global planning module 220 determining the globally optimal movement path. More specifically:
[0084] When the global planning module 220 starts planning the globally optimal movement path, it first judges the legality of the starting point and the ending point of the mobile purifier, and then evaluates the movement cost (that is, the sum of the cost from the current position point of the mobile purifier to a certain path point and the cost from that path point to the ending point of the mobile purifier) for each path point based on the breadth-first search defined by the priority, so as to calculate and obtain the globally optimal movement path.
[0085] Among them, the determination process of the path point is as follows: the global planning module 220 traverses the 9 grid points adjacent to each point from the starting point to the ending point of the mobile purifier, calculates the cost corresponding to the 9 grid points adjacent to each point, and determines the grid point with the minimum cost among the 9 adjacent grid points as the path point. In some embodiments, sparsification is performed on the obtained path points. For example, any path point is selected from 4 adjacent path points as the final path point.
[0086] Exemplarily, please refer to Figure 5 , Figure 5 which is a schematic structural diagram of a grid point provided by an embodiment of the present application. The cost of any grid point can be obtained according to the following formula:
[0087] f(n) = g(n) + h(n);
[0088] where n is the serial number of the current grid point; g(n) is the cost from the starting point to the current point; h(n) is the cost from the current grid point to the end point.
[0089] Among them, the cost g(n) from the starting point to the current point can be obtained according to the following formula:
[0090] g(n) = f(n - 1) + m + d * k + t * r;
[0091] where m is the movement cost; d is the cost of this grid point on the map; k is the map scale factor; t is the obstacle cost; r is the obstacle system.
[0092] The movement cost is the cost of moving from the previous grid point to the current grid point. In some embodiments, when the movement from the previous grid point to the current grid point is a straight line, the movement cost can be taken as 10; when the movement from the previous grid point to the current grid point is a diagonal line, the movement cost can be taken as 14.
[0093] The cost of this grid point on the map indicates the road condition of the position of this grid point on the map; in some embodiments, if the road condition of the position of this grid point on the map is a wall, d is taken as 100; if the road condition of the position of this grid point on the map is an empty road, d is taken as 0; if the road condition of the position of this grid point on the map is muddy ground, d is taken as 15.
[0094] The obstacle cost indicates the distance from this grid point to the obstacle. The farther the distance from the obstacle, the smaller the value of the obstacle cost.
[0095] The value of the cost h(n) from the current grid point to the end point can be obtained according to the following formula:
[0096] h(n) = l1 + l2 * n;
[0097] where l1 is the Manhattan distance; l2 is the straight line deviation; n is the deviation cost coefficient.
[0098] The Manhattan distance is the distance value (Δx + Δy) of this grid point to the end point on the x-axis and y-axis; the straight line deviation is the distance between the starting point and the end point.
[0099] After the global planning module 220 calculates the globally optimal movement path through the above A* search algorithm, it sends the globally optimal movement path to the local planning module 230. The local planning module 230 extracts a small movement sub-path in front of the current position, the path points included in the globally optimal movement path, and the end point.
[0100] The local planning module 230 determines whether the mobile purifier has reached the end point of the globally optimal movement path based on the current position and the end point of the globally optimal movement path. If the mobile purifier has not reached the end point of the globally optimal movement path, the local planning module 230 calls the Time-Elastic-Band (TED) algorithm to obtain the speed information of the mobile purifier moving on a small movement sub-path in front of the extracted current position according to the map information of the cleaning area and the position information of the obstacles determined in the above embodiments.
[0101] In some embodiments, if the local planning module 230 fails to calculate the speed information by calling the Time-Elastic-Band algorithm for a preset number of times, it is determined that the local path planning fails. Among them, the preset number of times can be determined according to the actual situation. For example, the preset number of times can be set to 5 times.
[0102] The local planning module 230 sends the determined speed information to the speed processing module 240. The speed processing module 240 smooths the speed information so that the speed in the speed information planned by the local planning module 230 changes more smoothly over time, thereby preventing the mobile purifier from jittering during movement.
[0103] It should be noted that the local planning module 230 uses a weighted sliding filter and can obtain the smoothed speed information according to the following formula:
[0104] c v(n) = k1*v(n - 2)+k2*v(n - 1)+k3*v(n)+k4*c v(n-2) +k5*c v(n-1) ;
[0105] where c v(n) is the smoothed speed information, n is the time, v is the speed information calculated by the local planning module 230, and k is the corresponding weight.
[0106] After the speed processing module 240 smooths the speed information sent by the local planning module 230, it sends the control instruction corresponding to the smoothed speed information to the chassis of the mobile purifier at a speed of 20 Hz, so that the chassis of the mobile purifier works at the smoothed speed information, so that the mobile purifier moves in the cleaning area.
[0107] Please refer toFigure 6 , Figure 6 FIG. Figure 6 is a schematic structural diagram of an obstacle avoidance device provided by an embodiment of the present application, which is applied to a mobile purifier. The mobile purifier includes an identification module for determining the distribution information of obstacles. The obstacle avoidance device 300 includes: a first determination module 310, a second determination module 320, a third determination module 330, and a control module 340. Specifically:
[0108] The first determination module 310 is configured to determine the installation parameters of the identification module;
[0109] The second determination module 320 is configured to determine a transformation matrix according to the installation parameters;
[0110] The third determination module 330 is configured to convert the distribution information into obstacle position information in the robot coordinate system according to the transformation matrix;
[0111] The control module 340 is configured to plan the movement path of the mobile purifier according to the position information to clean the cleaning area.
[0112] In some embodiments, the installation parameters include the position coordinates, roll angle, pitch angle, and yaw angle of the identification module. The second determination module 320 includes a first determination unit and a second determination unit, where:
[0113] The first determination unit is configured to determine a rotation matrix according to the roll angle, pitch angle, and yaw angle;
[0114] The second determination unit is configured to determine a transformation matrix according to the rotation matrix and the position coordinates.
[0115] In some embodiments, the identification module is configured to obtain detection data of obstacles. The detection data includes a plurality of point cloud data and the distance information between the point cloud data and the identification module. The obstacle avoidance device 300 further includes a conversion module, where:
[0116] The conversion module is configured to convert the first point cloud data into three-dimensional point cloud data in the coordinate system of the identification module according to the distance information to obtain the distribution information of obstacles; the first point cloud data is any one of the plurality of point cloud data
[0117] In some embodiments, the obstacle avoidance device 300 further includes a fourth determination module, where:
[0118] The fourth determination module is configured to determine target position data according to the position information;
[0119] In some embodiments, the control module further includes a control unit, where:
[0120] The control unit is configured to plan the movement path of the mobile purifier according to the target position data.
[0121] In some embodiments, the position information includes information of a plurality of obstacle points, the information of the obstacle points includes the signal strength corresponding to the obstacle points, and the fourth determination module includes a third determination unit, where:
[0122] The third determination unit is configured to determine a first obstacle point as a target obstacle point when the signal strength corresponding to the first obstacle point is greater than a first preset threshold, so as to obtain target position data; where the first obstacle point is any one of the plurality of obstacle points.
[0123] In some embodiments, the information of the obstacle points further includes the height corresponding to the obstacle points, and the fourth determination module includes a fourth determination unit, where:
[0124] The fourth determination unit is configured to determine a first obstacle point as a target obstacle point when the height corresponding to the first obstacle point is greater than a second preset threshold, so as to obtain target position data.
[0125] In some embodiments, the information of the obstacle points further includes the frequency of continuous occurrence of the obstacle points, and the fourth determination module includes a fifth determination unit, where:
[0126] The fifth determination unit is configured to determine a first obstacle point as a target obstacle point when the frequency of continuous occurrence of the first obstacle point is greater than a third preset threshold, so as to obtain target position data.
[0127] In some embodiments, the control module 340 includes a control unit, where;
[0128] The control unit is configured to plan a movement path of the mobile purifier according to the position information and the size information of the mobile purifier.
[0129] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0130] In several embodiments provided in the present application, the coupling, direct coupling, or communication connection between the modules shown or discussed with each other may be through some interfaces. The indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical, or other form.
[0131] In addition, in each embodiment of the present application, the various functional modules may be integrated into one processing module, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0132] Please refer to Figure 7 ,Figure 7 It is a schematic structural diagram of another mobile purifier provided by an embodiment of the present application. The mobile purifier 400 in the present application may include one or more of the following components: a processor 410, a memory 420, and one or more application programs. One or more application programs may be stored in the memory 420 and configured to be executed by one or more processors 410. One or more programs are configured to execute the obstacle avoidance method described in the foregoing method embodiments.
[0133] The processor 410 may include one or more processing cores. The processor 410 connects various parts within the entire mobile purifier 400 through various interfaces and lines. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 420, and by calling data stored in the memory 420, it executes various functions of the cooking device 400 and processes data. Optionally, the processor 410 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 410 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs, etc.; the GPU is responsible for rendering and drawing display content; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 410 and may be implemented separately through a communication chip.
[0134] The memory 420 may include random access memory (RAM) and may also include read-only memory. The memory 420 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 420 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for implementing at least one function, instructions for implementing the following method embodiments, etc. The data storage area may also store data created during the use of the mobile purifier 400.
[0135] Please refer to Figure 8 , Figure 8FIG. 0 is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of the present application. Program code is stored in the computer-readable medium 500, and the program code can be called by a processor to execute the obstacle avoidance method described in the above method embodiment.
[0136] The computer-readable storage medium 500 may be an electronic memory such as a flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 500 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 500 has a storage space for program code 510 that executes any method step in the above method. These program codes can be read out from or written into one or more computer program devices. The program code 510 may be compressed in an appropriate form, for example.
[0137] An obstacle avoidance method, device, mobile purifier, and computer-readable storage medium provided by an embodiment of the present application. The obstacle avoidance method is applied to a mobile purifier, and the mobile purifier includes an identification module for determining the distribution information of obstacles, including: determining the installation parameters of the identification module; determining a transformation matrix according to the installation parameters; converting the distribution information into position information in the coordinate system of the mobile purifier according to the transformation matrix; and planning the movement path of the mobile purifier according to the position information to perform a cleaning process on the cleaning area. Thus, the mobile purifier transforms the distribution information of the obstacles obtained by the identification module into position information in the coordinate system of the mobile purifier, so that the mobile purifier determines the position information of the obstacles in the cleaning area, and then the mobile purifier plans the movement path according to the position information of the obstacles to avoid collisions between the mobile purifier and the obstacles in the cleaning area.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An obstacle avoidance method, characterized in that, Applied to a mobile purifier, the mobile purifier includes an identification module for determining the distribution information of obstacles, and the method includes: Determine the installation parameters of the identification module; Determine a transformation matrix according to the installation parameters; Convert the distribution information into position information in the coordinate system of the mobile purifier according to the transformation matrix; Plan the movement path of the mobile purifier according to the position information to clean the cleaning area.
2. The obstacle avoidance method according to claim 1, characterized in that The installation parameters include the position coordinates, roll angle, pitch angle, and yaw angle of the identification module; The determining the transformation matrix according to the installation parameters includes: Determine a rotation matrix according to the roll angle, the pitch angle, and the yaw angle; Determine the transformation matrix according to the rotation matrix and the position coordinates.
3. The obstacle avoidance method according to claim 1, characterized in that The identification module is used to obtain detection data of obstacles, and the detection data includes a plurality of point cloud data and the distance information between the point cloud data and the identification module. The method further includes: Convert the first point cloud data into three-dimensional point cloud data in the coordinate system of the identification module according to the distance information to obtain the distribution information of the obstacles; the first point cloud data is any one of the plurality of point cloud data.
4. The obstacle avoidance method according to claim 1, characterized in that, The method further includes: Determine target position data according to the position information; The planning the movement path of the mobile purifier according to the position information includes: Plan the movement path of the mobile purifier according to the target position data.
5. The obstacle avoidance method according to claim 4, characterized in that, The position information includes information of a plurality of obstacle points, and the information of the obstacle points includes the signal strength corresponding to the obstacle points. The determining the target position data according to the position information includes: When the signal strength corresponding to the first obstacle point is greater than a first preset threshold, determine the first obstacle point as the target obstacle point to obtain the target position data; wherein, the first obstacle point is any one of the plurality of obstacle points.
6. The obstacle avoidance method according to claim 5, characterized in that The information of the obstacle points further includes the height corresponding to the obstacle points. The determining the target position data according to the position information further includes: When the height corresponding to the first obstacle point is greater than a second preset threshold, determine the first obstacle point as the target obstacle point to obtain the target position data.
7. The obstacle avoidance method according to claim 6, characterized in that The information of the obstacle points further includes the frequency of continuous occurrence of the obstacle points. The determining the target position data according to the position information further includes: When the frequency of continuous occurrence of the first obstacle point is greater than a third preset threshold, determine the first obstacle point as the target obstacle point to obtain the target position data.
8. The obstacle avoidance method according to claim 1, wherein The planning the movement path of the mobile purifier according to the position information to clean the cleaning area includes: Plan the movement path of the mobile purifier according to the position information and the size information of the mobile purifier.
9. An obstacle avoidance device, characterized in that, Applied to a mobile purifier, the mobile purifier includes an identification module for determining the distribution information of obstacles, and the device includes: A first determination module for determining the installation parameters of the identification module; A second determination module for determining a transformation matrix according to the installation parameters; A third determination module, configured to convert the distribution information into obstacle position information in the robot coordinate system according to the transformation matrix; A control module, configured to plan a movement path of the mobile purifier according to the position information so as to perform a cleaning process on a cleaning area.
10. A mobile purifier, characterized in that, Comprising: One or more processors; A memory; One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the one or more processors to perform the obstacle avoidance method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, Program code is stored in the computer-readable storage medium, and the program code can be called by a processor to execute the obstacle avoidance method according to any one of claims 1-8.