Vehicle control method and device, vehicle, storage medium and program product

By setting the prediction thread and the main thread to be asynchronous in the autonomous driving system, reducing the running frequency of the prediction thread to avoid GPU resource contention, the problem of GPU time-sharing limitation in the autonomous driving system is solved, and the system stability and prediction trajectory are improved. accuracy.

CN118744738APending Publication Date: 2024-10-08CHONGQING CHANGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411015895.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

In the autonomous driving system, the high running frequency of the prediction module causes contention for GPU resources, which affects the performance of the prediction module.

Method used

The prediction thread and main thread in the vehicle system are set as asynchronous threads, the prediction thread running frequency is reduced to avoid GPU time-sharing limitations, and the prediction trajectory is corrected through the main thread to optimize control decisions.

Benefits of technology

It improves the stability of the autonomous driving system and the accuracy of predicted trajectories, reduces errors due to delays between asynchronous threads, and optimizes resource utilization and system processing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118744738A_ABST
    Figure CN118744738A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle control method and device, a vehicle, a storage medium and a program product, and relates to the technical field of automatic driving. The method is applied to a controller of a first vehicle, and comprises the following steps: controlling a prediction thread to obtain driving data of a second vehicle from a main thread; the main thread is used for collecting driving data of surrounding vehicles in the driving process of the first vehicle; the second vehicle is any vehicle around the first vehicle; the prediction thread is asynchronous with the main thread; controlling the main thread to obtain a first prediction track of the second vehicle from the prediction thread; the prediction thread is used for determining a first prediction track of the second vehicle based on the driving data of the second vehicle; correcting the first predicted trajectory of the second vehicle through the main thread to obtain a second predicted trajectory of the second vehicle; and controlling, by the main thread, the first vehicle based on the second predicted trajectory of the second vehicle. The prediction thread operation frequency can be prevented from being influenced by the main thread, so that the time-sharing limitation of the GPU is met, and the performance of the automatic driving system is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of autonomous driving technology, in particular to the field of vehicle trajectory prediction technology, and specifically to a vehicle control method, device, vehicle, storage medium and program product. Background Art

[0002] With the rapid development of autonomous driving technology, autonomous driving systems have become an important part of the future intelligent transportation field. However, in the practical application of autonomous driving systems, a significant technical challenge is how to efficiently and accurately process a large amount of data from different submodules.

[0003] The prediction module is one of the important components of the autonomous driving system. This module is responsible for predicting the vehicle's trajectory and participating in the vehicle's behavior decision-making. The operation of the prediction module depends on the resource allocation of the graphics processing unit (GPU). Therefore, when the running frequency of the prediction module is high, it will exceed the GPU time-sharing limit, causing GPU resource contention, which will affect the operation effect of the prediction module. Summary of the invention

[0004] The present application provides a vehicle control method, device, vehicle, storage medium and program product, which can at least solve the problem of GPU time-sharing limitation caused by the excessively high running frequency of the prediction module in the prior art. The technical solution of the present application is as follows:

[0005] According to a first aspect of the present application, a vehicle control method is provided, the method comprising: controlling a prediction thread to obtain driving data of a second vehicle from a main thread; the main thread is used to collect driving data of surrounding vehicles during the driving of the first vehicle; the second vehicle is any vehicle around the first vehicle; the prediction thread is asynchronous to the main thread; controlling the main thread to obtain a first predicted trajectory of the second vehicle from the prediction thread; the prediction thread is used to determine the first predicted trajectory of the second vehicle based on the driving data of the second vehicle; correcting the first predicted trajectory of the second vehicle through the main thread to obtain a second predicted trajectory of the second vehicle; and controlling the first vehicle through the main thread based on the second predicted trajectory of the second vehicle.

[0006] According to the above technical means, the present application controls the vehicle by setting the prediction thread and the main thread in the vehicle system as asynchronous threads, and sending the predicted trajectory to the main thread after the prediction thread outputs the predicted trajectory. Since the prediction thread and the main thread are asynchronous threads, the running frequency of the prediction thread will not be affected by the main thread. Therefore, in order to meet the time-sharing limit of the GPU, a lower running frequency can be assigned to the prediction thread, thereby reducing the possibility of the prediction thread exceeding the GPU time-sharing limit during operation, and improving the stability of the autonomous driving system.

[0007] In a possible implementation, the first predicted trajectory is a trajectory in a Frenet coordinate system; correcting the first predicted trajectory of the second vehicle through the main thread to obtain a second predicted trajectory of the second vehicle includes: obtaining a current first position of the second vehicle; the first position is used to indicate the position of the second vehicle in the global coordinate system; converting the first position into a second position in the Frenet coordinate system; and correcting the first predicted trajectory based on the second position to obtain the second predicted trajectory of the second vehicle.

[0008] According to the above-mentioned technical means, the present application obtains the current first position of the second vehicle, and updates the predicted trajectory using the first position based on the Frenet coordinate system and the global coordinate system, thereby reducing to a certain extent the error in the final prediction result caused by the trajectory swinging left and right due to the time delay between the prediction thread and the main thread and the change in vehicle heading in an asynchronous situation.

[0009] In one possible implementation, correcting the first predicted trajectory based on the second position to obtain a second predicted trajectory of the second vehicle includes: correcting the first predicted trajectory based on the second position to obtain a third predicted trajectory; converting the third predicted trajectory to a global coordinate system to obtain a fourth predicted trajectory; and converting the fourth predicted trajectory to the first vehicle coordinate system to obtain the second predicted trajectory of the second vehicle.

[0010] According to the above technical means, the present application uses the latest acquired current position of the vehicle to correct the predicted trajectory of the vehicle, thereby enhancing the ability to correct and optimize the predicted trajectory.

[0011] In one possible implementation, the first predicted trajectory is a trajectory in a second vehicle coordinate system; the first predicted trajectory of the second vehicle is corrected by the main thread to obtain a second predicted trajectory of the second vehicle, including: obtaining the current first position and heading of the second vehicle; the first position is used to indicate the position of the second vehicle in the global coordinate system; the first predicted trajectory is converted to the global coordinate system to obtain a fifth predicted trajectory; based on the first position and heading, the fifth predicted trajectory is corrected to obtain a sixth predicted trajectory; the sixth predicted trajectory is converted to the first vehicle coordinate system to obtain the second predicted trajectory of the second vehicle.

[0012] According to the above technical means, the present application converts the vehicle's driving position and driving trajectory based on the vehicle coordinate system and the global coordinate system, which can reduce the error of the final prediction result caused by the time delay between the prediction thread and the main thread in an asynchronous situation to a certain extent.

[0013] In a possible implementation, the first vehicle further includes: a memory; the prediction thread is further used to obtain the driving data of the second vehicle saved by the main thread from the memory; the main thread is further used to obtain the first predicted trajectory of the second vehicle saved by the prediction thread from the memory.

[0014] According to the above-mentioned technical means, the present application realizes data exchange between the main thread and the prediction thread in an asynchronous state by setting up a memory to store the vehicle driving position and heading data from the main thread and the predicted trajectory data from the prediction thread, thereby reducing the time for the system to process data, improving the system processing capability, and optimizing resource utilization.

[0015] In a possible implementation, the main thread communicates with the prediction thread through a common data exchange interface.

[0016] According to the above technical means, the present application realizes communication between different threads through a common data exchange interface, thereby improving data interoperability and reducing system operation energy consumption.

[0017] According to a second aspect of the present application, a vehicle control device is provided, including an acquisition module, a processing module, and a control module.

[0018] The acquisition module is used to control the prediction thread to acquire the driving data of the second vehicle from the main thread; the main thread is used to collect the driving data of the surrounding vehicles during the driving of the first vehicle; the second vehicle is any vehicle around the first vehicle; the prediction thread is asynchronous with the main thread;

[0019] The analysis module is used to control the main thread to obtain the first predicted trajectory of the second vehicle from the prediction thread; the prediction thread is used to determine the first predicted trajectory of the second vehicle based on the driving data of the second vehicle; and the first predicted trajectory of the second vehicle is corrected by the main thread to obtain the second predicted trajectory of the second vehicle;

[0020] The control module is used to control the first vehicle based on the second predicted trajectory of the second vehicle through the main thread.

[0021] In one possible implementation, the first predicted trajectory is a trajectory in a Frenet coordinate system; the processing module is specifically used to obtain a current first position of the second vehicle; the current position is used to indicate a position of the second vehicle in a global coordinate system; the first position is converted into a second position in the Frenet coordinate system; the first predicted trajectory is corrected based on the second position to obtain a second predicted trajectory of the second vehicle.

[0022] In a possible implementation, the processing module is specifically used to correct the first predicted trajectory based on the second position to obtain a third predicted trajectory; convert the third predicted trajectory to a global coordinate system to obtain a fourth predicted trajectory; and convert the fourth predicted trajectory to a first vehicle coordinate system to obtain a second predicted trajectory of the second vehicle.

[0023] In one possible implementation, the first predicted trajectory is a trajectory in a second vehicle coordinate system; the processing module is specifically used to obtain a current first position and heading of the second vehicle; the current position is used to indicate a position of the second vehicle in a global coordinate system; the first predicted trajectory is converted to the global coordinate system to obtain a fifth predicted trajectory; based on the first position and heading, the fifth predicted trajectory is corrected to obtain a sixth predicted trajectory; the sixth predicted trajectory is converted to the first vehicle coordinate system to obtain a second predicted trajectory of the second vehicle.

[0024] In a possible implementation, the first vehicle further includes: a memory; the prediction thread is further used to obtain the driving data of the second vehicle saved by the main thread from the memory; the main thread is further used to obtain the first predicted trajectory of the second vehicle saved by the prediction thread from the memory.

[0025] In a possible implementation, the main thread communicates with the prediction thread through a common data exchange interface.

[0026] According to the third aspect provided by the present application, a vehicle is provided, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to execute instructions to implement the method of the above-mentioned first aspect and any possible implementation manner thereof.

[0027] According to the fourth aspect provided by the present application, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by the processor of the vehicle, the vehicle is enabled to execute the method in the above-mentioned first aspect and any possible implementation method thereof.

[0028] According to the fifth aspect provided by the present application, a computer program product is provided, the computer program product comprising computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method of the above-mentioned first aspect and any possible implementation manner thereof.

[0029] Therefore, the above technical features of the present application have the following beneficial effects:

[0030] (1) According to the above technical means, the present application controls the vehicle by setting the prediction thread and the main thread in the vehicle system as asynchronous threads, and sending the predicted trajectory to the main thread after the prediction thread outputs the predicted trajectory. Since the prediction thread and the main thread are asynchronous threads, the running frequency of the prediction thread will not be affected by the main thread. Therefore, in order to meet the time-sharing limit of the GPU, a lower running frequency can be assigned to the prediction thread, thereby reducing the possibility of the prediction thread exceeding the GPU time-sharing limit during operation, thereby improving the stability of the autonomous driving system.

[0031] (2) According to the above technical means, the present application obtains the current first position of the second vehicle, and updates the predicted trajectory using the first position based on the Frenet coordinate system and the global coordinate system, thereby to a certain extent reducing the error of the final prediction result caused by the trajectory swinging left and right due to the time delay between the prediction thread and the main thread and the change in vehicle heading in an asynchronous situation.

[0032] (3) Based on the above technical means, the present application uses the latest vehicle current position to correct the vehicle predicted trajectory, thereby enhancing the ability to correct and optimize the predicted trajectory.

[0033] (4) According to the above technical means, the present application converts the vehicle's driving position and driving trajectory based on the vehicle coordinate system and the global coordinate system, which can reduce the error of the final prediction result caused by the time delay between the prediction thread and the main thread in an asynchronous situation to a certain extent.

[0034] (5) According to the above technical means, the present application realizes data exchange between the main thread and the prediction thread in an asynchronous state by setting up a memory to store the vehicle driving position and heading data from the main thread and the predicted trajectory data from the prediction thread, thereby reducing the system processing time, improving the system processing capability, and optimizing resource utilization.

[0035] (6) According to the above technical means, the present application realizes communication between different threads through a common data exchange interface, thereby improving data interoperability and reducing system operation energy consumption.

[0036] It should be noted that the technical effects brought about by any implementation method in the second to fifth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here.

[0037] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.

[0039] Figure 1 is a schematic diagram of an architecture of a hardware facility according to an exemplary embodiment;

[0040] Figure 2 is a flow chart of a vehicle control method according to an exemplary embodiment;

[0041] Figure 3is a flow chart of another vehicle control method according to an exemplary embodiment;

[0042] Figure 4 is a schematic structural diagram of a vehicle control device according to an exemplary embodiment;

[0043] Figure 5 is a block diagram of a vehicle according to an exemplary embodiment. DETAILED DESCRIPTION

[0044] In order to enable ordinary persons in the art to better understand the technical solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0046] As described in the background technology, in an autonomous driving system, due to the large number and complexity of modules, each module may need to call the GPU for model reasoning to support advanced driver assistance systems and autonomous driving functions. However, the time-sharing resources of the GPU are limited, which means that each module faces time constraints when obtaining GPU resources for data processing and prediction. This limitation directly affects the stability of the autonomous driving system.

[0047] The autonomous driving system includes a main module and a prediction module. The main module runs in the main thread and is used to obtain relevant vehicle driving data and control the vehicle according to the predicted trajectory; the prediction module runs in the prediction thread and is mainly used to predict the trajectory based on the relevant vehicle driving data.

[0048] At present, the prediction module and the main module often run synchronously, that is, the main thread and the prediction thread are kept in sync. Since the main thread usually has a higher running frequency, in order to keep in sync with the main thread, the prediction thread will also maintain a higher running frequency, which will cause the prediction thread to frequently occupy GPU resources. In this case, it is easy for the GPU time-sharing to fail to meet the actual needs of the prediction thread, affecting the normal operation of the prediction thread and thus affecting the stability of the autonomous driving system.

[0049] In view of the above technical problems, the embodiment of the present application provides a vehicle control method, the idea of ​​which is:

[0050] Control the prediction thread to obtain the driving data of the second vehicle from the main thread; the main thread is used to collect the driving data of the surrounding vehicles during the driving of the first vehicle; the second vehicle is any vehicle around the first vehicle; the prediction thread is asynchronous with the main thread; control the main thread to obtain the first predicted trajectory of the second vehicle from the prediction thread; the prediction thread is used to determine the first predicted trajectory of the second vehicle based on the driving data of the second vehicle; correct the first predicted trajectory of the second vehicle through the main thread to obtain the second predicted trajectory of the second vehicle; control the first vehicle based on the second predicted trajectory of the second vehicle through the main thread.

[0051] For ease of understanding, the vehicle control method provided in the present application is specifically introduced below with reference to the accompanying drawings.

[0052] Figure 1 This is a schematic diagram of the architecture of a hardware facility provided in an embodiment of the present application. Figure 1 As shown, the hardware facilities involved in the embodiment of the present application include: a data acquisition device 100, a data processing device 200, and a control device 300.

[0053] The data acquisition device 100 is arranged in the vehicle and is used to collect the location information, heading and other data of the target vehicles around the current vehicle.

[0054] Exemplarily, the data acquisition device 100 may be a laser device (eg, a laser rangefinder), a radar device (eg, a radar rangefinder, a radar speedometer, etc.), or a positioning and navigation device (eg, a GPS, a gyroscope, etc.).

[0055] In some embodiments, the data acquisition device 100 is connected to the data processing device 200 , and the data acquisition device 100 transmits the collected vehicle motion data to the data processing device 200 .

[0056] The data processing device 200 is used to obtain the position information and heading data of the target vehicles around the current vehicle collected by the data collection device 100, so as to predict the driving trajectory of the target vehicles around the current vehicle based on the acquired data, and correct the predicted trajectory of the target vehicle through coordinate system conversion.

[0057] In some embodiments, the data processing device 200 may be a processing chip deployed on a vehicle together with the data acquisition device 100, or the data processing device 200 may also be a cloud server. The specific device form of the data processing device 200 is not limited in the present embodiment.

[0058] In some embodiments, the data processing device 200 is connected to the control device 300 , and the data processing device 200 sends the corrected predicted trajectory of the target vehicle to the control device 300 .

[0059] The control device 300 is used to control the current vehicle according to the corrected predicted trajectory of the target vehicle.

[0060] Exemplarily, the control device 300 may be a controller deployed on a vehicle, such as a vehicle controller, etc., for controlling the vehicle's brakes, throttle, engine, shifter, alarm, steering wheel, etc. The embodiment of the present application does not limit the specific device form of the control device 300.

[0061] In some embodiments, the control device 300 may exist independently of the data processing device 200; or, the data processing device 200 and the control device 300 may be integrated into the same device.

[0062] In some embodiments, the data processing device 200 and the control device 300 may be integrated into the same device, or respectively deployed in different devices.

[0063] It is understandable that the application scenarios of the embodiments of the present disclosure are not limited. The system architecture and business scenarios described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. It is known to those skilled in the art that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.

[0064] Figure 2 A flow chart of a vehicle control method provided in an embodiment of the present application is applied to Figure 1 In the data acquisition device 100, the data processing device 200 and the control device 300 shown, the method includes the following steps:

[0065] S100. Control the prediction thread to obtain the driving data of the second vehicle from the main thread.

[0066] Among them, the main thread is used to collect driving data of surrounding vehicles during the driving of the first vehicle; the second vehicle is any vehicle around the first vehicle; and the prediction thread is asynchronous with the main thread.

[0067] In some embodiments, the driving data of the second vehicle includes at least the current position, speed and heading of the vehicle. The position mentioned here can be a global position (such as longitude and latitude) or a position relative to the current vehicle, which is not specifically limited in the embodiments of the present application.

[0068] In some embodiments, the first vehicle further includes a memory, and the prediction thread is further used to obtain the driving data of the second vehicle saved by the main thread from the memory. The above step S100 includes: controlling the main thread to write the driving data of the second vehicle into the memory; controlling the prediction thread to read the driving data of the second vehicle in the memory and copy a copy of the data for subsequent trajectory prediction operations.

[0069] Exemplarily, the present application designs a data warehouse to store vehicle driving data and predicted trajectories.

[0070] In some embodiments, the main thread and the prediction thread involved in the present application are run in a timer-triggered (TimerCallback) manner. The running frequency of the main thread is greater than the running frequency of the prediction thread. Exemplarily, the execution cycle of the main thread is set to 40ms, and the execution cycle of the prediction thread is set to 100ms.

[0071] In some embodiments, the main thread and the prediction thread communicate via a common data exchange interface (DXI). It is understandable that the common data exchange interface enables data exchange between different threads, allowing data to be transmitted and processed in a standardized manner, thereby achieving data sharing and collaborative work.

[0072] S200. Control the main thread to obtain a first predicted trajectory of the second vehicle from the prediction thread.

[0073] The prediction thread is used to determine a first predicted trajectory of the second vehicle based on the driving data of the second vehicle.

[0074] In some embodiments, the first vehicle further includes a memory, and the main thread is further used to obtain the first predicted trajectory of the second vehicle saved by the prediction thread from the memory. The above step S200 includes: controlling the prediction thread to output the first predicted trajectory of the second vehicle and write the first predicted trajectory into the memory; controlling the main thread to copy the first predicted data in the memory for subsequent operations.

[0075] Exemplarily, the prediction thread may write the first prediction trace into the memory through a move constructor.

[0076] It should be noted that since the main thread and prediction thread involved in this application are asynchronous threads, in order to avoid race conditions when different threads access the same data, it is necessary to ensure that each thread performs atomic operations when reading and writing data.

[0077] In some embodiments, the present application uses a mutex to ensure that each thread can perform atomic operations. For example, when the main thread writes the driving data of the second vehicle into the data warehouse, it obtains the ownership of the first mutex and locks the first mutex. At this time, other threads will not be able to read the driving data of the second vehicle in the data warehouse; when the main thread completes the data writing, it releases the first mutex (or releases the ownership of the first mutex); after the first mutex is released, the prediction thread also locks the first mutex to obtain the ownership of the first mutex, thereby realizing data reading and copying. Similarly, the prediction thread implements the atomic operation of writing the first predicted trajectory of the second vehicle into the data warehouse by using the second mutex (a different mutex from the first mutex); the main thread implements the atomic operation of reading and copying the first predicted trajectory of the second vehicle from the data warehouse by using the second mutex.

[0078] It can be understood that the mutex ensures that only one thread can access or modify specific shared data at the same time, which prevents data inconsistency or corruption caused by multiple threads modifying the same resource at the same time, thereby optimizing the performance of the autonomous driving system.

[0079] S300: Correct the first predicted trajectory of the second vehicle through the main thread to obtain a second predicted trajectory of the second vehicle.

[0080] It is understandable that the main thread obtains the output of the prediction thread by accessing the data stored in the same address each time. Since the main thread and the prediction thread are independently triggered at regular intervals in this application, the data obtained by the main thread may be delayed, that is, the first predicted trajectory output by the prediction thread is based on the trajectory of historical vehicle driving data, so the timestamp corresponding to the first predicted trajectory is earlier than the latest timestamp of the main thread at the current moment, and there is an error between the first predicted trajectory and the actual driving trajectory at the current moment, so the main thread corrects the first predicted trajectory to reduce the error of the prediction result. The specific correction process can be seen in S301-S304 and S311-S313 below.

[0081] S400. Controlling the first vehicle based on the second predicted trajectory of the second vehicle through the main thread.

[0082] The second predicted trajectory of the second vehicle is the corrected final predicted trajectory.

[0083] In some embodiments, the main thread puts the corrected final predicted trajectory into a predefined message format and publishes it using the timestamp of the main thread.

[0084] In some embodiments, the first predicted trajectory is a trajectory in the second vehicle coordinate system, and the above step S300 can be specifically implemented as the following steps S301-S304:

[0085] S301. Obtain a current first position and heading of a second vehicle.

[0086] The current first position and heading are used to indicate the latest position and heading of the second vehicle in the global coordinate system.

[0087] S302: Convert the first predicted trajectory into a global coordinate system to obtain a fifth predicted trajectory.

[0088] It should be understood that the first predicted trajectory is a trajectory in the second vehicle coordinate system. In order to ensure that the correction is performed in the same coordinate system, the first predicted trajectory can be converted to the global coordinate system.

[0089] S303: Based on the first position and the heading, correct the fifth predicted trajectory to obtain a sixth predicted trajectory.

[0090] The sixth predicted trajectory is the predicted trajectory of the target vehicle in the corrected global coordinate system.

[0091] It should be understood that the predicted trajectory is a series of trajectory points with timestamps. During the correction process, the main thread determines the target trajectory point closest to the first position and heading among these trajectory points, deletes other trajectory points whose timestamps are before the corresponding timestamps of the target trajectory point, and obtains the corrected sixth predicted trajectory (in the global coordinate system).

[0092] S304: Convert the sixth predicted trajectory to the first vehicle coordinate system to obtain a second predicted trajectory of the second vehicle.

[0093] It should be understood that the first vehicle coordinate system is a coordinate system established with the first vehicle as the origin. Converting the predicted trajectory of the second vehicle to the first vehicle coordinate system can more intuitively reflect the impact of the subsequent driving trajectory of the second vehicle on the first vehicle, thereby facilitating automatic driving of the first vehicle.

[0094] In some embodiments, in order to better eliminate the problem of left-right swinging of the predicted trajectory caused by delay, the first predicted trajectory is a trajectory in the Frenet coordinate system, and the above step S300 can also be specifically implemented as the following steps S311-S313:

[0095] S311. Obtain the current first position of the second vehicle.

[0096] The current first position is used to indicate the latest position information of the second vehicle in the global coordinate system.

[0097] S312, converting the first position into a second position in the Frenet coordinate system.

[0098] The reference path of the Frenet coordinate system is the center line of the lane where the current vehicle is traveling, described in global coordinates.

[0099] It should be understood that the Frenet coordinate system describes the vehicle position based on the distance between the vehicle and the center line of the lane and the distance the vehicle travels along the lane line. It has no direct connection with the vehicle's heading information. Therefore, it is more concise and intuitive. The direct positional relationship between the vehicle and the road is clearer, which can better reduce the errors caused by asynchronous thread delays.

[0100] S313: Correct the first predicted trajectory based on the second position to obtain a second predicted trajectory of the second vehicle.

[0101] In some embodiments, the above step S313 specifically includes the following steps:

[0102] S321 . Correct the first predicted trajectory based on the second position to obtain a third predicted trajectory.

[0103] The third predicted trajectory is a predicted trajectory in a modified Frenet coordinate system.

[0104] It should be understood that the predicted trajectory is a series of trajectory points with timestamps. During the correction process, the main thread determines the target trajectory point closest to the second position among these trajectory points, deletes other trajectory points whose timestamps are before the corresponding timestamp of the target trajectory point, and obtains the corrected third predicted trajectory.

[0105] S322: Convert the third predicted trajectory into a global coordinate system to obtain a fourth predicted trajectory.

[0106] S323: Convert the fourth predicted trajectory into the first vehicle coordinate system to obtain a second predicted trajectory of the second vehicle.

[0107] It should be understood that the first vehicle coordinate system is a coordinate system established with the first vehicle as the origin. Converting the predicted trajectory of the second vehicle to the first vehicle coordinate system can intuitively reflect the impact of the subsequent driving trajectory of the second vehicle on the first vehicle, thereby facilitating automatic driving of the first vehicle.

[0108] It is understandable that the present application provides a vehicle control method, which predicts the trajectories of vehicles around the current vehicle based on the asynchronous method between the main thread and the prediction thread, and uses a shared data interface, mutex, data warehouse, etc. to achieve data exchange between the main thread and the prediction thread, and corrects the predicted trajectory through coordinate transformation. This vehicle control method optimizes the use of GPU resources, reduces the time consumption of a single GPU inference and the operating frequency of the prediction module, while ensuring the accuracy of vehicle trajectory prediction, thereby reducing driving problems caused by large trajectory deviations and improving the overall performance of the autonomous driving system.

[0109] The vehicle control method in this application is introduced below in conjunction with specific embodiments. Figure 3 As shown, the vehicle control method provided in the embodiment of the present application can be implemented in the following manner:

[0110] S1. Obtain vehicle data at the current time (t1).

[0111] S2. Store the vehicle data at time t1 into the data warehouse.

[0112] S3. Copy the vehicle data at time t1 in the data warehouse.

[0113] S4. Perform trajectory prediction based on the vehicle data at time t1 to obtain a first predicted trajectory.

[0114] S5. Move the first predicted trajectory into the data warehouse.

[0115] S6. Copy the first predicted trajectory.

[0116] S7. Obtain vehicle data at the current time (t2).

[0117] S8. Correct the first predicted trajectory based on the vehicle data at time t2 to obtain a second predicted trajectory.

[0118] S9. Release the second predicted trajectory and control the vehicle.

[0119] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, the vehicle control device or electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0120] The embodiments of the present application can exemplarily divide the functional modules of the vehicle control device or electronic device according to the above method. For example, the vehicle speed control device or electronic device for the ramp can include various functional modules corresponding to the various functional divisions, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0121] Figure 4Schematic diagram of the structure of a vehicle control device provided by the present application. Figure 4 The vehicle control device 400 includes an acquisition module 401, a processing module 402, and a control module 403.

[0122] The acquisition module 401 is used to control the prediction thread to acquire the driving data of the second vehicle from the main thread; the main thread is used to collect the driving data of the surrounding vehicles during the driving of the first vehicle; the second vehicle is any vehicle around the first vehicle; the prediction thread is asynchronous with the main thread;

[0123] The processing module 402 is used to control the main thread to obtain the first predicted trajectory of the second vehicle from the prediction thread; the prediction thread is used to determine the first predicted trajectory of the second vehicle based on the driving data of the second vehicle; and the first predicted trajectory of the second vehicle is corrected by the main thread to obtain the second predicted trajectory of the second vehicle;

[0124] The control module 403 is used to control the first vehicle based on the second predicted trajectory of the second vehicle through the main thread.

[0125] In one possible implementation, the first predicted trajectory is a trajectory in a Frenet coordinate system; the processing module 402 is specifically used to obtain the current first position of the second vehicle; the first position is used to indicate the position of the second vehicle in the global coordinate system; the first position is converted into a second position in the Frenet coordinate system; the first predicted trajectory is corrected based on the second position to obtain a second predicted trajectory of the second vehicle.

[0126] In a possible implementation, the processing module 402 is specifically used to correct the first predicted trajectory based on the second position to obtain a third predicted trajectory; convert the third predicted trajectory to the global coordinate system to obtain a fourth predicted trajectory; and convert the fourth predicted trajectory to the first vehicle coordinate system to obtain a second predicted trajectory of the second vehicle.

[0127] In one possible implementation, the first predicted trajectory is a trajectory in a second vehicle coordinate system; the processing module 402 is specifically used to obtain a current first position and heading of the second vehicle; the first position is used to indicate a position of the second vehicle in a global coordinate system; the first predicted trajectory is converted to the global coordinate system to obtain a fifth predicted trajectory; based on the first position and heading, the fifth predicted trajectory is corrected to obtain a sixth predicted trajectory; the sixth predicted trajectory is converted to the first vehicle coordinate system to obtain a second predicted trajectory of the second vehicle.

[0128] In a possible implementation, the first vehicle further includes: a memory; the prediction thread is further used to obtain the driving data of the second vehicle saved by the main thread from the memory; the main thread is further used to obtain the first predicted trajectory of the second vehicle saved by the prediction thread from the memory.

[0129] In a possible implementation, the main thread communicates with the prediction thread through a common data exchange interface.

[0130] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0131] Figure 5 FIG. 1 is a block diagram of a vehicle according to an exemplary embodiment. Figure 5 As shown, vehicle 500 includes, but is not limited to, a processor 501 and a memory 502 .

[0132] The memory 502 is used to store executable instructions of the processor 501. It can be understood that the processor 501 is configured to execute instructions to implement the vehicle control method in the above embodiment.

[0133] It should be noted that those skilled in the art can understand that Figure 5 The vehicle structure shown in the figure does not constitute a limitation on the vehicle, and the vehicle may include Figure 5 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.

[0134] The processor 501 is the control center of the vehicle, which uses various interfaces and lines to connect various parts of the entire vehicle, and executes various functions of the vehicle and processes data by running or executing software programs and / or modules stored in the memory 502, and calling data stored in the memory 502, so as to monitor the vehicle as a whole. The processor 501 may include one or more processing units. Optionally, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.

[0135] The memory 502 can be used to store software programs and various data. The memory 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application program required by at least one functional module (such as a determination unit, a processing unit, etc.), etc. In addition, the memory 502 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0136] In some embodiments, the present application also provides a vehicle, including: Figure 5 The vehicle shown is used to execute the vehicle control method in the above embodiment.

[0137] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 502 including instructions, and the above instructions can be executed by a processor 501 of a vehicle 500 to implement the vehicle speed control method for a ramp in the above embodiment.

[0138] In actual implementation, Figure 4 The functions of the acquisition module 401, the processing module 402 and the control module 403 in Figure 5 The processor 501 in the embodiment calls the computer program stored in the memory 502. The specific execution process can refer to the description of the method part in the above embodiment, which will not be repeated here.

[0139] Optionally, the computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0140] In an exemplary embodiment, the present application also provides a computer program product including one or more instructions, which can be executed by the processor 501 of the vehicle to complete the vehicle control method in the above embodiment.

[0141] It should be noted that when the instructions in the above-mentioned computer-readable storage medium or one or more instructions in the computer program product are executed by the vehicle's processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect as the above-mentioned method can be achieved. To avoid repetition, they will not be repeated here.

[0142] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0143] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0144] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0145] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0146] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the full classification part or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute the full classification part or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or CD and other media that can store program code.

[0147] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A vehicle control method, characterized in that: Applied to a controller of a first vehicle, the method comprises: Control the prediction thread to obtain the driving data of the second vehicle from the main thread; the main thread is used to collect the driving data of surrounding vehicles during the driving of the first vehicle; the second vehicle is any vehicle around the first vehicle; the prediction thread is asynchronous with the main thread; Controlling the main thread to obtain a first predicted trajectory of the second vehicle from the prediction thread; the prediction thread is used to determine the first predicted trajectory of the second vehicle based on the driving data of the second vehicle; Correcting the first predicted trajectory of the second vehicle by the main thread to obtain a second predicted trajectory of the second vehicle; The first vehicle is controlled, through the main thread, based on a second predicted trajectory of the second vehicle.

2. The method according to claim 1, characterized in that: The first predicted trajectory is a trajectory in a Frenet coordinate system; Correcting the first predicted trajectory of the second vehicle by the main thread to obtain a second predicted trajectory of the second vehicle includes: Acquire a current first position of the second vehicle; the first position is used to indicate a position of the second vehicle in a global coordinate system; Converting the first position to a second position in a Frenet coordinate system; The first predicted trajectory is corrected based on the second position to obtain a second predicted trajectory of the second vehicle.

3. The method according to claim 2, characterized in that The correcting the first predicted trajectory based on the second position to obtain a second predicted trajectory of the second vehicle includes: Correcting the first predicted trajectory based on the second position to obtain a third predicted trajectory; Converting the third predicted trajectory into a global coordinate system to obtain a fourth predicted trajectory; The fourth predicted trajectory is converted into the first vehicle coordinate system to obtain a second predicted trajectory of the second vehicle.

4. The method according to claim 1, characterized in that: The first predicted trajectory is a trajectory in a second vehicle coordinate system; Correcting the first predicted trajectory of the second vehicle by the main thread to obtain a second predicted trajectory of the second vehicle includes: Acquire a current first position and heading of the second vehicle; the first position is used to indicate a position of the second vehicle in a global coordinate system; Converting the first predicted trajectory into a global coordinate system to obtain a fifth predicted trajectory; Based on the first position and heading, correct the fifth predicted trajectory to obtain a sixth predicted trajectory; The sixth predicted trajectory is converted into the first vehicle coordinate system to obtain a second predicted trajectory of the second vehicle.

5. The method according to claim 1, characterized in that The first vehicle further includes: a memory; The prediction thread is further used to obtain the driving data of the second vehicle stored by the main thread from the memory; The main thread is further used to obtain from the memory a first predicted trajectory of the second vehicle saved by the prediction thread.

6. The method according to any one of claims 1 to 5, characterized in that: The main thread communicates with the prediction thread through a common data exchange interface.

7. A vehicle control device, characterized in that: The device is applied to a controller of a first vehicle, and the device comprises: an acquisition unit, used for controlling the prediction thread to acquire the driving data of the second vehicle from the main thread; the main thread is used for collecting the driving data of the surrounding vehicles during the driving of the first vehicle; the second vehicle is any vehicle around the first vehicle; the prediction thread is asynchronous with the main thread; A processing unit controls the main thread to obtain a first predicted trajectory of the second vehicle from the prediction thread; the prediction thread is used to determine the first predicted trajectory of the second vehicle based on the driving data of the second vehicle; and the first predicted trajectory of the second vehicle is corrected by the main thread to obtain a second predicted trajectory of the second vehicle; A control unit is used to control the first vehicle based on a second predicted trajectory of the second vehicle through the main thread.

8. A vehicle, characterized in that: include: processor; A memory for storing the processor executable instructions; wherein the processor is configured to execute the instructions to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: When the computer-executable instructions stored in the computer-readable storage medium are executed by a processor of a vehicle, the vehicle is capable of performing the method of any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product comprises a computer program and when the computer program product is executed by a processor of the vehicle, the vehicle is capable of performing the method according to any one of claims 1 to 6.