Dynamic boundary path generation method and computer device - Patents.com
Patent Information
- Application Number
- JP2024543589
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-05-31
- Filing Date
- 2023-04-23
- Publication Date
- 2025-02-19
- Estimated Expiration
- 2043-04-23
AI Technical Summary
【0012】 本願の実施例又は従来技術における技術的解決手段をより明白に説明するために、以下では実施例又は従来技術の説明に使用する必要がある図面を簡単に説明し、以下の説明における図面は、本願のいくつかの実施例に過ぎず、当業者であれば、創造的な労働しなく限り、これらの図面に基づいて他の実施例の図面を取得することができると言うまでもない。
Smart Images

Figure 2025504893000001_ABST
Abstract
Description
[Technical field]
[0001] (Related Applications) This application claims priority to a Chinese patent application bearing application number 2022106061380 and entitled "Dynamic boundary path generation method, apparatus, computer device and storage medium" filed with the State Intellectual Property Office of China on May 31, 2022, the entire contents of which are incorporated herein by reference.
[0002] The present application relates to the field of artificial intelligence, and in particular to a dynamic boundary path generation method, apparatus, computer device and storage medium. [Background technology]
[0003] With the development of artificial intelligence technology, automation devices are applied to all kinds of industries, such as cleaning, cruising, mine removal, harvesting, etc. The automation devices in each of the above industries perform work in a comprehensive manner according to the work path, and the work along the boundary path is an important indicator when evaluating the work efficiency of the automation device. Summary of the Invention [Problem to be solved by the invention]
[0004] In the prior art, automated devices operate according to pre-planned boundary paths, and therefore cannot handle complex scenes or scenes with large environmental variations. [Means for solving the problem]
[0005] According to embodiments of the present application, a method, apparatus, computer device, and storage medium for dynamic boundary path generation are provided.
[0006] One embodiment of the present application is a method for dynamic boundary path generation, comprising: Obtaining a static boundary path including a plurality of waypoints; Acquiring dynamic sensing information including the device's location and obstacle boundaries in real time; Based on the position of the device, cutting a path segment of a preset length from the static boundary path, and matching waypoints included in the path segment to obtain a matching curve; Identifying a moving direction corresponding to each matching sampling point on the matching curve according to the matching curve and a boundary of the obstacle; Moving each of the matching sampling points at least once according to a corresponding moving direction by a predetermined distance to obtain each corresponding target waypoint; and obtaining a dynamic boundary path based on each of the destination waypoints.
[0007] The present application further provides an apparatus for generating a dynamic boundary path, the apparatus comprising: a static boundary path acquisition module for acquiring a static boundary path including a plurality of waypoints; A dynamic sensing information acquisition module for acquiring dynamic sensing information including a device position and an obstacle boundary in real time; a matching module for cutting a path segment of a preset length from the static boundary path based on the position of the device, and matching waypoints included in the path segment to obtain a matching curve; a movement direction determining module for determining a movement direction corresponding to each matching sampling point on the matching curve according to the matching curve and a boundary of the obstacle; a moving module for moving each of the matching sampling points at least once according to a corresponding moving direction by a preset distance to obtain each corresponding target waypoint; and a dynamic boundary path generation module that obtains a dynamic boundary path based on each of the destination waypoints.
[0008] Another embodiment of the present application is a computing device including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps described in the dynamic boundary path generation method are performed.
[0009] Yet another embodiment of the present application is a computer-readable storage medium having a computer program stored therein, and when the computer program is executed by a processor, the steps described in the dynamic boundary path generation method are performed.
[0010] Yet another embodiment of the present application is a computer program product, the computer program product including a computer program that, when executed by a processor, performs the steps described in the dynamic boundary path generation method.
[0011] The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the application will become apparent from the description and drawings, and from the claims.
[0012] In order to more clearly describe the embodiments of the present application or the technical solutions in the prior art, the following will briefly describe the drawings that need to be used in the description of the embodiments or the prior art. It goes without saying that the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain drawings of other embodiments based on these drawings without any creative work. [Brief description of the drawings]
[0013] [Figure 1] FIG. 2 is an application environment diagram of a dynamic boundary path generation method in one embodiment. [Diagram 2] 1 is a schematic flow chart of a dynamic boundary path generation method according to an embodiment; [Diagram 3]4 is a schematic flow chart of generating a matching path in one embodiment; [Figure 4] 13 is a schematic flow chart of identifying a moving direction in an embodiment; [Diagram 5] FIG. 4 is a schematic diagram showing displacement in the vertical direction in one embodiment. [Figure 6] 13 is a schematic flowchart of identifying a movement direction in another embodiment. [Figure 7] 1 is a schematic flow diagram of identifying a target waypoint in one embodiment; [Figure 8] 1 is a schematic flow diagram of identifying a static boundary path in one embodiment; [Figure 9] 4 is a schematic flow chart of a cleaning robot acquiring a dynamic boundary path in one embodiment; [Figure 10A] FIG. 4 is a schematic diagram showing an initial map in one embodiment. [Figure 10B] FIG. 2 is a schematic diagram illustrating static and dynamic boundary paths in one embodiment. [Figure 11] FIG. 2 is a block diagram showing a configuration of an apparatus for generating dynamic boundary paths in one embodiment. [Figure 12] FIG. 2 is a diagram showing the internal configuration of the device according to the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] In order to facilitate understanding of the present application, the contents of the present application are described more fully below with reference to the accompanying drawings. Preferred examples of the present application are illustrated in the accompanying drawings. It should be noted that the present application may be embodied in different forms and is not limited to the embodiments set forth herein. Rather, these examples are provided to provide a thorough and complete understanding of the present disclosure.
[0015] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art. The terms used in the description of the present invention herein are only intended to describe specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the associated listed items.
[0016] The dynamic boundary path generation method provided by the embodiment of the present application can be applied to the application environment shown in FIG. 1. In addition, the device 102 communicates with the server 104 through a network. The data storage system stores data that needs to be processed by the server 104. The data storage system may be integrated in the server 104 or may be located in a cloud or other network server. The device 102 obtains a static boundary path from the server 104, and the device 102 works according to the static boundary path and sends the dynamic sensing information acquired in real time to the server 104. The server 104 obtains the dynamic sensing information, and based on the position of the device, cuts a path segment of a preset length from the static boundary path, matches the waypoints included in the path segment to obtain a matching curve, and based on the matching curve and the boundary of the obstacle, identifies the moving direction corresponding to each matching sampling point in the matching curve, and moves each of the matching sampling points at least once according to the corresponding moving direction for a preset distance to obtain each corresponding target waypoint, and takes a dynamic boundary path based on each target waypoint. The device 102 obtains the dynamic boundary path from the server 104 and performs operations according to the dynamic boundary path. The device 102 may be at least one of various automated devices, a cleaning robot, a robot, an autonomous vehicle, an unmanned aerial vehicle, etc., but is not limited thereto. The server 104 may be embodied as an independent server or a server cluster including multiple servers.
[0017] In one embodiment, as shown in Fig. 2, a dynamic boundary path generating method is provided, and the embodiment takes the method as an example to be applied to a device. It can be understood that the method can also be applied to a server, or can be applied to a system including a device and a server, and can be realized by the interaction between the device and the server. In this embodiment, the method includes the following steps: In step 202, a static boundary path is obtained that includes a number of waypoints.
[0018] A path is a single open or closed road for a device to follow. A static boundary path is a road that is close to the obstacle boundary generated based on a static map. A waypoint is a set of points that make up a path, and a waypoint can be represented by a unique 2D or 3D coordinate.
[0019] Illustratively, the device obtains a static boundary path for the working area that includes multiple waypoints.
[0020] In one embodiment, the device obtains an initial map of the working area, and performs processing and contour extraction on the initial map to identify the largest contour as the static boundary path. The initial map can be a feature map, a topology map, a grid map, etc., and the processing method can be one or a combination of image processing methods such as binarization, dilation, erosion, etc.
[0021] In step 204, dynamic sensing information including the device's position and obstacle boundaries is acquired in real time.
[0022] Note that "real" refers to performing an event in synchronization with the occurrence and progress of an event. Dynamic sensing information refers to information about the device itself and the working environment acquired while the device is performing an operation. The device's location refers to the specific orientation in which the device is positioned in the working area, and can be expressed in two-dimensional or three-dimensional coordinates. An obstacle refers to a facility or object that impedes device operation, such as a wall, a desk, or another device.
[0023] For example, the device obtains the device's location and obstacle information through auxiliary components, such as an ultrasonic sensor, an infrared distance meter, etc.
[0024] In one embodiment, the location of the device is represented by two-dimensional coordinates of the working area in which the geometric center point of the device is located. The obstacle information includes an obstacle boundary and an area covered by the obstacle, both of which are represented by a set of two-dimensional coordinate points, and the set of points of the obstacle boundary is a subset of the set of points of the area covered by the obstacle.
[0025] In step 206, a path segment of a preset length is cut from the static boundary path based on the device's position, and the waypoints contained in the path segment are matched to obtain a matching curve.
[0026] The preset length may be set according to information input by a user, the dimensions of a device, the operating speed of the device, the length of a static boundary path, etc. The matching curve is a straight line or a curve obtained by performing polynomial matching on a plurality of discrete points.
[0027] Illustratively, the device identifies a starting point for cutting a path segment based on the device's position, cuts a path segment of a preset length from a static boundary path based on the starting point, and performs polynomial matching on the waypoints contained in the path segment to obtain a matching curve.
[0028] In step 208, a moving direction corresponding to each matching sampling point on the matching curve is determined based on the matching curve and the boundary of the obstacle.
[0029] The boundary of an obstacle is a portion along the boundary of the obstacle. The boundary of an obstacle can be represented by a curve, a set of two-dimensional coordinate points, or the like.
[0030] For example, the device determines the movement direction corresponding to each matching sampling point according to the positional relationship between the matching curve and the boundary of the obstacle, and the tangent direction of each matching sampling point to the matching curve.
[0031] In step 210, each matching sampling point is moved at least once according to a corresponding moving direction by a preset distance to obtain each corresponding target waypoint.
[0032] The preset distance can be set according to the moving speed of the device, the shape of the device, the size of the device, the distance to the boundary of the obstacle, etc. The target waypoint is a corresponding point that satisfies the set condition after the matching sampling point moves.
[0033] Exemplarily, for each matching sampling point, the device moves multiple times at a preset distance according to the moving direction corresponding to the matching sampling point until the set condition is met, and obtains the target waypoint.
[0034] Step 212 obtains a dynamic boundary path based on each destination waypoint.
[0035] It should be noted that the dynamic boundary path is a boundary path obtained by adjusting the static boundary path based on dynamic sensing information.
[0036] Illustratively, the device connects adjacent waypoints using straight lines, and the straight lines between the destination waypoint and the adjacent waypoints constitute a dynamic boundary path.
[0037] In the above dynamic boundary path generating method, dynamic sensing information is obtained in real time, a path segment of a preset length is cut from the static boundary path according to the device's position, each matching sampling point obtained by sampling the path segment is matched to obtain a matching curve, and each matching sampling point on the matching curve is determined according to the matching curve and the boundary of the obstacle, and each matching sampling point is moved at least once according to the corresponding moving direction by a preset distance to obtain each corresponding target waypoint, and a dynamic boundary path is obtained according to each target waypoint, and the static boundary path is adjusted in real time according to the obtained dynamic sensing information, so that not only can the obstacle be avoided, but also the obtained dynamic boundary path can be better approached to the boundary of the obstacle. Thus, the problem of the device working along the boundary in a complex scene or a scene with large environmental changes can be solved.
[0038] In one embodiment, as shown in FIG. 3, step 206 includes the following steps. In step 302, the distance from each waypoint in the static boundary path to the device's position is calculated, and the waypoint closest to the device's position is taken as the first matching waypoint.
[0039] The first matching target waypoint is the first waypoint selected from the static boundary waypoints for determining a matching curve.
[0040] For example, the device calculates the distance from each waypoint in the static boundary path to the device's location, compares the distances to identify the shortest distance, and sets the waypoint corresponding to the shortest distance as the first matching waypoint. The distance from the waypoint to the device's location can be calculated using the following formula (1):
number
[0041] In step 304, based on the first matching target waypoint, the distance between two adjacent waypoints is calculated, and the distance is accumulated to obtain an accumulated length. If the accumulated length is a preset length, the waypoint included in the accumulated length is determined as the matching target waypoint.
[0042] For example, the device calculates the distance between two adjacent waypoints from the first matching target waypoint, accumulates the obtained distances to obtain an accumulated length, and if the accumulated length is equal to a predetermined distance, the waypoint included in the accumulated length is determined to be the matching target waypoint.
[0043] In step 306, the matching target waypoints are subjected to matching calculation to obtain matching parameters, and a matching curve is obtained based on the matching parameters.
[0044] In addition, matching refers to representing a series of points on a plane with one smooth curve. Matching may be linear matching, polynomial matching, exponential matching, Gaussian matching, etc. Matching parameters are parameters of a matching curve formula. Matching parameters can be obtained by least squares method, experimental data matching method, etc. Matching curve is a mathematical model constructed for multiple discrete points. Matching curve may be exponential function matching curve, power function matching curve, hyperbolic matching curve, etc.
[0045] In one embodiment, trinomial matching is performed on the matching target waypoints. First, a cubic polynomial is expressed as f(x)=a+b*x+c*x 2 +d*x 3 Let P = ((x1, y1), (x2, y2), . . . . , (x n ,y n )) and the parameter matrix that needs to be solved is Para=[abcd] T The parameters are calculated by the nonlinear least squares method, and the equation is as follows:
number
[0046] In this embodiment, matching the selected waypoints to obtain the corresponding matching curves provides basic information for identifying the matching sampling points and the movement directions of the matching sampling points, thereby improving the accuracy of calculating the movement directions of the matching sampling points.
[0047] In one embodiment, as shown in FIG. 4, step 208 includes the following steps. In step 402, the matching curve is sampled at a preset sampling distance to obtain a number of matching sampling points.
[0048] The preset sampling distance can be set according to the computing power of the server, the dimensions, shape, and operating speed of the device, etc. The matching sampling point is a point obtained by sampling the matching curve. The matching sampling point can be represented by a coordinate point.
[0049] For example, the device samples the matching curve multiple times, and the sampling interval distance is a preset sampling distance to obtain multiple matching sampling points.
[0050] In step 404, the distance from each matching sampling point to the device's position is calculated, and the matching sampling point closest to the device's position is set as the target matching sampling point.
[0051] In step 406, a boundary point that is closest to the target matching sampling point is obtained from the boundary of the obstacle as a reference point.
[0052] Note that a boundary point is a point in a set of points on the boundary of an obstacle, and can be represented by a two-dimensional coordinate point or a three-dimensional coordinate point.
[0053] Illustratively, the device calculates the distance from each boundary point of the obstacle boundary to the target matching sampling point respectively, compares the distances, and identifies the boundary point with the shortest distance as the reference point.
[0054] In step 408, a vertical displacement of the reference point relative to the target matching sampling point is determined based on the perpendicular direction of the tangent of the target matching sampling point to the matching curve.
[0055] In one embodiment, as shown in FIG. 5 , 502 is a point set of boundary points of an obstacle, 504 is a point set of matching sampling points, point A is a target matching sampling point, and point B is a reference point. The vertical displacement of point B relative to point A is the projection of point B on the vertical axis of a plane coordinate system constructed with point A as the origin and the tangent to the matching curve of point A as the horizontal axis. The vertical displacement of point B relative to point A can be understood as the vertical coordinate of point C, and the vertical displacement S can be obtained by the following formula: S = (y B -y A )*cosα-(x B -x A )*sinα (3) Also, x B , y B are the abscissa and ordinate of point B, respectively, and x A , y A are the abscissa and ordinate of point A, respectively, and α is the direction angle corresponding to the slope of the tangent to the matching curve at point A.
[0056] In step 410, a reference direction for the movement of each matching sampling point is determined based on the displacement in the vertical direction.
[0057] For example, the device determines whether the boundary of the obstacle is in the positive direction or the negative direction of the matching sampling point based on the positive or negative of the displacement in the vertical direction. If S>0, it can be understood that the boundary of the obstacle is determined to be in the area of y>0 in the coordinate system constructed with point A as the origin and the tangent to the matching curve of point A as the horizontal axis, that is, in the positive direction, and if S<0, it can be understood that the boundary of the obstacle is determined to be in the area of y<0 in the coordinate system constructed with point A as the origin and the tangent to the matching curve of point A as the horizontal axis, that is, in the negative direction.
[0058] In step 412, a moving direction corresponding to each of the matching sampling points is determined based on a reference direction and a tangent direction of each of the matching sampling points to the matching curve.
[0059] In this embodiment, a reference direction for the movement of the matching sampling points is obtained by calculation, and the corresponding movement direction of each matching sampling point is determined based on the reference direction and the tangent direction of each matching sampling point to the matching curve, thereby improving the directionality of the adjustment of the static boundary path.
[0060] In one embodiment, step 412 further includes setting the reference orientation to 90 degrees if the vertical displacement is greater than 0, and setting the reference orientation to -90 degrees if the vertical displacement is less than 0.
[0061] For example, if S>0, it can be understood that the reference point at the boundary of the obstacle is in the area of y>0 in a coordinate system constructed with the target matching point as the origin and the tangent to the matching curve of the target matching point as the horizontal axis, the matching sampling point moves in the positive direction of the vertical axis of the above coordinate system, and the reference direction is 90 degrees; if S<0, it can be understood that the reference point at the boundary of the obstacle is in the area of y<0 in a coordinate system constructed with the target matching point as the origin and the tangent to the matching curve of the target matching point as the horizontal axis, the matching sampling point moves in the negative direction of the vertical axis of the above coordinate system, and the reference direction is -90 degrees, and both directions of movement are toward the boundary of the obstacle.
[0062] In this embodiment, the vertical displacement is converted into a quantifiable angle, which makes it easy to identify the corresponding movement direction of each matching sampling point based on the reference direction.
[0063] In one embodiment, as shown in FIG. 6, step 208 includes the following steps. In step 602, based on the matching curve, a tangent direction of each matching sampling point to the matching curve is respectively determined by a direction calculation.
[0064] The direction calculation means performing a calculation to obtain a differential quotient and an arctangent calculation on the matching curve.
[0065] In one embodiment, as shown in FIG. 5, the tangent direction of the matching sampling point A is α, α = arctan(df(x A ) / dx A ) (4) where f(x) is the matching curve, x A is the abscissa of point A, which is the matching sampling point.
[0066] In step 604, the tangent direction of each matching sampling point to the matching curve is merged with the reference direction to obtain a corresponding moving direction of each matching sampling point.
[0067] The moving direction is the moving angle when each matching sampling point moves to the boundary of the obstacle.
[0068] For example, for each matching sampling point, the device adds a reference direction to the tangential direction of the matching sampling point to obtain the corresponding moving direction of the matching sampling point. It can be understood that the moving direction = tangential direction + reference direction. In one embodiment, the moving direction of point A, which is the matching sampling point shown in Figure 5, is α + 90°.
[0069] In this embodiment, the tangent direction of each matching sampling point is obtained by direction calculation, and a reference direction is added to the tangent direction of each matching sampling point to obtain the movement direction of each corresponding matching sampling point, and the quantified movement direction improves the accuracy of the adjustment of the static boundary path.
[0070] In one embodiment, as shown in FIG. 7, step 210 includes the following steps. In step 702, each matching sampling point is moved a preset distance according to a corresponding moving direction to obtain a corresponding reference waypoint.
[0071] It should be noted that the reference waypoint is a waypoint obtained after the matching sampling point is translated one or more times according to the corresponding moving direction.
[0072] In step 704, it is determined whether there is an overlap area between the planned coverage area of the corresponding reference waypoint and the area covered by the obstacle.
[0073] The planned coverage area is an area specified based on the reference waypoint and the device coverage area, and is the area that the device covers with the reference waypoint as the geometric center of the device. The planned coverage area can be expressed as a set of two-dimensional points or a set of three-dimensional points. The area covered by an obstacle is the area that the obstacle occupies in the working area, and can be expressed as a set of two-dimensional coordinate points or a set of three-dimensional coordinate points.
[0074] Illustratively, the device obtains a planned coverage area based on the reference waypoint and the device's dimensions, obtains an intersection between the planned coverage area and the area covered by the obstacle, and determines whether there is an area where the planned coverage area overlaps with the area covered by the obstacle based on the intersection result. If there is no area where the planned coverage area overlaps with the area covered by the obstacle, executes step 702; if there is an area where the planned coverage area overlaps with the area covered by the obstacle, executes step 706.
[0075] In one embodiment, the coordinates of one matching sampling point on the matching curve are (x i , y i ), the corresponding direction angle is α, the reference direction is β (β is 90° or -90°), the preset moving distance is L, and the reference waypoint after the matching waypoint moves once based on the moving direction and the preset moving distance is (x i1 , y i1 ), and x i1 and y i1 are as follows, respectively: x i1 =x i +L*cos(α+β) (5) y i1 =y i +L*sin(α+β) (6) Also, x i1 , y i1 are the matching sampling points (x i , y i) are the abscissa and ordinate of the reference waypoint after one movement.
[0076] In one embodiment, the device is a rectangle, and the coordinates of the four points at the device's reference waypoint are respectively vertices. 11 , vertex 12 , vertex 13 , vertex 14 The coverage area of the device at the reference waypoint is expressed as H1 = h( The set of points in the obstacle coverage area is H. If H1∩≠Φ, it indicates that the device's planned coverage area at the reference waypoint is partially within an area covered by an obstacle; If H1∩=Φ, it indicates that there is no overlap area between the device's planned coverage area at the reference waypoint and the area covered by the obstacle.
[0077] In step 706, the corresponding reference waypoint obtained in the previous movement is set as the corresponding target waypoint.
[0078] Illustratively, if the device determines that there is an area where the planned coverage area overlaps with an area to be covered by an obstacle, it indicates that the device cannot pass through the reference waypoint and sets the reference waypoint obtained in the previous movement as the target waypoint.
[0079] In this embodiment, the matching sampling point is moved one or more times to obtain a target waypoint, and the obtained target waypoint is closer to the boundary of the obstacle, and the device can operate through it to reduce the distance between the dynamic boundary path and the boundary of the obstacle.
[0080] In one embodiment, step 704 further includes obtaining dimensions of the device and obtaining a planned coverage area, based on the reference waypoint and the dimensions, where the geometric center of the device is located at the reference waypoint.
[0081] A dimension is a parameter that represents the size of a device. For example, if the device is a circular device, the dimension is a radius or a diameter, and if the device is a rectangular device, the dimension is a length and a height.
[0082] Illustratively, the device obtains the dimensions of the device, centers the device around a reference waypoint, takes the dimensions as coverage, and obtains the planned coverage area corresponding to the reference waypoint.
[0083] In this embodiment, based on the dimensions of the device and the reference waypoint, a planned coverage area is obtained in which the geometric center of the device is located at the reference waypoint, and the planned coverage area accurately represents the coverage area of the device when the device moves to the reference waypoint.
[0084] In one embodiment, step 704 includes the steps of obtaining a planned coverage area of the reference waypoint, where the planned coverage area is represented by a set of two-dimensional coordinate points; obtaining an obstacle coverage area, where the obstacle coverage area is represented by a set of two-dimensional coordinate points; calculating an intersection between the set of two-dimensional coordinate points of the planned coverage area and the set of two-dimensional coordinate points of the obstacle coverage area to obtain a result of the intersection; and determining that the planned coverage area does not overlap with the obstacle coverage area if the result of the intersection is empty.
[0085] As an example, when the intended coverage area and the area covered by the obstacle are both represented by a set of two-dimensional coordinate points, an intersection is found between the set of two-dimensional coordinate points of the intended coverage area and the set of two-dimensional coordinate points of the area covered by the obstacle to obtain the intersection result. If the intersection result is empty, it is determined that there is no area where the intended coverage area overlaps with the area covered by the obstacle, and if the intersection result is not empty, it is determined that there is an area where the intended coverage area overlaps with the area covered by the obstacle.
[0086] In this embodiment, it is possible to accurately determine whether the intended coverage area overlaps with the area covered by the obstacle based on the intersection of the set of two-dimensional coordinate points of the intended coverage area and the set of two-dimensional coordinate points of the area covered by the obstacle.
[0087] In one embodiment, obtaining the static boundary path includes the following steps, as shown in FIG. Step 802: Obtain an initial map of the working area, which is a map of the working area obtained by the device through a sensor or an infrared distance meter, and may be in the form of a topological map, a geometric map, a grid map, etc.
[0088] In step 804, the initial map is subjected to a dilation process and an erosion process to obtain a target image. The dilation process means adding pixel values to the boundary of the image to dilate the overall pixel values, thereby achieving an image dilation effect. The erosion process means removing a part of the boundary of the image to achieve an image shrinking effect. The erosion process may be horizontal erosion, vertical erosion, or omnidirectional erosion.
[0089] In step 806, a static boundary path is obtained based on the target image.
[0090] Contour extraction refers to extracting the boundary of an image. The method of contour extraction may be an internal cutout point method, a boundary tracing method, a region growing method, a region split and merge method, or the like.
[0091] Illustratively, the device employs a contour extraction method on the target image to obtain image contours, and takes the maximum contour as the static boundary path.
[0092] In this embodiment, the device obtains an initial map of the working area, performs dilation and erosion operations on the initial map to obtain a target map, performs contour extraction on the target map to obtain a static boundary path, and obtains a working path along which the device approaches the boundary of the obstacle.
[0093] In an illustrative embodiment, the device is a cleaning robot, and a flowchart for the cleaning robot to obtain a dynamic boundary path is as shown in FIG. 9, which includes steps as follows: Step 902: obtain an initial map of the working area. Illustratively, the initial map of the working area is a 2D grid map, as shown in FIG.
[0094] Step 904: Process the initial map to obtain a static boundary path. Exemplarily, a 2D grid map is binarized to obtain a first target image, in which pixel values in the image are represented as 0 or 254, where 0 indicates passable and 254 indicates non-passable. A 3*3 kernel is set, and the kernel is used to perform an OR operation with the first target image to obtain a second target image, and the 3*3 kernel is used to perform an AND operation with the second target image to obtain a third target image. A contour extraction is performed on the third target image, and the largest contour is determined as the static boundary path, and the static boundary path is as shown in 1002 in FIG. 10B.
[0095] In step 906, a cleaning task is performed based on the static boundary path, and dynamic sensing information is acquired in real time. Exemplarily, the cleaning robot performs a cleaning task based on the static boundary path, and while performing the cleaning task, dynamically acquires surrounding obstacle information including surrounding obstacle information such as walls, desks, etc., using auxiliary components such as a sensor and an infrared distance meter, and acquires an area covered by the obstacle and a boundary of the obstacle, which are indicated by a point set of two-dimensional coordinate points.
[0096] In step 908, the static boundary path is adjusted based on the dynamic sensing information to obtain a dynamic boundary path. For example, the coordinates of the geometric center of the cleaning robot are obtained based on the positioning information of the cleaning robot, a waypoint on the static boundary path that is closest to the geometric center of the cleaning robot is identified as a first matching target waypoint, distances between two adjacent waypoints from the first matching target waypoint are calculated and the calculated distances are accumulated, and a waypoint included when the accumulated distance is equal to a preset distance is set as a point set of the matching target waypoints, trinomial matching is performed on the point set of the matching target waypoints, parameters are stabilized using a nonlinear least squares method, parameters of the trinomial matching are obtained by a Newton-Gauss iteration method, a matching curve is obtained, and a sampling distance, which is a preset distance, is sampled on the matching curve to obtain matching sampling points. The matching curve is subjected to a differential quotient operation and an arctangent operation to obtain the tangent direction of each matching sampling point, the distance from each matching sampling point to the geometric center of the cleaning robot is calculated, and the sampling point with the shortest distance is determined as the target matching sampling point, the distance from each boundary point of the obstacle boundary to the target matching sampling point is calculated, and the boundary point with the shortest distance is determined as the reference point, the vertical displacement of the reference point relative to the target matching sampling point is calculated, and if the vertical displacement is less than 0, the reference direction is set to 90°, and if the vertical displacement is greater than 0, the reference direction is set to -90°, and the reference direction is added to the tangent direction of each matching sampling point to obtain the movement direction of each matching sampling point.
[0097] For each matching sampling point, perform one or more movements according to the corresponding movement direction and the preset movement distance to obtain a reference boundary waypoint, obtain a planned coverage area where the geometric center of the cleaning robot is located at the reference waypoint according to the coverage area of the cleaning robot and the reference waypoint, obtain an intersection between the planned coverage area and the area covered by the obstacle, and if the intersection result is empty, continue to move according to the movement direction and the preset movement distance until the intersection result is not empty, and identify the reference waypoint obtained in the previous movement as the target waypoint. The dynamic boundary path constituted by each target waypoint is shown as 1004 in FIG. 10B.
[0098] Step 910: performing a cleaning task based on the dynamic boundary path. Illustratively, the cleaning robot performs a cleaning task based on the dynamic boundary path shown at 1004 in FIG.
[0099] In this embodiment, the cleaning robot acquires information about surrounding obstacles while performing work, and based on the obstacle information, adjusts the static boundary path realistically to acquire a dynamic boundary path that is closer to the boundary of the obstacle, thereby reducing blind spots in the work and improving the cleaning effect on the boundary of the obstacle.
[0100] Although the steps in the flowcharts shown in Figures 1-9 are presented sequentially, as indicated by the arrows, it should be understood that the steps are not necessarily performed sequentially in the order indicated by the arrows. The performance of the steps is not limited to a strict order, unless expressly stated herein, and the steps may be performed in other orders. Furthermore, at least some of the steps in Figures 1-9 may include multiple steps or multiple stages, which steps or stages do not necessarily have to be performed simultaneously but may be performed at different times, and which steps or stages do not necessarily have to be performed consecutively but may be performed in alternating order with other steps or at least some of the steps or stages of other steps.
[0101] Based on the same inventive concept, the embodiment of the present application further provides an apparatus for generating dynamic boundary paths according to the above. The solution to the problem provided by the apparatus is similar to the solution described in the above method, so the specific limitations of the apparatus for generating one or more dynamic boundary paths and the embodiments provided below may refer to the limitations of the dynamic boundary path generating method described above, and will not be repeated here.
[0102] In one embodiment, as shown in FIG. 11, a dynamic boundary path generating apparatus is provided, the generating apparatus includes a static boundary path acquiring module 1102, a dynamic sensory information acquiring module 1104, a matching module 1106, a movement direction determining module 1108, a movement module 1110, and a dynamic boundary path generating module 1112, in which: The static boundary path acquisition module 1102 acquires a static boundary path that includes a number of waypoints.
[0103] The dynamic sensory information acquisition module 1104 acquires dynamic sensory information, including the device's position and obstacle boundaries, in real time.
[0104] The matching module 1106 cuts a path segment of a preset length from the static boundary path based on the device's position, and matches the waypoints contained in the path segment to obtain a matching curve.
[0105] The movement direction determination module 1108 determines the movement direction corresponding to each matching sampling point on the matching curve based on the matching curve and the boundary of the obstacle.
[0106] The moving module 1110 moves each matching sampling point at least once according to a corresponding moving direction by a preset distance to obtain each corresponding destination waypoint.
[0107] The dynamic boundary path generation module 1112 derives a dynamic boundary path based on each destination waypoint.
[0108] In one embodiment, the matching module 1106 further comprises: The distance from each waypoint in the static boundary path to the device position is calculated, the waypoint closest to the device position is set as the first matching target waypoint, the distance between each two adjacent waypoints is calculated based on the first matching target waypoint, the distances are accumulated to obtain an accumulated length, and if the accumulated length is a predetermined length, the waypoint included in the accumulated length is set as the matching target waypoint, the matching target waypoint is matched to obtain matching parameters, and a matching curve is obtained based on the matching parameters.
[0109] In one embodiment, the movement direction determination module 1108 further comprises: Sampling is performed on the matching curve at a predetermined sampling distance to obtain a plurality of matching sampling points, the distance from each matching sampling point to the device position is calculated, the matching sampling point closest to the device position is set as the target matching sampling point, and a boundary point closest to the target matching sampling point is obtained from the boundary of the obstacle as a reference point, the target matching sampling point is used to determine the vertical displacement of the reference point relative to the target matching sampling point based on the vertical displacement of the tangent to the matching curve, and the reference direction of the movement of each matching sampling point is determined based on the reference direction and the tangent direction of each matching sampling point to the matching curve.
[0110] In one embodiment, the movement direction determination module 1108 is further used to determine the reference direction as 90 degrees if the vertical displacement is greater than 0, and as -90 degrees if the vertical displacement is less than 0.
[0111] In one embodiment, the movement direction determination module 1108 further comprises: Based on the matching curve, a tangent direction of each matching sampling point to the matching curve is respectively determined by a direction calculation, and the tangent direction of each matching sampling point to the matching curve is merged with a reference direction to obtain the moving direction of each matching sampling point.
[0112] In one embodiment, the movement module 1110 further moves each matching sampling point by a predetermined distance according to a corresponding movement direction to obtain a corresponding reference waypoint, and if there is no area where the planned coverage area of the reference waypoint overlaps with the area covered by the obstacle, moves the reference waypoint again based on the corresponding movement direction and the predetermined distance until there is an area where the planned coverage area of the corresponding reference waypoint overlaps with the area covered by the obstacle, and the corresponding reference waypoint obtained in the previous movement is used as the corresponding target waypoint, and the planned coverage area of the reference waypoint is determined based on the reference waypoint and the coverage area of the device.
[0113] In one embodiment, the transfer module 1110 further comprises: The dimensions of the device are obtained and are used as a reference waypoint to obtain a planned coverage area based on the dimensions and the geometric center of the device is located at the reference waypoint.
[0114] In one embodiment, the transfer module 1110 further comprises: This method is used to obtain a planned coverage area of a reference waypoint represented by a set of two-dimensional coordinate points, obtain an area to be covered by an obstacle represented by a set of two-dimensional coordinate points, obtain an intersection between the set of two-dimensional coordinate points of the planned coverage area and the set of two-dimensional coordinate points of the area to be covered by the obstacle, obtain a result of the intersection, and if the result of the intersection is empty, determine that the planned coverage area does not overlap with the area to be covered by the obstacle.
[0115] In one embodiment, the static boundary path acquisition module 1102 further comprises: An initial map of a working area is obtained, a dilation process and an erosion process are performed on the initial map to obtain a target image, and a static boundary path is obtained based on the target image.
[0116] All or part of each module in the dynamic boundary path generating apparatus can be realized by software, hardware, and a combination thereof. Each module may be embedded in a processor in a computer device in the form of hardware, or may be independent, or may be stored in a memory in a computer device in the form of software, so that the processor can easily call and execute the operations corresponding to each module.
[0117] In one embodiment, a computer device is provided, which may be a device, and its internal configuration diagram is as shown in FIG. 12. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device provides calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. An operating system and a computer program are stored in the non-volatile storage medium. The internal memory provides an environment for the execution of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is for the processor to exchange information with an external device. The communication interface of the computer device is used to communicate with an external terminal by wire or wirelessly, and wireless can be realized by WIFI, mobile cellular network, NFC (near field communication) or other technology. The computer program performs a dynamic boundary path generation method when executed by the processor.
[0118] As will be understood by those skilled in the art, the configuration shown in FIG. 12 is a block diagram of a portion of the structure relevant to the solution of the present application and is not intended to limit the computing devices to which the solution of the present application may be applied, as a particular computing device may include more or fewer components than those shown in the figure, may combine some components, or may have a different arrangement of components.
[0119] In one embodiment, there is further provided a computing device including a memory and a processor, the memory storing a computer program, the processor executing the computer program performing the steps of each of the method embodiments described above.
[0120] In one embodiment, a computer readable storage medium is provided, having a computer program stored thereon, the computer program performing the steps of each of the method embodiments described above when executed by a processor.
[0121] In one embodiment, a computer program product is provided, the product including a computer program which, when executed by a processor, performs the steps of each of the method embodiments described above.
[0122] In addition, the user information (including, but not limited to, information on the user's device, the user's personal information, etc.) and data (including, but not limited to, data for analysis, data for storage, data for display, etc.) related to this application are all information and data that have been authenticated by the user or sufficiently authenticated by each party.
[0123] Those skilled in the art can understand and realize all or part of the processes in the methods of the above embodiments, and can instruct relevant hardware to complete the processes by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the above embodiments of the methods when the computer program is executed. In addition, any reference to a memory, database, or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. For purposes of explanation and not limitation, the RAM may be of various types, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The database according to the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a distributed database based on a blockchain. The processor according to the embodiments provided herein may be, but is not limited to, a general-purpose processor, a central processor, a graphics processor, a digital signal processor, programmable logic, data processing logic based on quantum computing, etc.
[0124] Each of the technical features of the above embodiments may be combined in any combination. For the sake of brevity, not all possible combinations of each of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, all of them should be considered within the scope described in this specification.
[0125] The above examples only show some embodiments of the present application, and the description is more specific and detailed, but this should not be understood as limiting the scope of the claims. However, a person skilled in the art can make several modifications and improvements without departing from the concept of the present application, all of which are within the scope of protection of the present application. Therefore, the scope of protection of the patent of the present application should be based on the scope of the attached claims.
Claims
1. 1. A dynamic boundary path generation method, comprising: Obtaining a static boundary path including a plurality of waypoints; Acquiring dynamic sensing information including the device's location and obstacle boundaries in real time; Based on the position of the device, cutting a path segment of a preset length from the static boundary path, and matching waypoints included in the path segment to obtain a matching curve; Identifying a moving direction corresponding to each matching sampling point on the matching curve according to the matching curve and a boundary of the obstacle; Moving each of the matching sampling points at least once according to a corresponding moving direction by a predetermined distance to obtain each corresponding target waypoint; and obtaining a dynamic boundary path based on each of the destination waypoints.
2. cutting a path segment of a preset length from the static boundary path based on the position of the device, and matching waypoints included in the path segment to obtain a matching curve; Calculating a distance from each waypoint in the static boundary path to the device's location, and determining the waypoint closest to the device's location as a first matching waypoint; Calculating the distance between each of two adjacent waypoints based on the first matching target waypoint, accumulating the distances to obtain an accumulated length, and when the accumulated length is a preset length, determining the waypoint included in the accumulated length as a matching target waypoint; The method of claim 1 , further comprising: performing a matching calculation on the matching target waypoints to obtain matching parameters; and obtaining a matching curve based on the matching parameters.
3. Determining a moving direction corresponding to each matching sampling point on the matching curve based on the matching curve and the boundary of the obstacle, Sampling the matching curve at a preset sampling distance to obtain a plurality of matching sampling points; calculating a distance from each of the matching sampling points to the device's position, and determining the matching sampling point that is closest to the device's position as a target matching sampling point; Obtaining a boundary point from the boundary of the obstacle that is closest to the target matching sampling point as a reference point; determining a vertical displacement of the reference point relative to the target matching sample point based on a perpendicular direction of the tangent of the target matching sample point to the matching curve; determining a reference direction of movement of each of the matching sampling points based on the displacement in the vertical direction; and determining a corresponding movement direction for each of the matching sampling points based on the reference direction and a tangent direction of each of the matching sampling points to the matching curve.
4. 4. The method of claim 3, wherein determining a reference direction for moving each of the matching sampling points based on the vertical displacement comprises: setting a reference direction to 90 degrees when the vertical displacement is greater than 0; and setting a reference direction to -90 degrees when the vertical displacement is less than 0.
5. Determining a moving direction corresponding to each of the matching sampling points based on the reference direction and a tangent direction of each of the matching sampling points to the matching curve, determining a tangent direction of each matching sampling point to the matching curve based on the matching curve through a direction calculation; and merging a tangent direction of each of the matching sampling points to the matching curve with the reference direction to obtain a corresponding movement direction for each of the matching sampling points.
6. The dynamic sensing information further includes an area covered by an obstacle; Moving each of the matching sampling points at least once according to a corresponding moving direction by a predetermined distance to obtain each corresponding target waypoint, Moving each of the matching sampling points by a predetermined distance according to a corresponding moving direction to obtain a corresponding reference waypoint; The method according to claim 1, further comprising: when there is no area where the planned coverage area of a reference waypoint identified based on the reference waypoint and the coverage area of a device overlaps with the area covered by the obstacle, moving the reference waypoint again based on the corresponding moving direction and the predetermined distance until there is an area where the planned coverage area of the corresponding reference waypoint overlaps with the area covered by the obstacle, and setting the corresponding reference waypoint obtained in the previous movement as the corresponding target waypoint.
7. The method further comprises: obtaining dimensions of the device; and obtaining a planned coverage area, the geometric center of the device being located at the reference waypoint, based on the reference waypoint and the dimensions.
8. The step for when there is no overlapping area between the planned coverage area of the reference waypoint and the area covered by the obstacle, Obtaining a planned coverage area of the reference waypoint represented by a point set of two-dimensional coordinate points; obtaining an area covered by the obstacle, the area being represented by a set of two-dimensional coordinate points; Finding an intersection between the set of two-dimensional coordinate points of the intended coverage area and the set of two-dimensional coordinate points of the area to be covered by the obstacle, and obtaining an intersection result; 7. The method of claim 6, further comprising determining that the planned coverage area does not overlap with the obstacle coverage area if the resulting intersection is empty.
9. Obtaining the static boundary path includes: Obtaining an initial map of a working area; performing dilation and erosion operations on the initial map to obtain a target image; and obtaining the static boundary path based on the target image.
10. An apparatus for generating a boundary path, comprising: a static boundary path acquisition module for acquiring a static boundary path including a plurality of waypoints; A dynamic sensing information acquisition module for acquiring dynamic sensing information including a device position and an obstacle boundary in real time; a matching module for cutting a path segment of a preset length from the static boundary path based on the position of the device, and matching waypoints included in the path segment to obtain a matching curve; a movement direction determining module for determining a movement direction corresponding to each matching sampling point on the matching curve according to the matching curve and a boundary of the obstacle; a moving module for moving each of the matching sampling points at least once according to a corresponding moving direction by a preset distance to obtain each corresponding target waypoint; and a dynamic boundary path generation module that obtains a dynamic boundary path based on each of the destination waypoints.
11. The matching module further comprises: Calculating a distance from each waypoint in the static boundary path to the device's location, and determining the waypoint closest to the device's location as a first matching waypoint; Calculate a distance between two adjacent waypoints based on the first matching target waypoint, accumulate the distances to obtain an accumulated length, and if the accumulated length is a preset length, set a waypoint included in the accumulated length as a matching target waypoint; The apparatus according to claim 10, further comprising: a matching calculation for the matching target waypoints to obtain matching parameters; and a matching curve is obtained based on the matching parameters.
12. The movement direction determination module further comprises: Sampling the matching curve at a preset sampling distance to obtain a plurality of matching sampling points; Calculate the distance from each of the matching sampling points to the device's position, and set the matching sampling point closest to the device's position as the target matching sampling point; From the boundary of the obstacle, obtain a boundary point that is closest to the target matching sampling point as a reference point; determining a vertical displacement of the reference point relative to the target matching sample point based on a perpendicular direction of the tangent of the target matching sample point to the matching curve; determining a reference direction of movement of each of the matching sampling points based on the displacement in the vertical direction; 11. The apparatus of claim 10, wherein each of the matching sampling points is used to identify a corresponding direction of movement based on the reference direction and a tangent direction of each of the matching sampling points to the matching curve.
13. The movement direction determination module further comprises:
11. The apparatus of claim 10, wherein if the displacement in the vertical direction is greater than 0, a reference direction of 90 degrees is used, and if the displacement in the vertical direction is less than 0, a reference direction of -90 degrees is used.
14. The movement direction determination module further comprises: Based on the matching curve, a direction calculation is performed to determine a tangent direction of each matching sampling point to the matching curve; 11. The apparatus of claim 10, wherein each of the matching sampling points is used as merging a tangent direction to the matching curve with the reference direction to obtain a movement direction for each of the matching sampling points.
15. The transfer module further comprises: Move each of the matching sampling points by a predetermined distance according to a corresponding moving direction to obtain a corresponding reference waypoint; The device of claim 10, characterized in that if there is no area where the planned coverage area of the reference waypoint identified based on the reference waypoint and the coverage area of the device overlaps with the area covered by the obstacle, the reference waypoint is moved again based on the corresponding moving direction and the predetermined distance until there is an area where the planned coverage area of the corresponding reference waypoint overlaps with the area covered by the obstacle, and the corresponding reference waypoint obtained in the previous movement is used as the corresponding target waypoint.
16. The transfer module further comprises: Obtaining dimensions of the device; The apparatus of claim 10, wherein based on the reference waypoint and the dimensions, a geometric center of the device is used to obtain a planned coverage area located at the reference waypoint.
17. The transfer module further comprises: Obtain a planned coverage area of the reference waypoint represented by a set of two-dimensional coordinate points; Obtaining an area covered by the obstacle, which is represented by a set of two-dimensional coordinate points; Find an intersection between the set of two-dimensional coordinate points of the intended coverage area and the set of two-dimensional coordinate points of the area to be covered by the obstacle, and obtain the intersection result; 11. The apparatus of claim 10, wherein if the intersection result is empty, it is used to determine that the planned coverage area does not overlap with the obstacle coverage area.
18. The static boundary path acquisition module further comprises: Obtain an initial map of the working area, performing dilation and erosion on the initial map to obtain a target image; The apparatus of claim 10 , further comprising: a static boundary path generating unit configured to generate the static boundary path based on the target image.
19. 1. A computing device comprising: A memory and a processor are included. A computing device, characterized in that a computer program is stored in the memory, and that, when executed by the processor, the steps of the method according to any one of claims 1 to 9 are performed.
20. 1. A computer-readable storage medium, comprising: A computer-readable storage medium storing a computer program, the computer program being adapted to perform the steps of the method according to any one of claims 1 to 9 when executed by a processor.
Citation Information
Patent Citations
Autonomous machine
JP2008077670A
Driving support device
JP2012173786A
Route correction device
JP2014115924A
Autonomous travel route generation system
JP2017211734A
Environment information update apparatus, environment information update method, and program
WO2019069524A1