Path planning method and device, electronic equipment and computer readable storage medium
By dividing the obstacle's identification frame into sub-identification frames and projecting them into the target coordinate system, the problem of large obstacle projection deviation in traditional path planning is solved, achieving more accurate path planning and obstacle avoidance, and improving the accuracy and safety of path planning.
Patent Information
- Application Number
- CN202510591666.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-09-19
AI Technical Summary
When large obstacles appear in the environment, the projection of the obstacles in the Frenet coordinate system may have serious deviations in traditional path planning methods, resulting in reduced accuracy of path planning.
The obstacle's recognition frame is divided into multiple sub-recognition frames, and these sub-recognition frames are projected into the target coordinate system. Combined with the position of the target object and the end point position, multiple target points are determined to connect and form a target path.
It improves the accuracy and safety of path planning, avoids collisions, optimizes movement routes, and enables target objects to move more intelligently and efficiently in complex environments.
Smart Images

Figure CN120668161A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to intelligent driving technology, and in particular to a path planning method, device, electronic device, and computer-readable storage medium. Background Art
[0002] In the fields of intelligent transportation systems and autonomous driving, path planning is a key technology for ensuring safe and efficient vehicle operation. Traditional path planning methods primarily implement path planning by mapping environmental information from a Cartesian coordinate system to a Frenet coordinate system centered on the lane centerline.
[0003] However, when large obstacles appear in the environment, the projection of the large obstacles in the Frenet coordinate system may have serious deviations, resulting in reduced accuracy of path planning. Summary of the Invention
[0004] Embodiments of the present application provide a path planning method, device, electronic device, and computer-readable storage medium, which can improve the accuracy of path planning.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] This embodiment of the present application provides a path planning method, the method comprising:
[0007] Obtain a first recognition frame of the obstacle and a second recognition frame of the target object;
[0008] Divide the first recognition frame of the obstacle into N first sub-recognition frames, where N is a positive integer greater than 1;
[0009] Projecting the second recognition frame onto the target coordinate system to obtain a first projection of the second recognition frame, and projecting the N first sub-recognition frames onto the target coordinate system to obtain corresponding second projections of the N first sub-recognition frames;
[0010] Based on the relative positional relationship between the first projection and the N second projections, the position of the target object and the preset end position, multiple target points in the target coordinate system are determined, and the multiple target points are connected to obtain a target path indicating the movement of the target object.
[0011] An embodiment of the present application provides a path planning device, comprising:
[0012] An acquisition module, configured to acquire a first recognition frame of the obstacle and a second recognition frame of the target object;
[0013] a division module, configured to divide the first recognition frame of the obstacle into N first sub-recognition frames, where N is a positive integer greater than 1;
[0014] a projection module, configured to project the second recognition frame onto a target coordinate system to obtain a first projection of the second recognition frame, and project the N first sub-recognition frames onto the target coordinate system to obtain corresponding second projections of the N first sub-recognition frames;
[0015] A planning module is used to determine multiple target points in the target coordinate system based on the relative position relationship between the first projection and the N second projections, the position of the target object and the pre-set end position, and connect the multiple target points to obtain a target path indicating the movement of the target object.
[0016] An embodiment of the present application provides an electronic device, comprising:
[0017] a memory for storing computer-executable instructions or computer programs;
[0018] The processor is used to implement the path planning method provided in the embodiment of the present application when executing the computer executable instructions or computer program stored in the memory.
[0019] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the path planning method provided in the embodiment of the present application when executed by a processor.
[0020] An embodiment of the present application provides a computer program product, including a computer program or computer-executable instructions. When the computer program or computer-executable instructions are executed by a processor, the path planning method provided in the embodiment of the present application is implemented.
[0021] The embodiments of the present application have the following beneficial effects:
[0022] A first identification frame of the obstacle and a second identification frame of the target object are obtained, the first identification frame is divided into N first sub-identification frames, and the second identification frame and the N first sub-identification frames are respectively projected into the target coordinate system, thereby obtaining a first projection of the second identification frame and a second projection of the N first sub-identification frames. Based on the relative positional relationship between the first projection and the N second projections, the position of the target object and the pre-set end position, multiple target points in the target coordinate system are determined, and the multiple target points are connected to obtain a target path indicating the movement of the target object. This can more accurately assess the impact of obstacles on the target object, improve the accuracy and safety of path planning, avoid collisions and optimize the movement route, and enable the target object to move more intelligently and efficiently in a complex road environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a schematic diagram of the architecture of the path planning system provided in an embodiment of the present application;
[0024] Figure 2 is a schematic diagram of the structure of the terminal provided in an embodiment of the present application;
[0025] Figure 3 This is a schematic diagram of the path planning method provided in the embodiment of the present application. Figure 1 ;
[0026] Figure 4 This is a schematic diagram of the path planning method provided in the embodiment of the present application. Figure 2 ;
[0027] Figure 5 is a schematic diagram of a first identification frame provided by an embodiment of the present application as a rectangular frame;
[0028] Figure 6 2 is a schematic diagram of interpolation processing when the first identification frame provided in the embodiment of the present application is a rectangular frame;
[0029] Figure 7 1 is a schematic diagram of a sub-recognition frame when the first recognition frame provided in an embodiment of the present application is a rectangular frame;
[0030] Figure 8 This is a schematic diagram of the path planning method provided in the embodiment of the present application. Figure 3 ;
[0031] Figure 9 1 is a schematic diagram of a sub-recognition frame when the first recognition frame provided by an embodiment of the present application is a non-rectangular frame;
[0032] Figure 10 This is a schematic diagram of the path planning method provided in the embodiment of the present application. Figure 4 ;
[0033] Figure 11 It is a schematic diagram of obstacle projection in the related art;
[0034] Figure 12 This is a schematic projection diagram of an unmanned vehicle and multiple small obstacles in the Frenet coordinate system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0036] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0037] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0038] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0039] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0040] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0041] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0042] 1) Path planning: This involves determining a safe and efficient route for a moving target object (such as an autonomous vehicle) from its starting point to its destination within a specified environment. Path planning must account for both static and dynamic obstacles in the environment, ensuring that the target object can avoid them and successfully reach its destination. Path planning algorithms typically combine sensor data and map information to adjust the path in real time to accommodate changing conditions.
[0043] 2) Obstacles: These are obstacles in the target's path, including static obstacles (such as buildings and roadblocks) and dynamic obstacles (such as other vehicles and pedestrians). Obstacles can be identified and located using sensors (such as lidar and cameras) for subsequent obstacle avoidance and path adjustment.
[0044] 3) Cartesian coordinate system: This is a common two-dimensional or three-dimensional coordinate system consisting of mutually perpendicular axes, usually labeled X, Y (and Z). In path planning, the Cartesian coordinate system is used to describe the position and motion of target objects and obstacles.
[0045] 4) Frenet Coordinate System: This is a local coordinate system based on road geometry, with the vertical axis parallel to the road's centerline and the horizontal axis perpendicular to it. The Frenet coordinate system provides a more intuitive description of the target object's position and orientation relative to the road.
[0046] 5) Autonomous vehicles: Also known as self-driving cars, these are vehicles capable of driving autonomously without driver intervention. They rely on a variety of sensors (such as lidar, cameras, and radar) and advanced algorithms (such as path planning, perception, and decision-making) to perceive their surroundings, plan their routes, and execute driving maneuvers.
[0047] In related technologies, the projection of large obstacles in the Frenet coordinate system may cause errors in subsequent path planning calculations, reducing the accuracy of path planning.
[0048] In response to the above problems, embodiments of the present application provide a path planning method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve the accuracy of path planning. Exemplary applications of the electronic devices provided in embodiments of the present application are described below. The electronic devices provided in embodiments of the present application can be implemented as various types of terminals, such as laptop computers, tablet computers, desktop computers, set-top boxes, smart phones, smart speakers, smart watches, smart TVs, and in-vehicle terminals, and can also be implemented as servers. Exemplary applications when the electronic device is implemented as a terminal or a server will be described below.
[0049] The path planning method provided in the embodiments of the present application can be applied to any scenario where path planning is required for the movement of a target object, thereby improving the accuracy of path planning. Specific application scenarios may include:
[0050] 1) Autonomous driving system for unmanned vehicles. Unmanned vehicles traveling on urban roads need to perform path planning and obstacle avoidance in real time. When the unmanned vehicle detects pedestrians or other obstacles ahead through on-board sensors (such as lidar, cameras, etc.), the on-board terminal of the unmanned vehicle obtains the first identification frame of the obstacle and the second identification frame of the unmanned vehicle; if the first identification frame of the obstacle and the second identification frame of the unmanned vehicle meet the preset conditions (for example, the area difference between the first identification frame and the second identification frame of the obstacle is greater than the preset area threshold), the first identification frame of the obstacle is divided into multiple sub-identification frames. The second identification frame and sub-identification frames of the unmanned vehicle are projected into the Frenet coordinate system, and path planning is performed based on the projection data in the Frenet coordinate system. Based on the new path planning results, the on-board terminal controls the unmanned vehicle to adjust its driving direction and speed to ensure safe avoidance of obstacles.
[0051] 2) Unmanned Logistics and Delivery Vehicles. Within industrial parks or large warehouses, unmanned logistics and delivery vehicles must efficiently complete cargo transport tasks in complex environments while avoiding various obstacles (such as other vehicles, pedestrians, and stacked goods). The unmanned vehicle detects a large truck occupying part of the lane ahead through its sensors and uploads the captured image containing the truck to a server. The server performs target recognition on the image, obtaining a first recognition frame of the truck and a second recognition frame of the unmanned vehicle. The server analyzes whether the first recognition frame and the second recognition frame of the target object meet preset conditions (for example, whether the area difference between the first and second recognition frames of the truck exceeds a preset area threshold). If the first recognition frame of the truck and the second recognition frame of the unmanned vehicle meet the preset conditions, the first recognition frame of the truck is divided into multiple sub-recognition frames. The second recognition frame and sub-recognition frames of the unmanned vehicle are projected into the Frenet coordinate system, and path planning is performed based on the projection data in the Frenet coordinate system. Based on the new path planning results, the server sends control commands to the unmanned vehicle, controlling it to adjust its driving direction and speed to ensure safe avoidance of the large truck.
[0052] 3) VR / AR navigation scenarios. Users use smartphones or tablets to perform VR / AR navigation in indoor environments, such as museums, shopping malls, or large buildings. Using VR / AR technology, users can see virtual paths and information overlaid on the real environment while avoiding obstacles. When a user opens a navigation app on their mobile device, the mobile device uses a camera and sensors (such as lidar and depth sensors) to scan the surrounding environment in real time, identifying obstacles such as walls, pillars, and other pedestrians, and obtaining a first frame of the obstacle. If the detected first frame of the obstacle and the user's second frame meet preset conditions, the first frame of the obstacle is divided into multiple sub-frames. The user's second frame and sub-frames are projected into the Frenet coordinate system, and path planning is performed based on the projected data. The Frenet coordinate system can be a local coordinate system based on the user's current direction. Based on the new path planning results, the navigation app displays the updated virtual path on the screen, guiding the user around obstacles and continuing to the destination. Voice prompts or vibration feedback are also provided to alert the user to obstacles ahead.
[0053] See also Figure 1 , Figure 1 Figure 1 is a schematic diagram of the architecture of a path planning system 100 provided in an embodiment of the present application. To support a path planning application, the path planning system 100 includes at least a terminal 400, a network 300, and a server 200. The terminal 400 is connected to the server 200 via the network 300. The network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of the two.
[0054] See also Figure 1 Terminal 400 can obtain environmental information about the road on which the target object is located through its onboard sensors. When terminal 400 detects an obstacle on the road on which the target object is located, it encapsulates an image containing the obstacle into a path planning request and sends the path planning request to server 200. In response to the path planning request, server 200 obtains a first recognition frame of the obstacle and a second recognition frame of the target object. Server 200 divides the first recognition frame of the obstacle into N first sub-recognition frames, where N is a positive integer greater than 1. Server 200 projects the second recognition frame into a target coordinate system to obtain a first projection of the second recognition frame, and projects each of the N first sub-recognition frames into the target coordinate system to obtain corresponding second projections of the N first sub-recognition frames. Based on the relative positional relationship between the first projection and the N second projections, the position of the target object, and a pre-set end point, server 200 determines multiple target points in the target coordinate system and connects the multiple target points to obtain a target path indicating the movement of the target object. Server 200 returns the target path to terminal 400, so that terminal 400 displays the target path on the current interface and controls the movement of the target object along the target path.
[0055] Alternatively, terminal 400 may obtain environmental information of the road on which the target object is located through an onboard sensor. When terminal 400 detects an obstacle on the road on which the target object is located, terminal 400 obtains a first recognition frame of the obstacle and a second recognition frame of the target object. Terminal 400 divides the first recognition frame of the obstacle into N first sub-recognition frames, where N is a positive integer greater than 1. Terminal 400 projects the second recognition frame onto a target coordinate system to obtain a first projection of the second recognition frame, and projects the N first sub-recognition frames onto the target coordinate system to obtain corresponding second projections of the N first sub-recognition frames. Terminal 400 determines multiple target points in the target coordinate system based on the relative positional relationship between the first projection and the N second projections, the position of the target object, and a pre-set end point position, and connects the multiple target points to obtain a target path indicating the movement of the target object. Terminal 400 displays the target path on the current interface and controls the target object to move along the target path.
[0056] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal and the server may be connected directly or indirectly via wired or wireless communication, which is not limited in the embodiments of the present application.
[0057] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the terminal 400 provided in an embodiment of the present application, Figure 2 The terminal 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to including a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .
[0058] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0059] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0060] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0061] The memory 450 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0062] In some embodiments, the memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.
[0063] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and process hardware-based tasks;
[0064] A network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include Bluetooth, Wi-Fi, and Universal Serial Bus (USB);
[0065] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripheral devices and displaying content and information);
[0066] The input processing module 454 is configured to detect one or more user inputs or interactions from one of the one or more input devices 432 and to translate the detected inputs or interactions.
[0067] In some embodiments, the apparatus provided in the embodiments of the present application may be implemented in software. Figure 2 Path planning device 455 stored in memory 450 is shown. This device can be software in the form of a program or plug-in, and includes the following software modules: acquisition module 4551, segmentation module 4552, projection module 4553, and planning module 4554. These modules are logical and can be arbitrarily combined or further divided according to the functions they implement. The functions of each module will be described below.
[0068] In other embodiments, the apparatus provided in the embodiments of the present application may be implemented in hardware. As an example, the apparatus provided in the embodiments of the present application may be a processor in the form of a hardware decoding processor, which is programmed to execute the path planning method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor may be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0069] The following describes the path planning method provided by the embodiment of the present application. As mentioned above, the electronic device that implements the path planning method of the embodiment of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution entity of each step will not be repeated below.
[0070] See also Figure 3 , Figure 3 This is a schematic diagram of the path planning method provided in the embodiment of the present application. Figure 1 , will combine Figure 3 The steps shown are explained below. Figure 3As shown, the path planning method is described as an example in which the execution subject is a server. The method includes the following steps 101 to 104:
[0071] In step 101 , a first recognition frame of an obstacle and a second recognition frame of a target object are obtained.
[0072] Here, the target object can be moving or stationary on the road. The target object and the obstacle are on the same road. The target object is an entity that requires path planning and obstacle avoidance. The target object can be a mobile device, such as a vehicle, robot, drone, etc., and the target object can also be a pedestrian, etc. If the target object is a mobile device, the terminal can be a terminal mounted on the mobile device, such as a vehicle-mounted terminal; if the target object is a pedestrian, the terminal can be a mobile terminal such as a mobile phone or computer used by the user. The terminal is equipped with sensors (such as lidar, camera, ultrasonic sensor, etc.) for detecting the surrounding environment. The road is the physical path or area where the target object is located, and the road has a clear geometric shape and boundaries (such as lane lines).
[0073] When the target object moves on the road, the image of the road can be collected in real time through the camera installed on the terminal, and the sensor data of the surrounding environment of the road can be obtained in real time through the sensor installed on the terminal (such as three-dimensional point cloud data obtained by lidar, etc.). Use machine learning or deep learning models to perform target recognition on the objects in the image to obtain image recognition results. When the image recognition result is that multiple objects in the image include obstacles, it is determined that an obstacle is detected on the road. The center point position and size of the obstacle in the Cartesian coordinate system are determined based on the sensor data, and a first identification frame is constructed in the Cartesian coordinate system based on the position and size. The first identification frame is a bounding box surrounding the obstacle, which is used to describe the position, size and direction of the obstacle. The Cartesian coordinate system can be a three-dimensional map coordinate system with a preset reference point as the origin (such as the initial position of the target object).
[0074] The second identification frame is a rectangular frame surrounding the target object, which is used to describe the current position, size and orientation of the target object. The position of the target object in the Cartesian coordinate system can be obtained through sensors (such as the Global Positioning System (GPS), Inertial Measurement Unit (IMU), etc.), and a rectangular frame surrounding the target object is generated based on the size and current position of the target object as the second identification frame. As the target object moves, the position and orientation of the second identification frame are continuously updated to ensure that the second identification frame always accurately reflects the state of the target object.
[0075] For example, in an industrial park scenario, the target object is an unmanned vehicle. When the unmanned vehicle detects an obstacle ahead on the road, it can obtain the GPS coordinates of the unmanned vehicle and construct a second recognition frame in a Cartesian coordinate system based on the GPS coordinates and the length and width of the unmanned vehicle. The first recognition frame is constructed based on the center point position and size of the obstacle in the Cartesian coordinate system.
[0076] In step 102 , the first recognition frame of the obstacle is divided into N first sub-recognition frames.
[0077] Here, N is a positive integer greater than 1.
[0078] In some embodiments, when the first identification frame and the second identification frame meet preset conditions, the first identification frame of the obstacle is divided into N first sub-identification frames, wherein the preset conditions include one of the following: the difference between the first area of the first identification frame and the second area of the second identification frame is greater than a preset area threshold; the difference between the first side length of the first identification frame and the second side length of the second identification frame is greater than a preset length threshold, wherein the first side length is the maximum length of the obstacle, and the second side length is the maximum side length in the second identification frame.
[0079] Here, the preset condition can be a condition for determining whether the size or area of the obstacle exceeds a set threshold, and the value of the set threshold is related to the second identification frame. When the first identification frame and the second identification frame meet the preset conditions, the obstacle is determined to be a large obstacle. There is a deviation in the projection obtained by directly projecting the first identification frame of the large obstacle onto the Frenet coordinate system, which may cause the projection of the large obstacle to overlap with the projection of the target object on the Frenet coordinate system, resulting in a result that the target object and the obstacle have collided. At this time, path planning can no longer be performed to achieve obstacle avoidance. Therefore, in an embodiment of the present application, when the first identification frame and the second identification frame meet the preset conditions, the first identification frame of the obstacle can be divided into N first sub-identification frames.
[0080] The second identification frame is a rectangular frame. The first identification frame can be a regular rectangular frame or other irregular shapes, such as a triangle or polygon. Parameters of the first identification frame and the second identification frame can be obtained. The parameters of the first identification frame include the lengths of each side of the first identification frame. The parameters of the second identification frame include the lengths of each side of the second identification frame. A first area is calculated based on the lengths of each side of the first identification frame, and a second area is calculated based on the lengths of each side of the second identification frame. The maximum length of the obstacle is determined based on the lengths of each side of the first identification frame, and the maximum length of the obstacle is used as the first side length. The maximum length is selected from the lengths of each side of the second identification frame as the second side length. When the difference between the first area of the first identification frame and the second area of the second identification frame is greater than a preset area threshold, or when the difference between the first side length of the first identification frame and the second side length of the second identification frame is greater than a preset length threshold, the first and second identification frames meet the preset conditions. It should be noted that the embodiments of this application do not specifically limit the values of the preset area threshold and length threshold, and can be set based on actual needs or historical experience.
[0081] Exemplarily, the preset area threshold is the second area of the second identification frame. When the difference between the first area of the first identification frame and the second area of the second identification frame is greater than the second area of the second identification frame, the first identification frame and the second identification frame meet the preset condition. That is, when the first area of the first identification frame is greater than twice the second area of the second identification frame, the first identification frame and the second identification frame meet the preset condition. The preset length threshold is the second side length of the second identification frame. When the difference between the first side length of the first identification frame and the second side length of the second identification frame is greater than the second side length of the second identification frame, the first identification frame and the second identification frame meet the preset condition. That is, when the first side length of the first identification frame is greater than twice the second side length of the second identification frame, the first identification frame and the second identification frame meet the preset condition.
[0082] Through the above-mentioned preset conditions, the embodiment of the present application can accurately identify large obstacles that have a significant impact on the driving path of the target object, divide the first identification frame of the large obstacle into multiple first sub-identification frames for subsequent projection processing, and avoid path planning errors caused by projection deviations of large obstacles, thereby improving the accuracy of path planning.
[0083] In some embodiments, when the first identification frame is a rectangular frame, the product of the length and width of the first identification frame is determined as the first area, and the maximum side length of the first identification frame is used as the first side length.
[0084] In some embodiments, when the first identification frame is not a rectangular frame, the first area and the first side length of the first identification frame can be determined in the following manner: first, determine the circumscribed rectangular frame of the first identification frame, where the circumscribed rectangular frame is the minimum rectangle containing the first identification frame; then, determine the product of the length and width of the circumscribed rectangular frame as the first area; and determine the maximum side length of the circumscribed rectangular frame as the first side length.
[0085] Here, the coordinates of each vertex of the first identification frame can be obtained. The maximum horizontal coordinate, minimum horizontal coordinate, maximum vertical coordinate, and minimum vertical coordinate are obtained from the coordinates of multiple vertices. The coordinate point composed of the minimum horizontal coordinate and the minimum vertical coordinate is used as the lower left corner vertex of the circumscribed rectangular frame, the coordinate point composed of the maximum horizontal coordinate and the maximum vertical coordinate is used as the upper right corner vertex of the circumscribed rectangular frame, the difference between the maximum horizontal coordinate and the minimum horizontal coordinate is used as the length of the circumscribed rectangular frame, and the difference between the maximum vertical coordinate and the minimum vertical coordinate is used as the width of the circumscribed rectangular frame. Construct the circumscribed rectangular frame based on the lower left corner vertex, the upper right corner vertex, the length, and the width.
[0086] For example, the obstacle is a triangular obstacle, and the coordinates of the three vertices of the obstacle are: vertex E (4, 5), vertex D (1, 1), and vertex F (8, 2). Then the maximum horizontal coordinate is 8, the minimum horizontal coordinate is 1, the maximum vertical coordinate is 5, and the minimum vertical coordinate is 1. The coordinates of the lower left corner vertex of the circumscribed rectangular box are (1, 1), the coordinates of the upper right corner vertex of the circumscribed rectangular box are (8, 5), the length is 8-1=7, and the width is 5-1=4. Construct the circumscribed rectangular box based on the lower left corner vertex (1, 1), the upper right corner vertex (8, 5), the length 7, and the width 4. The product of the length and width of the circumscribed rectangular box is 7×4=28, so the first area is 28. The maximum side length of the circumscribed rectangular box is 7, so the first side length is 7.
[0087] In some embodiments, if the first identification frame is not a rectangular frame, the first area can be calculated using an area algorithm based on the actual shape of the first identification frame. For example, if the first identification frame is a triangle, the first area can be calculated using a triangle area calculation algorithm. Alternatively, the first area of the first identification frame can be calculated using a vector representation method.
[0088] By determining the circumscribed rectangular frame of the first identification frame, this embodiment ensures that even if the first identification frame is an irregular shape (such as a triangle or polygon), the area and maximum side length can be accurately calculated, thereby ensuring the accuracy of the preset condition judgment. This embodiment ensures a unified processing standard for obstacles of different shapes, improving the robustness and applicability of the path planning algorithm.
[0089] In some embodiments, the first identification frame is a rectangular frame. In the case where the first identification frame is a rectangular frame, see Figure 4In step 102, the first recognition frame of the obstacle is divided into N first sub-recognition frames, which can be achieved by following steps 1021A to 1024A, which are described in detail below.
[0090] In step 1021A, a first side and a second side having the same length are extracted from the first recognition frame.
[0091] The first side and the second side are the sides with the longest length in the first recognition frame.
[0092] Here, the first identification frame is a rectangular frame. The first identification frame includes two sets of edges, where each set includes two parallel edges, and the two edges in each set have the same length. The set with the longest edge length is selected from the two sets of edges, and the two edges included in this set are designated as the first and second edges. It should be noted that the edges of the first identification frame are not necessarily parallel to the horizontal or vertical axes of the Cartesian coordinate system.
[0093] For example, Figure 5 Schematic diagram of the first identification frame provided by the embodiment of the present application as a rectangular frame. Figure 5 The first identification box includes four vertices: A, B, C, and D. The coordinates of the four vertices are as follows: A = {x1, y1}, B = {x2, y2}, C = {x3, y3}, and D = {x4, y4}. The first side of the first identification box is AB, and the second side is CD.
[0094] In step 1022A, interpolation processing is performed on the first side to obtain N-1 first intermediate points arranged in sequence.
[0095] Here, the interpolation processing of the first side can be achieved in the following way: sampling the first side at equal intervals to obtain N-1 first intermediate points, and numbering the N-1 first intermediate points in the order of generation to obtain a unique serial number for each first intermediate point. First, the number N-1 of the sampled first intermediate points can be determined, and the number N-1 can be set based on actual needs. Alternatively, a preset interval can be obtained, and the ratio of the length of the first side to the interval can be determined as the number N-1. If the ratio of the length of the first side to the interval is not an integer, the ratio of the length of the first side to the interval is rounded up to obtain the number N-1. The number N-1 of the sampled first intermediate points satisfies the following formula (1).
[0096]
[0097] Wherein, |AB| is the length of the first side AB, k is a preset interval, and when the target object is a vehicle, k may be the body length of the vehicle.
[0098] For the i-th first intermediate point, i is the serial number of the first intermediate point. Obtain the coordinates of the two vertices of the first side AB: A(x1, y1) and B(x2, y2). Determine the difference in the horizontal coordinates x2-x1 and the difference in the vertical coordinates y2-y1 of the two vertices of the first side AB. Determine a first ratio of the difference in the horizontal coordinates to the number N-1, and multiply the first ratio by the serial number i, and add the horizontal coordinate of vertex A to obtain the horizontal coordinate of the i-th first intermediate point. The horizontal coordinate of the i-th first intermediate point satisfies the following formula (2).
[0099]
[0100] in, is the abscissa of the i-th first intermediate point, x2-x1 is the difference in the abscissas of the two vertices of the first side AB, and x1 is the abscissa of vertex A.
[0101] Determine a second ratio of the ordinate difference to the number N-1, and multiply the second ratio by the sequence number i and add the ordinate of vertex A to obtain the ordinate of the i-th first intermediate point. The ordinate of the i-th first intermediate point satisfies the following formula (3).
[0102]
[0103] in, is the ordinate of the i-th first intermediate point, y2-y1 is the difference in the ordinates of the two vertices of the first side AB, and y1 is the ordinate of vertex A.
[0104] In step 1023A, interpolation processing is performed on the second side to obtain N-1 second intermediate points arranged in sequence.
[0105] Here, the specific process of interpolating the second side to obtain N-1 second intermediate points arranged in sequence is consistent with the specific process of interpolating the first side in step 1022A to obtain N-1 first intermediate points arranged in sequence, and will not be explained again. Figure 6 Schematic diagram of interpolation processing when the first identification frame provided by the embodiment of the present application is a rectangular frame. Figure 6 , sample N-1 points at equal intervals on the first side AB, and obtain N-1 first intermediate points A1, A2, ...A arranged in sequence. N-1 Sample N-1 points at equal intervals on the second side CD to obtain N-1 second intermediate points D1, D2, ...D arranged in sequence. N-1 .
[0106] In step 1024A, the first recognition frame is divided into N first sub-recognition frames by connecting the first middle point and the second middle point with the same sequence number.
[0107] Here, a first middle point and a second middle point having the same serial number are connected to obtain a plurality of lines, which divide the first recognition frame into N first sub-recognition frames. Figure 7 Schematic diagram of the first sub-recognition frame when the first recognition frame provided by the embodiment of the present application is a rectangular frame. Figure 7 , connect the first and second intermediate points with the same serial number to obtain multiple lines: A1D1, A2D2..., A N-1 D N-1 The multiple lines and the first recognition frame together form N first sub-recognition frames: AA1D1D, A1A2D2D1..., A N-2 A N-1 D N-1 D N-2 , A N-1 BCD N-1 .
[0108] The embodiment of the present application can accurately divide the first identification frame into multiple first sub-identification frames by interpolating the edges of the first identification frame, ensuring that the path planning algorithm can more finely handle obstacles of complex shapes and improve the accuracy of path planning.
[0109] In some embodiments, the first identification frame is not a rectangular frame. In the case where the first identification frame is not a rectangular frame, see Figure 8 In step 102, the first recognition frame of the obstacle is divided into N first sub-recognition frames, which can be achieved by following steps 1021B to 1025B, which are described in detail below.
[0110] In step 1021B, a circumscribed rectangular frame of the first recognition frame is determined.
[0111] The circumscribed rectangular frame is the smallest rectangle that includes the first recognition frame.
[0112] Here, the first identification frame is not a rectangular frame. The specific process of determining the circumscribed rectangular frame of the first identification frame in the above embodiment can be referred to and will not be described again. Figure 9 Schematic diagram of a sub-identification frame when the first identification frame provided by the embodiment of the present application is a non-rectangular frame. Figure 9 , the first identified box is the triangle EDF. The circumscribed rectangular box is determined to be ABCD.
[0113] In step 1022B, a third side and a fourth side having the same length are extracted from the circumscribed rectangular frame.
[0114] Among them, the third side and the fourth side are the longest sides in the circumscribed rectangular frame.
[0115] Here, the specific process of extracting the third side and the fourth side of the same length from the circumscribed rectangular frame is the same as the specific process of extracting the first side and the second side of the same length from the first recognition frame in step 1021A, and will not be further described. Figure 9 , the third side is side AB, and the fourth side is side CD.
[0116] In step 1023B, interpolation processing is performed on the third side to obtain N-1 third intermediate points arranged in sequence, and interpolation processing is performed on the fourth side to obtain N-1 fourth intermediate points arranged in sequence.
[0117] Here, the interpolation process is performed on the third side to obtain N-1 third intermediate points arranged in sequence, which is the same as the specific process of interpolating the first side in step 1022A to obtain N-1 first intermediate points arranged in sequence. The interpolation process is performed on the fourth side to obtain N-1 fourth intermediate points arranged in sequence, which is the same as the specific process of interpolating the second side in step 1023A to obtain N-1 second intermediate points arranged in sequence, and will not be further described. For example, see Figure 9 The N-1 third intermediate points arranged in sequence include A1 and A2, and the N-1 fourth intermediate points arranged in sequence include D1 and D2.
[0118] In step 1024B, the circumscribed rectangular frame is divided into N sub-rectangular frames by connecting the third middle point and the fourth middle point having the same sequence number.
[0119] Here, the specific process of dividing the circumscribed rectangular frame into N sub-rectangular frames by connecting the third and fourth midpoints with the same serial number is the same as the specific process of dividing the first identification frame into N sub-identification frames by connecting the first and second midpoints with the same serial number in step 1024A, and will not be further described. Figure 9 , N=3, divide the circumscribed rectangular frame into three sub-rectangular frames AA1D1D, A1A2D2D1 and A2BCD2.
[0120] In step 1025B, the portion of the first recognition frame included in the sub-rectangular frame is determined as the first sub-recognition frame corresponding to the sub-rectangular frame.
[0121] Here, for each sub-rectangular frame, the portion of the first recognition frame contained in the sub-rectangular frame is determined as the first sub-recognition frame corresponding to the sub-rectangular frame. Figure 9 , the multiple first sub-identification frames are DEE1F1, E1F1F2E2, and E2E2F respectively.
[0122] The embodiment of the present application first calculates the minimum circumscribed rectangular frame containing the first identification frame to ensure that subsequent processing is based on a standard rectangular structure. By dividing the circumscribed rectangular frame into sub-rectangular frames, the irregularly shaped first identification frame can be accurately divided into multiple first sub-identification frames, ensuring the safety and reliability of path planning while improving the robustness and adaptability of the algorithm.
[0123] In some embodiments, when the first identification frame and the second identification frame of the target object do not meet preset conditions, the first identification frame is projected to the target coordinate system to obtain a third projection of the first identification frame; based on the relative position relationship between the first projection and the third projection, the position of the target object and the pre-set end position, multiple target points in the target coordinate system are determined, and the multiple target points are connected to obtain a target path indicating the movement of the target object.
[0124] Here, the target coordinate system can be a Frenet coordinate system, and the center line of the road is used as the longitudinal axis s, and the direction perpendicular to the lane is used as the transverse axis l to construct the Frenet coordinate system. When the first identification frame and the second identification frame of the target object do not meet the preset conditions, the obstacle is a non-large obstacle, and the first identification frame of the obstacle can be directly projected onto the Frenet coordinate system without generating projection deviation. Therefore, in an embodiment of the present application, when the first identification frame and the second identification frame of the target object do not meet the preset conditions, the coordinates of the four vertices of the first identification frame are obtained. For each vertex, a discrete point on the center line of the road with the closest Euclidean distance to the vertex is determined. The arc length of the discrete point along the center line of the road is directly used as the longitudinal axis coordinate of the vertex in the Frenet coordinate system. The perpendicular distance between the discrete point and the vertex is used as the transverse axis coordinate of the vertex in the Frenet coordinate system. After obtaining the coordinates of each vertex of the first identification frame in the Frenet coordinate system, the maximum horizontal axis coordinate, the minimum horizontal axis coordinate, the maximum vertical axis coordinate, and the minimum vertical axis coordinate are screened out, and a rectangle formed by connecting the maximum horizontal axis coordinate, the minimum horizontal axis coordinate, the maximum vertical axis coordinate, and the minimum vertical axis coordinate is determined as the third projection of the first identification frame in the Frenet coordinate system.
[0125] When the relative position relationship represents the extension line of the length of the first projection in the longitudinal direction of the Frenet coordinate system, and there is no overlap with the third projection, it is determined that the target object will not collide with obstacles during the road movement. The target object is controlled to continue moving along the original path. When the relative position relationship represents the extension line of the length of the first projection in the longitudinal direction of the Frenet coordinate system, and there is overlap with the third projection, it is determined that the target object may collide with obstacles during the road movement. Dynamic programming combined with a path optimization algorithm can be used to determine multiple target points in the target coordinate system based on the position of the target object and the pre-set end point position, and the multiple target points are connected. After smoothing the connected route, the target path is obtained.
[0126] Alternatively, the minimum distance between the third projection and the target boundary of the road can be determined. The target boundary is the boundary of the road where the third projection does not overlap. The minimum distance between the first projection and the target boundary of the road is determined in the Frenet coordinate system. When the minimum distance is less than or equal to the width of the second identification frame, it is determined that the target object cannot pass through the remaining space between the obstacle and the road boundary. The target object can be controlled to stop moving or to turn back and choose another route.
[0127] When the minimum distance is greater than the width of the second identification frame, it is determined that the target object can pass through the remaining space between the obstacle and the road boundary, and a preset safe passage distance threshold is obtained. Based on the safe passage distance threshold, the width of the second identification frame, and the minimum distance between the first projection and the target boundary of the road, a target path is generated to instruct the target object to move laterally toward the target boundary. The target object is controlled to move on the road according to the target path to avoid obstacles. The embodiment of the present application does not limit the specific algorithm for generating the target path to instruct the target object to move laterally toward the target boundary, and reference may be made to the path planning algorithm in the relevant technology.
[0128] In the embodiment of the present application, when the obstacle does not meet the preset conditions, the first recognition frame is directly projected, thereby avoiding the complicated sub-recognition frame division steps, simplifying the processing logic, and improving the speed of path planning.
[0129] In step 103 , the second recognition frame is projected onto the target coordinate system to obtain a first projection of the second recognition frame, and the N first sub-recognition frames are projected onto the target coordinate system to obtain corresponding second projections of the N first sub-recognition frames.
[0130] Here, the longitudinal axis of the target coordinate system is parallel to the center line of the road, and the transverse axis is perpendicular to the center line. For each first sub-identification frame, the first sub-identification frame is projected onto the target coordinate system to obtain the second projection of the first sub-identification frame. The specific process of projecting the first sub-identification frame onto the target coordinate system to obtain the second projection of the first sub-identification frame is consistent with the process of projecting the first identification frame onto the target coordinate system to obtain the third projection of the first identification frame in the above embodiment, and will not be described again. The specific process of projecting the second identification frame onto the target coordinate system to obtain the first projection of the second identification frame is consistent with the process of projecting the first identification frame onto the target coordinate system to obtain the third projection of the first identification frame in the above embodiment, and will not be described again.
[0131] In step 104, based on the relative positional relationship between the first projection and the N second projections, the position of the target object and the pre-set end position, multiple target points in the target coordinate system are determined, and the multiple target points are connected to obtain a target path indicating the movement of the target object.
[0132] Here, based on the relative positional relationship between the first projection and the N second projections, it can be determined whether the first projection of the target object will overlap with a second projection while the target object is moving on the road according to the original path, or while the target object is moving in the direction in which the current vehicle head is pointing. If the first projection of the target object does not overlap with any second projection, the target object will not collide with the obstacle, and the original path can be left unchanged, or the target object can be moved directly in the direction in which the vehicle head is pointing. If the first projection of the target object overlaps with any one of the second projections, the target object will collide with the obstacle, and the overlapping second projection can be used as the target second projection. Determine the minimum distance between the second projection and the target boundary of the road. Based on the minimum distance between the second projection and the target boundary of the road and the width of the second identification box, the path of the target object is planned.
[0133] When the relative position relationship characterizes the side length extension line of the first projection in the longitudinal direction and overlaps with any second projection, the minimum distance between the N second projections and the target boundary of the road is determined. The target boundary is the boundary in the road that does not overlap with the N second projections. Here, the first projection has two side length extension lines in the longitudinal direction. When any one of the side length extension lines overlaps with any second projection, it is determined that the target object may collide with an obstacle. At this time, the minimum distance between the N second projections and the target boundary of the road is determined. The minimum distance between the N second projections and the target boundary of the road is the distance between the overlapping target second projections and the target boundary. When the minimum distance is greater than the width of the second identification frame, a target path is generated to indicate that the target object moves laterally toward the target boundary.
[0134] Here, when the target object is a vehicle, the width of the second identification frame can be the width of the vehicle body. When the minimum distance is less than or equal to the width of the second identification frame, it is judged that the target object cannot pass through the remaining space between the obstacle and the road boundary, and the target object can be controlled to stop moving, or the target object can be controlled to turn back and choose another route. When the minimum distance is greater than the width of the second identification frame, it is judged that the target object can pass through the remaining space between the obstacle and the road boundary, and a preset safe passing distance threshold is obtained. Based on the safe passing distance threshold, the width of the second identification frame, and the distance between the second projection of the target and the target boundary of the road, a target path is generated to indicate that the target object moves laterally toward the target boundary. The target object is controlled to move on the road according to the target path to avoid obstacles. The embodiment of the present application does not limit the specific algorithm for generating a target path to indicate that the target object moves laterally toward the target boundary, and reference can be made to the path planning algorithm in the relevant technology.
[0135] Based on the location of the target boundary, you can determine whether the target object should move laterally to the left or right. For example, if the target boundary is on the left side of the road, the target object should move left; if the target boundary is on the right side of the road, the target object should move right. Generate a target path that gradually moves laterally from the current travel path to the target boundary. You can use smooth curves (such as Bezier curves) or straight lines to achieve the target path.
[0136] After detecting that projections may overlap in the future and calculating the minimum distance, the embodiment of the present application flexibly generates a target path for lateral movement, ensuring that the target object safely avoids obstacles and continues to travel along the road, thereby improving the accuracy of path planning.
[0137] In some embodiments, see Figure 10 In step 104, based on the relative position relationship between the first projection and the N second projections, the position of the target object and the pre-set end position, multiple target points in the target coordinate system are determined. This can be achieved by following steps 1041 to 1043, which are described in detail below.
[0138] In step 1041 , the side length extension line of the first projection in the longitudinal direction is determined, and the relative positional relationship between the side length extension line and the N second projections is determined.
[0139] Here, the first projection has two side extension lines in the longitudinal direction, and the relative positional relationship between each side extension line and the N second projections can be determined.
[0140] In step 1042 , when the relative position relationship representation side length extension line overlaps with any second projection, a coordinate point in the target coordinate system that is not occupied by the N second projections is used as a passable first coordinate point.
[0141] Here, when any extended side length of the relative positional relationship overlaps with any second projection, it is determined that the target object may collide with an obstacle. The target coordinate system can be divided into multiple coordinate points, where the coordinate points occupied by N second projections are marked as impassable, and the remaining multiple coordinate points are designated as first traversable coordinate points. These first coordinate points are the coordinate points that may constitute the target path for the target object to move.
[0142] For example, if the three second projections of a small obstacle occupy the grid area (5, 3) to (7, 5) in the Frenet coordinate system (the coordinates here represent the row and column positions of the grid), the multiple coordinate points contained in the grid area are marked as impassable. All other coordinates are marked as passable.
[0143] Alternatively, when the extended length of the side representing the relative position relationship does not overlap with any of the second projections, it is determined that the target object will not collide with obstacles if it continues moving in its current direction. The original path of the target object can be used as the target path. If the target object does not have an original path, all coordinate points in the target coordinate system can be used as the multiple first coordinate points.
[0144] In step 1043 , a plurality of target points are determined from the plurality of first coordinate points based on the position of the target object and the end point position.
[0145] Here, the target object's location can be used as the starting point. The coordinates of the starting and ending points in the target coordinate system are determined. A path search algorithm (such as Dijkstra's algorithm or A*) is then used to find a preliminary path from the starting point to the ending point in the target coordinate system. During the search, the coordinate points occupied by obstacles are considered impassable areas. The cost of each path is calculated, taking into account factors such as path length and direction changes. The path with the lowest cost is selected as the preliminary result.
[0146] For example, the vehicle's current position in the Frenet coordinate system is determined to be (0, 0), and the target position is determined to be (20, 10). The A* algorithm is used to search for a path. During the search, the A* algorithm calculates the cost of each coordinate point. The cost includes the actual cost from the starting position to the current coordinate point (e.g., the distance traveled) and the estimated cost from the current coordinate point to the target location (usually estimated using Manhattan distance or Euclidean distance). During the search, any coordinate point marked as impassable (i.e., a coordinate point occupied by a small obstacle) is skipped. Starting from the starting point (0, 0), first calculate the cost of the adjacent coordinate points, select the coordinate point with the smallest cost as the next exploration point, and gradually expand the search range until the end position (20, 10) is found, and a preliminary path is obtained, for example [(0, 0), (1, 0), (2, 0), (3, 1), (4, 2), (5, 3), (6, 4), (7, 5), (8, 6), (9, 7), (10, 8), (11, 9), (12, 10), (13, 10), (14, 10), (15, 10), (16, 10), (17, 10), (18, 10), (19, 10), (20, 10)].
[0147] The initial path may have abrupt turns and be uneven. This is smoothed using methods such as spline curve fitting and Bezier curves to obtain the target path, ensuring smoother movement of the target object. Dynamic and kinematic constraints, such as the target object's maximum speed, acceleration, and steering angle limits, are also considered to adjust the path to ensure the target object follows the planned path. Furthermore, quadratic programming is introduced, with optimization objectives such as minimizing path length, driving time, and maximizing driving comfort. This solves for the optimal path while satisfying obstacle avoidance and vehicle constraints.
[0148] When an obstacle is detected, the embodiment of the present application obtains a first identification frame of the obstacle and a second identification frame of the target object. When preset conditions are met, the first identification frame is divided into N sub-identification frames. The establishment of the preset conditions ensures that the first identification frame of the obstacle is only subjected to more detailed division and projection calculations when a specific situation exists between the obstacle and the target object, thus avoiding unnecessary waste of computing resources and improving the response speed and efficiency of path planning. The second identification frame and the N sub-identification frames are projected into a target coordinate system parallel and perpendicular to the road centerline, respectively, so that path planning is performed based on the first projection and the N second projections. This allows for a more accurate assessment of the impact of obstacles on the target object, improves the accuracy and safety of path planning, avoids collisions, optimizes movement routes, and enables more intelligent and efficient movement of the target object in complex road environments.
[0149] Below, an exemplary application of the embodiment of the present application in a practical application scenario will be described.
[0150] In the context of autonomous driving of unmanned vehicles in industrial parks, path planning algorithms, as core modules within these algorithms, have received extensive attention and research in recent years. The Frenet coordinate system is a commonly used coordinate system in path planning algorithms. Frenet-based path planning algorithms can implement separate horizontal and vertical planning (horizontally: perpendicular to the lane; longitudinally: along the lane), effectively reducing the complexity of the path planning algorithm. The path solving method using dynamic programming combined with quadratic programming in the Frenet coordinate system is currently one of the mainstream path planning algorithms. This method requires mapping environmental information from a Cartesian coordinate system to a Frenet coordinate system centered on the lane centerline to meet subsequent planning and solving requirements.
[0151] Traditional mapping methods convert the obstacle's vertices, output by 3D object detection, into Frenet coordinates in order to map the entire obstacle into the Frenet coordinate system. This method transforms the obstacle into a rectangle parallel to the lane centerline. Subsequent planning uses these coordinates to approximate the obstacle's impact on the autonomous vehicle's path.
[0152] However, unlike common public road scenarios, large trucks exceeding 20 meters in length frequently appear in autonomous driving scenarios in industrial parks. Because these obstacles are so large, their projections in the Frenet coordinate system can be significantly misaligned, leading to misjudgment during subsequent path planning. For example, an obstacle that is actually within the lane may not be projected onto it. Figure 11 This is a schematic diagram of obstacle projection in related technology. Figure 11 , part (a) on the left represents the actual relative position of the unmanned vehicle 1101 and the large obstacle 1102, and part (b) on the right represents the relative position of the unmanned vehicle and the large obstacle in the Frenet coordinate system. During the driving process of the unmanned vehicle, it may detect the presence of a large obstacle in the lane, such as a large truck. Among them, the unmanned vehicle is driving in the lane, and the Frenet coordinate system is constructed with the centerline of the lane as the longitudinal axis s and the direction perpendicular to the lane as the horizontal axis l. The centerline of the lane is parallel to the left and right boundaries of the lane. The projection 1103 of the unmanned vehicle in the Frenet coordinate system and the projection 1104 of the obstacle in the Frenet coordinate system have an overlapping area, indicating that the unmanned vehicle and the large obstacle have collided. However, in reality, the unmanned vehicle and the large obstacle did not collide. Therefore, there is a deviation error in the projection, which makes it impossible for the unmanned vehicle to plan a path to bypass the obstacle.
[0153] To address the problem where large obstacles partially occupy the lane, resulting in projections that are too large to be avoided, an embodiment of the present application provides a path planning method. This path planning method is a method that uses interpolation methods to optimize the obstacle avoidance performance of unmanned vehicles in industrial parks. By reducing the projection deviation of the obstacle, path planning for unmanned vehicles to avoid obstacles is achieved.
[0154] In the embodiment of the present application, to address the potential risk of misjudgment of large obstacles, the following steps are performed to maintain the accuracy of the projection results of large obstacles:
[0155] Step 1: Determine whether the obstacle meets the criteria of a large obstacle (corresponding to the preset conditions in the above embodiment).
[0156] Among them, the unmanned vehicle (corresponding to the target object in the above embodiment) is usually equipped with a variety of sensing devices such as lidar, camera, ultrasonic sensor, etc., which can detect the surrounding environment in real time and in all directions and collect images of the surrounding environment. By performing target detection on the collected image, the position and shape of the obstacle can be identified. The upstream perception algorithm is based on point cloud data and image information, using traditional algorithms or machine learning methods, and will eventually output a rectangular box to represent the obstacle detected in the image. The rectangular box (corresponding to the first recognition box in the above embodiment) represents the outline of the obstacle observed from the planning and control perspective, such as the shape of a truck. The obstacle outline contains information such as length, width, height, center point position, and orientation. The obstacle area (corresponding to the first area in the above embodiment) can be calculated based on the length and height.
[0157] If the obstacle outline (corresponding to the first identification frame in the above embodiment) is a regular rectangle, the obstacle area is directly determined as the product of the obstacle outline's length and width. If the obstacle outline is not a regular rectangle, the obstacle outline's circumscribed rectangle is determined (corresponding to the circumscribed rectangular frame in the above embodiment), the area of the circumscribed rectangle is determined as the obstacle area, and the length of the circumscribed rectangle is determined as the length of the obstacle outline (corresponding to the first side length in the above embodiment). Alternatively, the obstacle area can be calculated based on the actual shape of the obstacle outline (e.g., the area calculation formula for a triangle). The unmanned vehicle can also be represented by a rectangular frame (corresponding to the second identification frame in the above embodiment), and the product of the length and width of the rectangular frame is determined as the unmanned vehicle area (corresponding to the second area in the above embodiment). When the obstacle area is greater than twice the unmanned vehicle area, the obstacle is determined to meet the criteria for a large obstacle. Alternatively, the length of the obstacle outline and the length of the unmanned vehicle (corresponding to the second side length in the above embodiment) are obtained. When the length of the obstacle outline is greater than twice the length of the unmanned vehicle, the obstacle is determined to meet the criteria for a large obstacle.
[0158] Step 2: For large obstacles, the long sides of the obstacle outline are searched one by one (corresponding to the first and second sides in the above embodiment), and the long sides are interpolated to obtain several small obstacles (corresponding to the N sub-identification boxes in the above embodiment).
[0159] The coordinates of the four vertices of the obstacle in a Cartesian coordinate system (such as a map coordinate system) can be determined based on the length, width, height, center point position, and orientation information contained in the obstacle outline. Figure 5 The obstacle outline consists of four vertices: A, B, C, and D. The coordinates of the four vertices are as follows: A = {x1, y1}, B = {x2, y2}, C = {x3, y3}, and D = {x4, y4}. The obstacle outline has two long sides, AB and CD (corresponding to the first and second sides in the above embodiment).
[0160] See also Figure 6 Taking the long side AB as an example, n (corresponding to N-1 in the above embodiment) points can be sampled at equal intervals on this long side to obtain A1, A2, ...A n (corresponding to the first midpoint in the above embodiment). n is a positive integer that can be determined based on the length of the long side AB and a preset parameter k. Parameter k is a positive number that can be set voluntarily. For example, parameter k can be the length of the unmanned vehicle. The value of n satisfies the following formula (4).
[0161]
[0162] Where |AB| is the length of the longer side AB.
[0163] The horizontal coordinates of the sampled points satisfy the following formula (5).
[0164]
[0165] Among them, A i is the i-th point obtained by sampling the long side AB, Point A i The horizontal coordinate of vertex A is x1, and the horizontal coordinate of vertex B is x2.
[0166] The vertical coordinates of the sampled points satisfy the following formula (6).
[0167]
[0168] Among them, A i is the i-th point obtained by sampling the long side AB, Point A i The vertical coordinate of vertex A is y1, and the vertical coordinate of vertex B is y2.
[0169] Further interpolation of the other long side CD is performed in the same way as that of the AB side, and n points can be obtained, D1, D2, ...D n (corresponding to the second intermediate point in the above embodiment). Figure 7 , connect the nth point on the long side AB with the nth point on the long side CD to get multiple (n+1) small obstacles: AA1D1D, A1A2D2D1..., A n-1 A n D n D n-1 , A n BCD n .
[0170] See also Figure 9 For non-rectangular obstacle outlines, such as triangle DEF, the circumscribed rectangle ABCD of the obstacle outline can be determined. Similarly, interpolation processing is performed on the long side AB (corresponding to the third side in the above embodiment) and the long side CD (corresponding to the fourth side in the above embodiment) of the circumscribed rectangle ABCD, respectively, to obtain points A1, A2 (corresponding to the third intermediate point in the above embodiment) and D1, D2 (corresponding to the fourth intermediate point in the above embodiment). The nth point on long side AB is connected to the nth point on long side CD to obtain multiple grids (corresponding to the sub-rectangular boxes in the above embodiment): AA1D1D, A1A2D2D1, A2BCD2. These grids are overlaid on the irregular polygonal obstacle outline and the obstacle outline is segmented to obtain multiple polygons (corresponding to the sub-identification boxes in the above embodiment): DEE1F1, E1F1F2E2, E2E2F. These polygons are identified as multiple small obstacles.
[0171] Step 3: Project the segmented small obstacles one by one into the Frenet coordinate system.
[0172] First, determine a reference line, such as the center line of a lane. The reference line is a discrete curve consisting of a series of points. Each point on the curve contains the position (x ref ,y ref ), orientation angle θ ref (i.e. the angle between the tangent direction and the positive direction of the X-axis), the arc length s along the reference line ref and lateral offset l ref (Vertical distance relative to the lane centerline). The lateral offset l of each point on the reference line ref = 0. Determine the outline of a small obstacle, which consists of a vertex sequence of an arbitrary convex polygon {(x1, y1), (x2, y2), (x3, y3)… (x n ,y n).
[0173] For each vertex in the vertex sequence (x n ,y n ), find a discrete point p with the closest Euclidean distance on the reference line ref,i (x ref,i ,y ref,i ), calculate the vertex (x n ,y n ) relative to the discrete point p ref,i (x ref,i ,y ref,i )’s relative position: Δx=x n -x ref,i Δ, Δy=y n -y ref,i . Discrete point p ref,i Arc length s along the reference line ref,i Directly as a vertex (x n ,y n ) in the Frenet coordinate system. Based on the discrete point p ref,i The orientation angle θ ref,i Calculate the vertex (x n ,y n ) is the horizontal coordinate of the Frenet coordinate system. Specifically, the vertex (x n ,y n )The horizontal axis coordinate of the vertex (x n ,y n ) to discrete point p ref,i (x ref,i ,y ref,i ) vertical distance.
[0174] After obtaining the coordinates of each vertex of the small obstacle in the Frenet coordinate system, the maximum horizontal coordinate, minimum horizontal coordinate, maximum vertical coordinate, and minimum vertical coordinate are selected. The rectangle formed by connecting the maximum horizontal coordinate, minimum horizontal coordinate, maximum vertical coordinate, and minimum vertical coordinate is determined as the projection of the small obstacle in the Frenet coordinate system (corresponding to the second projection in the above embodiment). The projection process of the unmanned vehicle in the Frenet coordinate system (corresponding to the first projection in the above embodiment) is the same as the projection process of the small obstacle and is not further explained.
[0175] Figure 12 This is a schematic diagram of the projection of the unmanned vehicle and multiple small obstacles in the Frenet coordinate system provided in the embodiment of the present application. Figure 12The large obstacle is divided into multiple smaller obstacles through interpolation: Obstacle 1, Obstacle 2, and Obstacle 3. Large obstacle 1201 does not actually intersect with unmanned vehicle 1202. However, due to the limitations of traditional projection methods, the rectangular box 1203 generated by projecting large obstacle 1201 into the Frenet coordinate system will be mistakenly identified as intersecting with the unmanned vehicle's projection 1204. In this case, the path planning algorithm performing collision detection in the Frenet coordinate system will determine that the unmanned vehicle has collided with the large obstacle and will be unable to plan a path. To address this issue, embodiments of the present application can optimize the Frenet coordinate system projection results of large obstacles to reduce the impact of this limitation. The Frenet coordinate system projection results of Obstacles 1, 2, and 3 do not intersect with the unmanned vehicle's projection 1204. At this point, the Frenet coordinate system collision detection path planning algorithm can normally plan a detour path, and the unmanned vehicle can move along the planned route to bypass the obstacle.
[0176] The following continues to describe the exemplary structure of the path planning device 455 provided in the embodiment of the present application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the path planning device 455 of the memory 450 may include:
[0177] The acquisition module 4551 is used to acquire a first recognition frame of the obstacle and a second recognition frame of the target object.
[0178] The division module 4552 is configured to divide the first recognition frame of the obstacle into N first sub-recognition frames, where N is a positive integer greater than 1.
[0179] The projection module 4553 is used to project the second recognition frame to the target coordinate system to obtain the first projection of the second recognition frame, and project the N first sub-recognition frames to the target coordinate system to obtain the second projections of the N first sub-recognition frames.
[0180] The planning module 4554 is used to determine multiple target points in the target coordinate system based on the relative position relationship between the first projection and the N second projections, the position of the target object and the pre-set end position, and connect the multiple target points to obtain a target path indicating the movement of the target object.
[0181] In some embodiments, when the first identification frame is a rectangular frame, the division module 4552 is further used to extract a first side and a second side of the same length from the first identification frame, wherein the first side and the second side are the sides with the longest length in the first identification frame; perform interpolation processing on the first side to obtain N-1 first intermediate points arranged in sequence; perform interpolation processing on the second side to obtain N-1 second intermediate points arranged in sequence; and divide the first identification frame into N first sub-identification frames by connecting the first intermediate points and the second intermediate points with the same sequence number.
[0182] In some embodiments, when the first identification frame is not a rectangular frame, the division module 4552 is further used to determine the circumscribed rectangular frame of the first identification frame, wherein the circumscribed rectangular frame is the smallest rectangle containing the first identification frame; extract a third side and a fourth side of the same length from the circumscribed rectangular frame, wherein the third side and the fourth side are the sides with the longest length in the circumscribed rectangular frame; interpolate the third side to obtain N-1 third intermediate points arranged in sequence, and interpolate the fourth side to obtain N-1 fourth intermediate points arranged in sequence; divide the circumscribed rectangular frame into N sub-rectangular frames by connecting the third intermediate points and the fourth intermediate points with the same sequence number; and determine the part of the first identification frame included in the sub-rectangular frame as the first sub-identification frame corresponding to the sub-rectangular frame.
[0183] In some embodiments, the division module 4552 is further used to divide the first identification frame of the obstacle into N first sub-identification frames when the first identification frame and the second identification frame meet preset conditions; wherein the preset conditions include one of the following: the difference between the first area of the first identification frame and the second area of the second identification frame is greater than a preset area threshold; the difference between the first side length of the first identification frame and the second side length of the second identification frame is greater than a preset length threshold, wherein the first side length is the maximum length of the obstacle, and the second side length is the maximum side length in the second identification frame.
[0184] In some embodiments, the path planning device 455 also includes a data processing module for determining the circumscribed rectangular frame of the first identification frame when the first identification frame is not a rectangular frame, wherein the circumscribed rectangular frame is the minimum rectangle containing the first identification frame; determining the product of the length and width of the circumscribed rectangular frame as the first area; and determining the maximum side length of the circumscribed rectangular frame as the first side length.
[0185] In some embodiments, the projection module 4553 is also used to project the first identification frame to the target coordinate system to obtain a third projection of the first identification frame when the first identification frame and the second identification frame of the target object do not meet preset conditions; the planning module 4554 is also used to determine multiple target points in the target coordinate system based on the relative position relationship between the first projection and the third projection, the position of the target object and the pre-set end position, and connect the multiple target points to obtain a target path indicating the movement of the target object.
[0186] In some embodiments, the longitudinal axis of the target coordinate system is parallel to the centerline of the road, and the transverse axis is perpendicular to the centerline. Planning module 4554 is further configured to determine an extension line of the longitudinal axis of the first projection, and determine a relative positional relationship between the extension line and the N second projections; when the relative positional relationship indicates that the extension line overlaps with any second projection, a coordinate point in the target coordinate system that is not occupied by the N second projections is used as a passable first coordinate point; and based on the position of the target object and the destination position, multiple target points are determined from the multiple first coordinate points.
[0187] An embodiment of the present application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the path planning method described in the embodiment of the present application.
[0188] The embodiment of the present application provides a computer-readable storage medium in which computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the path planning method provided by the embodiment of the present application, for example, Figure 3 The path planning method is shown.
[0189] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0190] In some embodiments, computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0191] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).
[0192] By way of example, computer-executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.
[0193] In summary, the embodiments of the present application can reduce the projection deviation of large obstacles in the case where a large obstacle partially occupies the lane, resulting in a projection that is too large to circumvent the obstacle, thereby improving the accuracy of path planning.
[0194] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.
Claims
1. A path planning method, characterized in that: The method comprises: Obtain a first recognition frame of the obstacle and a second recognition frame of the target object; Divide the first recognition frame of the obstacle into N first sub-recognition frames, where N is a positive integer greater than 1; Projecting the second recognition frame onto the target coordinate system to obtain a first projection of the second recognition frame, and projecting the N first sub-recognition frames onto the target coordinate system to correspondingly obtain N second projections of the first sub-recognition frames; Based on the relative positional relationship between the first projection and the N second projections, the position of the target object and the preset end position, multiple target points in the target coordinate system are determined, and the multiple target points are connected to obtain a target path indicating the movement of the target object.
2. The method according to claim 1, characterized in that In the case where the first recognition frame is a rectangular frame, dividing the first recognition frame of the obstacle into N first sub-recognition frames includes: Extracting a first side and a second side of the same length from the first identification frame, wherein the first side and the second side are the longest sides in the first identification frame; Performing interpolation processing on the first side to obtain N-1 first intermediate points arranged in sequence; Performing interpolation processing on the second side to obtain N-1 second intermediate points arranged according to the sequence number; The first recognition frame is divided into N first sub-recognition frames by connecting the first middle point and the second middle point having the same sequence number.
3. The method according to claim 1, characterized in that In a case where the first recognition frame is not a rectangular frame, dividing the first recognition frame of the obstacle into N first sub-recognition frames includes: Determining a bounding rectangle of the first identification frame, wherein the bounding rectangle is a minimum rectangle that includes the first identification frame; Extracting a third side and a fourth side of the same length from the circumscribed rectangular frame, wherein the third side and the fourth side are the longest sides in the circumscribed rectangular frame; Interpolate the third side to obtain N-1 third intermediate points arranged in sequence, and interpolate the fourth side to obtain N-1 fourth intermediate points arranged in sequence; Dividing the circumscribed rectangular frame into N sub-rectangular frames by connecting the third middle point and the fourth middle point having the same sequence number; The portion of the first recognition frame included in the sub-rectangular frame is determined as a first sub-recognition frame corresponding to the sub-rectangular frame.
4. The method according to claim 1, wherein The step of dividing the first recognition frame of the obstacle into N first sub-recognition frames includes: When the first recognition frame and the second recognition frame meet a preset condition, the first recognition frame of the obstacle is divided into N first sub-recognition frames; wherein the preset condition includes one of the following: A difference between a first area of the first identification frame and a second area of the second identification frame is greater than a preset area threshold; A difference between a first side length of the first identification frame and a second side length of the second identification frame is greater than a preset length threshold, wherein the first side length is the maximum length of the obstacle, and the second side length is the maximum side length in the second identification frame.
5. The method according to claim 4, characterized in that When the first recognition frame is not a rectangular frame, the method further includes: Determining a bounding rectangle of the first identification frame, wherein the bounding rectangle is a minimum rectangle that includes the first identification frame; Determine the first area as the product of the length and width of the circumscribed rectangular frame; The maximum side length of the circumscribed rectangular frame is determined as the first side length.
6. The method according to claim 4, characterized in that The method further comprises: When the first recognition frame and the second recognition frame of the target object do not meet the preset condition, projecting the first recognition frame to the target coordinate system to obtain a third projection of the first recognition frame; Based on the relative positional relationship between the first projection and the third projection, the position of the target object and the preset end position, multiple target points in the target coordinate system are determined, and the multiple target points are connected to obtain a target path indicating the movement of the target object.
7. The method according to any one of claims 1 to 6, characterized in that The longitudinal axis of the target coordinate system is parallel to the center line of the road, and the transverse axis is perpendicular to the center line. The determining of multiple target points in the target coordinate system based on the relative positional relationship between the first projection and the N second projections, the position of the target object, and a preset end point position includes: Determine an extension line of the side length of the first projection in the longitudinal axis direction, and determine a relative positional relationship between the extension line and the N second projections; When the relative position relationship indicates that the side length extension line overlaps with any of the second projections, a coordinate point in the target coordinate system that is not occupied by the N second projections is used as a passable first coordinate point; Based on the position of the target object and the end point position, a plurality of target points are determined from the plurality of first coordinate points.
8. A path planning device, characterized in that: The device comprises: An acquisition module, configured to acquire a first recognition frame of the obstacle and a second recognition frame of the target object; a division module, configured to divide the first recognition frame of the obstacle into N first sub-recognition frames, where N is a positive integer greater than 1; a projection module, configured to project the second recognition frame onto a target coordinate system to obtain a first projection of the second recognition frame, and project the N first sub-recognition frames onto the target coordinate system to obtain corresponding second projections of the N first sub-recognition frames; A planning module is used to determine multiple target points in the target coordinate system based on the relative position relationship between the first projection and the N second projections, the position of the target object and the pre-set end position, and connect the multiple target points to obtain a target path indicating the movement of the target object.
9. An electronic device, characterized in that: The electronic device comprises: a memory for storing computer-executable instructions or computer programs; The processor is configured to implement the path planning method according to any one of claims 1 to 7 when executing the computer-executable instructions or computer program stored in the memory.
10. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the path planning method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Self-driving vehicle path adaptation system and method
CA3166449A1
Travelable space planning method and device
CN114815791A
Method and device for processing projection ambiguity under Frenet coordinate system and medium
CN117764817A
Obstacle processing method and device for automatic driving scene, equipment and medium
CN119356182A