Path planning method and device, electronic equipment and readable storage medium
By acquiring the regional boundary projection and planning points of irregular polygonal bridge piers, and combining the detection width and working direction, the problem of full-area coverage of the wall-climbing robot in the detection of irregular polygonal bridge piers was solved, and full-area detection was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 上海圭目机器人有限公司
- Filing Date
- 2022-02-24
- Publication Date
- 2026-06-16
AI Technical Summary
When wall-climbing robots are inspecting irregular polygonal bridge piers, it is difficult to achieve full-area inspection, especially when the top of the pier is obscured.
By acquiring multiple area boundary projections of the work area, the target boundary is determined, and planning points are divided according to the detection width. Path planning is then performed in conjunction with the preset work direction.
It enables full-area detection of irregular polygonal bridge piers, ensuring that the wall-climbing robot can cover all areas.
Smart Images

Figure CN116698025B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and more specifically, to a path planning method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] Wall-climbing robots are automated robots that can climb vertical walls and complete tasks. When performing surface inspections on areas such as bridge piers, wall-climbing robots need to plan their paths first. However, most common bridge piers are irregular polygons, such as trapezoids, and some piers may even have their tops partially obscured, which can affect the full-area inspection capabilities of the wall-climbing robot. Summary of the Invention
[0003] Based on the above research, this invention provides a path planning method, device, electronic device, and readable storage medium to solve the problem of wall-climbing robots being unable to perform full-area detection in irregular polygons.
[0004] The embodiments of the present invention can be implemented through the following aspects:
[0005] In a first aspect, embodiments of the present invention provide a path planning method, the method comprising:
[0006] Obtain the work area to be planned;
[0007] For each boundary of the work area, determine multiple projections of the remaining boundaries of the work area onto that boundary. Based on these multiple projections, determine the target boundary from the boundaries of the work area.
[0008] The target boundary is divided according to the detection width, resulting in multiple first planning points on the target boundary;
[0009] For each first planning point on the target boundary, based on the location information of the first planning point, a second planning point corresponding to the first planning point is determined in the remaining area boundaries of the working area excluding the target boundary.
[0010] Based on the preset work direction, path planning is performed for each first planning point and each second planning point.
[0011] In a second aspect, embodiments of the present invention provide a path planning device, comprising:
[0012] The data acquisition module acquires the work area to be planned.
[0013] The first processing module determines multiple projections of the remaining area boundaries of the work area onto the boundary of the work area for each area boundary, and determines the target boundary from each area boundary of the work area based on the multiple projections of the remaining area boundaries of the work area onto the boundary of the work area.
[0014] The second processing module divides the target boundary according to the detection width to obtain multiple first planning points on the target boundary;
[0015] The third processing module, for each first planning point on the target boundary, determines the second planning point corresponding to the first planning point in the remaining area boundaries of the working area, excluding the target boundary, based on the location information of the first planning point.
[0016] The path planning module performs path planning for each first planning point and each second planning point according to the preset working direction.
[0017] Thirdly, embodiments of the present invention provide an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned path planning method.
[0018] Fourthly, embodiments of the present invention provide a readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned path planning method.
[0019] This invention provides a path planning method, apparatus, electronic device, and readable storage medium. It acquires a work area to be planned, then, for each boundary of the work area, determines multiple projections of the remaining boundaries of the work area onto that boundary. Based on these projections, a target boundary is determined from the boundaries of the work area. The target boundary is then divided according to the detection width, resulting in multiple first planning points on the target boundary. For each first planning point on the target boundary, based on its position information, a second planning point corresponding to that first planning point is determined from the remaining boundaries of the work area (excluding the target boundary). Finally, path planning is performed on each first planning point and each second planning point according to a preset working direction. Thus, when the work area is an irregular polygon, the target boundary of the work area can be determined first, followed by the determination of the first planning points on the target boundary and the second planning points on the boundaries of other areas within the work area. Finally, path planning is performed on each planning point according to the preset working direction, thereby achieving full-area detection of the irregular polygonal work area. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0022] Figure 2 This is a flowchart of a path planning method provided in an embodiment of the present invention.
[0023] Figure 3 This is a schematic diagram of a working area provided in an embodiment of the present invention.
[0024] Figure 4 This is a schematic diagram of path planning provided in an embodiment of the present invention.
[0025] Figure 5 This is another schematic diagram of path planning provided in an embodiment of the present invention.
[0026] Figure 6 This is a structural block diagram of the path planning device provided in an embodiment of the present invention.
[0027] Icons: 100 - Electronic device; 10 - Path planning device; 11 - Data acquisition module; 12 - First processing module; 13 - Second processing module; 14 - Third processing module; 15 - Path planning module; 20 - Memory; 30 - Processor; 40 - Communication unit. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0029] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0030] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0031] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0032] Wall-climbing robots are automated robots that can climb vertical walls and complete tasks. When performing surface inspections on areas such as bridge piers, wall-climbing robots need to plan their paths first. However, most common bridge piers are irregular polygons, such as trapezoids, and some piers may even have their tops partially obscured, which can affect the full-area inspection capabilities of the wall-climbing robot.
[0033] Based on the above research, this invention provides a path planning method. The method involves acquiring a work area to be planned, then determining multiple projections of the remaining boundaries of the work area onto each boundary of that area. Based on these projections, a target boundary is determined from the boundaries of the work area. The target boundary is then divided according to the detection width, resulting in multiple first planning points on the target boundary. For each first planning point on the target boundary, a second planning point is determined from the remaining boundaries of the work area (excluding the target boundary) based on its location information. Finally, path planning is performed on each first planning point and each second planning point according to a preset working direction. Thus, when the work area is an irregular polygon, the target boundary of the work area can be determined first, followed by the determination of the first planning points on the target boundary and the second planning points on the boundaries of other areas within the work area. Finally, path planning is performed on each planning point according to the preset working direction, thereby achieving full-area detection of the irregular polygonal work area.
[0034] Please see Figure 1 , Figure 1 This is a structural block diagram of an electronic device 100 provided in this embodiment. Figure 1As shown, the electronic device 100 may include a path planning device 10, a memory 20, a processor 30, and a communication unit 40. The memory 20 stores machine-readable instructions that can be executed by the processor 30. When the electronic device 100 is running, the processor 30 and the memory 20 communicate with each other via a bus. The processor 30 executes the machine-readable instructions and performs a path planning method.
[0035] The memory 20, processor 30, and communication unit 40 are electrically connected directly or indirectly to each other to achieve signal transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The path planning device 10 includes at least one software function module that can be stored in the memory 20 in the form of software or firmware. The processor 30 is used to execute the executable module (e.g., the software function module or computer program included in the path planning device 10) stored in the memory 20.
[0036] The memory 20 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0037] In some embodiments, processor 30 is used to perform one or more functions described in this embodiment. In some embodiments, processor 30 may include one or more processing cores (e.g., a single-core processor (S) or a multi-core processor (S)). By way of example only, processor 30 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), an application-specific instruction-set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field-programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computing (RISC) computer, or a microprocessor, or any combination thereof.
[0038] For ease of explanation, only one processor is described in electronic device 100. However, it should be noted that electronic device 100 in this embodiment may also include multiple processors, and therefore the steps performed by one processor as described in this embodiment may also be performed jointly or individually by multiple processors. For example, if the server's processor performs steps A and B, it should be understood that steps A and B may also be performed jointly by two different processors or individually by one processor. For example, one processor performs step A, and a second processor performs step B, or the first and second processors jointly perform steps A and B.
[0039] In this embodiment, the memory 20 is used to store the program, and the processor 30 is used to execute the program after receiving the execution instruction. The process definition method disclosed in any implementation of this embodiment can be applied to the processor 30, or implemented by the processor 30.
[0040] The communication unit 40 is used to establish a communication connection between the electronic device 100 and other devices via a network, and to send and receive data via the network.
[0041] In some implementations, the network can be any type of wired or wireless network, or a combination thereof. By way of example only, the network may include wired networks, wireless networks, fiber optic networks, telecommunications networks, intranets, the Internet, local area networks (LANs), wide area networks (WANs), wireless local area networks (WLANs), metropolitan area networks (MANs), public switched telephone networks (PSTNs), Bluetooth networks, ZigBee networks, or near field communication (NFC) networks, or any combination thereof.
[0042] In this embodiment, the electronic device 100 may be, but is not limited to, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), or other electronic devices. This embodiment does not impose any restrictions on the specific type of electronic device.
[0043] Understandably, Figure 1 The structure shown is for illustrative purposes only. The electronic device 100 may also have... Figure 1 Showing more or fewer components, or having with Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.
[0044] based on Figure 1 The implementation architecture of this embodiment provides a path planning method, which is... Figure 1 The electronic device 100 shown performs the following based on Figure 1 The structural diagram of the electronic device 100 shown illustrates in detail the steps of the path planning method provided in this embodiment. Please refer to the attached diagram. Figure 2 The path planning method provided in this embodiment includes steps 101 to 105.
[0045] Step 101: Obtain the work area to be planned.
[0046] The working area refers to the area where the equipment performs detection. The working area is an irregular polygon, such as a trapezoid. The path planning method in this embodiment can also be applied to other polygons that meet preset conditions, such as a region boundary where the projections of all other region boundaries lie on that boundary. It should be noted that, in this embodiment, unless otherwise specified, the working area is trapezoidal.
[0047] The work equipment can be a wall-climbing robot or other inspection crawling device. Before the work equipment performs inspections in the work area, path planning for the work area is required. Path planning for the work area can be performed by electronic devices. It should be noted that the electronic devices can be integrated into the work equipment or located outside the work equipment for controlling the work equipment, such as a remote control. This embodiment does not limit this.
[0048] Step 102: For each boundary of the work area, determine multiple projections of the remaining boundaries of the work area onto that boundary. Based on these multiple projections, determine the target boundary from the boundaries of the work area.
[0049] The boundary of the work area refers to its outline, and there are multiple boundaries within the work area. A boundary that meets certain conditions is considered the target boundary. Specifically, for each boundary of the work area, we can first determine multiple projections of the other boundaries of the work area onto that boundary. Then, based on these projections, we can determine the target boundary from among the various boundaries of the work area. The line segment obtained by projecting any boundary onto the line containing another boundary is considered the projection of that boundary onto the other boundary. It should be noted that for a given boundary, if the projections of all other boundaries onto that boundary lie on that boundary, then that boundary can be considered the target boundary.
[0050] It is easy to understand that there may be multiple regional boundaries that can serve as target boundaries within the work area. For example, when the work area is an acute triangle, all three regional boundaries of the work area can serve as target boundaries. In this embodiment, if there are multiple regional boundaries that can serve as target boundaries within the work area, the region boundary with the longest length can be selected as the target boundary, or the region boundary with the shortest length can be selected as the target boundary, or the operator can make the selection.
[0051] Step 103: Divide the target boundary according to the detection width to obtain multiple first planning points on the target boundary.
[0052] In this embodiment, the detection width is used as the basis for defining the target boundary. The detection width can be determined based on the image capture width of the working device and the image overlap width. It should be explained that the working device detects the work area by taking pictures of its appearance, and the device may need to make multiple round trips. It is easy to understand that the image capture width is the width of the image taken by the working device during the detection operation. To achieve full coverage of the work area, the area covered by the images will overlap to a certain extent with each round trip; this is the image overlap width.
[0053] Once the target boundary is determined, it can be divided according to the detection width to obtain multiple first planning points on the target boundary. For example, if the target boundary is 4.6 meters, the image width is 0.3 meters, the image overlap width is 0.15 meters, and the detection width is 0.45 meters, then 4.6 is used as the dividend, and 0.45 is used as the divisor. The integer quotient is 10, and the remainder is 0.1. The integer quotient is used as the number of first planning points on the target boundary. It should be noted that since the two ends of the target boundary are connected to the boundaries of other areas, and the angle formed between the connected area boundaries and the target boundary is less than 90 degrees, for the convenience of planning and detection, it is common practice to discard a portion of the length at both ends of the target boundary. The discarded length can be based on the chassis width of the operating equipment. For example, if the chassis width is 0.3 meters, 0.3 meters are discarded at both ends of the target boundary.
[0054] Step 104: For each first planning point on the target boundary, based on the location information of the first planning point, determine the second planning point corresponding to the first planning point in the remaining area boundaries of the working area excluding the target boundary.
[0055] It should be noted that in this embodiment, both the first planning point and the second planning point are planning points used for path planning. The difference is that the first planning point is located on the target boundary, and each first planning point has a corresponding second planning point. That is, for each first planning point, based on the location information of the first planning point, the second planning point corresponding to the first planning point can be determined in the remaining area boundaries of the working area, excluding the target boundary. The location information of the first planning point can be understood as its coordinates in the coordinate system of the working area. For each first planning point, in an optional implementation, a ray can be drawn from the first planning point as the origin towards any other area boundary. The intersection of the ray with the remaining area boundary can be used as the second planning point corresponding to the first planning point. It should be noted that the drawn ray forms an angle with the target boundary, and for any first planning point, the angle between the drawn ray and the target boundary is the same. The angle can be 30 degrees, 60 degrees, or 90 degrees; this embodiment does not limit this. For ease of understanding and implementation by those skilled in the art, unless otherwise specified, the angle between the ray drawn from the first planning point and the target boundary is 90 degrees in the following content.
[0056] Step 105: Based on the preset work direction, perform path planning for each first planning point and each second planning point.
[0057] The working direction is a pre-set direction, which can be preset in the electronic device or selected by the operator through the device's interface. After obtaining all the first and second planning points, path planning can be performed for each of the first and second planning points based on the preset working direction. For example, combining... Figure 3As shown, trapezoid A'B'C'D' represents the working area. In the coordinate system of the working area, the first coordinate axis lies on the straight line of the target boundary A'B', and the positive direction of the first coordinate axis points from B' to A'. The working direction is parallel to the first coordinate axis, pointing from B' to A'. Assume there are six first planning points on the target boundary A'B', i.e., from B' to A', namely points 10, 20, 30, 40, 50, and 60. Correspondingly, there are second planning points on the area boundary B'D' corresponding to points 10 and 20, namely points 11 and 21. On the area boundary D'C', there are second planning points corresponding to points 30 and 40, namely points 31 and 41. On the area boundary A'C', there are second planning points corresponding to points 50 and 60, namely points 51 and 61. According to the preset working direction, all the above first and second planning points are sorted, and path planning can be performed based on the sorted planning points. It should be noted that during planning, you can start with the first planning point, for example, point 10. Then, find the second planning point corresponding to point 10, which is point 11. Next, according to the work direction, find the second planning point closest to point 11, which is point 21. Then, find the first planning point corresponding to point 21, which is point 20. Then, according to the work direction, find the first planning point closest to point 20, which is point 30, and so on. This results in the sorted planning points being: point 10, point 11, point 20, point 21, point 30, point 31, point 40, point 41, point 50, point 51, point 60, and point 61. Path planning can then be performed based on these sorted planning points.
[0058] The working direction is from the left end to the right end of the target boundary. The first target coordinate system can be constructed with the target boundary as the first coordinate axis. Based on the first coordinates of each first planning point and each second planning point, the first planning points and each second planning point are sorted, and path planning is performed based on the sorted first planning points and each second planning point.
[0059] This invention provides a path planning method that involves acquiring a work area to be planned, then determining multiple projections of the remaining boundaries of the work area onto each boundary of the work area, and determining a target boundary from among the boundaries of the work area based on these projections. The target boundary is then divided according to the detection width to obtain multiple first planning points on the target boundary. For each first planning point on the target boundary, a second planning point corresponding to that first planning point is determined from among the remaining boundaries of the work area (excluding the target boundary) based on the location information of that first planning point. Finally, path planning is performed on each first planning point and each second planning point according to a preset working direction. Thus, when the work area is an irregular polygon, the target boundary of the work area can be determined first, followed by the determination of the first planning points on the target boundary and the second planning points on the boundaries of other areas within the work area. Finally, path planning is performed on each planning point according to the preset working direction, thereby achieving full-area detection of the irregular polygonal work area.
[0060] In actual planning, the work areas to be planned include bridges, bridge piers, etc., and these work areas often require the equipment to climb at a certain height. Therefore, for the safety of the equipment, the work areas to be planned need to be processed to obtain the final working area for the equipment to be inspected.
[0061] In one alternative implementation, the step of obtaining the work area to be planned includes:
[0062] Obtain the work area to be planned.
[0063] The work area is determined from the work area based on the safety margin of the operating equipment.
[0064] In detail, combined Figure 3 As shown, trapezoid ABCD represents the work area, and trapezoid A'B'C'D' represents the operational area. The work area is the actual area to be planned, and it is generally an irregular polygon, such as a trapezoid. After obtaining the work area, the operational area can be determined from it based on the operational safety margin of the equipment. Specifically, the operational area can be obtained by shifting the boundaries of each area of the work area inwards by a distance equal to one operational safety margin. That is, for each boundary of the operational area, that boundary is parallel to the corresponding boundary of the operational area and is separated from it by a distance equal to one operational safety margin. It is easy to understand that the operational safety margin is a parameter of the equipment and can be directly obtained from the equipment; a common operational safety margin is 0.15 meters.
[0065] In this embodiment, for ease of understanding and description, the planning points include first planning points and second planning points. From the above, it is easy to understand that before determining the planning points, a target boundary needs to be determined among the boundaries of each area in the working area. Then, the first planning points are determined on the target boundary, and subsequently, the second planning points on the remaining area boundaries are determined. In an optional implementation, the step of determining the target boundary from the boundaries of each area in the working area includes:
[0066] For each boundary of the working area, the remaining boundaries are projected onto that boundary to obtain multiple projections of the remaining boundaries onto that boundary.
[0067] If multiple projections of the remaining region boundaries onto the boundary of this region are all located on the boundary of this region, then this region boundary is set as the target boundary.
[0068] In this embodiment, after obtaining the working area, the boundaries of each region within the working area can be determined, and the target boundary is determined from these boundaries. Specifically, for each boundary of the working area, the remaining boundaries are projected onto that boundary. For example, for boundary A of the working area, two vertices on any other boundary are projected onto the line containing boundary A, resulting in two projection points. The line segment defined by these two projection points is the projection of the boundary onto boundary A. After obtaining multiple projections of all other boundaries onto boundary A, if all projections of the other boundaries onto boundary A are located on boundary A, then boundary A is set as the target boundary. For example, when the working area is an isosceles trapezoid, the base with the longer length is the target boundary, and the projections of the other sides of the isosceles trapezoid onto that base are all located on that base.
[0069] In this embodiment, each first planning point corresponds to a second planning point. After determining the first planning point, in an optional implementation, for each first planning point on the target boundary, based on the location information of the first planning point, the step of determining the second planning point corresponding to the first planning point in the remaining area boundaries of the working area other than the target boundary includes:
[0070] Obtain the position information of each vertex in the working area and the position information of multiple first planning points on the target boundary;
[0071] Based on the position information of each vertex in the working area, the positional relationship data of the boundaries of the remaining areas in the working area, excluding the target boundary, are determined;
[0072] For each first planning point on the target boundary, based on the location information of the first planning point and the location relationship data of the other regional boundaries in the working area excluding the target boundary, a second planning point corresponding to the first planning point is determined in the other regional boundaries in the working area excluding the target boundary.
[0073] In this embodiment, the position information of each vertex in the working area and the position information of multiple first planning points on the target boundary are first obtained. The position information refers to the position coordinates in the coordinate system of the working area. Correspondingly, the position information of the vertex refers to the position coordinates of the vertex, and the position information of the first planning point refers to the position coordinates of the first planning point. The position coordinates include the first coordinate and the second coordinate.
[0074] After obtaining the position information of each vertex in the work area, the positional relationship data of the remaining area boundaries (excluding the target boundary) can be determined based on this information. The positional relationship data of the area boundaries can be the equation of the line containing the area boundary. Specifically, each area boundary is determined by the vertices at both ends of the boundary. Therefore, after obtaining the position information of the two corresponding vertices of a certain area boundary, the positional relationship data of that area boundary can be determined. For example, the work area is an isosceles trapezoid with four vertices A(x1,y1), B(x2,y2), C(x3,y3), and D(x4,y4). The lower base of the trapezoid is AB, and the upper base is CD. Considering the safety margin of the working equipment, each area boundary of the trapezoidal work area is translated inward to obtain four new vertices A′B′C′D′. A′B′ is taken as the target boundary, and the line containing AB is parallel to the first coordinate axis of the coordinate system of the work area. Each area boundary of the work area is separated from the corresponding area boundary of the work area by a safety margin. The equation of the line C′D′ is a constant l1 = y4 or l1 = y3.
[0075] The equation of the line l2 of A′C′ is:
[0076]
[0077] The equation of the line l3 for B′D′ is:
[0078]
[0079] Among them, w safe Safety margin for operating equipment
[0080] After obtaining the positional relationship data of the boundaries of the remaining areas in the working area excluding the target boundary, for each first planning point on the target boundary, a second planning point corresponding to the first planning point can be determined in the remaining areas in the working area excluding the target boundary based on the positional information of the first planning point and the positional relationship data of the boundaries of the remaining areas in the working area excluding the target boundary.
[0081] For example, for each first planning point, we can first determine which region boundary projection includes the first coordinate of the first planning point, and then substitute the first coordinate of the first planning point into the straight line equation of the corresponding region boundary to obtain the corresponding second coordinate. Based on the first coordinate of the first planning point and the second coordinate substituted into the solution, we can obtain the position coordinate of the second planning point corresponding to the first planning point.
[0082] It should be noted that although the work area in this embodiment is obtained by processing the work area, for further safety considerations, in order to prevent the work equipment from climbing out of the work area and falling, the position of the second planning point on the boundary of some areas is adjusted in some implementations.
[0083] In some alternative implementations, combined with Figure 4 As shown, before performing path planning for each first planning point and each second planning point according to the preset working direction, the path planning method also includes:
[0084] For each area boundary of the work area other than the target boundary, if the area boundary is not parallel to the target boundary, then the second planning points on the area boundary are sorted according to the preset work direction.
[0085] The second planning points on the boundary of the sorted area are divided into units, with each unit consisting of two second planning points.
[0086] Determine the first coordinates of each second planning point on the boundary of the area in the first target coordinate system;
[0087] Determine the minimum first coordinate among the first coordinates of each second planning point in each unit, and adjust the first coordinates of each second planning point in each unit according to the minimum first coordinate.
[0088] Based on the preset work direction, path planning is performed for each first planning point, the unadjusted second planning point, and the adjusted second planning point.
[0089] After determining the target boundary of the work area, the boundaries of other areas within the work area may or may not be parallel to the target boundary. For each area boundary of the work area, excluding the target boundary, if the area boundary is not parallel to the target boundary, the second planning points on that area boundary are sorted according to the preset working direction, and the sorted second planning points on that area boundary are then divided into units. Generally, each unit includes two second planning points. It should be noted that the number of second planning points on the area boundary may be odd or even. When the number of second planning points on the area boundary is odd, the last second planning point on the sorted area boundary is not divided into units.
[0090] In this embodiment, a first target coordinate system is constructed using the target boundary as the first coordinate axis. Then, the position coordinates of each second planning point on the boundary of the region are determined. The position coordinates include the first coordinate and the second coordinate. It should be noted that the first target coordinate system may be the same as the coordinate system of the working area mentioned above, or the first target coordinate system may not be the same as the coordinate system of the working area mentioned above. However, even if the two are not the same coordinate system, the conversion calculation between the two coordinate systems is easy for those skilled in the art to understand.
[0091] After dividing the second planning points on the boundary of the region into units, for each unit, it is necessary to determine the minimum first coordinate among the first coordinates of each second planning point in that unit. This minimum first coordinate is then set as the first coordinate of each planning point in that unit to obtain the adjusted first coordinates of each second planning point in that unit. It should be noted that after adjustment, the relative height of each second planning point in the unit is the same; this relative height refers to the distance between the second planning point and its corresponding first planning point. Finally, according to the preset working direction, path planning is performed on each first planning point, the unadjusted second planning points, and the adjusted second planning points. It should be explained that unadjusted second planning points include two categories: one category refers to second planning points on the boundary of the region parallel to the target boundary; the other category refers to second planning points on the boundary of the region not parallel to the target boundary whose first coordinates have not been adjusted. Correspondingly, adjusted second planning points refer to second planning points on the boundary of the region not parallel to the target boundary whose first coordinates have been adjusted.
[0092] In this embodiment, after determining each first planning point and each second planning point, path planning can be performed on these first planning points and second planning points according to the preset working direction. It should be noted that both the first planning points and the second planning points are planning points used for path planning.
[0093] In one alternative implementation, combined with Figure 5 As shown, the steps for path planning for each first planning point and each second planning point according to the preset working direction include:
[0094] Determine the first and second coordinates of each planning point in the first target coordinate system.
[0095] Based on the preset working direction, the target coordinate axis in the first target coordinate system is determined, and based on the target coordinate axis, the target coordinates in the first coordinate and the second coordinate system are determined.
[0096] Planning points with the same target coordinates are set as the same group, and the groups are sorted according to the preset working direction.
[0097] For any two adjacent groups after sorting, sort the planning points in one group according to the first order, and sort the planning points in the other group according to the second order; the first order is the reverse of the second order.
[0098] Path planning is performed based on the planning points in each group after sorting.
[0099] The first target coordinate system has already been explained above and will not be repeated here. After constructing the first target coordinate system, determine the first and second coordinates of each planning point within it. Then, based on the preset working direction, determine the target coordinate axis in the first target coordinate system. It should be noted that the first target coordinate system includes a first coordinate axis and a second coordinate axis, and the target coordinate axis can be either the first or the second coordinate axis, depending on the working direction. The working direction can be preset and can be parallel or perpendicular to the target boundary. If the working direction is parallel to the target boundary, the first coordinate axis serves as the target coordinate axis, and the first coordinate is the target coordinate. If the working direction is perpendicular to the target boundary, the second coordinate axis serves as the target coordinate axis, and the second coordinate is the target coordinate.
[0100] After determining the target coordinate axes, planning points with the same target coordinates are grouped together, and these groups are sorted according to a preset working direction. It should be noted that each group generally includes two planning points with the same target coordinates. After sorting the groups, for any two adjacent groups, the planning points in one group are sorted according to a first order, and the planning points in the other group are sorted according to a second order, with the first order being the reverse of the second order. The first and second orders can be referenced to the non-target coordinates of the planning points within each group. For example, using the second coordinate as the non-target coordinate and the first coordinate as the target coordinate, for any two adjacent groups, the planning points in one group are sorted in descending order of the second coordinate, and the planning points in the other group are sorted in ascending order. Thus, for any two adjacent groups, the order of the planning points within each group is reversed. After sorting the planning points in each group, path planning can be performed based on the sorted planning points in each group.
[0101] In this embodiment, when the working equipment performs inspections in the work area, it needs to climb up and down a certain height within the work area. After completing the crawling inspection of one group's planned points, the working equipment turns and moves to the next group's planned points. During this turning and moving, the working equipment often experiences a slight downward slip. If the distance between two planned points in a group is relatively small, this slippage has a significant impact on the crawling inspection. Therefore, for safety and work efficiency considerations, the planned points can be screened.
[0102] In one alternative implementation, combined with Figure 5 As shown, the steps for path planning based on the planning points of each group after sorting include:
[0103] For each group, calculate the spacing between each planned point in that group, and determine the maximum spacing from all the spacings in that group.
[0104] If the maximum spacing is less than the distance threshold, then the planned points in that group are discarded;
[0105] If the maximum spacing is greater than the distance threshold, then the planned points in the group are retained;
[0106] Route planning is performed based on the retained planning points.
[0107] In this embodiment, there can be two or more planning points in a group; this embodiment is not limited to this. However, it is common for a group to have two planning points. The distances between each planning point in the group are then calculated. It is easy to understand that if the number of planning points in the group is greater than two, the number of calculated distances will be greater than or equal to two. Therefore, it is necessary to determine the maximum distance from the distances in the group, and then compare this maximum distance with a preset distance threshold. If the maximum distance is less than the distance threshold, the planning points in the group are discarded; that is, the planning points in the group do not need to participate in path planning. If the maximum distance is greater than the distance threshold, the planning points in the group are retained, and finally, path planning is performed based on the retained planning points.
[0108] In summary, the path planning method provided in this invention involves acquiring a work area to be planned, then determining multiple projections of the remaining boundaries of the work area onto each boundary of the work area, and determining a target boundary from among the boundaries of the work area based on these projections. The target boundary is then divided according to the detection width to obtain multiple first planning points on the target boundary. For each first planning point on the target boundary, a second planning point corresponding to that first planning point is determined from among the remaining boundaries of the work area (excluding the target boundary) based on the position information of that first planning point. Finally, path planning is performed on each first planning point and each second planning point according to a preset working direction. Thus, when the work area is an irregular polygon, the target boundary of the work area can be determined first, followed by the determination of the first planning points on the target boundary and the second planning points on the boundaries of other areas within the work area. Finally, path planning is performed on each planning point according to the preset working direction, thereby achieving full-area detection of the irregular polygonal work area.
[0109] Based on the same inventive concept, please refer to the following: Figure 6 This embodiment also provides a path planning device 10, including: a data acquisition module 11, a first processing module 12, a second processing module 13, a third processing module 14, and a path planning module 15.
[0110] Data acquisition module 11 is used to acquire the work area to be planned;
[0111] The first processing module 12 is used to determine, for each first planning point on the target boundary, a second planning point corresponding to the first planning point in the remaining area boundaries of the working area excluding the target boundary, based on the location information of the first planning point.
[0112] The second processing module 13 is used to divide the target boundary according to the detection width to obtain multiple first planning points on the target boundary;
[0113] The third processing module 14 is used to determine, for each first planning point on the target boundary, a second planning point corresponding to the first planning point in the remaining area boundaries of the working area excluding the target boundary, based on the location information of the first planning point.
[0114] The path planning module 15 is used to plan the path for each first planning point and each second planning point according to the preset working direction.
[0115] In an optional implementation, the data acquisition module 11 is further configured to:
[0116] Obtain the work area to be planned;
[0117] The work area is determined from the work area based on the safety margin of the operating equipment.
[0118] In an optional implementation, the first processing module 12 is further configured to:
[0119] For each boundary of the working area, the remaining boundaries are projected onto that boundary to obtain multiple projections of the remaining boundaries onto that boundary.
[0120] If multiple projections of the remaining region boundaries onto the boundary of this region are all located on the boundary of this region, then this region boundary is set as the target boundary.
[0121] In an optional implementation, the third processing module 14 is further configured to:
[0122] Obtain the position information of each vertex in the working area and the position information of multiple first planning points on the target boundary;
[0123] Based on the position information of each vertex in the working area, the positional relationship data of the boundaries of the remaining areas in the working area, excluding the target boundary, are determined;
[0124] For each first planning point on the target boundary, based on the location information of the first planning point and the location relationship data of the other regional boundaries in the working area excluding the target boundary, a second planning point corresponding to the first planning point is determined in the other regional boundaries in the working area excluding the target boundary.
[0125] In an alternative implementation, the path planning module 15 is further configured to:
[0126] Determine the first and second coordinates of each planning point in the first target coordinate system; the planning points include the first planning point and the second planning point.
[0127] Based on the preset working direction, determine the target coordinate axis in the first target coordinate system, and based on the target coordinate axis, determine the target coordinate in the first coordinate and the second coordinate system;
[0128] Set planning points with the same target coordinates into the same group, and sort the groups according to the preset working direction;
[0129] For any two adjacent groups after sorting, sort the planning points in one group according to the first order, and sort the planning points in the other group according to the second order; the first order is the reverse of the second order.
[0130] Path planning is performed based on the planning points in each group after sorting.
[0131] In an alternative implementation, the path planning module 15 is further configured to:
[0132] For each area boundary of the work area other than the target boundary, if the area boundary is not parallel to the target boundary, then the second planning points on the area boundary are sorted according to the preset work direction.
[0133] Divide the sorted second planning points on the boundary of the region into units, with each unit containing two second planning points;
[0134] Determine the first coordinates of each second planning point on the boundary of the area in the first target coordinate system;
[0135] Determine the minimum first coordinate among the first coordinates of each second planning point in each unit, and adjust the first coordinates of each second planning point in each unit according to the minimum first coordinate;
[0136] Based on the preset work direction, path planning is performed for each first planning point, the unadjusted second planning point, and the adjusted second planning point.
[0137] In an alternative implementation, the path planning module 15 is further configured to:
[0138] For each group, calculate the spacing between each planned point in that group, and determine the maximum spacing from all the spacings in that group;
[0139] If the maximum spacing is less than the distance threshold, then the planned points in that group are discarded;
[0140] If the maximum spacing is greater than the distance threshold, then the planned points in the group are retained;
[0141] Route planning is performed based on the retained planning points.
[0142] The path planning device provided in this embodiment first determines the target boundary of the work area, then determines the planning points on the boundaries of each area in the work area, and finally performs path planning for each planning point according to the preset work direction, thereby realizing full-area detection of the work area.
[0143] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the path planning device described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.
[0144] Based on the above, this embodiment provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the path planning method of any of the aforementioned embodiments.
[0145] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the readable storage medium described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.
[0146] In summary, the path planning method, apparatus, electronic device, and readable storage medium provided in this invention acquire a working area to be planned. Then, for each boundary of the working area, multiple projections of the remaining boundaries of the working area onto that boundary are determined. Based on these projections, a target boundary is determined from the boundaries of the working area. The target boundary is then divided according to the detection width to obtain multiple first planning points on the target boundary. For each first planning point on the target boundary, based on its position information, a second planning point corresponding to that first planning point is determined from the remaining boundaries of the working area excluding the target boundary. Finally, path planning is performed on each first planning point and each second planning point according to a preset working direction. Thus, when the working area is an irregular polygon, the target boundary of the working area can be determined first, followed by the determination of the first planning points on the target boundary and the second planning points on the boundaries of other areas within the working area. Finally, path planning is performed on each planning point according to the preset working direction, thereby achieving full-area detection of the irregular polygonal working area.
[0147] The above are merely various embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A path planning method, characterized in that, The method includes: Obtain the work area to be planned; For each boundary of the work area, determine multiple projections of the remaining boundaries of the work area onto that boundary, and based on the multiple projections of the remaining boundaries of the work area onto that boundary, determine the target boundary from each boundary of the work area. The target boundary is divided according to the detection width to obtain multiple first planning points on the target boundary; For each first planning point on the target boundary, based on the location information of the first planning point, a second planning point corresponding to the first planning point is determined in the remaining area boundaries of the working area excluding the target boundary; Based on the preset work direction, path planning is performed for each of the first planning points and each of the second planning points; The step of performing path planning for each first planning point and each second planning point according to a preset working direction includes: Determine the first coordinate and second coordinate of each planning point in the first target coordinate system; the planning point includes the first planning point and the second planning point. Based on the preset working direction, the target coordinate axis in the first target coordinate system is determined, and based on the target coordinate axis, the target coordinates in the first coordinate and the second coordinate are determined; Planning points with the same target coordinates are set as the same group, and the groups are sorted according to the preset working direction; For any two adjacent groups after sorting, sort the planning points in one group according to a first order, and sort the planning points in the other group according to a second order; the first order is the reverse of the second order. Path planning is performed based on the planning points in each of the sorted groups.
2. The path planning method according to claim 1, characterized in that, The process of obtaining the work area to be planned includes: Obtain the work area to be planned; The work area is determined from the work area based on the safety margin of the working equipment.
3. The path planning method according to any one of claims 1 or 2, characterized in that, For each boundary of the working area, determining multiple projections of the remaining boundaries of the working area onto that boundary, and determining the target boundary from the boundaries of the working area based on the multiple projections of the remaining boundaries of the working area onto that boundary, includes: For each boundary of the working area, the remaining boundaries are projected onto that boundary to obtain multiple projections of the remaining boundaries onto that boundary. If multiple projections of the remaining region boundaries onto the region boundary are all located on the region boundary, then the region boundary is set as the target boundary.
4. The path planning method according to claim 1, characterized in that, For each first planning point on the target boundary, based on the location information of the first planning point, a second planning point corresponding to the first planning point is determined in the remaining area boundaries of the working area excluding the target boundary, including: Obtain the position information of each vertex in the working area and the position information of multiple first planning points on the target boundary; Based on the position information of each vertex in the working area, the positional relationship data of the boundaries of the remaining areas in the working area, excluding the target boundary, are determined; For each first planning point on the target boundary, based on the location information of the first planning point and the location relationship data of the remaining area boundaries in the working area other than the target boundary, a second planning point corresponding to the first planning point is determined in the remaining area boundaries in the working area other than the target boundary.
5. The path planning method according to claim 1, characterized in that, Before performing path planning for each first planning point and each second planning point according to a preset working direction, the method further includes: For each area boundary of the work area other than the target boundary, if the area boundary is not parallel to the target boundary, then the second planning points on the area boundary are sorted according to the preset work direction; Divide the second planning points on the boundary of the sorted area into units, with each unit including two second planning points; Determine the first coordinates of each of the second planning points on the boundary of the area in the first target coordinate system; Determine the minimum first coordinate among the first coordinates of each second planning point in each of the units, and adjust the first coordinates of each second planning point in each of the units according to the minimum first coordinate; Based on the preset work direction, path planning is performed for each of the first planning points, the unadjusted second planning points, and the adjusted second planning points.
6. The path planning method according to claim 1, characterized in that, The step of path planning based on the planning points of each of the sorted groups includes: For each group, calculate the spacing between each planned point in that group, and determine the maximum spacing from all the spacings in that group; If the maximum spacing is less than the distance threshold, then the planned points in that group are discarded; If the maximum spacing is greater than the distance threshold, then the planned points in the group are retained; Path planning is performed based on the retained planning points.
7. A path planning device, characterized in that, include: The data acquisition module acquires the work area to be planned. The first processing module determines multiple projections of the remaining area boundaries of the working area onto the area boundary for each area boundary of the working area, and determines the target boundary from each area boundary of the working area based on the multiple projections of the remaining area boundaries of the working area onto the area boundary. The second processing module divides the target boundary according to the detection width to obtain multiple first planning points on the target boundary; The third processing module, for each first planning point on the target boundary, determines a second planning point corresponding to the first planning point in the remaining area boundaries of the working area, excluding the target boundary, based on the location information of the first planning point. The path planning module performs path planning for each first planning point and each second planning point according to a preset working direction. Specifically, it determines the first coordinate and second coordinate of each planning point in a first target coordinate system. The planning points include the first planning point and the second planning point. According to the preset working direction, it determines the target coordinate axis in the first target coordinate system and determines the target coordinate in the first and second coordinates based on the target coordinate axis. Planning points with the same target coordinate are set as the same group, and the groups are sorted according to the preset working direction. For any two adjacent groups after sorting, the planning points in one group are sorted according to a first order, and the planning points in the other group are sorted according to a second order. The first order is the reverse of the second order. Path planning is performed based on the planning points in each group after sorting.
8. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the path planning method according to any one of claims 1-6.
9. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the path planning method according to any one of claims 1-6.