Unmanned vehicle patrol line obstacle avoidance method, device, equipment and storage medium
By calculating the center of the obstacle on the route of the unmanned vehicle patrol and generating obstacle avoidance routes, the problem that unmanned vehicles cannot actively avoid obstacles is solved, and more efficient route patrol operations are achieved.
Patent Information
- Application Number
- CN202210520831.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-12
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-05-12
AI Technical Summary
Existing unmanned vehicles cannot actively avoid obstacles when patrolling the line, resulting in reduced line patrol efficiency.
By obtaining the global positioning information of the unmanned vehicle and the patrol mission information, the patrol route is generated. When an obstacle is detected, the center of shape is calculated based on the point cloud information of the obstacle, and the obstacle avoidance route is generated based on the center of shape, and the unmanned vehicle is controlled to drive according to the obstacle avoidance route to bypass the obstacle.
It realizes the active obstacle avoidance of unmanned vehicles during the patrol process, improves the efficiency of patrol, and does not require prior wiring or track laying, which enhances flexibility and applicability.
Smart Images

Figure CN114839993B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned vehicle control, and in particular to an unmanned vehicle line patrol and obstacle avoidance method, device, equipment and storage medium. Background Art
[0002] With the development of information technology, unmanned equipment has received more and more attention, and unmanned vehicles have also been widely used in various industries. Among them, patrolling along a pre-planned route is the most basic and commonly used method. At present, when patrolling, most existing unmanned vehicles need to lay tracks on the planned patrol lines, or lay wires as patrol marks for unmanned vehicles to identify patrol paths. When there are obstacles on the patrol path that block the tracks or patrol marks, unmanned vehicles are usually unable to actively avoid obstacles, which affects patrol efficiency. Summary of the invention
[0003] The present invention provides an unmanned vehicle line patrol and obstacle avoidance method, device, equipment and storage medium, which are used to solve the defect in the prior art that the unmanned vehicle cannot actively avoid obstacles when patrolling the line, thus affecting the patrol efficiency.
[0004] The present invention provides an unmanned vehicle line patrol and obstacle avoidance method, comprising:
[0005] Acquire global positioning information and line patrol mission information of the unmanned vehicle, and generate a line patrol path according to the global positioning information and the line patrol mission information;
[0006] When an obstacle is detected on the patrol route, point cloud information of the obstacle is obtained;
[0007] Calculating the centroid of the obstacle based on the point cloud information, and generating an obstacle avoidance route according to the centroid of the obstacle;
[0008] The unmanned vehicle is controlled according to the global positioning information to travel according to the obstacle avoidance route when patrolling the line, so as to bypass the obstacle.
[0009] In one embodiment, the step of generating an obstacle avoidance route according to the centroid of the obstacle includes:
[0010] Generate a circular area with the centroid of the obstacle as the center and a first preset distance as the radius, and determine a first intersection point and a second intersection point of the circular area with the line patrol path, and a first line segment between the first intersection point and the second intersection point;
[0011] Calculating the maximum distance between the point cloud information of the obstacle and the centroid of the obstacle;
[0012] Taking the centroid of the obstacle as the center, a rectangular area is generated with the sum of the first preset distance and the integer multiple of the maximum distance as the side length, wherein the side length of the rectangular area includes a second line segment and a third line segment parallel to the first line segment;
[0013] Determine a target line segment, among the second line segment and the third line segment, which is at a smaller distance from the first line segment, and obtain a first endpoint and a second endpoint of the target line segment;
[0014] The first intersection point, the second intersection point, the first endpoint and the second endpoint are connected in sequence to generate an obstacle avoidance route.
[0015] In one embodiment, the step of generating a line patrol path according to the global positioning information and the line patrol task information includes:
[0016] Creating a relative coordinate system to determine the position information of the unmanned vehicle based on the global positioning information;
[0017] Converting the longitude and latitude coordinates corresponding to the position information in the global positioning information into first relative coordinates in the relative coordinate system;
[0018] Determining a patrol route of the unmanned vehicle in the relative coordinate system according to the route selection task information;
[0019] The line patrol navigation route is subjected to linear interpolation processing based on the first relative coordinates, and a line patrol path is generated according to the linearly interpolated path points.
[0020] In one embodiment, the step of controlling the unmanned vehicle to travel according to the obstacle avoidance route when patrolling the line according to the global positioning information includes:
[0021] Determining, based on the global positioning information, an actual patrol path of the unmanned vehicle within a preset time period in the future in the obstacle avoidance route;
[0022] Calculating the second relative coordinates of the front wheels on both sides in the relative coordinate system according to the positions of the front wheels on both sides of the unmanned vehicle on the vehicle body;
[0023] According to the actual line patrol path and the second relative coordinate, the unmanned vehicle is controlled to travel according to the obstacle avoidance route when patrolling the line.
[0024] In one embodiment, the step of controlling the unmanned vehicle to travel according to the obstacle avoidance route when patrolling the line according to the actual patrol path and the second relative coordinates includes:
[0025] Determining the relative positions of the front wheels on both sides of the unmanned vehicle and the actual line patrol path according to the second relative coordinates;
[0026] Based on the relative position, if the actual line patrol path is not between the front wheels on both sides of the unmanned vehicle, adjusting the angles of the front wheels on both sides of the unmanned vehicle to control the unmanned vehicle to travel according to the actual line patrol path in the obstacle avoidance route when patrolling the line;
[0027] Based on the relative position, if the actual line-patrolling path is between the front wheels on both sides of the unmanned vehicle, calculate the angle between the body direction of the unmanned vehicle and the actual line-patrolling path according to the second relative coordinate;
[0028] The front wheel angles on both sides of the unmanned vehicle are adjusted according to the included angle to control the unmanned vehicle to travel according to an actual line patrol path in the obstacle avoidance route when patrolling the line.
[0029] In one embodiment, the step of determining the actual patrol path of the unmanned vehicle within a preset time period in the future in the obstacle avoidance route according to the global positioning information includes:
[0030] Determine, based on the global positioning information, a target path point on the obstacle avoidance route that is closest to the unmanned vehicle;
[0031] Along the driving direction of the unmanned vehicle, a path point at a second preset distance of the target path point on the obstacle avoidance route is obtained and connected with the target path point to generate an actual patrol path of the unmanned vehicle in the obstacle avoidance route within a future preset time period.
[0032] In one embodiment, after the step of obtaining the point cloud information of the obstacle, the method further includes:
[0033] Calculate the minimum distance between the obstacle and the unmanned vehicle according to the point cloud information;
[0034] If the minimum distance is less than or equal to a first distance threshold, the unmanned vehicle is controlled to perform a braking operation.
[0035] The present invention also provides an unmanned vehicle line patrol and obstacle avoidance device, comprising:
[0036] A path generation module is used to obtain the global positioning information and line patrol task information of the unmanned vehicle, and generate a line patrol path according to the global positioning information and the line patrol task information;
[0037] An obstacle detection module is used to obtain point cloud information of the obstacle when an obstacle is detected on the patrol route;
[0038] An obstacle avoidance planning module, used to calculate the centroid of the obstacle based on the point cloud information, and generate an obstacle avoidance route according to the centroid of the obstacle;
[0039] The obstacle avoidance control module is used to control the unmanned vehicle to travel according to the obstacle avoidance route when patrolling the line according to the global positioning information, so as to bypass the obstacle.
[0040] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the unmanned vehicle line patrol and obstacle avoidance method as described above is implemented.
[0041] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the unmanned vehicle line patrol and obstacle avoidance method as described in any one of the above methods is implemented.
[0042] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned unmanned vehicle line patrol and obstacle avoidance methods.
[0043] The unmanned vehicle line patrol and obstacle avoidance method, device, equipment and storage medium provided by the present invention generate a line patrol path through the global positioning information and line patrol task information of the unmanned vehicle. When an obstacle is detected, the centroid of the obstacle is calculated according to the point cloud information of the obstacle, so as to re-plan the line patrol path according to the centroid of the obstacle, generate an obstacle avoidance route that allows the unmanned vehicle to bypass the obstacle, and control the unmanned vehicle to travel according to the generated obstacle avoidance route according to the global positioning information of the unmanned vehicle to complete the line patrol task, thereby realizing active obstacle avoidance of the unmanned vehicle during the line patrol process and improving the line patrol efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 This is one of the flow charts of the unmanned vehicle line patrol and obstacle avoidance method provided by the present invention;
[0046] Figure 2 It is a schematic diagram of the obstacle avoidance route generation principle of the unmanned vehicle line patrol and obstacle avoidance method provided by the present invention;
[0047] Figure 3 It is one of the schematic diagrams of automatic line patrol of an unmanned vehicle in the line patrol and obstacle avoidance method of an unmanned vehicle provided by the present invention;
[0048] Figure 4 It is a structural schematic diagram of the unmanned vehicle line patrol and obstacle avoidance device provided by the present invention;
[0049] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Combine the following Figure 1-Figure 3 The present invention describes the unmanned vehicle line patrol and obstacle avoidance method.
[0052] First, refer to Figure 1 , Figure 1 One of the flow charts of the unmanned vehicle line patrol and obstacle avoidance method embodiment provided by the embodiment of the present invention, the unmanned vehicle line patrol and obstacle avoidance method is applied to patrol unmanned vehicles, comprising the following steps:
[0053] Step 100, obtaining global positioning information and line patrol mission information of the unmanned vehicle, and generating a line patrol path according to the global positioning information and the line patrol mission information;
[0054] Obtain the global positioning information and patrol line mission information of the unmanned vehicle, determine the current position of the unmanned vehicle based on the global positioning information, and determine the pre-planned patrol route based on the patrol line mission information. Generate the patrol line path of the unmanned vehicle based on the pre-planned patrol route and the current position of the unmanned vehicle. If the current position of the unmanned vehicle is not on the pre-planned patrol line, the generated patrol line path may include the path of the unmanned vehicle from the current position to the planned patrol line.
[0055] The global positioning information of the unmanned vehicle can be GNSS data obtained through the Global Navigation Satellite System (GNSS), or it can be global positioning information achieved through UWB (Ultra Wide Band) or point cloud map combined with ICP (Iterative Closest Point), NDT (Normal Distribution Transform) and other registration algorithms, which are not specifically limited here. The following uses GNSS data as an example of global positioning information to illustrate that according to the global positioning information of the unmanned vehicle, the current location of the unmanned vehicle is determined, and the patrol path of the unmanned vehicle is generated in combination with the pre-planned patrol route. There is no need to lay cables or tracks in advance, which saves manpower and material resources. Moreover, when the patrol route needs to be adjusted, it is only necessary to adjust the patrol route planned in the patrol task information, and regenerate the patrol path according to the adjusted patrol route, which improves the flexibility and applicability of the unmanned vehicle patrol.
[0056] Step 100 may also include:
[0057] Step 101, creating a relative coordinate system, and determining the position information of the unmanned vehicle according to the global positioning information;
[0058] Step 102, converting the longitude and latitude coordinates corresponding to the position information in the global positioning information into first relative coordinates in the relative coordinate system;
[0059] Step 103, determining a patrol route of the unmanned vehicle in the relative coordinate system according to the route selection task information;
[0060] Step 104: perform linear interpolation processing on the line patrol navigation route based on the first relative coordinates, and generate a line patrol path according to the linearly interpolated path points.
[0061] When generating a patrol line path, first create a relative coordinate system. Specifically, create a relative coordinate system with the navigation origin as the origin, the due east direction as the x-axis, and the due north direction as the y-axis. Convert the longitude and latitude coordinates of the global positioning information to the relative coordinates in the relative coordinate system to obtain the first relative coordinates of the unmanned vehicle in the relative coordinate system. According to the patrol line planned in advance in the patrol line task, the patrol line navigation route of the unmanned vehicle in the relative coordinate system is obtained, and the patrol line navigation route is linearly interpolated. For example, a path point is inserted every 0.1 meters, and the patrol line path of the unmanned vehicle is generated according to the interpolated path points.
[0062] Furthermore, the specific process of relative coordinate transformation of global positioning information is shown in the following formulas 1 to 3, where LOC is the difference in longitude between point O and point C. It can be seen that the shape of the earth is approximately an ellipsoid that is slightly flattened at the poles and has the largest radius at the equator. In the WGS-84 (World Geodetic System) coordinate system, the cross-section of the earth parallel to the equatorial plane is a circle, while the cross-section of the earth perpendicular to the equatorial plane is an ellipse. The average radius of the equatorial circle is the major axis of the ellipse, denoted as a; the distance between the two poles of the earth is the minor axis of the ellipse, denoted as b. Let the navigation origin be point O, any path point be point C, and let the geodetic latitude of point O be B O , the geodetic latitude of point C is B C , the relative coordinates (x, y) of point C can be calculated by the following formulas 1 to 3:
[0063]
[0064]
[0065]
[0066] Step 200, when it is detected that there is an obstacle on the patrol route, obtaining point cloud information of the obstacle;
[0067] The unmanned vehicle travels according to the generated patrol path to complete the patrol task. During the patrol process, it obtains point cloud images in the environment and detects the presence of obstacles. When an obstacle is detected on the patrol path, the point cloud information of the obstacle is obtained. It can be understood that the patrol path can be generated according to the planned patrol route. Obstacles on the patrol path need to be detected when the unmanned vehicle patrols. Specifically, the unmanned vehicle is equipped with devices such as laser radar or depth camera to detect obstacles on the patrol path when the unmanned vehicle patrols the line. Taking laser radar as an example, when the unmanned vehicle travels on the patrol path, the laser radar is used to obtain point cloud images in the environment, and the point cloud images are used to detect whether there are obstacles on the patrol path. When the existence of an obstacle is detected, the point cloud information corresponding to the obstacle is obtained from the acquired cloud image.
[0068] Step 300, calculating the centroid of the obstacle based on the point cloud information, and generating an obstacle avoidance route according to the centroid of the obstacle;
[0069] The centroid of the obstacle is calculated according to the point cloud information of the obstacle, and according to the position of the calculated centroid, an obstacle avoidance route is generated for the unmanned vehicle to bypass the obstacle. The obstacle avoidance route is based on the generated patrol path, and the route is re-planned for the part blocked by the obstacle. The section blocked by the obstacle in the patrol path is replaced with the re-planned section that bypasses the obstacle. The generated new patrol path is the obstacle avoidance route that can bypass the obstacle.
[0070] After step 200, the following steps may also be included:
[0071] Step 210, calculating the minimum distance between the obstacle and the unmanned vehicle according to the point cloud information;
[0072] Step 220: If the minimum distance is less than or equal to a second preset distance, control the unmanned vehicle to perform a braking operation.
[0073] After obtaining the point cloud information of the obstacle, the minimum distance between the obstacle and the unmanned vehicle is calculated based on the point cloud information of the obstacle. The minimum distance is determined by the obstacle point closest to the unmanned vehicle in the point cloud information. When the minimum distance is less than or equal to the set first distance threshold, the unmanned vehicle is controlled to perform a braking operation to avoid a collision. The first distance threshold is, for example, 1.5 meters. If the minimum distance is greater than the set first distance threshold, and the unmanned vehicle is currently bypassing the obstacle, it can continue to drive normally and continue to complete the inspection task, and continuously obtain point cloud images during driving to detect the existence of obstacles; if it is not bypassing the obstacle, then detect whether there is an obstacle point within a certain distance range of the patrol line path, and the distance range is, for example, 3 meters. If there is, it is necessary to re-plan the obstacle avoidance route; if the patrol line path is not within a certain distance range of the obstacle point, then the obstacle does not hinder the driving of the unmanned vehicle, and there is no need to re-plan the route for obstacle avoidance. Just continue driving according to the generated patrol line path.
[0074] That is, when an obstacle is detected on the patrol path, if the obstacle is within a certain distance from the unmanned vehicle, the patrol path is replanned to generate an obstacle avoidance route. If the obstacle is far away from the unmanned vehicle, it can continue to drive until the distance between the obstacle and the unmanned vehicle is within a certain range, then the patrol path is replanned to generate an obstacle avoidance route. If the obstacle is too close to the unmanned vehicle, it is determined whether the unmanned vehicle is currently bypassing the obstacle. If the unmanned vehicle is bypassing the obstacle, the unmanned vehicle is controlled to continue driving according to the planned obstacle avoidance route. If the unmanned vehicle is not bypassing the obstacle, it is necessary to perform braking processing and change N to brake to avoid collision.
[0075] Furthermore, the obstacle can be a static obstacle or a dynamic obstacle. When it is a dynamic obstacle, the motion parameters of the obstacle are calculated based on the point cloud information of the obstacle, and the change relationship between the relative displacement of the obstacle and the unmanned vehicle is determined based on the motion parameters, so as to determine whether obstacle avoidance planning is needed and generate an obstacle avoidance route. For example, when a moving object is detected on the patrol path, based on the calculated motion parameters of the object, it can be estimated that when the unmanned vehicle drives to the current position of the object, the object has moved to a position that does not affect the normal driving of the unmanned vehicle. At this time, there is no need to re-plan the obstacle avoidance for the patrol path. When obstacle avoidance planning is required, the movement trend of the obstacle is predicted based on the calculated motion parameters, so that obstacle avoidance planning is performed based on the predicted movement trend.
[0076] Step 400, controlling the unmanned vehicle to travel according to the obstacle avoidance route when patrolling the line according to the global positioning information to bypass the obstacle.
[0077] Furthermore, after the obstacle avoidance route is generated, the unmanned vehicle is controlled to travel according to the generated obstacle avoidance route when patrolling the line, thereby bypassing obstacles. When the unmanned vehicle is controlled to travel according to the generated obstacle avoidance route, the position of the unmanned vehicle is determined according to the global positioning information of the unmanned vehicle, and the unmanned vehicle is controlled based on the position of the unmanned vehicle so that it will not deviate from the obstacle avoidance route during driving.
[0078] In this embodiment, a line patrol path is generated by using the global positioning information and line patrol task information of the unmanned vehicle. When an obstacle is detected, the centroid of the obstacle is calculated based on the point cloud information of the obstacle, and the line patrol path is replanned based on the centroid of the obstacle to generate an obstacle avoidance route that allows the unmanned vehicle to bypass the obstacle. The unmanned vehicle is controlled to travel along the generated obstacle avoidance route based on the global positioning information of the unmanned vehicle to complete the line patrol task, thereby realizing active obstacle avoidance of the unmanned vehicle during the line patrol process and improving the line patrol efficiency.
[0079] Furthermore, the line patrol path is generated according to the positioning and line patrol task of the unmanned vehicle, and the unmanned vehicle is controlled to travel according to the generated obstacle avoidance route based on the positioning of the unmanned vehicle. There is no need to lay wiring or tracks in advance. When the line patrol is changed, it is only necessary to regenerate a new line patrol path according to the changed line patrol, which saves manpower and material resources and can improve the flexibility and applicability of the unmanned vehicle line patrol.
[0080] In one embodiment, step 300 may further include:
[0081] Step 301, generating a circular area with the centroid of the obstacle as the center and a first preset distance as the radius, and determining a first intersection point and a second intersection point of the circular area with the line patrol path, and a first line segment between the first intersection point and the second intersection point;
[0082] Step 302, calculating the maximum distance between the point cloud information of the obstacle and the centroid of the obstacle;
[0083] Step 303, taking the centroid of the obstacle as the center and the sum of the first preset distance and the integer multiple of the maximum distance as the side length, generating a rectangular area, wherein the side length of the rectangular area includes a second line segment and a third line segment parallel to the first line segment;
[0084] Step 304, determining a target line segment, which is at a smaller distance from the first line segment, among the second line segment and the third line segment, and obtaining a first endpoint and a second endpoint of the target line segment;
[0085] Step 305: connect the first intersection, the second intersection, the first endpoint, and the second endpoint in sequence to generate an obstacle avoidance route.
[0086] When generating an obstacle avoidance route based on the centroid of the obstacle, three straight lines are generated as the obstacle avoidance route by generating auxiliary squares to replace the route blocked by the obstacle. Figure 2 , Figure 2 Schematic diagram of the principle of obstacle avoidance route generation. Figure 2 In the figure, point O is the centroid of the obstacle, and line segment ABCD is the obstacle avoidance segment planned according to the centroid of the obstacle. It is used to replace the segment blocked by the obstacle on the patrol path, and thus an obstacle avoidance route can be generated.
[0087] based on Figure 2 First, calculate the centroid O of all obstacles within a certain distance range from the patrol path, such as within 3 meters, and calculate the maximum distance R between the above obstacle and the centroid. Use the centroid O as the center and the first preset distance as the radius to make a circle to generate a circular area, and determine the two intersection points A and B of the circular area with the patrol path, as well as the first line segment AB, where the first preset distance is, for example, 6 meters. Then use the centroid O as the center and use the sum of the first preset distance and the integer multiple of the maximum distance R between the obstacle and the centroid, such as 6+2R as the side length to make a rectangle to generate a square area. In the square area, there are two sides parallel to the first line segment AB, namely the second line segment and the third line segment. The side length of the square is times smaller than the diameter of the circular area. Calculate the distances between the first line segment and the second and third line segments respectively, determine the target line segment CD that is closer to the first line segment from the second and third line segments, and connect points A, B and the endpoints C and D of line segment CD in sequence to generate an obstacle avoidance route. That is, determine the target line segment based on the relative position relationship between the centroid O and the patrol path. If O is on the left side of AB, take the two endpoints of the line segment on the right side of the square, otherwise take the two endpoints of the line segment on the left side of the square, record them as points C and D, cut off the original path between points A and B, and connect points A, C, D, and B in sequence to obtain the obstacle avoidance route.
[0088] In this embodiment, three straight lines are generated by auxiliary squares as obstacle avoidance sections to replace sections blocked by obstacles in the patrol path. This can make the generated obstacle avoidance route transition smoother, reduce the control complexity and patrol difficulty of the unmanned vehicle, and thus improve the obstacle avoidance success rate.
[0089] In one embodiment, step 400 may further include:
[0090] Step 401, determining an actual patrol path of the unmanned vehicle within a preset time period in the future in the obstacle avoidance route according to the global positioning information;
[0091] Step 402, calculating the second relative coordinates of the front wheels on both sides of the unmanned vehicle in the relative coordinate system according to the positions of the front wheels on both sides of the unmanned vehicle on the vehicle body;
[0092] Step 403: According to the actual line patrol path and the second relative coordinates, the unmanned vehicle is controlled to travel according to the obstacle avoidance route when patrolling the line.
[0093] When controlling the unmanned vehicle to drive along the generated obstacle avoidance route, first determine the current position of the unmanned vehicle based on the global positioning information of the unmanned vehicle, where the current position of the unmanned vehicle can be represented by the coordinates of the center of the unmanned vehicle. Based on the current position of the unmanned vehicle, determine its actual line patrol path within a preset time in the future in the obstacle avoidance route, and calculate the second relative coordinates of the front wheels on both sides of the unmanned vehicle in the relative coordinate system according to the position of the front wheels on both sides of the unmanned vehicle on the vehicle body and the current position of the unmanned vehicle, so as to determine the position of the front wheels on both sides of the unmanned vehicle. According to the current position of the unmanned vehicle and the position of the front wheels on both sides, when controlling the unmanned vehicle to patrol the line, drive along the generated obstacle avoidance route.
[0094] Wherein, step 401 may further include:
[0095] Step 4011, determining a target path point on the obstacle avoidance route that is closest to the unmanned vehicle according to the global positioning information;
[0096] Step 4012, along the driving direction of the unmanned vehicle, obtain the path point of the target path point at the second preset distance on the obstacle avoidance route and connect it with the target path point to generate the actual patrol path of the unmanned vehicle in the obstacle avoidance route within a future preset time period.
[0097] When determining the actual patrol path of the unmanned vehicle within a preset time in the future, the current location of the unmanned vehicle is determined based on the global positioning information, and then the target path point closest to the unmanned vehicle is determined from the obstacle avoidance route, and the target path point is used as the corresponding path point of the unmanned vehicle on the obstacle avoidance route. Among them, when calculating the distance between the path point on the obstacle avoidance route and the unmanned vehicle, it can be calculated The distance between the path point on the obstacle avoidance route and the center point of the unmanned vehicle. When determining the target path point, it can be selected from the path points within a certain range of the unmanned vehicle. For example, starting from the corresponding point of the previous unmanned vehicle on the obstacle avoidance route, all path points within a range of 15 meters backward along the direction of the unmanned vehicle are traversed, and the path point closest to the current position of the unmanned vehicle is used as the corresponding point of the unmanned vehicle on the obstacle avoidance route, that is, the target path point.
[0098] Starting from the target path point, along the driving direction of the unmanned vehicle, obtain a path point on the obstacle avoidance route that is at a second preset distance from the target path point, and connect the path point with the target path point to generate the actual patrol path of the unmanned vehicle in the obstacle avoidance route within a future preset time length. The preset time length is, for example, 500ms, and the second preset distance is, for example, 4 meters.
[0099] Furthermore, step 403 may also include:
[0100] Step 4031, determining the relative positions of the front wheels on both sides of the unmanned vehicle and the actual line patrol path according to the second relative coordinates;
[0101] Step 4032: Based on the relative position, if the actual line patrol path is not between the front wheels on both sides of the unmanned vehicle, adjust the angles of the front wheels on both sides of the unmanned vehicle to control the unmanned vehicle to travel according to the actual line patrol path in the obstacle avoidance route when patrolling the line;
[0102] Step 4033: based on the relative position, if the actual line-patrolling path is between the front wheels on both sides of the unmanned vehicle, calculate the angle between the body direction of the unmanned vehicle and the actual line-patrolling path according to the second relative coordinate;
[0103] Step 4034, adjusting the front wheel angles on both sides of the unmanned vehicle according to the included angle, so as to control the unmanned vehicle to travel according to the actual patrol path in the obstacle avoidance route when patrolling the line.
[0104] According to the second relative coordinates of the front wheels on both sides of the unmanned vehicle in the relative coordinate system, the global coordinates of the front wheels on both sides and the center of the unmanned vehicle in the global coordinate system are calculated, and the relative positions of the front wheels on both sides and the current actual line patrol path are determined according to the calculated global coordinates. Based on this relative position, if the actual line patrol path is not between the front wheels on both sides, the angles of the front wheels on both sides are adjusted according to the position of the center of the unmanned vehicle, thereby changing the driving direction of the unmanned vehicle so that the actual line patrol path is located between the front wheels on both sides of the unmanned vehicle, thereby controlling the unmanned vehicle to travel according to the actual line patrol path in the obstacle avoidance route. Specifically, when the center of the unmanned vehicle is on the left side of the actual line patrol path, turn the wheel to the right, and when the center of the unmanned vehicle is on the left side of the actual line patrol path, turn the wheel to the left. The steering angle can be calculated based on the angle between the direction of the vehicle body and the direction of the actual line patrol path, as well as the parameters of the unmanned vehicle itself, and is not specifically limited here. When the actual line patrol path is between the front wheels on both sides of the unmanned vehicle, the angle between the body direction of the unmanned vehicle and the actual line patrol path is calculated according to the relative coordinates of the front wheels on both sides of the unmanned vehicle, and the angles of the front wheels on both sides of the unmanned vehicle are adjusted according to the angle, so as to control the unmanned vehicle to travel along the actual line patrol path in the obstacle avoidance route when patrolling the line, and avoid deviating from the actual line patrol path.
[0105] Reference Figure 3 , Figure 3 To control the unmanned vehicle to patrol the line according to the actual patrol path, Figure 3 In the figure, number 1 represents the unmanned vehicle, number 2 represents the target path point corresponding to the unmanned vehicle in the obstacle avoidance route, number 3 represents the path point at the second preset distance after the target path point, number 4 represents the actual line patrol path, and number 5 represents the body direction of the unmanned vehicle. The line connecting the path points numbered 2 and 3 is the actual line patrol path of the unmanned vehicle in the obstacle avoidance route within the future preset time period. If the actual line patrol path 4 is between the front wheels on both sides, let the angle between the body direction 5 and the actual line patrol path 4 be α. If the body direction 5 is in the clockwise direction of the actual line patrol path 4, turn the wheel to the left, for example, turn the wheel to the left by 2α degrees; if the body direction 5 is in the counterclockwise direction of the actual line patrol path 4, turn the wheel to the right by 2α degrees. If the actual patrol line path 4 is not between the front wheels on both sides of the unmanned vehicle 1, when the unmanned vehicle 1 is on the right side of the actual patrol line path 4, turn the wheel to the left, for example, 30° to the left; when the unmanned vehicle 1 is on the left side of the actual patrol line 4, turn the wheel to the right 30°. Whether the unmanned vehicle is on the left or right side of the actual patrol line path can be determined based on the center of the unmanned vehicle 1, that is, when the center of the unmanned vehicle 1 is on the left side of the actual patrol line path 4, the unmanned vehicle 1 is on the left side of the actual patrol line path 4, and when the center of the unmanned vehicle 1 is on the right side of the actual patrol line path 4, the unmanned vehicle 1 is on the right side of the actual patrol line path 4. According to Figure 3As shown in the schematic diagram, the actual line patrol path 4 is not between the front wheels on both sides of the unmanned vehicle 1, and the unmanned vehicle 1 is located on the right side of the actual line patrol path 4. In this case, the front wheel angle of the unmanned vehicle can be adjusted by turning the wheel 30° to the left to change the driving direction of the unmanned vehicle. When the unmanned vehicle deviates from the actual line patrol path, it can be corrected in time so that the unmanned vehicle can travel along the actual line patrol path in the obstacle avoidance route to complete the inspection task.
[0106] In this embodiment, based on the generated obstacle avoidance route, the actual line patrol path within a preset time period in the future is used to determine whether the actual driving path of the unmanned vehicle deviates, and timely correction is made when deviation occurs to ensure that the unmanned vehicle can travel according to the actual line patrol path in the obstacle avoidance route to complete the line patrol task and ensure the quality of completion of the line patrol task.
[0107] The unmanned vehicle line patrol and obstacle avoidance device provided by the present invention is described below. The unmanned vehicle line patrol and obstacle avoidance device described below and the unmanned vehicle line patrol and obstacle avoidance method described above can be referred to each other.
[0108] Reference Figure 4 The unmanned vehicle line patrol and obstacle avoidance device provided by the embodiment of the present invention comprises:
[0109] A path generation module 10 is used to obtain the global positioning information and line patrol task information of the unmanned vehicle, and generate a line patrol path according to the global positioning information and the line patrol task information;
[0110] The obstacle detection module 20 is used to obtain point cloud information of the obstacle when an obstacle is detected on the patrol route;
[0111] An obstacle avoidance planning module 30, configured to calculate the centroid of the obstacle based on the point cloud information, and generate an obstacle avoidance route according to the centroid of the obstacle;
[0112] The obstacle avoidance control module 40 is used to control the unmanned vehicle to travel according to the obstacle avoidance route when patrolling the line according to the global positioning information, so as to bypass the obstacle.
[0113] In one embodiment, the obstacle avoidance planning module 30 is further used to:
[0114] Generate a circular area with the centroid of the obstacle as the center and a first preset distance as the radius, and determine a first intersection point and a second intersection point of the circular area with the line patrol path, and a first line segment between the first intersection point and the second intersection point;
[0115] Calculating the maximum distance between the point cloud information of the obstacle and the centroid of the obstacle;
[0116] Taking the centroid of the obstacle as the center, a rectangular area is generated with the sum of the first preset distance and the integer multiple of the maximum distance as the side length, wherein the side length of the rectangular area includes a second line segment and a third line segment parallel to the first line segment;
[0117] Determine a target line segment, among the second line segment and the third line segment, which is at a smaller distance from the first line segment, and obtain a first endpoint and a second endpoint of the target line segment;
[0118] The first intersection point, the second intersection point, the first endpoint and the second endpoint are connected in sequence to generate an obstacle avoidance route.
[0119] In one embodiment, the path generation module 10 is further used to:
[0120] Creating a relative coordinate system to determine the position information of the unmanned vehicle based on the global positioning information;
[0121] Converting the longitude and latitude coordinates corresponding to the position information in the global positioning information into first relative coordinates in the relative coordinate system;
[0122] Determining a patrol route of the unmanned vehicle in the relative coordinate system according to the route selection task information;
[0123] The line patrol navigation route is subjected to linear interpolation processing based on the first relative coordinates, and a line patrol path is generated according to the linearly interpolated path points.
[0124] In one embodiment, the obstacle avoidance control module 40 is further configured to:
[0125] Determining, based on the global positioning information, an actual patrol path of the unmanned vehicle within a preset time period in the future in the obstacle avoidance route;
[0126] Calculating the second relative coordinates of the front wheels on both sides in the relative coordinate system according to the positions of the front wheels on both sides of the unmanned vehicle on the vehicle body;
[0127] According to the actual line patrol path and the second relative coordinate, the unmanned vehicle is controlled to travel according to the obstacle avoidance route when patrolling the line.
[0128] In one embodiment, the obstacle avoidance control module 40 is further configured to:
[0129] Determining the relative positions of the front wheels on both sides of the unmanned vehicle and the actual line patrol path according to the second relative coordinates;
[0130] Based on the relative position, if the actual line patrol path is not between the front wheels on both sides of the unmanned vehicle, adjusting the angles of the front wheels on both sides of the unmanned vehicle to control the unmanned vehicle to travel according to the actual line patrol path in the obstacle avoidance route when patrolling the line;
[0131] Based on the relative position, if the actual line-patrolling path is between the front wheels on both sides of the unmanned vehicle, calculate the angle between the body direction of the unmanned vehicle and the actual line-patrolling path according to the second relative coordinate;
[0132] The front wheel angles on both sides of the unmanned vehicle are adjusted according to the included angle to control the unmanned vehicle to travel according to an actual line patrol path in the obstacle avoidance route when patrolling the line.
[0133] In one embodiment, the obstacle avoidance control module 40 is further configured to:
[0134] Determine, based on the global positioning information, a target path point on the obstacle avoidance route that is closest to the unmanned vehicle;
[0135] Along the driving direction of the unmanned vehicle, a path point at a second preset distance of the target path point on the obstacle avoidance route is obtained and connected with the target path point to generate an actual patrol path of the unmanned vehicle in the obstacle avoidance route within a future preset time period.
[0136] In one embodiment, the unmanned vehicle line patrol and obstacle avoidance device further includes a braking control module for:
[0137] Calculate the minimum distance between the obstacle and the unmanned vehicle according to the point cloud information;
[0138] If the minimum distance is less than or equal to a first distance threshold, the unmanned vehicle is controlled to perform a braking operation.
[0139] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 830 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the unmanned vehicle line patrol obstacle avoidance method, which includes:
[0140] Acquire global positioning information and line patrol mission information of the unmanned vehicle, and generate a line patrol path according to the global positioning information and the line patrol mission information;
[0141] When an obstacle is detected on the patrol route, point cloud information of the obstacle is obtained;
[0142] Calculating the centroid of the obstacle based on the point cloud information, and generating an obstacle avoidance route according to the centroid of the obstacle;
[0143] The unmanned vehicle is controlled according to the global positioning information to travel according to the obstacle avoidance route when patrolling the line, so as to bypass the obstacle.
[0144] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0145] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the unmanned vehicle line patrol obstacle avoidance method provided by the above methods, the method includes:
[0146] Acquire global positioning information and line patrol mission information of the unmanned vehicle, and generate a line patrol path according to the global positioning information and the line patrol mission information;
[0147] When an obstacle is detected on the patrol route, point cloud information of the obstacle is obtained;
[0148] Calculating the centroid of the obstacle based on the point cloud information, and generating an obstacle avoidance route according to the centroid of the obstacle;
[0149] The unmanned vehicle is controlled according to the global positioning information to travel according to the obstacle avoidance route when patrolling the line, so as to bypass the obstacle.
[0150] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the unmanned vehicle line patrol and obstacle avoidance method provided by the above methods, the method comprising:
[0151] Acquire global positioning information and line patrol mission information of the unmanned vehicle, and generate a line patrol path according to the global positioning information and the line patrol mission information;
[0152] When an obstacle is detected on the patrol route, point cloud information of the obstacle is obtained;
[0153] Calculating the centroid of the obstacle based on the point cloud information, and generating an obstacle avoidance route according to the centroid of the obstacle;
[0154] The unmanned vehicle is controlled according to the global positioning information to travel according to the obstacle avoidance route when patrolling the line, so as to bypass the obstacle.
[0155] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0156] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0157] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for unmanned vehicle line patrol and obstacle avoidance, It is characterized in that The following steps are involved: Acquire global positioning information and line patrol mission information of the unmanned vehicle, and generate a line patrol path according to the global positioning information and the line patrol mission information; When an obstacle is detected on the patrol route, point cloud information of the obstacle is obtained; Calculating the centroid of the obstacle based on the point cloud information, and generating an obstacle avoidance route according to the centroid of the obstacle; Controlling the unmanned vehicle to travel along the obstacle avoidance route when patrolling the line according to the global positioning information to bypass the obstacle; The step of generating an obstacle avoidance route according to the centroid of the obstacle comprises: Generate a circular area with the centroid of the obstacle as the center and a first preset distance as the radius, and determine a first intersection point and a second intersection point of the circular area with the line patrol path, and a first line segment between the first intersection point and the second intersection point; Calculating the maximum distance between the point cloud information of the obstacle and the centroid of the obstacle; Taking the centroid of the obstacle as the center, a square area is generated with the sum of the integer multiple of the maximum distance and the first preset distance as the side length, wherein the side length of the square area includes a second line segment and a third line segment parallel to the first line segment; Determine a target line segment, among the second line segment and the third line segment, which is at a smaller distance from the first line segment, and obtain a first endpoint and a second endpoint of the target line segment; The first intersection, the first endpoint, the second endpoint and the second intersection are connected in sequence to generate an obstacle avoidance route.
2. The unmanned vehicle line patrol and obstacle avoidance method according to claim 1, It is characterized in that The step of generating a line patrol path according to the global positioning information and the line patrol task information comprises: Creating a relative coordinate system to determine the position information of the unmanned vehicle based on the global positioning information; Converting the longitude and latitude coordinates corresponding to the position information in the global positioning information into first relative coordinates in the relative coordinate system; Determining a line patrol navigation route of the unmanned vehicle in the relative coordinate system according to the line patrol mission information; The line patrol navigation route is subjected to linear interpolation processing based on the first relative coordinates, and a line patrol path is generated according to the linearly interpolated path points.
3. The unmanned vehicle line patrol and obstacle avoidance method according to claim 2, It is characterized in that The step of controlling the unmanned vehicle to travel according to the obstacle avoidance route when patrolling the line according to the global positioning information includes: Determining, based on the global positioning information, an actual patrol path of the unmanned vehicle within a preset time period in the future in the obstacle avoidance route; Calculating the second relative coordinates of the front wheels on both sides in the relative coordinate system according to the positions of the front wheels on both sides of the unmanned vehicle on the vehicle body; According to the actual line patrol path and the second relative coordinate, the unmanned vehicle is controlled to travel according to the obstacle avoidance route when patrolling the line.
4. The unmanned vehicle line patrol and obstacle avoidance method according to claim 3, It is characterized in that The step of controlling the unmanned vehicle to travel according to the obstacle avoidance route when patrolling the line according to the actual patrol path and the second relative coordinates includes: Determining the relative positions of the front wheels on both sides of the unmanned vehicle and the actual line patrol path according to the second relative coordinates; Based on the relative position, if the actual line patrol path is not between the front wheels on both sides of the unmanned vehicle, adjusting the angles of the front wheels on both sides of the unmanned vehicle to control the unmanned vehicle to travel according to the actual line patrol path in the obstacle avoidance route when patrolling the line; Based on the relative position, if the actual line-patrolling path is between the front wheels on both sides of the unmanned vehicle, calculate the angle between the body direction of the unmanned vehicle and the actual line-patrolling path according to the second relative coordinate; The front wheel angles on both sides of the unmanned vehicle are adjusted according to the included angle to control the unmanned vehicle to travel according to an actual line patrol path in the obstacle avoidance route when patrolling the line.
5. The unmanned vehicle line patrol and obstacle avoidance method according to claim 3, It is characterized in that The step of determining the actual patrol path of the unmanned vehicle within a preset time period in the future in the obstacle avoidance route according to the global positioning information comprises: Determine, based on the global positioning information, a target path point on the obstacle avoidance route that is closest to the unmanned vehicle; Along the driving direction of the unmanned vehicle, a path point at a second preset distance of the target path point on the obstacle avoidance route is obtained and connected with the target path point to generate an actual patrol path of the unmanned vehicle in the obstacle avoidance route within a future preset time period.
6. The unmanned vehicle line patrol and obstacle avoidance method according to claim 1, It is characterized in that After the step of obtaining the point cloud information of the obstacle, the method further includes: Calculate the minimum distance between the obstacle and the unmanned vehicle according to the point cloud information; If the minimum distance is less than or equal to a first distance threshold, the unmanned vehicle is controlled to perform a braking operation.
7. An unmanned vehicle patrol and obstacle avoidance device, It is characterized in that include: A path generation module is used to obtain the global positioning information and line patrol task information of the unmanned vehicle, and generate a line patrol path according to the global positioning information and the line patrol task information; An obstacle detection module is used to obtain point cloud information of the obstacle when an obstacle is detected on the patrol route; An obstacle avoidance planning module, used to calculate the centroid of the obstacle based on the point cloud information, and generate an obstacle avoidance route according to the centroid of the obstacle; An obstacle avoidance control module, used to control the unmanned vehicle to travel according to the obstacle avoidance route when patrolling the line according to the global positioning information, so as to bypass the obstacle; The obstacle avoidance planning module is also used for: Generate a circular area with the centroid of the obstacle as the center and a first preset distance as the radius, and determine a first intersection point and a second intersection point of the circular area with the line patrol path, and a first line segment between the first intersection point and the second intersection point; Calculating the maximum distance between the point cloud information of the obstacle and the centroid of the obstacle; Taking the centroid of the obstacle as the center, a square area is generated with the sum of the integer multiple of the maximum distance and the first preset distance as the side length, wherein the side length of the square area includes a second line segment and a third line segment parallel to the first line segment; Determine a target line segment, among the second line segment and the third line segment, which is at a smaller distance from the first line segment, and obtain a first endpoint and a second endpoint of the target line segment; The first intersection, the first endpoint, the second endpoint and the second intersection are connected in sequence to generate an obstacle avoidance route.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the unmanned vehicle line patrol and obstacle avoidance method as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by the processor, the unmanned vehicle line patrol and obstacle avoidance method as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Mobile robot navigation system and method
CN109002046A
Field operation path planning method and device for unmanned tractor
CN112015176A