Unmanned sweeper automatic control method and unmanned sweeper
Patent Information
- Application Number
- CN202511860144.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-02-13
AI Technical Summary
The current unmanned sweeping vehicles have a large workload for real-time image acquisition and analysis during operation, and the results are unstable, which affects the stability of automatic control and makes collisions more likely.
Before the unmanned sweeper operates, the global image of the target work area is processed to extract the boundary of the drivable area. During the operation, a detection box is constructed based on the real-time position, and collision detection is performed in combination with the boundary of the drivable area, which reduces the detection workload and improves the accuracy of the results.
By extracting the drivable area boundary offline, the uncertainty of real-time image analysis is reduced, the workload of collision detection is decreased, and the accuracy of detection results and the stability of automatic control are improved.
Smart Images

Figure CN121523342A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of control, in particular to an automatic control method of an unmanned cleaning vehicle and the unmanned cleaning vehicle. BACKGROUND
[0002] As an important component of smart city and intelligent sanitation, the unmanned cleaning vehicle has significant necessity and multiple advantages in popularization and application. The unmanned cleaning vehicle can greatly alleviate the labor shortage pressure and ensure the sustainable and efficient operation of urban environmental management. It can realize all-weather operation, avoid exposing sanitation workers to dangerous or extreme environments, and significantly improve operation safety and occupational health protection. The unmanned cleaning vehicle can efficiently, accurately and standardizedly operate, improve the overall image of the city and the quality of life of residents, and help the construction of smart city.
[0003] In the working environment of the unmanned cleaning vehicle, there are often non-drivable areas, including green areas, flower bed areas, bus stations and other areas. The unmanned cleaning vehicle needs to avoid driving into these non-drivable areas during operation, otherwise the unmanned cleaning vehicle may collide with obstacles, causing abnormal operation. In the prior art, real-time image acquisition and analysis are usually performed during the operation of the unmanned cleaning vehicle, and the real-time position of the unmanned cleaning vehicle is combined to determine whether a collision will occur. In the prior art, the real-time image acquisition and analysis method is used, and the acquired images are constantly changing and updating, resulting in large analysis and processing workload and unstable results, which further affects the collision analysis and detection, making the automatic control of the unmanned cleaning vehicle unstable and prone to collision. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide an automatic control method of an unmanned cleaning vehicle and the unmanned cleaning vehicle, which reduces the detection workload and improves the accuracy of the detection results.
[0005] In a first aspect, the present application provides an automatic control method of an unmanned cleaning vehicle, which comprises: Before the unmanned cleaning vehicle starts operation, a global image of a target operation area is obtained, the global image is processed, and the boundary of a drivable area in the target operation area is obtained; After the unmanned cleaning vehicle starts operation, the real-time position of the unmanned cleaning vehicle in the target operation area is obtained; Based on the real-time position, a detection frame surrounding the unmanned cleaning vehicle is constructed, and the target drivable area boundary in the drivable area boundary located in the detection frame is determined; Combined with the real-time position of the unmanned cleaning vehicle and the target drivable area boundary, it is detected whether the unmanned cleaning vehicle will collide, and the unmanned cleaning vehicle is controlled based on the detection result.
[0006] In an optional implementation, the processing of the global image to obtain the drivable area boundary in the target work area comprises: converting the global image into a global binary image; performing contour detection on the global binary image to obtain a contour set containing all the detected contours; traversing each contour in the contour set and converting the contour into a polyline polygon composed of multiple straight line segments; converting the converted contour from an image coordinate system to a global coordinate system to obtain the drivable area boundary in the target work area.
[0007] In an optional implementation, the contour detection on the global binary image to obtain a contour set containing all the detected contours comprises: performing an inversion operation on the global binary image, and performing contour detection on the global binary image after the inversion operation to obtain multiple contours; obtaining the area of each contour, and constructing a hierarchical relationship of the detected contours based on the area of each contour; obtaining the contour set based on all the detected contours and the hierarchical relationship thereof.
[0008] In an optional implementation, the conversion of the contour into a polyline polygon composed of multiple straight line segments comprises: obtaining a contour point set composed of points of the contour; simplifying the points in the contour point set according to a set approximation precision value to obtain a simplified contour point set; constructing multiple straight line segments based on the points in the simplified contour point set, and obtaining a polyline polygon based on the constructed multiple straight line segments.
[0009] In an optional implementation, the drivable area boundary comprises multiple contours, and each contour is a polyline polygon composed of multiple straight line segments; The determination of the target drivable area boundary in the drivable area boundary located in the detection frame comprises: calculating the distance between each straight line segment in the contour and the center point of the unmanned sweeper for each contour in the drivable area boundary; if the distance is less than a set value, it is determined that the straight line segment is located in the detection frame; determining the target drivable area boundary based on all the straight line segments located in the detection frame.
[0010] In an optional implementation, the calculation of the distance between each straight line segment in the contour and the center point of the unmanned sweeper comprises: For each straight line segment, a vector from the start point of the straight line segment to the center point is obtained; According to the vector from the start point of the straight line segment to the center point, the vector from the start point to the end point of the straight line segment, and the length of the straight line segment, a projection parameter is calculated; Based on the projection parameter, the distance between the straight line segment and the center point is determined.
[0011] In an optional embodiment, the step of detecting whether the unmanned sweeper will collide based on the real-time position of the unmanned sweeper and the target drivable area boundary comprises: Based on the real-time position of the unmanned sweeper and the size information of the unmanned sweeper, a surrounding box surrounding the unmanned sweeper is constructed; Based on the target drivable area boundary, an obstacle boundary box is constructed; The surrounding box and the obstacle boundary box are combined to detect whether the unmanned sweeper will collide.
[0012] In an optional embodiment, the step of constructing an obstacle boundary box based on the target drivable area boundary comprises: The target drivable area boundary is translated in a direction away from the center point of the unmanned sweeper to obtain a translated boundary; Based on the target drivable area boundary and the translated boundary, an obstacle boundary box is constructed.
[0013] In an optional embodiment, the step of combining the surrounding box and the obstacle boundary box to detect whether the unmanned sweeper will collide comprises: The normal of each edge of the surrounding box and the normal of each edge of the obstacle boundary box are obtained, and each obtained normal is taken as a candidate axis; For each candidate axis, each vertex of the surrounding box is projected onto the candidate axis, and each vertex of the obstacle boundary box is projected onto the candidate axis; Based on the projection points of the surrounding box on the candidate axis, a first projection interval is determined, and based on the projection points of the obstacle boundary box on the candidate axis, a second projection interval is determined; It is detected whether there is an overlap between the first projection interval and the second projection interval; If there is a candidate axis in the plurality of candidate axes for which there is no overlap between the first projection interval and the second projection interval, it is determined that the unmanned sweeper will not collide; If there is an overlap between the first projection interval and the second projection interval on each candidate axis in the plurality of candidate axes, it is determined that the unmanned sweeper will collide.
[0014] In a second aspect, the present application provides an unmanned cleaning vehicle, comprising: one or more processors; a storage device configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of the preceding embodiments.
[0015] The present application provides an unmanned cleaning vehicle automatic control method and an unmanned cleaning vehicle. Before the unmanned cleaning vehicle starts working, a global image of a target working area is obtained, the global image is processed, and a drivable area boundary in the target working area is obtained. After the unmanned cleaning vehicle starts working, a real-time position of the unmanned cleaning vehicle in the target working area is obtained, a detection frame containing the unmanned cleaning vehicle is constructed based on the real-time position, and a target drivable area boundary in the drivable area boundary located in the detection frame is determined. In combination with the real-time position of the unmanned cleaning vehicle and the target drivable area boundary, whether the unmanned cleaning vehicle will collide is detected, and the unmanned cleaning vehicle is controlled based on the detection result.
[0016] In the present solution, before the unmanned cleaning vehicle works, the drivable area boundary is determined by analyzing the global image in the target working area, which avoids the problems of large analysis and processing workload and unstable image caused by real-time image acquisition and analysis during working. In addition, the detection frame is constructed based on the real-time position of the unmanned cleaning vehicle, and then the collision detection is performed based on the target drivable area boundary in the detection frame, which can reduce the detection workload of the collision detection and further improve the accuracy of the detection result. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0018] Figure 1 The flowchart of the unmanned cleaning vehicle automatic control method provided by the embodiments of the present application; Figure 2 The schematic diagram of the gray pixel map in the embodiments of the present application; Figure 3 The flowchart of the sub-step included in S11 in the embodiments of the present application; Figure 1 Figure 4 The schematic diagram of the global binary map in the embodiments of the present application; Figure 5 A schematic diagram of the feasible area boundary in the embodiment of the present application; Figure 6 A schematic diagram of the feasible area boundary in the embodiment of the present application; Figure 1 A flow chart of the sub-steps included in S13 in the embodiment of the present application; Figure 7 A schematic diagram of the detection frame and the target feasible area boundary in the embodiment of the present application; Figure 8 A schematic diagram of the detection frame and the target feasible area boundary in the embodiment of the present application; Figure 1 A flow chart of the sub-steps included in S14 in the embodiment of the present application; Figure 9 A schematic diagram of the obstacle boundary frame in the embodiment of the present application; Figure 10 A functional module block diagram of the automatic control system of the unmanned sweeper provided in the embodiment of the present application; Figure 11 A structural block diagram of the unmanned sweeper provided in the embodiment of the present application. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
[0020] Please refer to Figure 1 A flow chart of the automatic control method of the unmanned sweeper provided in the embodiment of the present application, it should be understood that in other embodiments, the order of some steps of the automatic control method of the unmanned sweeper in the present embodiment can be exchanged according to actual needs, or some steps can be omitted or deleted. The detailed steps of the automatic control method of the unmanned sweeper are described as follows.
[0021] S11, before the unmanned sweeper starts working, obtaining a global image of a target working area, processing the global image to obtain the feasible area boundary in the target working area; S12, after the unmanned sweeper starts working, obtaining the real-time position of the unmanned sweeper in the target working area; S13, based on the real-time position, constructing a detection frame surrounding the unmanned sweeper, and determining the target feasible area boundary in the feasible area boundary located in the detection frame; S14, combining the real-time position of the unmanned sweeper and the target feasible area boundary, detecting whether the unmanned sweeper will collide, and controlling the unmanned sweeper based on the detection result.
[0022] An unmanned cleaning vehicle tends to relatively fixedly clean one or more areas. Before the unmanned cleaning vehicle cleans a certain area, a global analysis can be performed on the area to determine which areas in the area are drivable areas and which areas are non-drivable areas. The drivable areas are road areas, and the unmanned cleaning vehicle can drive in and clean the drivable areas. The non-drivable areas include areas such as greenery areas, flower beds, pools, bus stations, and the like, and the unmanned cleaning vehicle is limited to enter the non-drivable areas and needs to avoid collision with the boundaries of the non-drivable areas.
[0023] In this embodiment, before the unmanned cleaning vehicle starts work, a global image of the target work area can be obtained by a collection device arranged on the unmanned cleaning vehicle or a monitoring device arranged in the target work area.
[0024] The collected global image is processed, mainly including boundary extraction of each different area in the global image, so that the drivable area boundary in the target work area can be determined. The drivable area boundary is the demarcation between the drivable area and the non-drivable area.
[0025] After the unmanned cleaning vehicle starts work, the real-time position of the unmanned cleaning vehicle is obtained by a positioning module on the unmanned cleaning vehicle. Since the unmanned cleaning vehicle can only collide with obstacles near it, in this embodiment, a detection frame surrounding the unmanned cleaning vehicle is constructed based on the real-time position of the unmanned cleaning vehicle, which can be a circular frame, an elliptical frame, a rectangular frame, etc. without limitation, with the unmanned cleaning vehicle as the center point. Then, the target drivable area boundary in the drivable area boundary located in the detection frame is determined, and finally, the real-time position of the unmanned cleaning vehicle and the target drivable area boundary are combined to detect whether the unmanned cleaning vehicle will collide. In this way, the problem of large detection workload in global drivable area boundary collision detection can be avoided, and the precision of the detection result can be improved based on local boundary collision detection.
[0026] Finally, the unmanned cleaning vehicle is controlled based on the detection result. For example, if the detection result indicates that the unmanned cleaning vehicle will collide, the unmanned cleaning vehicle can be controlled to travel urgently, and an abnormal signal can be sent. If the detection result indicates that the unmanned cleaning vehicle will not collide, the unmanned cleaning vehicle can be controlled to continue normal cleaning work.
[0027] The automatic control method of the unmanned cleaning vehicle provided in the embodiment determines the drivable area boundary by analyzing the global image in the target operation area before the unmanned cleaning vehicle operates. The drivable area boundary is extracted offline, so it can be verified in advance whether the extraction is successful. After the offline extraction of the drivable area boundary is successful, the processing logic based on the image pixels has actually been completed. After the extraction of the drivable area boundary is realized in advance, the subsequent range boundary searching and collision detection will not change due to uncertain factors such as image pixels, that is, the stable extraction of the target drivable area boundary and collision detection can be realized regardless of the position of the unmanned cleaning vehicle. The existing technology adopts the mode of extracting the boundary by intercepting the original pixel image of the real-time position of the unmanned cleaning vehicle. The image changes constantly due to the change of the position of the unmanned cleaning vehicle, the calculation resource consumption is large, and the extraction result has uncertainty. The present solution can eliminate the uncertainty of the extraction and processing of the image pixels in the existing technology, and avoid the problems of large analysis and processing workload and unstable image caused by real-time image acquisition and analysis during operation.
[0028] In addition, the detection frame is constructed based on the real-time position of the unmanned cleaning vehicle, and then the collision detection is performed based on the target drivable area boundary in the detection frame, which can reduce the detection workload of the collision detection and improve the accuracy of the detection result.
[0029] The specific implementation modes of the above steps will be described in detail below.
[0030] When the unmanned cleaning vehicle operates in a closed park, the coordinate reference of its perception, positioning, planning and control is a global coordinate system. The global map is a grid-based grayscale pixel-level map in the global coordinate system, that is, the physical space is divided into grids, and each grid is represented by a grayscale pixel in the form of a two-dimensional image. Among them, grid: divide the continuous space into regular grid cells (cells), each cell corresponds to a "grid". Pixel: the smallest unit in an image, each grid is represented by a pixel. Grayscale: each pixel has only one brightness value (0~255), which represents different meanings (such as free, obstacle, unknown). Map: a spatial structure representing the environment around the robot or vehicle.
[0031] The grid grayscale pixel map is like a "chessboard" drawn for the real world, and each grid is painted black, white or gray to inform the unmanned cleaning vehicle whether it can go there. It is one of the basic "languages" for autonomous driving and robot perception of the world. For example, Figure 2 As shown in FIG. 1 of the specification, wherein the black area represents the drivable area of the unmanned cleaning vehicle, and the white area represents the non-drivable area, such as a flower bed.
[0032] During the automated operation of the unmanned sweeper, the vehicle must maintain a safe distance from the boundary of the drivable area; otherwise, there is a risk of collision or falling. When the vehicle collides with the boundary of the drivable area, the vehicle needs to brake urgently and sound an alarm.
[0033] In existing methods, the extraction of the drivable area boundary is performed online, including pixel-level boundary extraction and boundary fitting optimization. Each of these processes requires acquiring pixel-level images within a certain range based on the real-time location of the unmanned sweeper. Existing solutions are not only resource-intensive, but also suffer from unstable results due to rapid image updates.
[0034] Therefore, in this embodiment, before the unmanned sweeper begins its work on the target work area, a global image of the target work area is first obtained. This global image is then processed to obtain the drivable boundary within the target work area. This avoids the problems of large processing load and unstable results that occur when performing image analysis and processing while the sweeper is working. For details, please refer to... Figure 3 This step can be achieved in the following way: S111 converts the global image into a global binary image; S112, Perform contour detection on the global binary image to obtain a contour set containing all detected contours; S113, traverse each contour in the contour set and convert the contour into a polyline polygon composed of multiple straight line segments; S114 transforms each contour from the image coordinate system to the global coordinate system to obtain the drivable area boundary within the target working area.
[0035] In this embodiment, the acquired global image is a color space image, containing a large amount of color information, which is inconvenient for subsequent processing. Therefore, the global image is first converted into a global binary image.
[0036] For each pixel in the global image, its pixel value is obtained and compared with a preset threshold. If the pixel value is greater than or equal to the preset threshold, its grayscale value is set to 255, which is represented as white in the binary image. If the pixel value is less than the preset threshold, its grayscale value is set to 0, which is represented as black in the binary image. The preset threshold could be, for example, 127.
[0037] In this way, the rich color information in the global image can be simplified, making subsequent algorithm processing faster and more efficient.
[0038] Then, contour detection is performed on the obtained global binary image, and the detected contours are used to form a contour set. Specifically, this step can be implemented in the following way: The global binary image is inverted, and contour detection is performed on the inverted global binary image to obtain multiple contours; the area of each contour is obtained, and a hierarchical relationship is constructed based on the area of each contour; a contour set is obtained based on all detected contours and their hierarchical relationship.
[0039] Optionally, in this embodiment, contour extraction functions in OpenCV can be called to perform contour detection and extraction, such as the cv::findContours function.
[0040] In the resulting global binary image, roads and other features are generally represented as white foreground elements, while the background (such as flower beds and ponds) is black. For example... Figure 4 As shown in the diagram. The contour extraction function by default only detects the contours of white areas, while internal holes appear as black in the original global binary image and cannot be directly detected. Therefore, in this embodiment, the global binary image is first inverted, that is, a logical NOT operation is performed on the global binary image, converting the original white areas (255) to black areas (0), and the original black areas (0) to white areas (255). Thus, in the global binary image after the inversion operation, target objects such as green plants, flower beds, and ponds are converted to white, while roads are converted to black.
[0041] Based on this, the contour detection function is called to perform contour detection on the global binary image after the inversion operation.
[0042] After detecting all contours, the area of each contour can be obtained. Then, a hierarchical relationship can be constructed based on the area of each contour. For example, the contour with the largest area can be found first; this contour represents the outermost boundary of the entire drivable area. Specifically, an index array `cnt_indices` can be created, containing 0, 1, 2, ..., `cnts.size()-1`. `std::sort` is used to sort these indices in descending order of the area of the corresponding contour. `ext_cnt_idx` is the index of the contour with the largest area.
[0043] Next, construct a contour set including the contour with the largest area and its direct child contours. Specifically, initialize the contours vector and add the contour with the largest area (ext_cnt_idx). Iterate through the hierarchy array, checking if the parent (hierarchy[i][3]) of each contour is ext_cnt_idx. If it is, it means that it is a "direct child contour" of the contour with the largest area (that is, the hole inside this outer contour). Add these child contours to the contours vector as well.
[0044] The final contour set contains an outer contour and the contours of all the holes within it. For example, it can identify an area with multiple internal holes (such as a pond or flower bed in the middle of an unmanned sweeper's operating area) and extract its complete structure. Based on this, it iterates through each contour in the contour set, converting each contour into a polyline polygon composed of multiple straight line segments. Specifically, this step can be implemented as follows: Obtain the contour point set that constitutes the contour; simplify the points in the contour point set according to the set approximation accuracy value to obtain the simplified contour point set; construct multiple line segments based on the points in the simplified contour point set, and obtain a polyline polygon based on the constructed multiple line segments.
[0045] The contour set obtained through the above steps includes multiple closed contours, each composed of multiple points. This can be understood as the points in each contour being very densely packed, thus forming continuous, smooth curves or straight lines. The purpose of this step is to simplify the large number of dense points in the original contour into a small number of key vertices, forming a simpler polygon and improving algorithm efficiency.
[0046] Specifically, all contours can be traversed, and the OpenCV function `cv::approxPolyDP` can be called to approximate the i-th contour as a polygon. In this way, a curved boundary can be transformed into a polyline polygon composed of straight line segments.
[0047] Finally, the transformed contours are converted from the image coordinate system to the global coordinate system, that is, the points in the OpenCV pixel coordinate system are converted into real physical coordinates on the map (the unit can be meters), which facilitates the subsequent implementation of automatic control algorithms.
[0048] All of the above processes are completed in advance before the unmanned sweeper operates. That is, the boundaries of the drivable area are extracted offline in advance and saved so that they can be called up at any time during the operation of the unmanned sweeper.
[0049] After the unmanned sweeper starts working, it is necessary to detect in real time whether the unmanned sweeper will collide with obstacles during the operation, and then execute the corresponding control.
[0050] During the operation of the unmanned sweeper, its real-time position within the target work area is obtained. This can be determined using either RTK (Real-Time Kinematic) or SLAM (Simultaneous Localization and Mapping) positioning methods. To avoid excessive detection workload, this embodiment only performs obstacle detection within a certain range around the unmanned sweeper. Based on this, after determining the real-time position of the unmanned sweeper, a detection bounding box surrounding the sweeper is constructed, thereby determining the boundary of the target drivable area within the detection bounding box.
[0051] As described above, the drivable area boundary comprises multiple contours, each of which is a polygonal line composed of multiple straight line segments. For example... Figure 5 As shown in the diagram, the black area represents the drivable area, and the white area represents the non-drivable area. A1-A2-A3-A4 and B1-B2-B3-B4 are the boundaries of the drivable area, which include the straight segments A1A2, A2A3, A3A4, B1B2, B2B3, and B3B4.
[0052] Please see Figure 6 When determining the boundary of a target drivable area within the detection frame in the drivable area boundary, it can be achieved in the following way: S131, For each contour in the boundary of the drivable area, calculate the distance between each straight line segment in the contour and the center point of the unmanned sweeper. S132, if the distance is less than the set value, then the straight line segment is determined to be within the detection frame; S133, determine the boundary of the target drivable area based on all straight line segments located within the detection frame.
[0053] In this embodiment, when determining the target drivable area boundary located within the detection frame in the drivable area boundary, the detection and judgment are based on the distance between each straight line segment in each contour and the center point of the unmanned sweeper. Specifically, this can be achieved in the following way: For each line segment, obtain the vector from the starting point to the center point; based on the vector from the starting point to the center point, the vector from the starting point to the ending point, and the length of the line segment, calculate the projection parameters; determine the distance between the line segment and the center point based on the projection parameters.
[0054] like Figure 5As shown in the diagram, point O represents the center point of the unmanned sweeper in real time. During implementation, a two-level loop is established. The first loop iterates through multiple contours within the extracted drivable area boundary, and the second loop iterates through multiple line segments within each contour. The distance from each line segment to the center point O is calculated, and all line segments with a distance less than a set value are extracted and stored in a vector container.
[0055] Assuming the line segment is BC, the distance from the center point O to the line segment BC can be divided into three cases: the distance to point B is the shortest; the distance to point C is the shortest; and the perpendicular distance to a point on the line segment BC is the shortest.
[0056] Based on this, in this embodiment, the projection parameters can be calculated according to the vector from the starting point to the center point of the line segment, the vector from the starting point to the ending point of the line segment, and the length of the line segment.
[0057] If the projection parameter is less than 0, then point O is located outside point B (the starting point) of line segment BC, with point B being the closest point, and the distance is the distance between point O and point B. If the projection parameter is greater than 1, then point O is located outside point C (the ending point) of line segment BC, with point C being the closest point, and the distance is the distance between point O and point C. If the projection parameter is greater than or equal to 0 and less than or equal to 1, then the projection point of point O on line segment BC lies between points B and C, and the distance is the perpendicular distance from point O to line segment BC.
[0058] Let P be the projection of point O onto line segment BC. Then, the projection point P can be represented as follows:
[0059] Among them, projection parameters t The calculation formula is as follows:
[0060] The distance between each straight line segment and the center point of the unmanned sweeper can be accurately calculated using the above method. Furthermore, this calculation method has a time complexity of O(1), requiring only a constant number of arithmetic operations, making it very suitable for real-time calculation.
[0061] The final straight line segment located within the detection frame constitutes the boundary of the target drivable area, such as... Figure 7 As shown in the figure, the yellow circle represents the detection frame, and the straight line segments located within the detection frame include A2A3, A3A4, B2B3, and B3B4.
[0062] Based on this, the real-time location of the unmanned cleaning vehicle and the boundary of the target drivable area can be combined to detect whether a collision is likely. For details, please refer to [link / reference needed]. Figure 8 This can be achieved in the following ways: S141, Based on the real-time location and size information of the unmanned sweeper, construct a bounding box surrounding the unmanned sweeper; S142, Construct obstacle bounding boxes based on the target drivable area boundaries; S143, combining the bounding box and obstacle boundary box, detects whether the unmanned cleaning vehicle will collide.
[0063] In this embodiment, the center point of the unmanned sweeper is determined based on its real-time location, and a bounding box surrounding the unmanned sweeper is constructed based on the center point and the size information of the unmanned sweeper, such as... Figure 9 As shown in the green box. The size information includes the length and width of the unmanned cleaning vehicle.
[0064] Considering that if collision detection is performed directly between the bounding box of the unmanned sweeper and the boundary of the target drivable area, complex geometric calculations are required for each point or endpoint of the boundary, such as the shortest distance from the point to the bounding box and the intersection detection of the edge with the bounding box. The computational cost is very high and it is not suitable for real-time processing scenarios.
[0065] Based on the above considerations, in this embodiment, obstacle bounding boxes are constructed based on the boundaries of the target drivable area. Collision detection for the unmanned sweeper can then be performed by combining the bounding boxes and obstacle bounding boxes. Collision detection between two boxes has significantly reduced computational complexity compared to collision detection between edges and boxes, thus improving computational efficiency.
[0066] In this embodiment, the step of constructing the obstacle boundary box based on the boundary of the target drivable area can be achieved in the following way: The boundary of the target drivable area is translated away from the center point of the unmanned sweeper to obtain the translated boundary; based on the boundary of the target drivable area and the translated boundary, the obstacle boundary box is constructed.
[0067] In this embodiment, Figure 9 As shown in the example, for the straight line segment A2A3 in the boundary of the target drivable area, the straight line segment A2A3 can be translated in a direction away from the center point of the unmanned sweeper to obtain the translated boundary, such as A2'A3'. The translation distance can be set according to the requirements, such as 0.2m, 0.3m, etc.
[0068] Based on the original straight line segment A2A3 and the translated boundary A2'A3', the obstacle bounding box A2A2'A3A3' is constructed.
[0069] Similarly, for the line segments A3A4, B2B3, and B3B4, new obstacle bounding boxes A3A3'A4A4', B2B2'B3B3', and B3B3'B4B4' are formed. These obstacle bounding boxes can be added to a vector container. These bounding boxes are rectangular and convex polygons. Later, when determining whether a collision has occurred between the unmanned cleaning vehicle and the boundary of the drivable area, detection can be performed based on these constructed obstacle bounding boxes.
[0070] It should be noted that the obstacle bounding box can be as follows: Figure 9 The rectangular frame shown can also be constructed as a trapezoidal frame or other convex polymorphs based on requirements; this embodiment does not limit the specific form.
[0071] In this embodiment, convex polygon construction is performed only on the drivable area boundary within a certain range of the current real-time location of the unmanned sweeper. This saves resources while ensuring the safety of the unmanned sweeper operation. Furthermore, subsequent collision detection processing is performed on the drivable area boundary using convex polygons such as obstacle bounding boxes. Rectangular or trapezoidal boxes constructed through line segment translation are simple and applicable, and these boxes naturally possess the properties of convex polygons, simplifying the processing logic and making the algorithm concise, efficient, and practical.
[0072] Based on this, by combining the bounding box and obstacle boundary box, the detection of whether the unmanned cleaning vehicle will collide can be achieved in the following way: Obtain the normals of each edge of the bounding box and each edge of the obstacle bounding box, and use each obtained normal as a candidate axis. For each candidate axis, project each vertex of the bounding box onto the candidate axis, and project each vertex of the obstacle bounding box onto the candidate axis. Determine a first projection interval based on the projection points of the bounding box onto the candidate axis, and determine a second projection interval based on the projection points of the obstacle bounding box onto the candidate axis. Detect whether there is an overlap between the first projection interval and the second projection interval. If there is a candidate axis among multiple candidate axes where the first projection interval and the second projection interval do not overlap, it is determined that the unmanned sweeper will not collide. If there is an overlap between the first projection interval and the second projection interval on each of the multiple candidate axes, it is determined that the unmanned sweeper will collide.
[0073] In this embodiment, after determining the obstacle bounding box corresponding to the boundary of the target executable area using the above method, the obstacle bounding box can be sent to the downstream local planning module, which can then call the relevant collision detection function to perform collision detection.
[0074] Specifically, the normal of each edge of the bounding box and each edge of the obstacle bounding box can be used as a candidate axis, and each point on the bounding box and the obstacle bounding box can be projected onto each candidate axis.
[0075] If a candidate axis can be found on which the projection points of two boxes do not overlap, then it can be determined that the candidate axis can separate the two boxes, meaning that the two boxes will not collide. If no candidate axis can be found that prevents the projection points of two boxes from overlapping, then it indicates that the two boxes will collide.
[0076] This method determines whether the unmanned cleaning vehicle will collide with an obstacle. If a collision is imminent, the vehicle must be brought to an emergency stop, and an alarm must be triggered. If no collision is expected, the vehicle can continue its normal cleaning operation.
[0077] Please see Figure 10 The present invention also provides an automatic control system for unmanned sweepers, which can be applied to perform automatic control of unmanned sweepers. The system can be implemented by software and / or hardware and is generally integrated into the control equipment of the unmanned sweeper.
[0078] like Figure 10 As shown, the automatic control system of the unmanned sweeper includes an offline processing module, an acquisition module, a determination module, and a detection and control module. The functions of each module of this automatic control system are described in detail below.
[0079] The offline processing module is used to obtain a global image of the target work area before the unmanned sweeper starts working, process the global image, and obtain the boundary of the drivable area within the target work area. The acquisition module is used to obtain the real-time location of the unmanned sweeper within the target work area after the unmanned sweeper starts working; The determination module is used to construct a detection box surrounding the unmanned sweeper based on the real-time location, and to determine the boundary of the target drivable area within the detection box in the drivable area boundary. The detection and control module is used to detect whether the unmanned sweeper will collide with the real-time location of the unmanned sweeper and the boundary of the target drivable area, and control the unmanned sweeper based on the detection results.
[0080] The implementation process of the functions and roles of each module in the above system is detailed in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0081] Figure 11 This is a structural schematic diagram of an unmanned cleaning vehicle provided in an embodiment of the present invention. Figure 11 As shown, the unmanned cleaning vehicle includes one or more processors and a storage device; the processor in the device can be one or more, Figure 11Taking a processor as an example; the storage device is used to store one or more programs; the one or more programs are executed by one or more processors, causing one or more processors to implement the automatic control method for unmanned sweepers as described in any of the embodiments of the present invention.
[0082] Unmanned cleaning vehicles may also include devices such as positioning equipment and data collection equipment.
[0083] The processor and storage devices in the unmanned cleaning vehicle can be connected via bus or other means. Figure 11 Taking the example of a connection between China and Israel via a bus.
[0084] The storage device in this apparatus serves as a computer-readable storage medium, capable of storing one or more programs. These programs can be software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the unmanned sweeper automatic control method provided in this embodiment of the invention. The processor executes the software programs, instructions, and modules stored in the storage device to perform various functional applications and data processing of the unmanned sweeper, thereby realizing the unmanned sweeper automatic control method in the above-described method embodiments.
[0085] The storage device may include a stored program area and a stored data area, wherein the stored program area may store the operating system and at least one application program required for a function; and the stored data area may store data created based on the use of the device. Furthermore, the storage device may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.
[0086] In some instances, the storage device may further include memory remotely located relative to the processor, which can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0087] Furthermore, when one or more programs included in the aforementioned device are executed by one or more processors, the programs perform the following operations: Before the unmanned sweeper starts working, a global image of the target work area is obtained, and the global image is processed to obtain the boundary of the drivable area within the target work area. After the unmanned sweeper starts working, obtain the real-time location of the unmanned sweeper in the target work area; A detection box surrounding the unmanned sweeper is constructed based on real-time location, and the boundary of the target drivable area located within the detection box is determined within the boundary of the drivable area. By combining the real-time location of the unmanned cleaning vehicle with the boundary of the target drivable area, the system detects whether the unmanned cleaning vehicle will collide, and controls the unmanned cleaning vehicle based on the detection results.
[0088] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, performs an automatic control method for an unmanned sweeper vehicle, the method comprising: Before the unmanned sweeper starts working, a global image of the target work area is obtained, and the global image is processed to obtain the boundary of the drivable area within the target work area. After the unmanned sweeper starts working, obtain the real-time location of the unmanned sweeper in the target work area; A detection box surrounding the unmanned sweeper is constructed based on real-time location, and the boundary of the target drivable area located within the detection box is determined within the boundary of the drivable area. By combining the real-time location of the unmanned cleaning vehicle with the boundary of the target drivable area, the system detects whether the unmanned cleaning vehicle will collide, and controls the unmanned cleaning vehicle based on the detection results.
[0089] Optionally, when the program is executed by the processor, it can also be used to execute the automatic control method for unmanned sweepers provided in any embodiment of the present invention.
[0090] The computer storage medium of this invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable CD-ROM, optical storage device, magnetic storage device, or any suitable combination thereof. The computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0091] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device.
[0092] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, radio frequency (RF), etc., or any suitable combination thereof.
[0093] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0094] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. An automatic control method of an unmanned sweeper, characterized by comprising: The method comprises: Before the unmanned sweeper starts work, a global image of a target work area is obtained, and the global image is processed to obtain a drivable area boundary in the target work area; After the unmanned sweeper starts work, a real-time position of the unmanned sweeper in the target work area is obtained; Based on the real-time position, a detection frame surrounding the unmanned sweeper is constructed, and a target drivable area boundary in the drivable area boundary located in the detection frame is determined; In combination with the real-time position of the unmanned sweeper and the target drivable area boundary, whether the unmanned sweeper will collide is detected, and the unmanned sweeper is controlled based on the detection result.
2. The automatic control method of the unmanned sweeper according to claim 1, characterized by, The step of processing the global image to obtain the drivable area boundary in the target work area comprises: The global image is converted into a global binary image; Contour detection is performed on the global binary image to obtain a contour set containing all detected contours; Each contour in the contour set is converted into a polyline polygon composed of multiple straight line segments; Each converted contour is converted from an image coordinate system to a global coordinate system to obtain the drivable area boundary in the target work area.
3. The automatic control method of the unmanned sweeper according to claim 2, wherein The step of performing contour detection on the global binary image to obtain a contour set containing all detected contours comprises: An inversion operation is performed on the global binary image, and contour detection is performed on the global binary image after the inversion operation to obtain multiple contours; The area of each contour is obtained, and the detected contours are constructed in a hierarchical relationship based on the area of each contour; The contour set is obtained based on all detected contours and the hierarchical relationship thereof.
4. The automatic control method of the unmanned sweeper according to claim 2, wherein The step of converting the contour into a polyline polygon composed of multiple straight line segments comprises: A contour point set composed of points of the contour is obtained; The points in the contour point set are simplified according to a set approximation precision value to obtain a simplified contour point set; Multiple straight line segments are constructed based on the points in the simplified contour point set, and a polyline polygon is obtained based on the constructed multiple straight line segments.
5. The automatic control method of the unmanned sweeper according to claim 1, wherein The drivable area boundary comprises multiple contours, and each contour is a polyline polygon composed of multiple straight line segments; The step of determining the target drivable area boundary in the drivable area boundary located in the detection frame comprises: For each contour in the drivable area boundary, the distance between each straight line segment in the contour and the center point of the unmanned sweeper is calculated; If the distance is less than a set value, it is determined that the straight line segment is located in the detection frame; The target drivable area boundary is determined based on all straight line segments located in the detection frame.
6. The automatic control method of the unmanned sweeper according to claim 5, wherein The step of calculating the distance between each straight line segment in the contour and the center point of the unmanned sweeper comprises: For each straight line segment, a vector from the start point of the straight line segment to the center point is obtained; According to the vector from the start point of the straight line segment to the center point, the vector from the start point to the end point of the straight line segment, and the length of the straight line segment, a projection parameter is calculated; The distance between the straight line segment and the center point is determined based on the projection parameter.
7. The automatic control method of the unmanned sweeper according to claim 1, wherein The step of combining the real-time position of the unmanned sweeper and the target drivable area boundary to detect whether the unmanned sweeper will collide, comprises: constructing an enclosing frame surrounding the unmanned sweeper based on the real-time position of the unmanned sweeper and the size information of the unmanned sweeper; constructing an obstacle boundary frame based on the target drivable area boundary; combining the enclosing frame and the obstacle boundary frame to detect whether the unmanned sweeper will collide.
8. The automatic control method of the unmanned sweeper according to claim 7, wherein The step of constructing an obstacle boundary frame based on the target drivable area boundary, comprises: translating the target drivable area boundary in a direction away from the center point of the unmanned sweeper to obtain a translated boundary; constructing an obstacle boundary frame based on the target drivable area boundary and the translated boundary.
9. The automatic control method of the unmanned sweeper according to claim 7, wherein The step of combining the enclosing frame and the obstacle boundary frame to detect whether the unmanned sweeper will collide, comprises: obtaining the normal of each edge of the enclosing frame and the normal of each edge of the obstacle boundary frame, and taking the obtained normals as candidate axes; projecting each vertex of the enclosing frame to the candidate axis and projecting each vertex of the obstacle boundary frame to the candidate axis for each candidate axis; determining a first projection interval based on the projection points of the enclosing frame on the candidate axis and determining a second projection interval based on the projection points of the obstacle boundary frame on the candidate axis; detecting whether there is an overlap between the first projection interval and the second projection interval; if there is a candidate axis in the plurality of candidate axes for which there is no overlap between the first projection interval and the second projection interval, determining that the unmanned sweeper will not collide; if there is an overlap between the first projection interval and the second projection interval on each candidate axis in the plurality of candidate axes, determining that the unmanned sweeper will collide.
10. An unmanned sweeper characterized by comprising: comprise: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 9.
Citation Information
Patent Citations
System and method for generating lane-level navigation map of unmanned vehicle
CN106441319A
Method and device for generating cleaning path of robot
CN110874101A
Mobile robot, edge moving method thereof and computer storage medium
CN114253267A
Operation boundary generation method, operation control method, equipment and storage medium
CN117095044A
Collision detection method and device, electronic equipment and storage medium
CN118168563A