Path planning method and device, computer equipment and computer readable storage medium
By dividing semantic sub-regions in environments such as garages and generating path plans that comply with traffic rules, the problem of frequent robot path crossings of functional areas in traditional methods is solved, improving safety and efficiency and ensuring safe collaboration between robots, vehicles, and pedestrians.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-03-31
AI Technical Summary
In environments with specific traffic rules, such as parking garages, traditional path planning methods often result in robots traversing different functional areas, increasing the risk of collisions with vehicles and pedestrians, and failing to conform to the vehicle's direction of travel, leading to decreased operational efficiency and safety.
By acquiring information on obstacle and traffic semantic elements, the target area is divided into multiple semantic sub-regions. Motion rules are determined based on the semantic element types, and a spiral-shaped coverage path generation method based on contour contraction is adopted to generate a path plan that conforms to traffic rules.
This improves the safety and operational efficiency of robots in environments such as garages, ensures that the path is consistent with the direction of vehicle travel, reduces the risk of collisions, and achieves the safety and effectiveness of full-coverage cleaning tasks.
Smart Images

Figure CN121764071A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of path planning technology, and in particular to a path planning method, apparatus, computer device, and computer-readable storage medium. Background Technology
[0002] A garage environment can include typical traffic elements such as driveways, lane intersections, parking spaces, and speed bumps, as well as architectural obstacles. These elements together constitute a map structure with semantic information. Vehicles and pedestrians generally follow certain traffic rules when navigating in such environments to maintain order and safety within the area.
[0003] In related technologies, robot path planning methods are mostly based on geometric or topological map information, aiming to achieve comprehensive coverage of the area to be performed. However, in environments with implicit traffic flow rules, such as parking garages, the cleaning paths generated by traditional methods may frequently traverse different functional areas or interact with commonly used vehicle travel directions, thus posing new requirements for the robot's operational efficiency and collaborative safety. Therefore, there is an urgent need to research new methods for cleaning path planning that adapt to such structured dynamic environments. Summary of the Invention
[0004] Therefore, it is necessary to provide a path planning method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the safety of robot operation and is particularly suitable for complex environments with specific traffic rules, such as garages.
[0005] Firstly, this application provides a path planning method, the method comprising:
[0006] Obtain obstacle information and traffic semantic element information in the target area;
[0007] The target area is divided into at least one sub-area corresponding to a traffic semantic element based on the traffic semantic element information.
[0008] For each of the sub-regions, a passable area within the sub-region is determined based on the obstacle information;
[0009] Based on the traffic semantic element information corresponding to the sub-region, determine the robot's movement rules within the passable area of the sub-region;
[0010] According to the motion rules, the robot performs path planning within the passable area of the sub-region to obtain the path planning result corresponding to the sub-region.
[0011] Based on the path planning results corresponding to each of the sub-regions, the target path of the robot within the target region is determined.
[0012] Secondly, this application also provides a path planning device, the device comprising:
[0013] The acquisition module is used to acquire obstacle information and traffic semantic element information in the target area;
[0014] The segmentation module is used to divide the target area into at least one sub-region corresponding to a traffic semantic element based on the traffic semantic element information.
[0015] The first determining module is used to determine, for each of the sub-regions, a passable area within the sub-region based on the obstacle information;
[0016] The second determining module is used to determine the movement rules of the robot within the passable area of the sub-region based on the traffic semantic element information corresponding to the sub-region;
[0017] The planning module is used to plan the path of the robot in the passable area of the sub-region according to the motion rules, and obtain the path planning result corresponding to the sub-region;
[0018] The third determining module is used to determine the target path of the robot in the target area based on the path planning results corresponding to each of the sub-regions.
[0019] Thirdly, this application also provides a computer device including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps included in any embodiment of the path planning method described in the first aspect.
[0020] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps included in any embodiment of the path planning method as described in the first aspect.
[0021] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps included in any embodiment of the path planning method as described in the first aspect.
[0022] The aforementioned path planning method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire obstacle information and traffic semantic element information in a target area. Considering that different traffic semantic elements generally correspond to different traffic rules, the target area is divided into at least one sub-region corresponding to a traffic semantic element based on the traffic semantic element information. This facilitates subsequent path planning for each sub-region according to the traffic rules corresponding to that sub-region, avoiding the risk of collisions between the robot and vehicles or pedestrians caused by the robot navigating between various traffic elements. For each sub-region, a passable area is determined based on the obstacle information; the movement rules for the robot within the passable area are determined based on the traffic semantic element information corresponding to the sub-region; path planning is performed on the robot within the passable area according to the movement rules, resulting in a path planning result for that sub-region; and the target path for the robot within the target area is determined based on the path planning results for each sub-region. The embodiments of the present invention take into account the distribution of various traffic semantic element areas within the target area, such as garages, and the basic traffic rules for vehicle driving when planning the path. This can ensure that the robot avoids collisions with vehicles to a greater extent when performing cleaning operations, thereby improving the safety and effectiveness of the robot in performing tasks. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating a path planning method in one embodiment;
[0025] Figure 2 This is a flowchart illustrating the path planning method in another embodiment;
[0026] Figure 3 This is a schematic diagram of the original map in another embodiment;
[0027] Figure 4 This is a schematic diagram of selecting a target area in another embodiment;
[0028] Figure 5 This is a schematic diagram of the lane line area in another embodiment;
[0029] Figure 6This is a schematic diagram of a semantic map in another embodiment;
[0030] Figure 7 This is a schematic diagram of a sub-region within the target area in another embodiment;
[0031] Figure 8 This is a schematic diagram illustrating obstacle information within the target area in another embodiment;
[0032] Figure 9 This is a schematic diagram of the coverage path of the lane line sub-region within the target area in another embodiment;
[0033] Figure 10 This is a schematic diagram of obstacle avoidance path coverage in a parking space sub-area within the target area in another embodiment;
[0034] Figure 11 This is a schematic diagram of the target path of the robot in the target area in another embodiment;
[0035] Figure 12 This is a structural block diagram of a path planning device in one embodiment;
[0036] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0038] Before describing the embodiments of the present invention, the related technologies and their existing problems will be further explained:
[0039] Robots such as cleaning robots, food delivery robots, and security robots perform tasks in complex and diverse environments. For cleaning robots, path planning typically requires a path that covers the area to be cleaned. Specific types of areas may have specific traffic rules. Taking a garage as an example, when a cleaning robot operates in such an area with defined traffic rules, it inevitably encounters vehicles and pedestrians. Traditional autonomous cleaning robot path planning often doesn't consider these traffic rules, resulting in paths that constantly weave between various traffic elements and paths that don't align with vehicle travel directions. This significantly increases the risk of collisions between the robot and vehicles or pedestrians.
[0040] Based on this, in order to solve the above-mentioned technical problems, the embodiments of this application provide a path planning scheme that can improve the safety of robot operation and is particularly suitable for complex environments with specific traffic rules, such as garages.
[0041] In one exemplary embodiment, such as Figure 1 As shown, a path planning method is provided, which can be applied to electronic devices, such as mobile robots. A mobile robot is a robot with mobility capabilities, such as a cleaning robot, a logistics robot, or a patrol robot. Taking the application of this method to a cleaning robot as an example, the method includes the following steps 202 to 212.
[0042] Step 202: Obtain obstacle information and traffic semantic element information in the target area.
[0043] The target area refers to the specific range within which the robot needs to perform its tasks. This area can be selected by the user on a map through a human-computer interaction interface. For example, the target area for a cleaning robot could be a specific cleaning area in a garage. Obstacle information includes the location, outline, and grid occupancy of static obstacles (such as walls, pillars, and fixed facilities) and dynamic obstacles (such as vehicles and pedestrians), which are collected in real time by environmental perception devices such as lidar, depth cameras, or ultrasonic sensors on the robot or obtained from a pre-built map.
[0044] Traffic semantic element information is used to represent the traffic semantic elements included in the target area. Traffic semantic elements are language elements with specific traffic attributes and rules; for example, parking spaces, lanes, and intersections in a garage environment are all types of traffic semantic elements. Traffic semantic element information can include the type, location, and corresponding preset traffic rules of the traffic semantic elements.
[0045] Traffic semantic elements can be extracted from a pre-constructed semantic map corresponding to the target area. This semantic map is generated through preliminary site surveys and annotations, and is used to associate the geometric map with traffic semantic information. Taking a parking garage as an example, the garage environment mainly consists of elements with clear traffic functions, such as driving lanes, lane intersections, parking spaces, and speed bumps. These semantic elements collectively define the traffic flow patterns and rules within the garage. For example, driving lane elements include lane width, centerline geometry, and the traffic direction rules they follow (such as right-hand drive or left-hand drive rules); intersection elements identify the areas where multiple lanes intersect, which may have higher interaction complexity and potential risks; parking space elements represent vehicle parking areas, where obstacles (such as vehicles) are mostly stationary or moving at low speeds. Speed bumps contain information such as their physical location and recommended passing speed.
[0046] Step 204: Divide the target area into at least one sub-region corresponding to a traffic semantic element based on the traffic semantic element information.
[0047] In this invention, considering that traditional robot path planning relies solely on geometric spatial information and cannot identify functional zones and risk areas within the environment, robots may repeatedly cross lanes and intersection centers during task execution. This path pattern not only intersects with vehicle traffic flow multiple times, increasing the probability of interaction and conflict with vehicles, but also frequently exposes the robot to high-risk environments, significantly increasing the risk of collision. Therefore, in this embodiment of the invention, the geometric polygonal contours of various traffic semantic elements (such as lanes, intersections, and parking spaces) defined in the semantic map are used to perform spatial intersection operations with the user-specified target area, thereby decomposing the target area into multiple non-overlapping and fully covered sub-regions. Each sub-region is uniquely labeled with its semantic type (e.g., "lane sub-region," "intersection sub-region," "parking space sub-region"). This semantically guided partitioning process ensures that subsequent path planning can be tailored to the characteristics of different functional areas, strictly limiting the robot's coverage path to be generated within each sub-area. For example, the lane coverage path will only be generated along the lane direction, and there will be no situation where part of the path turns into the adjacent parking space, thus avoiding the dangerous behavior of the path randomly shuttling between different functional areas and repeatedly crossing the lane in traditional methods.
[0048] Step 206: For each of the sub-regions, determine the passable area within the sub-region based on the obstacle information.
[0049] For each semantic sub-region, to further refine the safe passage space for the robot within it, the geometric boundary of the sub-region can be superimposed with the obstacle occupancy information obtained in step 202. Through binarization and morphological operations in image processing, the continuous area within the sub-region that is not occupied by obstacles and can be safely passed by the robot is accurately calculated, i.e., the "passable area". This area is the basis for generating the coverage path. Binarization may include marking unoccupied grids in the sub-region as 255 (white, passable) and occupied grids as 0 (black, impassable). Morphological operations may include erosion and collision operations. For example, first, an erosion operation is performed (using a circular kernel of a preset size, such as 3×3) to eliminate isolated obstacle points caused by sensor noise; then, an expansion operation is performed (using a circular kernel with a radius equal to the robot radius plus a safety distance (0.2-0.3 meters)) to ensure a safety margin at the obstacle boundary. The resulting white connected area is the passable area within the sub-region.
[0050] Step 208: Determine the movement rules of the robot within the passable area of the sub-region based on the traffic semantic element information corresponding to the sub-region.
[0051] Motion rules refer to the behavioral guidelines that robots should follow when performing coverage operations within specific semantic sub-regions. These rules can be determined by the semantic type of the sub-region (i.e., the type of the corresponding semantic traffic element). For example, for a driving lane sub-region, the core motion rule is that the global direction of travel of the coverage path (e.g., clockwise or counterclockwise) must be consistent with the vehicle traffic direction (right-hand drive or left-hand drive rule) followed by the lane, in order to match the expected direction of vehicle travel and reduce the risk of frontal collisions. For intersection sub-regions, motion rules may include safety strategies such as automatically triggering deceleration upon entering the area and improving obstacle detection sensitivity to cope with higher interaction complexity. For parking space sub-regions, motion rules focus on effectively avoiding static obstacles (such as parked vehicles) during the coverage process.
[0052] Step 210: According to the motion rules, the robot performs path planning within the passable area of the sub-region to obtain the path planning result corresponding to the sub-region.
[0053] Specifically, the robot performs path planning within the passable area of the sub-region according to the motion rules, thereby generating a coverage path for each sub-region. Specifically, a spiral coverage path generation method based on contour shrinkage can be used. This method uses the robot's cleaning width as a step size and continuously performs morphological erosion operations on the "passable area" within the sub-region to extract a series of closed contours from the outer boundary to the inner region layer by layer. Then, according to the motion rules (especially the direction rules), all extracted contour point sets are sorted in a specific clockwise or counterclockwise direction. Finally, nearest neighbor and other optimization algorithms are used to connect these ordered contour sequences into a continuous, collision-free path that covers the entire passable area, which is the path planning result for that sub-region.
[0054] Specifically, the spiral coverage path generation process based on contour shrinkage can include the following: First, using the robot's coverage width W (e.g., 0.5-0.8 meters, which can be determined according to the physical width of the robot's cleaning mechanism) as the step size, iterative morphological erosion is performed on the passable area. After each erosion, the closed contour of the current layer is extracted, resulting in a series of candidate coverage path contours from the outside to the inside. Then, the area of each contour is calculated, and contours with an area less than a minimum threshold (e.g., 0.5 square meters) are discarded, and those retained as the target coverage path contours. Next, the contour point set is sorted (clockwise / counterclockwise) according to the motion rules (e.g., direction requirements) determined in step 208. The nearest neighbor principle (which can be measured by the Euclidean distance between the contour centroids) is used to determine the connection order between contours, and the A* algorithm is used to plan collision-free transition paths between adjacent contours. Finally, all contours are connected to form the coverage sub-path of the sub-region.
[0055] Step 212: Determine the target path of the robot within the target area based on the path planning results corresponding to each of the sub-regions.
[0056] To achieve complete coverage of the target area by the robot, the coverage paths of each independent sub-region need to be integrated into a single, comprehensive cleaning path that runs throughout the target area. The integration strategy includes determining the global order of accessing each sub-region and planning transfer paths between them. For example, a breadth-first search strategy can be used. Starting from the robot's current position, the next sub-region to be visited within the un-cleaned areas is determined, and a path planning algorithm (such as the A* algorithm) is used to plan a safe transfer path connecting to the starting point of the coverage path for that sub-region. Finally, the coverage paths of all sub-regions are connected in an orderly manner through these transfer paths, forming a complete target path.
[0057] A greedy strategy can be used to determine the sub-region access sequence: starting from the robot's current position, calculate the distance to all uncleaned sub-regions (the starting points of their sub-paths). Select the sub-region with the closest distance as the next target sub-region. Use the A* algorithm to plan an unobstructed transition path from the current position to the starting point of the target sub-region. In the cost function f(n) = g(n) + h(n) of the A* algorithm, g(n) is the actual cost, and h(n) is the estimated Euclidean distance to the target, ensuring the shortest path; simultaneously, the algorithm searches on a cost map containing an obstacle inflation layer to ensure an unobstructed path. Connect the transition path with the covering sub-path of the target sub-region. After the robot performs this task, mark the sub-region as "completed". Repeat the above until all sub-regions are marked as "completed", and finally connect all path segments to obtain the complete target path.
[0058] This invention, by introducing traffic semantic elements, transforms the path planning of cleaning robots from a simple geometric spatial coverage problem into a task that understands environmental functions and adheres to implicit traffic rules. This effectively improves safety during the task. Semantic-based partitioning and refined coverage path generation for each sub-region ensure that all accessible surfaces within the target area are effectively cleaned without omission. Furthermore, because the robot's movement patterns align with the general expectations of vehicles and pedestrians in the garage regarding traffic participant behavior, it is easier to understand, thereby promoting safe collaboration among pedestrians, vehicles, and robots.
[0059] In one embodiment, the traffic semantic element information includes the element type and location of the traffic semantic elements included in the target area; wherein, the type is used to identify the functional category of the semantic element, such as a driving lane, intersection, or parking space; the location information is used to describe the geometric range of the semantic element in the target area, such as represented by a set of polygon vertex coordinates or a grid-occupied area.
[0060] The step of dividing the target area into at least one sub-region corresponding to a traffic semantic element based on the traffic semantic element information includes:
[0061] Based on the location of the traffic semantic elements, the target area is divided into sub-regions corresponding to each of the traffic semantic elements;
[0062] The step of determining the robot's movement rules within the passable area based on the traffic semantic element information corresponding to the sub-region includes:
[0063] Based on the element type of the traffic semantic element, the movement rules of the robot in each of the sub-regions are determined.
[0064] This embodiment divides the target area into fine-grained partitions based on the geometric location and functional type of traffic semantic elements and customizes corresponding motion rules for each sub-region.
[0065] First, the area is divided based on the location of traffic semantic elements. A pre-built garage semantic map is read, and the location information of each traffic semantic element is extracted. This location information is represented as a set of geometric polygon coordinates, accurately describing the spatial distribution range of each semantic element within the garage environment. Using the user-specified target cleaning area as the boundary, spatial intersection calculations are performed with the polygonal region of each traffic semantic element. Specifically, a polygon clipping algorithm (such as the Sutherland-Hodgman algorithm or the Weiler-Atherton algorithm) is used to calculate the intersection of each semantic element's polygon with the target area's polygon. The resulting intersection polygon is the sub-region corresponding to that semantic element within the target area. By traversing all traffic semantic elements, the target area is divided into several non-overlapping and completely covered sub-regions, each with a unique semantic identifier. Optionally, considering the potential small overlaps or gaps at the boundaries of semantic elements, boundary alignment processing can be performed on the polygons of adjacent semantic elements before the intersection calculation to ensure that the divided sub-regions are neither overlapping nor missing, forming a partitioned grid that completely covers the target area.
[0066] Then, motion rules are determined based on element type. For each sub-region, specific motion rules are formulated according to the element type of its corresponding traffic semantic element. For example, when the element type corresponding to the sub-region is a driving lane, the motion rules include: the global direction of travel of the covered path must be consistent with the traffic direction defined by the lane (e.g., clockwise under right-hand drive rules, counterclockwise under left-hand drive rules); maintaining a moderate and constant speed (e.g., 0.6-0.8 m / s); and maintaining a large safe distance from dynamic obstacles (e.g., 1.5-2 m). When the element type corresponding to the sub-region is an intersection, the motion rules include: triggering a deceleration command upon entering the area, reducing the running speed to a safe speed (e.g., 0.3-0.4 m / s). Optionally, this may also include increasing the detection frequency of the robot's LiDAR and vision sensors; enabling an omnidirectional emergency stop mechanism to avoid moving obstacles in the target direction (e.g., all directions).
[0067] When the element type corresponding to the sub-area is a parking space, the movement rules include: adopting a standard operating speed (e.g., 0.4-0.6 m / s); maintaining a fixed safe distance from static obstacles (e.g., 0.3-0.5 m); and allowing small-range multi-point steering adjustments.
[0068] Optionally, considering that semantic elements of the same type may also have different characteristics, the motion rules can be refined according to the attribute parameters of the semantic elements. For example, for main lanes with a large width, the operating speed can be appropriately increased to 0.8-1.0 m / s; for parking garages in school or hospital areas, a uniform speed reduction mode is adopted in all sub-areas, and the speed limit is set to 0.5 m / s, thereby achieving more refined safety control.
[0069] Optionally, a motion rule knowledge base can be established to map and associate element types with motion rule parameters. When an element type in a sub-region is identified, the corresponding speed parameters, safety distance parameters, and direction rules are automatically retrieved from the knowledge base, enabling standardized management and flexible configuration of motion rules.
[0070] The embodiments of the present invention enable robots to adopt the most suitable motion strategies in different functional sub-regions through semantic-based location partitioning and type-based rule customization, which not only ensures operational efficiency but also significantly improves operational safety and traffic coordination in structured environments.
[0071] In one embodiment, the path planning result includes a sub-path of the robot within the traversable area of the sub-region; the step of performing path planning for the robot within the traversable area according to the motion rules to obtain the path planning result includes:
[0072] Using the robot's coverage width as the operational scale, layer-by-layer morphological erosion is performed on the passable area to obtain multiple candidate coverage path contours of the robot for the passable area;
[0073] Based on the comparison between the area enclosed by the candidate coverage path contours and the preset minimum area, the target coverage path contour of the robot in the passable area is selected from the multiple candidate coverage path contours.
[0074] The connection order among the multiple target coverage path contours is determined according to the motion rules;
[0075] The multiple target coverage path outlines are sequentially connected according to the connection order to obtain the sub-path of the robot in the sub-region.
[0076] One approach is to use a spiral-shaped coverage path generation method based on contour contraction to generate a coverage sub-path that conforms to its specific motion rules for each semantic sub-region. Specifically, the robot's coverage width W (which can be 0.5-0.8 meters, determined according to the physical width of the cleaning mechanism for a specific robot model) is first used as the structuring element size for the morphological erosion operation. The binary image of the passable area within the sub-region is then iteratively eroded. Each erosion operation causes the passable area boundary to shrink inwards uniformly by a distance W, generating a new internal contour. This process can be implemented using the erode function (image erosion function) from image processing libraries such as OpenCV, resulting in a series of nested closed polygonal contours from the outside in, serving as candidate coverage path contours. Optionally, considering the potential contour breakage problem caused by complex boundaries, a morphological closing operation (e.g., using a 3×3 circular structuring element) can be added after each erosion operation to smooth the contour boundaries and maintain their connectivity, thereby obtaining a more complete and continuous coverage path contour.
[0077] Subsequently, the area S of each candidate contour is calculated and compared with a preset minimum area S_min (which can be set to 2-3 times the robot's projected area, approximately 0.5-1 square meters). Contours with S ≥ S_min are retained as target coverage path contours, while contours with S < S_min are discarded. This filtering ensures that the robot only covers sufficiently large areas, avoiding ineffective operations in confined spaces and improving path coverage and task execution efficiency.
[0078] Then, the connection order of the target contours is determined according to the motion rules corresponding to the sub-regions. For the driving lane sub-region, the sorting direction of the contour point set (clockwise / counterclockwise) is determined according to the lane traffic direction (left-hand drive / right-hand drive), and a spiral connection order from the outside to the inside is adopted to ensure that the overall direction of the coverage path is consistent with the expected driving direction of the vehicle. For the intersection and parking space sub-regions, the nearest neighbor priority principle can be adopted, using the Euclidean distance from the end point of the current contour to the starting point of the next contour as the evaluation index, and selecting the nearest uncovered contour as the next coverage target.
[0079] Optionally, to further optimize operational efficiency, a turning cost factor can be introduced based on the nearest neighbor principle. When selecting the next contour, not only the spatial distance is considered, but also the turning angle required for the robot to move from the current pose to the starting point of the next contour. Paths with smaller turning angles are given priority, thereby reducing the robot's turning losses and time overhead.
[0080] Finally, the connecting contours form sub-paths. Based on the determined connection order, the A* algorithm is used to plan collision-free transition paths between the start and end points of each target coverage path contour. The transition paths must avoid all obstacles within the sub-regions and connect smoothly with the coverage paths.
[0081] Optionally, considering the passability of low obstacles such as speed bumps, a higher passability cost can be set for known speed bump areas in the cost function of the A* algorithm (e.g., setting the cost coefficient to 1.5-2 times that of ordinary areas), causing the planned transition path to prioritize flat areas, thereby improving the robot's passability and cleaning stability. This embodiment of the invention generates an optimized sub-path for each semantic sub-region that satisfies full coverage requirements, conforms to specific traffic rules, and fully considers operational efficiency and passability, laying a solid foundation for constructing a globally optimal coverage path.
[0082] In one embodiment, the process of determining a sub-path within the sub-region by the robot includes:
[0083] Using the outermost target coverage path contour as the current contour, calculate the distance between each other target coverage path contour and the current contour;
[0084] Connect the other target coverage path contours with the shortest distance to the current contour in the connection order to obtain the current sub-path;
[0085] Replace the current contour with the other target coverage path contour with the shortest distance, and return to the step of calculating the distance between each other target coverage path contour and the current contour, until all the target coverage path contours are included in the current sub-path.
[0086] A greedy algorithm based on the nearest neighbor principle can be used to efficiently determine the connection order between the coverage path contours within a sub-region, thereby generating sub-paths with shorter total lengths. Specifically: First, the outermost target coverage path contour C_outer is set as the current contour. This contour can be the one with the largest area, located at the outermost edge of the passable area, serving as the starting point of the coverage path according to the outside-in coverage logic. Then, the distance between the current contour and all other unconnected target coverage path contours is calculated. This distance can be the Euclidean distance between the centroids of two contours, or the straight-line distance from the end point of the current contour to the starting point of the next contour. All unconnected contours are traversed, and the contour C_next with the shortest distance to the current contour is found. The current contour is then connected to the found nearest contour C_next according to a predetermined connection order. Specifically, a path search algorithm such as A* can be used to plan a collision-free transition path that avoids all obstacles within the sub-region between the predetermined end point of the current contour (the contour traversal end point determined according to the motion rules) and the predetermined starting point of contour C_next. This transition path, together with the two contour's own coverage path segments, constitutes the current partial sub-path.
[0087] The current contour is then updated and iterated, replacing it with the newly connected contour C_next. Then, using the new current contour as the center, the distances between it and all remaining unconnected contours are recalculated, and a new nearest contour is found. This iterative process continues until all target-covered path contours are connected and contained within the subpaths.
[0088] Optionally, considering the real-time performance of the algorithm, a distance threshold D_threshold (e.g., 5-8 meters) can be set for distance calculation. When the nearest distance is found to be greater than this threshold, it indicates that the remaining contour may be located in an independent, unconnected region. At this point, the current loop can be terminated, the connected paths can be treated as a sub-path cluster, and a new round of connection process can begin with the outermost contour in the remaining contour as the new starting point, thereby avoiding the generation of excessively long and inefficient transition paths.
[0089] Optionally, considering the robot's motion energy consumption, when calculating distance, in addition to spatial Euclidean distance, a turning cost factor can also be introduced. For example, the angle θ between the vector from the current contour endpoint to the next contour starting point and the robot's current orientation vector can be used as a weighting term. The final distance D_total is calculated using the formula D_total = α * D_euclidean + β * |θ|, where α and β are weighting coefficients. This allows for the priority selection of paths that are not only spatially shorter but also have smaller turning angles for connection, reducing the robot's turning losses and energy consumption, and improving coverage efficiency.
[0090] This embodiment uses the iterative nearest neighbor connection method described above to efficiently generate a sub-path with a shorter total transfer distance, significantly reducing the robot's empty driving mileage during the coverage process and improving overall operational efficiency.
[0091] In one embodiment, the target area includes a garage area; the traffic semantic elements include at least one of lanes, intersections, and parking spaces; the process of determining the traffic semantic element information includes:
[0092] The environmental data of the target area is identified to obtain the location information corresponding to the lane in the target area;
[0093] Based on the intersection of the lane location information, determine the location information corresponding to the intersection in the target area;
[0094] Based on the location information corresponding to the intersection and the lane, the target area is filtered to obtain the location information of the parking space.
[0095] The process involves processing environmental data (including point cloud maps and raster maps) of the target area acquired through SLAM technology to obtain lane line information. By analyzing linear features and passable areas in the environmental data, and combining this with a preset lane width range (2.5-3.5 meters), a line segment detection algorithm or machine learning model is used to identify the lane centerline. Each lane centerline is represented by an ordered set of points, and the lane width attribute W_lane and traffic direction rules (left-hand drive / right-hand drive) are recorded, together forming the lane's position information.
[0096] The system analyzes the location information of all identified lanes and detects their intersections. When the centerlines of two or more lanes intersect in space, or the Euclidean distance between their endpoints is less than a preset connection threshold, these lanes are considered to be intersecting. A polygonal region is generated as a candidate intersection, centered on the intersection point. The radius of this polygonal region can be determined based on the average width of the intersecting lanes. Simultaneously, candidate regions with excessively small areas (e.g., less than 2 square meters) are filtered out, ultimately determining the location information of the intersection.
[0097] After obtaining the location information of lanes and intersections, the entire target area is filtered to determine the parking space locations. The geometric extent of the target area is subtracted from the polygonal areas of all lanes and all polygonal areas of all intersections; the remaining area is the candidate parking space area. Morphological operations (such as closing operations to fill small holes) are performed on these candidate areas, and areas that are too small (less than 5-6 square meters) are filtered out, ultimately yielding the parking space location information.
[0098] Optionally, considering the potential errors in lane recognition in complex garage environments, an angle verification mechanism can be introduced when determining intersection locations. When lane merging is detected, the angle θ between the centerlines of the merging lanes is further calculated. If the angle is too small (e.g., θ < 30°), it may be a curved section of the same lane rather than a true intersection and should be excluded, thereby improving the accuracy of intersection recognition.
[0099] Optionally, a garage road network topology map can be constructed based on the identified lane and intersection information. Nodes in the map represent intersections, and edges represent lanes connecting two intersections. This topology map can not only be used to verify the completeness of semantic element recognition (such as checking for isolated lanes or intersections), but also provide high-level routing information for subsequent global path planning, improving the robot's navigation efficiency in the garage.
[0100] Through the hierarchical identification and reasoning process described above, this invention can automatically extract key semantic elements of the parking garage from the original environmental data, including the precise location information of lanes, intersections, and parking spaces. This lays a solid foundation for subsequent semantic partitioning and path planning, reduces reliance on manual annotation, improves the efficiency and consistency of semantic map construction, and ensures the consistency of logical relationships between semantic elements.
[0101] In one embodiment, the process of determining the obstacle information includes:
[0102] Obtain the original map of the target area;
[0103] The original map is binarized to obtain the initial obstacle information of the target area;
[0104] The initial obstacle information is subjected to an erosion operation to obtain the denoised initial obstacle information of the target area;
[0105] The initial obstacle information after denoising is expanded to obtain the obstacle information in the target region.
[0106] The process involves acquiring an original map of the target area constructed using SLAM technology. This map can be a grayscale raster map. The original map is then binarized, with a grayscale threshold T set (which can be between 128 and 200, depending on the map's contrast). Pixels with grayscale values below T are identified as obstacles and set to black (value 0); pixels with grayscale values above or equal to T are identified as passable areas and set to white (value 255). This process yields a binary image, representing the initial obstacle information. The initial obstacle information is then subjected to an erosion operation. A small structuring element (a 3×3 or 5×5 circular kernel) is used for morphological erosion. This operation effectively eliminates isolated obstacle pixels (such as single or small clusters of black pixels) caused by sensor noise or mapping errors, and reduces the size of small obstacles, resulting in denoised initial obstacle information. This step improves the accuracy of the obstacle information and avoids unnecessary detours in subsequent path planning due to map noise.
[0107] The initial obstacle information after denoising is expanded. A structural element related to the safety margin of the robot's physical shape (which can be a circular core with a size equal to the robot's outer envelope radius plus a safety distance, for example, a radius of 0.4 meters) can be used for morphological expansion. This expands the remaining, exact obstacle area outward by a safety distance, forming obstacle information with a safety margin. This ensures that the robot can maintain at least one safety distance from obstacles in subsequent path planning, significantly improving its operational safety.
[0108] Alternatively, considering the characteristics of different types of obstacles, adaptive structural element sizes can be adopted. For example, for known, fixed building obstacles (such as walls and columns), larger structural elements can be used to expand the size (e.g., increase the safety distance by 0.5 meters) to provide a more conservative safety boundary; for dynamic obstacle areas or uncertain areas, smaller structural elements can be used (e.g., increase the safety distance by 0.2 meters) to achieve a balance between safety and accessibility.
[0109] Optionally, a connectivity analysis step can be added between the erosion and dilation operations. This involves marking connected components in the denoised initial obstacle information, filtering out connected regions with excessively small areas (e.g., less than 0.1 square meters), classifying them as noise, and removing them from the obstacle information. This further purifies the obstacle map, preventing tiny, isolated noise points from being amplified into larger virtual obstacle areas by subsequent dilation operations, thus ensuring the accuracy of passable areas.
[0110] The embodiments of the present invention effectively process noise in the original map through the above-described morphological combination operations and generate accurate obstacle information with safety margins. This improves the reliability of the environment representation, lays a solid data foundation for subsequent calculation of passable areas and path planning, and significantly enhances the collision avoidance capability of the robot in complex environments by introducing safety boundaries.
[0111] In one embodiment, the path planning result includes sub-paths within the traversable area of the sub-region where the robot is located; the process of determining the target path includes:
[0112] Obtain the target sub-region that is closest to the robot's current position and for which the robot has not performed a task;
[0113] The target path is obtained by performing the shortest and unobstructed path search between the current position and the starting point of the sub-path corresponding to the target sub-region according to the preset path search algorithm.
[0114] A global state map can be maintained beforehand to record the task execution status (completed / incomplete) of each sub-region. The process of obtaining the target sub-region closest to the robot's current position where the robot has not yet performed a task is as follows: Calculate the Euclidean distance from the current position to the geometric center of all sub-regions with unperformed tasks or the starting point of their sub-paths. By traversing and comparing, select the closest sub-region as the next target sub-region to be visited, thereby minimizing the total transfer distance between sub-regions and improving overall operation efficiency.
[0115] Then, according to a preset path search algorithm, the shortest and unobstructed path is searched between the current position and the starting point of the sub-path corresponding to the target sub-region. The path search algorithm in this step can preferably be the A* algorithm, which can efficiently find the optimal path in a known environment. Specifically, the A* algorithm guarantees the optimality of the path by evaluating the function f(n) = g(n) + h(n), where g(n) is the actual cost from the starting point to node n, and h(n) is the heuristically estimated cost from node n to the target point (which can be Euclidean distance or Manhattan distance). The node with the smallest f(n) value is expanded first, thus ensuring that a shortest path can be found when the heuristic function h(n) satisfies acceptability (i.e., never overestimating the actual cost).
[0116] In this algorithm, the expansion of search nodes strictly adheres to the constraints of obstacle information. The environment is represented as a grid map, where each grid is labeled as free, occupied, or unknown, and movement is only permitted on free grids. Partially occupied grids are handled through a cost map mechanism: different costs are assigned to grids within a certain range around the obstacle, with higher costs for closer grids. The A* algorithm searches for the path with the minimum total cost (g(n)), which naturally ensures that the planned path not only avoids obstacles but also maintains a safe distance from them.
[0117] Finally, the planned transition path is connected with the coverage sub-path corresponding to the target sub-area, forming a continuous path from the current address to the completion of coverage in that sub-area. After the robot completes the task in that sub-area, it updates the status map, marks the sub-area as completed, and repeats the above process to find the next nearest unexecuted task sub-area until all sub-areas have completed their tasks. All transition paths and sub-paths are connected in the order of execution to form the target path that the robot executes within the entire target area.
[0118] Optionally, considering the dynamic changes in the environment, incremental search algorithms such as D*Lite can be introduced on the basis of the A* algorithm. When the robot detects new obstacles that are not marked in the original map through sensors during the execution of the path, D*Lite can efficiently replan the optimal path from the current pose to the target point without performing a complete global replanning, thereby significantly improving the real-time performance and adaptability of the algorithm in dynamic environments.
[0119] Optionally, to further improve the smoothness of the transition path and the robot's following ability, gradient descent or spline interpolation can be used to perform post-path optimization on the original path generated by the A* algorithm. This reduces unnecessary sharp turns in the path and generates a smoother path that better conforms to the robot's kinematic constraints, thereby reducing the robot's mechanical wear and energy consumption.
[0120] Through the above steps, this invention systematically solves the problem of coordination between sub-regions, generates a safe and efficient global target path, and ensures the integrity and execution efficiency of the full-coverage cleaning task.
[0121] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0122] In yet another embodiment of the invention, such as Figure 2 As shown, the path planning process may include steps 302-326:
[0123] Step 302: Obtain the original map of the original area, and in response to the task execution request, determine the target area from the original map for the robot to perform the task.
[0124] First load as follows Figure 2 The original map shown can be generated by the robot during the mapping phase using SLAM technology. When the operator initiates a task request, an interactive interface is provided, allowing the operator to select a specific target area from the original map; this area is the range that needs to be covered in this task. Figure 3 The original SLAM map was displayed, while Figure 4 This illustrates how to select a box on the map to define the target area where the task will ultimately be performed.
[0125] Step 304: Identify the environmental data of the original area to obtain the location information corresponding to the lane in the original area.
[0126] This step aims to extract the passable skeleton—the lane network—from the original map. In practice, based on an understanding of the site environment, the lane skeleton is defined by drawing lane centerlines; the beginning and end points of lane path segments are connected by straight lines to form the lane centerlines, and the width of each lane must be specified. All lanes within the garage together constitute a complete passable road network. Figure 5 A schematic diagram of the garage road network, drawn based on the original map, is shown.
[0127] Step 306: Identify the original map of the original area based on the location information corresponding to the lane to obtain the traffic semantic element information of the original area.
[0128] After establishing the road network framework, the process begins to identify richer traffic semantic elements, upgrading the simple map into a semantic map. Specifically, intersection identification requires two conditions: first, the area must be an intersection of lanes, or a circular area with a lane width as its radius where the angle between lane path segments exceeds a preset threshold; second, the area must be larger than a specific threshold. Areas meeting these conditions are identified as intersection areas. The remaining non-lane, non-intersection areas in the map are categorized as parking areas. After initially extracting parking areas and intersections, the drawn lanes need further refinement to ensure that each final lane segment, except for its beginning and end, is not interrupted by intersections, thus forming continuous traffic units. Through this series of processes, a structured parking garage semantic map is finally generated.
[0129] Step 308: Divide the original region into at least one sub-region corresponding to a traffic semantic element based on the traffic semantic element information, and extract the sub-regions included in the target region.
[0130] Figure 6 This displays the semantic map of the garage generated in the previous step. In this map, white dotted areas are defined as parking space areas, grayscale solid color areas are lane areas, and black dotted areas are intersection areas. Figure 6 As shown, except for dead ends, each lane segment can be sandwiched between two intersections, which conforms to real traffic logic. Subsequently, based on the previously selected target area boundaries, this global semantic map is cropped and extracted. Boundary processing sets the area outside as impassable obstacles, while partition extraction precisely delineates the outline of each semantic sub-region (such as a lane segment or a parking space) within the target area, serving as the basic unit for subsequent path planning. The processed target area semantic map is shown below. Figure 7 As shown.
[0131] Step 310: Perform identification processing on the original map corresponding to the target area to obtain obstacle information in the target area.
[0132] The original SLAM map corresponding to the target area is binarized and morphologically manipulated to clearly distinguish between areas that the robot can safely reach (i.e., traversable areas) and inaccessible areas. Inaccessible areas include static obstacles inherent in the map and parts outside the boundary of the target area. Figure 8 The results of this processing are shown, where white pixels represent large safe areas and black pixels represent obstacles or boundaries that need to be avoided.
[0133] Step 312: For each of the sub-regions, determine the passable area within the sub-region based on the obstacle information.
[0134] Will Figure 7 semantic subregions and Figure 8 The accessibility information is overlaid. For each semantic sub-region, its contour is intersected with the white safe area in the binary image to accurately calculate the specific range that the robot can actually pass through in each sub-region, laying the foundation for subsequent generation of coverage paths.
[0135] Step 314: Determine the movement rules of the robot within the passable area of the sub-region based on the traffic semantic element information corresponding to the sub-region.
[0136] Different motion rules are preset for different types of sub-regions. For example, in a lane area, the robot may be programmed to perform reciprocating cleaning along the long side; while in a parking space area, a spiral coverage strategy from the outside in or from the inside out may be adopted. These rules aim to make full use of the geometric characteristics of different semantic regions to improve coverage efficiency.
[0137] Step 316: Using the robot's coverage width as the operating scale, perform layer-by-layer morphological erosion on the passable area to obtain multiple candidate coverage path contours of the robot for the passable area.
[0138] Using the robot's actual coverage width (such as the physical width of the cleaning brush) as the operational scale for morphological erosion, the erosion proceeds layer by layer inwards, starting from the boundary of the passable range of the sub-region. After each erosion, the boundary of the current layer is extracted as a candidate coverage path contour. This process is similar to filling a region layer by layer from the outside in with a brush of fixed width, with the center line of each layer being a potential walking path.
[0139] Step 318: Based on the comparison result between the area enclosed by the candidate coverage path contours and the preset minimum area, select the target coverage path contour of the robot in the passable area from the multiple candidate coverage path contours.
[0140] The area enclosed by each candidate contour is calculated and compared with a preset minimum effective area threshold. Contours with too small an area, even if located at the very center of the region, may not be able to accommodate the robot for effective coverage and will therefore be filtered out. The contours that are ultimately retained are the target coverage path contours that need to be covered.
[0141] Step 320: Determine the connection order between the multiple target coverage path contours according to the motion rules.
[0142] By combining the spatial distribution of contours, optimization algorithms such as "nearest neighbor" are used to determine an efficient sequence of sequences, aiming to minimize the empty travel distance of the robot when transferring between different contours.
[0143] Step 322: Connect the multiple target coverage path outlines sequentially according to the connection order to obtain the sub-path of the robot in the sub-region.
[0144] Once the order is determined, path search algorithms such as A* are used to plan the shortest, obstacle-free connection path between two adjacent target covered path contours. Finally, all covered path segments (i.e., contours) and the connecting paths between them are pieced together in a determined order to form a complete and coherent sub-path for the robot within that sub-region. Figure 9 This demonstrates the meandering coverage path generated within the lane sub-region, while Figure 10 This demonstrates how to cleverly avoid fixed obstacles (such as pillars) inside the parking space in the parking space sub-area, generating a safe coverage path.
[0145] Step 324: Obtain the target sub-region that is closest to the robot's current position and where the robot has not performed a task.
[0146] When a robot begins to perform a task, it needs a global scheduling strategy. The robot will locate itself in real time and use strategies such as breadth-first search (BFS) to find the sub-region that is closest to its current location and has not yet been executed on the task map of the entire target area, and set it as the next task target.
[0147] Step 326: According to the preset path search algorithm, perform the shortest and unobstructed path search between the current position and the starting point of the sub-path corresponding to the target sub-region to obtain the target path of the robot for the target region.
[0148] After identifying the next target sub-region, the robot uses the A* algorithm to plan the shortest, obstacle-free transition path from its current position to the starting point of the sub-path in that sub-region. After covering a sub-region, it marks it as "completed" on the cleaning map to ensure no repeated work. The robot then continues to search for and move to the next untouched sub-region until all sub-regions are covered, at which point the task ends. Through this cyclical strategy of "partitioning-coverage-marking," a path can ultimately be generated as shown... Figure 11 The optimal work path shown is the one that achieves efficient and full coverage of a designated area in the garage.
[0149] Based on the same inventive concept, this application also provides a path planning apparatus for implementing the path planning method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more path planning apparatus embodiments provided below can be found in the limitations of the path planning method described above, and will not be repeated here.
[0150] In one exemplary embodiment, such as Figure 12 As shown, a path planning device is provided, the device comprising:
[0151] The acquisition module is used to acquire obstacle information and traffic semantic element information in the target area;
[0152] The segmentation module is used to divide the target area into at least one sub-region corresponding to a traffic semantic element based on the traffic semantic element information.
[0153] The first determining module is used to determine, for each of the sub-regions, a passable area within the sub-region based on the obstacle information;
[0154] The second determining module is used to determine the movement rules of the robot within the passable area of the sub-region based on the traffic semantic element information corresponding to the sub-region;
[0155] The planning module is used to plan the path of the robot in the passable area of the sub-region according to the motion rules, and obtain the path planning result corresponding to the sub-region;
[0156] The third determining module is used to determine the target path of the robot in the target area based on the path planning results corresponding to each of the sub-regions.
[0157] Each module in the aforementioned path planning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0158] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 13As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a path planning method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0159] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0160] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps included in any of the foregoing method embodiments, which will not be repeated here.
[0161] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps included in any of the foregoing method embodiments, which will not be repeated here.
[0162] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps included in any of the foregoing method embodiments, which will not be repeated here.
[0163] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0164] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0165] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0166] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A path planning method characterized by, The method comprises: obtaining obstacle information and traffic semantic element information in a target area; dividing the target area into sub-areas corresponding to at least one traffic semantic element according to the traffic semantic element information; for each sub-area, determining a passable area in the sub-area according to the obstacle information; determining a movement rule of a robot in the passable area in the sub-area according to the traffic semantic element information corresponding to the sub-area; path planning for the robot in the passable area in the sub-area according to the movement rule, to obtain a path planning result corresponding to the sub-area; determining a target path of the robot in the target area according to the path planning result corresponding to each sub-area.
2. The method of claim 1, wherein, The traffic semantic element information comprises an element type and a position of a traffic semantic element included in the target area; and the target area is divided into sub-areas corresponding to at least one traffic semantic element according to the traffic semantic element information, which comprises: dividing the target area into sub-areas corresponding to each traffic semantic element according to the position of the traffic semantic element; The movement rule of the robot in the passable area is determined according to the traffic semantic element information corresponding to the sub-area, which comprises: determining the movement rule of the robot in each sub-area according to the element type of the traffic semantic element.
3. The method of claim 1, wherein, The path planning result comprises a sub-path of the robot in the passable area in the sub-area; and the path planning for the robot in the passable area according to the movement rule to obtain a path planning result comprises: performing layer-by-layer morphological erosion on the passable area with the coverage width of the robot as the operation scale, to obtain a plurality of candidate coverage path contours of the robot for the passable area; selecting a target coverage path contour of the robot in the passable area from the plurality of candidate coverage path contours according to a comparison result of an area enclosed by the candidate coverage path contour and a preset minimum area; determining a connection order between the plurality of target coverage path contours according to the movement rule; connecting the plurality of target coverage path contours in sequence according to the connection order, to obtain a sub-path of the robot in the sub-area.
4. The method of claim 3, wherein, The determination process of the sub-path of the robot in the sub-area comprises: calculating distances between each other target coverage path contour and the current contour with the outermost target coverage path contour as the current contour; connecting the other target coverage path contour with the shortest distance and the current contour in the connection order, to obtain a current sub-path; replacing the current contour with the other target coverage path contour with the shortest distance, and returning to the step of calculating distances between each other target coverage path contour and the current contour, until all the target coverage path contours are included in the current sub-path.
5. The method of claim 1, wherein, The target area includes a garage area; the traffic semantic element includes at least one of a lane, an intersection, and a parking space; the determination process of the traffic semantic element information includes: identifying environment data of the target area to obtain position information corresponding to the lane in the target area; determining position information corresponding to the intersection in the target area according to intersection conditions of the position information of the lane; performing area screening on the target area according to the position information corresponding to the lane and the intersection to obtain position information of the parking space.
6. The method of claim 1, wherein, The determination process of the obstacle information includes: obtaining an original map of the target area; performing binaryzation processing on the original map to obtain initial obstacle information of the target area; performing an erosion operation on the initial obstacle information to obtain denoised initial obstacle information of the target area; performing an inflation operation on the denoised initial obstacle information to obtain obstacle information in the target area.
7. The method of claim 1, wherein, The path planning result includes a sub-path of the robot in the passable area in the sub-area; the determination process of the target path includes: obtaining a target sub-area closest to a current position of the robot and in which the robot has not performed a task; performing shortest and obstacle-free path searching between the current position and a starting point of the sub-path corresponding to the target sub-area according to a preset path searching algorithm to obtain the target path.
8. A route planning apparatus characterized by comprising: The device includes: an acquisition module configured to acquire obstacle information and traffic semantic element information in a target area; a division module configured to divide the target area into at least one sub-area corresponding to a traffic semantic element according to the traffic semantic element information; a first determination module configured to determine, for each sub-area, a passable area in the sub-area according to the obstacle information; a second determination module configured to determine a movement rule of a robot in the passable area in the sub-area according to the traffic semantic element information corresponding to the sub-area; a planning module configured to perform path planning on the robot in the passable area in the sub-area according to the movement rule to obtain a path planning result corresponding to the sub-area; a third determination module configured to determine a target path of the robot in the target area according to the path planning result corresponding to each sub-area. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.