METHOD AND DEVICE FOR PLANNING THE SPEED OF AN AUTONOMOUS VEHICLE AND STORAGE MEDIUM
Patent Information
- Application Number
- DE602020047875
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-02-22
- Filing Date
- 2020-02-12
- Publication Date
- 2025-03-19
- Estimated Expiration
- 2040-02-12
AI Technical Summary
Autonomous vehicles face challenges in determining reasonable speeds during lane changes, which can lead to traffic accidents if the speed is not adequately calculated, as existing technologies do not effectively account for obstacle positions and speeds in planning trajectories.
A method and apparatus for planning the speed of an autonomous vehicle by generating multiple speed trajectories, calculating a cost function value based on predicted obstacle speeds and positions, and selecting a trajectory with a minimum cost function value to ensure a safe distance during lane changes, using a route-time coordinate system and preset parameters to determine expected distances and cost values.
This approach allows for more reasonable speed planning, increasing the success rate of lane changes by maintaining a safe distance from obstacles, thereby reducing the risk of accidents and improving the accuracy of trajectory planning.
Description
TECHNICAL FIELD
[0001] The present invention relates to automatic driving, and particularly to a method and an apparatus for planning a speed of an autonomous vehicle, and a storage medium.BACKGROUND
[0002] The autonomous vehicle includes vehicles travelling in an autonomous mode, such as driverless mode. The autonomous vehicle can liberate passengers, especially a driver, from driving. The autonomous vehicles can be navigated to various locations by using on-board sensors, so as to travel with minimal human-computer interactions or without any passengers. During a lane change of travelling, the autonomous vehicle moves from one lane to another lane, which is referred to as a merge into a traffic flow. Before the lane change, it is required to determine a travelling trajectory, including travelling speed, for the autonomous vehicle. If a determined speed is unreasonable, a traffic accident will occur.
[0003] US 2017 / 349183 A1 discloses a vehicle control system comprising an automated driving controller configured to execute an automated driving of the vehicle by automatically performing at least one of speed control and steering control of the vehicle, wherein the automated driving controller is provided with a trajectory generation part which is configured to generate a candidate of the trajectory based on the traveling mode determined. The trajectory candidates generated thereby may be represented by a plurality of trajectory points each of which including a speed component. A trajectory candidate generation part is required to give a target speed to each of the trajectory points.
[0004] US 2018 / 148051 A1 discloses a further vehicle control system.SUMMARY
[0005] The embodiments of the present invention provide a method and apparatus for determining a speed of an autonomous vehicle, and a non-volatile computer-readable storage medium, so as to solve one or more technical problems in the existing technology.
[0006] According to a first aspect, a method for planning a speed of an autonomous vehicle is provided according to the invention. The method includes: generating a plurality of speed trajectories to be selected for the autonomous vehicle before the autonomous vehicle changes a lane, wherein the speed trajectory to be selected comprises the speeds to be selected at a plurality of time points within a preset time range; obtaining predicted speeds and predicted positions of an obstacle at the plurality of time points; calculating a cost function value of each of the speed trajectories to be selected, according to the plurality of speed trajectories to be selected, the predicted speeds, and the predicted positions; and selecting a speed trajectory to be selected with a minimum cost function value, as a planning speed trajectory of the autonomous vehicle.
[0007] Furthermore, calculating the calculating a cost function value of each of the speed trajectories to be selected, according to the plurality of speed trajectories to be selected, the predicted speeds, and the predicted positions includes: setting an expected distance at each time point, according to the speed to be selected of the autonomous vehicle at each time point and the predicted speed of the obstacle at each time point, wherein the expected distance is a safe distance from the autonomous vehicle to the obstacle; calculating a cost function value of the speed trajectory to be selected at each time point according to the expected distance and a distance to be selected at each time point, wherein the distance to be selected is a distance from the autonomous vehicle to the obstacle on the speed trajectory to be selected; and obtaining the cost function value of the speed trajectory to be selected according to the cost function value of the speed trajectory to be selected at each time point.
[0008] Furthermore, the calculating a cost function value of each of the speed trajectories to be selected, according to the plurality of speed trajectories to be selected, the predicted speeds, and the predicted positions includes: generating a travelling route trajectory in a route-time coordinate system according to the speed trajectory to be selected, wherein a horizontal axis and a longitudinal axis of the route-time coordinate system denote a time and a position respectively; and mapping a plurality of predicted positions of the obstacle into the route-time coordinate system to obtain a mapping route trajectory of the obstacle, according to a correspondence relation to the time points.
[0009] Furthermore, the setting an expected distance at each time point, according to the speed to be selected of the autonomous vehicle at each time point and the predicted speed of the obstacle at each time point includes: determining a lane change corresponding to the speed trajectory to be selected as a lane change for overtaking or a lane change for yielding, according to the travelling route trajectory and the mapping route trajectory; if the lane change is determined as a lane change for overtaking, calculating the expected distance at each time point according to a formula: d_desire = v_obs×x1 + (v_obs-v_adc) ×x2+x3; wherein d_desire is an expected distance at the time point, v_obs is a predicted speed at the time point, v_adc is a speed to be selected at the time point, and x1, x2 and x3 are a first preset parameter, a second preset parameter and a third preset parameter, respectively.
[0010] Furthermore, the setting an expected distance at each time point, according to speed to be selected of the autonomous vehicle at each time point and predicted speed of an obstacle at each time point includes: if the lane change is determined as a lane change for yielding, calculating the expected distance at each time point according to a formula: d_desire = v_obs × x 1 + v_adc − v_obs × x 2 + x 3 .
[0011] In an embodiment, the calculating a cost function value of the speed trajectory to be selected at each time point according to the expected distance and a distance to be selected at the each time point includes: determining the distance to be selected at each time point, according to the travelling route trajectory and the mapping route trajectory; calculating the cost function value of the speed trajectory to be selected at each time point according to a formula cost = max[0, - x4(d - d_desire)], wherein d is a distance to be selected at the time point, d_desire is an expected distance at the time point, and x4 is a fourth preset parameter.
[0012] According to a second aspect, an apparatus for planning a speed of an autonomous vehicle is provided according to the invention. The apparatus includes: a generating module configured to generate a plurality of speed trajectories to be selected for the autonomous vehicle before the autonomous vehicle changes a lane, wherein the speed trajectory to be selected includes the speeds to be selected at a plurality of time points within a preset time range; an obtaining module configured to obtain predicted speeds and predicted positions of an obstacle at the plurality of time points; a calculating module configured to calculate a cost function value of each of the speed trajectories to be selected, according to the plurality of speed trajectories to be selected, the predicted speeds, and the predicted positions; and a selecting module configured to select a speed trajectory to be selected with a minimum cost function value, as a planning speed trajectory of the autonomous vehicle.
[0013] Furthermore, the calculation module includes: an expected distance setting sub-module configured to set an expected distance at each time point, according to the speed to be selected of the autonomous vehicle at each time point and the predicted speed of the obstacle at each time point, wherein the expected distance is a safe distance from the autonomous vehicle to the obstacle; a cost function value calculating sub-module configured to calculate a cost function value of the speed trajectory to be selected at each time point according to the expected distance and a distance to be selected at each time point, wherein the distance to be selected is a distance from the autonomous vehicle to the obstacle on the speed trajectory to be selected; and a cost function value obtaining sub-module configured to obtain the cost function value of the speed trajectory to be selected according to the cost function value of the speed trajectory to be selected at each time point.
[0014] Furthermore, the calculating module includes: a travelling route trajectory generating sub-module configured to generate a travelling route trajectory in a route-time coordinate system according to the speed trajectory to be selected, wherein a horizontal axis and a longitudinal axis of the route-time coordinate system denote a time and a position respectively; and a mapping route trajectory obtaining sub-module configured to map a plurality of predicted positions of the obstacle into the route-time coordinate system to obtain a mapping route trajectory of the obstacle, according to a correspondence relation to the time points.
[0015] Furthermore, the expected distance calculating sub-module further includes: a judging unit configured to determine a lane change corresponding to the speed trajectory to be selected as a lane change for overtaking or a lane change for yielding, according to the travelling route trajectory and the mapping route trajectory; and a first calculating unit configured to, if the lane change is determined as a lane change for overtaking, calculate the expected distance at each time point according to a formula: d_desire = v_obs×x1 + (v_obs-v_adc) ×x2+x3; wherein d_desire is an expected distance for the time point, v_obs is a predicted speed at the time point, v_adc is a speed to be selected at the time point, and x1, x2 and x3 are a first preset parameter, a second preset parameter and a third preset parameter, respectively.
[0016] Furthermore, the expected distance setting sub-module further includes: a second calculating unit configured to, if the lane change is determined as a lane change for yielding, calculate the expected distance at each time point according to a formula: d_desire = v_obs×x1 + (v_adc-v_obs) ×x2+x3.
[0017] In an embodiment, the cost function value calculating sub-module includes: a determining unit configured to determine the distance to be selected at each time point, according to the travelling route trajectory and the mapping route trajectory; and a calculating unit configured to calculate the cost function value of the speed trajectory to be selected at each time point according to a formula cost = max[0,-x4(d-d_desire)], wherein d is a distance to be selected at the time point, d_desire is an expected distance at the time point, and x4 is a fourth preset parameter.
[0018] According to a third aspect, a computer-readable storage medium is provided according to the invention, which is configured to store computer software instructions used by an apparatus for planning a speed of an autonomous vehicle, and including a program involved in performing any of the above methods for planning a speed of an autonomous vehicle.
[0019] According to the above technical solutions, a planning speed may be more reasonable by generating a plurality of speed trajectories to be selected, calculating a cost function value of the speed trajectories to be selected according to relative positions and relative speeds between the autonomous vehicle and the obstacle, and determining a speed trajectory to be selected with a minimum cost function value as a planning speed of the autonomous vehicle before the autonomous vehicle changes a lane. Further, in the above technical solutions, the method for calculating the cost function value may adjust the speed of the autonomous vehicle before the autonomous vehicle changes a lane, so that the distance from the autonomous vehicle to the obstacle on the target lane is increased, thereby creating an opportunity and a safe distance for the lane change, and improving a success rate of the lane change.
[0020] The above summary is for the purpose of the specification only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and characters described above, further aspects, embodiments, and characters of the present invention will be readily understood by reference to the drawings and the following detailed description.BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In the drawings, unless otherwise specified, identical reference numerals will be used throughout the drawings to refer to identical or similar parts or elements. The drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in accordance with the present invention and are not to be considered as limiting the scope of the present invention. Fig. 1 illustrates a flowchart of a method for planning a speed of an autonomous vehicle according to an embodiment of the present invention. Figs. 2A and 2B illustrate example diagrams of a method for planning a speed of an autonomous vehicle according to an embodiment of the present invention, respectively. Fig. 3 illustrates a flowchart of a method for planning a speed of an autonomous vehicle according to one of embodiments of the present invention. Fig. 4 illustrates a schematic diagram of a travelling route trajectory and a mapping route trajectory in an embodiment of the present invention. Fig. 5 illustrates a flowchart of a method for planning a speed of an autonomous vehicle according to another one of embodiments of the present invention. Fig. 6 illustrates a structural block diagram of an apparatus for planning a speed of an autonomous vehicle according to an embodiment of the present invention. Fig. 7 illustrates a structural block diagram of an apparatus for planning a speed of an autonomous vehicle according to one of embodiments of the present invention. Fig. 8 illustrates a structural block diagram of an apparatus for planning a speed of an autonomous vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] In the following, only certain exemplary embodiments are briefly described. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the scope of the present invention as defined in the claims. Accordingly, the drawings and description are to be regarded as illustrative in nature and not restrictive.
[0023] Fig. 1 illustrates a flowchart of a method for planning a speed of an autonomous vehicle according to an embodiment of the present invention. As illustrated in Fig. 1, the method may include the following steps: S100: generating a plurality of speed trajectories to be selected for the autonomous vehicle before the autonomous vehicle changes a lane, wherein the speed trajectory to be selected comprises the speeds to be selected at a plurality of time points within a preset time range; S200: obtaining predicted speeds and predicted positions of an obstacle at the plurality of time points; S300: calculating a cost function value of each of the speed trajectories to be selected, according to the plurality of speed trajectories to be selected, the predicted speeds, and the predicted positions; and S400: selecting a speed trajectory to be selected with a minimum cost function value, as a planning speed trajectory of the autonomous vehicle.
[0024] When the autonomous vehicle travels along a selected route, the speed of the autonomous vehicle at different time points may be determined so as to provide a speed trajectory for the autonomous vehicle. In this embodiment, the speed trajectory to be selected may be represented by a two-dimensional trajectory formed of speed and time. The preset time range is divided into a plurality of time points by a preset time interval. The speed trajectory to be selected is discretized to obtain a speed to be selected at the time point.
[0025] Figs. 2A and 2B illustrate application scenes of a method for planning a speed of an autonomous vehicle according to an embodiment of the present invention, respectively. Figs. 2A and 2B illustrate a segment of two-lane road having an upward direction as a travelling direction. In Figs. 2A and 2B, the autonomous vehicle travels on a right lane before a lane change, and travels on a left lane after the lane change, wherein the right lane may be referred to a 'current lane', and the left lane may be referred to a 'target lane'. The target lane may have the obstacles that affect the lane change of the autonomous vehicle, and the obstacles may include pedestrians, animals and vehicles, etc. on the lane.
[0026] In Fig. 2A, an autonomous vehicle is located in front of an obstacle before a lane change. In the embodiments of the present invention, multiple speed trajectories to be selected within a preset time range may be generated for the autonomous vehicle before the lane change; a cost function value of each of the speed trajectories to be selected is calculated, and a trajectory of speed to be selected with a minimum cost function value is selected as a planning speed trajectory. A planning travelling route trajectory may be obtained according to the planning speed trajectory, and the autonomous vehicle may change its lane according to the planning speed trajectory and the planning travelling route trajectory. For example, the trajectory from point A to point B in Fig. 2A is a route corresponding to the planning travelling route.
[0027] In S200, a speed trajectory and a position trajectory of the obstacle within the preset time range may be predicted according to the current travelling condition of the obstacle and in combination with the current data, so as to obtain a predicted speed and a predicted position of the obstacle at each time point.
[0028] The relative speed between the obstacle and the autonomous vehicle will affect the relative distance therebetween. Before the lane change, the relative distance between the autonomous vehicle and the obstacle may be obtained according to the predicted speed and the predicted position of the obstacle; and then according to the relative distance, the cost function value of each of the speed trajectories to be selected may be calculated, so that the finally determined planning speed trajectory may be more reasonable. The speed before the lane change may be adjusted, thereby maintaining a lane change distance between the autonomous vehicle and the obstacle sufficient.
[0029] In one example, the preset time range may be 8 seconds. An error of the speed trajectory may be increased after the preset 8 seconds, and thus the preset speed within 8 seconds may reduce the data redundancy and improve the accuracy of the planning travelling route and the planning speed.
[0030] In one embodiment, as illustrated in Fig. 3, S300 may include: S310: setting an expected distance at each time point, according to the speed to be selected of the autonomous vehicle at each time point and the predicted speed of the obstacle at each time point, wherein the expected distance is a safe distance from the autonomous vehicle to the obstacle; S320: calculating a cost function value of the speed trajectory to be selected at each time point according to the expected distance and a distance to be selected at each time point, wherein the distance to be selected is a distance from the autonomous vehicle to the obstacle on the speed trajectory to be selected; and S330: obtaining the cost function value of the speed trajectory to be selected according to the cost function value of the speed trajectory to be selected at each time point.
[0031] In S310, according to the speed to be selected at each time point and the predicted speed of the obstacle at the time point, the relative speeds between the autonomous vehicle and the obstacle at the time point may be obtained, and then according to the relative speeds, an expected distance at the time point may be calculated. The expected distance may represent a safe distance away from the obstacle when the autonomous vehicle may successfully change the lane.
[0032] At a certain time point, a difference between the distance to be selected and the expected distance, from the autonomous vehicle to the obstacle, will affect the cost function value of speed trajectory to be selected at the time point. For example, the cost function value decreases as the difference decreases.
[0033] In S330, the cost function value of the speed trajectory to be selected may be obtained by accumulating the cost function value at each time point.
[0034] In Fig. 2B, the autonomous vehicle and the obstacle are side by side before a lane change. According to the method of the embodiments of the present invention, before the lane change, the speed of the autonomous vehicle may be adjusted, so that a safe distance from the autonomous vehicle to the obstacle in the target lane may be provided.
[0035] In one embodiment, as illustrated in Fig. 3, S300 may include: S340: generating a travelling route trajectory in a route-time coordinate system according to the speed trajectory to be selected, wherein a horizontal axis and a longitudinal axis of the route-time coordinate system denote a time and a position respectively; and S350: mapping a plurality of predicted positions of the obstacle into the route-time coordinate system to obtain a mapping route trajectory of the obstacle, according to a correspondence relation to the time points.
[0036] In one example, as illustrated in Fig. 4, in the route-time coordinate system, the horizontal axis denotes a time (t) in a unit of second, and the longitudinal axis denotes a position (s) in a unit of meter. In S311, according to a formula s=v×t, trajectories of speed to be selected v1(t) and v2(t) may be converted into travelling route trajectories s1(t) and s2(t), respectively, and s1(t) and s2(t) may be expressed in the route-time coordinate system. The predicted positions of the obstacle at each time point are mapped into the route-time coordinate system to obtain a plurality of discrete points, and a mapping route trajectory s0(t) of the obstacle may be obtained by fitting the plurality of discrete points. The preset time range Δt includes multiple time points t0, t1, t2, t3, t4 and t5.
[0037] In one embodiment, as illustrated in Fig. 5, S310 may include: S311: determining a lane change corresponding to the speed trajectory to be selected as a lane change for overtaking or a lane change for yielding, according to the travelling route trajectory and the mapping route trajectory; S312: if the lane change is determined as a lane change for overtaking, calculating the expected distance at each time point according to a formula: d_desire = v_obs×x1 + (v_obs-v_adc) ×x2+x3; wherein d_desire is an expected distance at the time point, v_obs is a predicted speed at the time point, v_adc is a speed to be selected at the time point, and x1, x2 and x3 are a first preset parameter, a second preset parameter and a third preset parameter, respectively; and S313: if the lane change is determined as a lane change for yielding, calculating the expected distance at each time point according to a formula: d_desire = v_obs × x 1 + v_adc - v_obs × x 2 + x 3 .
[0038] In S311, a lane change corresponding to the speed trajectory to be selected may be determined as a lane change for overtaking or a lane change for yielding, according to a relative position between the autonomous vehicle and the obstacle at a last time point within the preset time range.
[0039] Next, the description is continued with reference to Fig. 4. In Fig. 4, C0 denotes a position of the obstacle at a last time point t5; C1 denotes a position of the autonomous vehicle when travelling to the time point t5 based on the trajectory of speed to be selected v1(t); C2 denotes a position of the autonomous vehicle when travelling to the time point t5 based on the trajectory of speed to be selected v2(t). When C1 is located above C0, it is determined that the lane change expressed by the trajectory of speed to be selected v1(t) is a lane change for overtaking; and when C2 is located below C0, it is determined that the lane change expressed by the trajectory of speed to be selected v2(t) is a lane change for yielding.
[0040] In S312 and S313, the first preset parameter x1, the second preset parameter x2, and the third preset parameter x3 may be preset according to actual experiences. For example, x3 is set as a minimum distance allowed between the autonomous vehicle and the obstacle during the lane change.
[0041] In one embodiment, in S320, the distance to be selected at each time point is determined according to the travelling route trajectory and the mapping route trajectory; the cost function value of the speed trajectory to be selected at the time point is calculated, according to a formula cost = max[0, - x4(d - d_desire)], wherein d is a distance to be selected at the time point, d_desire is an expected distance at the time point, and x4 is a fourth preset parameter.
[0042] In this embodiment, the cost function value of the speed trajectory to be selected at each time point is calculated according to the formula cost = max[0, - x4(d - d_desire)], and then the cost function value of the speed trajectory to be selected is calculated.
[0043] In summary, in the method for planning the speed of the autonomous vehicle according to the embodiments of the present invention, by generating a plurality of speed trajectories to be selected; calculating a cost function value of each of the speed trajectories to be selected, according to the relative positions and the relative speeds between the autonomous vehicle and the obstacle; and then determining a speed trajectory to be selected with a minimum cost function value as a planning speed trajectory for the lane change of the autonomous vehicle, the planning speed may be more reasonable and a sufficient lane change distance from the obstacle in the target lane may be maintained before the lane change.
[0044] Further, when the cost function value is calculated, in consideration of the safe distance between the autonomous vehicle and the obstacle, and the distance to be selected, it is possible to adjust the speed of the autonomous vehicle before the lane change in order to increase the distance from the obstacle, thereby creating an opportunity and a safe distance for the lane change, and then improving the success rate of the lane change (the merge into the traffic flow).
[0045] In addition, upon planning a speed, different calculating methods of the cost function value adopted for the overtaking lane change and the yielding lane change lead to a more accuracy.
[0046] Fig. 6 illustrates a structural block diagram of an apparatus for planning a speed of an autonomous vehicle according to an embodiment of the present invention. As illustrated in Fig. 6, the apparatus includes: a generating module 100 configured to generate a plurality of speed trajectories to be selected for the autonomous vehicle before the autonomous vehicle changes a lane, wherein the speed trajectory to be selected comprises the speeds to be selected at a plurality of time points within a preset time range; an obtaining module 200 configured to obtain predicted speeds and predicted positions of an obstacle at the plurality of time points; a calculating module 300 configured to calculate a cost function value of each of the speed trajectories to be selected, according to the plurality of speed trajectories to be selected, the predicted speeds, and the predicted positions; and a selecting module 400 configured to select a speed trajectory to be selected with a minimum cost function value, as a planning speed trajectory of the autonomous vehicle .
[0047] In one embodiment, as illustrated in Fig. 7, the calculating module 300 may include: an expected distance setting sub-module 310 configured to set an expected distance at each time point, according to the speed to be selected of the autonomous vehicle at each time point and the predicted speed of the obstacle at each time point, wherein the expected distance is a safe distance from the autonomous vehicle to the obstacle; a cost function value calculating sub-module 320 configured to calculate a cost function value of the speed trajectory to be selected at each time point according to the expected distance and a distance to be selected at each time point, wherein the distance to be selected is a distance from the autonomous vehicle to the obstacle on the speed trajectory to be selected; and a cost function value obtaining sub-module 330 configured to obtain the cost function value of the speed trajectory to be selected according to the cost function value of the speed trajectory to be selected at each time point.
[0048] In one embodiment, as illustrated in Fig. 7, the calculating module 300 may further include: a travelling route trajectory generating unit 340 configured to generate a travelling route trajectory in a route-time coordinate system according to the speed trajectory to be selected, wherein a horizontal axis and a longitudinal axis of the route-time coordinate system denote a time and a position respectively; a mapping route trajectory obtaining unit 350 configured to map a plurality of predicted positions of the obstacle into the route-time coordinate system to obtain a mapping route trajectory of the obstacle, according to a correspondence relation to the time points.
[0049] In one embodiment, the expected distance setting sub-module 310 may further include: a judging unit configured to determine a lane change corresponding to the speed trajectory to be selected as a lane change for overtaking or a lane change for yielding, according to the travelling route trajectory and the mapping route trajectory; and a first calculating unit configured to, if the lane change is determined as a lane change for overtaking, calculate the expected distance at each time point according to a formula: d_desire = v_obs×x1 + (v_obs - v_adc) ×x2+x3; wherein d_desire is an expected distance for the time point, v_obs is a predicted speed at the time point, v_adc is a speed to be selected at the time point, and x1, x2 and x3 are a first preset parameter, a second preset parameter and a third preset parameter, respectively; and a second calculating unit configured to, if the lane change is determined as a lane change for yielding, calculate the expected distance at each time point according to a formula: d_desire = v_obs×x1 + (v_adc - v_obs) ×x2+x3.
[0050] In one embodiment, the cost function value calculating sub-module 320 may further include: a determining unit configured to determine the distance to be selected at each time point, according to the travelling route trajectory and the mapping route trajectory; and a calculating unit configured to calculate the cost function value of the speed trajectory to be selected at each time point according to a formula cost = max[0, - x4(d - d_desire)], wherein d is a distance to be selected at the time point, d_desire is an expected distance at the time point, and x4 is a fourth preset parameter.
[0051] The function of each of the modules in the apparatus according to the embodiments of the present invention can refer to corresponding descriptions in the above method, and will not be repeated here.
[0052] Fig. 8 illustrates a structural block diagram of an apparatus for planning a speed of an autonomous vehicle according to an embodiment of the present invention. As illustrated in Fig. 8, the apparatus includes a memory 810 and a processor 820, wherein a computer program executable on the processor 820 is stored in the memory 810. When the processor 820 executes the computer program, the method for planning a speed of an autonomous vehicle in the above embodiment is implemented. There may be one or more memories 810 and one or more processors 820.
[0053] The apparatus further includes a communication interface 830 configured to communicate with an external device for a data interactive transmission.
[0054] The memory 810 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.
[0055] If the memory 810, the processor 820, and the communication interface 830 are implemented independently, the memory 810, the processor 820, and the communication interface 830 may be connected to each other through a bus and communicate with one another. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, an Extended Industry Standard Component (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one bold line is shown in FIG. 8, but it does not mean that there is only one bus or one type of bus.
[0056] Optionally, in a specific implementation, if the memory 810, the processor 820, and the communication interface 830 are integrated on one chip, the memory 820, the processor 810, and the communication interface 830 may implement mutual communication through an internal interface.
[0057] An embodiment of the present invention provides a non-volatile computer readable storage medium storing a computer program, which implements the method according to any one of the above embodiments when being executed by a processor.
[0058] In the description of the specification, the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" and the like means the specific characters, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. Furthermore, the specific characters, structures, materials, or characteristics described may be combined in any suitable manner in any one or more of the embodiments or examples. In addition, different embodiments or examples described in this specification and characters of different embodiments or examples may be incorporated and combined by those skilled in the art without mutual contradiction.
[0059] In addition, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical characters. Thus, characters defining "first" and "second" may explicitly or implicitly include at least one of the characters. In the description of the present invention, "a plurality of" means two or more, unless expressly limited otherwise.
[0060] Any process or method descriptions described in flowcharts or otherwise herein may be understood as representing modules, segments or portions of code that include one or more executable instructions for implementing the steps of a particular logic function or process. The scope of the preferred embodiments of the present invention includes additional implementations where the functions may not be performed in the order shown or discussed, including according to the functions involved, in substantially simultaneous or in reverse order, which should be understood by those skilled in the art to which the embodiment of the present invention belongs.
[0061] Logic and / or steps, which are represented in the flowcharts or otherwise described herein, for example, may be thought of as a sequencing listing of executable instructions for implementing logic functions, which may be embodied in any computer-readable medium, for use by or in connection with an instruction execution system, device, or apparatus (such as a computer-based system, a processor-included system, or other system that fetch instructions from an instruction execution system, device, or apparatus and execute the instructions). For the purposes of this specification, a "computer-readable medium" may be any device that may contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, device, or apparatus. More specific examples (not a non-exhaustive list) of the computer-readable media include the following: electrical connections (electronic devices) having one or more wires, a portable computer disk cartridge (magnetic device), random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber devices, and portable read only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium upon which the program may be printed, as it may be read, for example, by optical scanning of the paper or other medium, followed by editing, interpretation or, where appropriate, process otherwise to electronically obtain the program, which is then stored in a computer memory.
[0062] It should be understood that various portions of the present invention may be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, they may be implemented using any one or a combination of the following techniques well known in the art: discrete logic circuits having a logic gate circuit for implementing logic functions on data signals, application specific integrated circuits with suitable combinational logic gate circuits, programmable gate arrays (PGA), field programmable gate arrays (FPGAs), and the like.
[0063] Those skilled in the art may understand that all or some of the steps carried in the methods in the foregoing embodiments may be implemented by a program instructing relevant hardware. The program may be stored in a non-volatile computer-readable storage medium, and when executed, one of the steps of the method embodiment or a combination thereof is included.
[0064] In addition, each of the functional units in the embodiments of the present invention may be integrated in one processing module, or each of the units may exist alone physically, or two or more units may be integrated in one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional module. When the integrated module is implemented in the form of a software functional module and is sold or used as an independent product, the integrated module may also be stored in a non-volatile computer-readable storage medium. The storage medium may be a read only memory, a magnetic disk, an optical disk, or the like.
[0065] The foregoing descriptions are merely specific embodiments of the present invention, but not intended to limit the protection scope of the present invention. Those skilled in the art may easily conceive of various changes or modifications within the technical scope disclosed herein, all these should be covered within the protection scope of the present invention. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for planning a speed of an autonomous vehicle, comprising: generating (S100) a plurality of speed trajectories to be selected for the autonomous vehicle before the autonomous vehicle changes a lane, wherein the speed trajectory to be selected comprises the speeds to be selected at a plurality of time points within a preset time range; obtaining (S200) predicted speeds and predicted positions of an obstacle at the plurality of time points; calculating (S300) a cost function value of each of the speed trajectories to be selected, according to the plurality of speed trajectories to be selected, the predicted speeds, and the predicted positions; and selecting (S400) a speed trajectory to be selected with a minimum cost function value, as a planning speed trajectory of the autonomous vehicle; wherein the calculating (S300) a cost function value of each of the speed trajectories to be selected, according to the plurality of speed trajectories to be selected, the predicted speeds, and the predicted positions comprises: setting (S310) an expected distance at each time point, according to the speed to be selected of the autonomous vehicle at each time point and the predicted speed of the obstacle at each time point, wherein the expected distance is a safe distance from the autonomous vehicle to the obstacle; calculating (S320) a cost function value of the speed trajectory to be selected at each time point according to the expected distance and a distance to be selected at each time point, wherein the distance to be selected is a distance from the autonomous vehicle to the obstacle on the speed trajectory to be selected; and obtaining (S330) the cost function value of the speed trajectory to be selected according to the cost function value of the speed trajectory to be selected at each time point; wherein the calculating (S300) a cost function value of each of the speed trajectories to be selected, according to the plurality of speed trajectories to be selected, the predicted speeds, and the predicted positions comprises: generating (S340) a travelling route trajectory in a route-time coordinate system according to the speed trajectory to be selected, wherein a horizontal axis and a longitudinal axis of the route-time coordinate system denote a time and a position respectively; and mapping (S350) a plurality of predicted positions of the obstacle into the route-time coordinate system to obtain a mapping route trajectory of the obstacle, according to a correspondence relation to the time points; characterized in that the setting (S310) an expected distance at each time point, according to the speed to be selected of the autonomous vehicle at each time point and the predicted speed of the obstacle at each time point comprises: determining (S311) a lane change corresponding to the speed trajectory to be selected as a lane change for overtaking or a lane change for yielding, according to the travelling route trajectory and the mapping route trajectory; if the lane change is determined as a lane change for overtaking, calculating (S312) the expected distance at each time point according to a formula: d_desire = v_obs×x1 + (v_obs - v_adc) ×x2+x3; wherein d_desire is an expected distance at the time point, v_obs is a predicted speed at the time point, v_adc is a speed to be selected at the time point, and x1, x2 and x3 are a first preset parameter, a second preset parameter and a third preset parameter, respectively; and if the lane change is determined as a lane change for yielding, calculating (S313) the expected distance at each time point according to another formula: d_desire = v_obs × x 1 + v_adc - v_obs × x 2 + x 3 .
2. The method according to claim 1, wherein the calculating a cost function value of the speed trajectory to be selected at each time point according to the expected distance and a distance to be selected at each time point comprises: determining the distance to be selected at each time point, according to the travelling route trajectory and the mapping route trajectory; calculating the cost function value of the speed trajectory to be selected at each time point according to a formula cost = max[0, - x4(d - d_desire)], wherein d is a distance to be selected at the time point, d_desire is an expected distance at the time point, and x4 is a fourth preset parameter.
3. An apparatus for planning a speed of an autonomous vehicle, comprising: a generating module (100) configured to generate a plurality of speed trajectories to be selected for the autonomous vehicle before the autonomous vehicle changes a lane, wherein the speed trajectory to be selected comprises the speeds to be selected at a plurality of time points within a preset time range; an obtaining module (200) configured to obtain predicted speeds and predicted positions of an obstacle at the plurality of time points; a calculating module (300) configured to calculate a cost function value of each of the speed trajectories to be selected, according to the plurality of speed trajectories to be selected, the predicted speeds, and the predicted positions; and a selecting module (400) configured to select a speed trajectory to be selected with a minimum cost function value, as a planning speed trajectory of the autonomous vehicle; wherein the calculating module (300) comprises: an expected distance setting sub-module (310) configured to set an expected distance at each time point, according to the speed to be selected of the autonomous vehicle at each time point and the predicted speed of the obstacle at each time point, wherein the expected distance is a safe distance from the autonomous vehicle to the obstacle; a cost function value calculating sub-module (320) configured to calculate a cost function value of the speed trajectory to be selected at each time point according to the expected distance and a distance to be selected at each time point, wherein the distance to be selected is a distance from the autonomous vehicle to the obstacle on the speed trajectory to be selected; and a cost function value obtaining sub-module (330) configured to obtain the cost function value of the speed trajectory to be selected according to the cost function value of the speed trajectory to be selected at each time point; wherein the calculating module comprises: a travelling route trajectory generating sub-module (340) configured to generate a travelling route trajectory in a route-time coordinate system according to the speed trajectory to be selected, wherein a horizontal axis and a longitudinal axis of the route-time coordinate system denote a time and a position respectively; and a mapping route trajectory obtaining sub-module (350) configured to map a plurality of predicted positions of the obstacle into the route-time coordinate system to obtain a mapping route trajectory of the obstacle, according to a correspondence relation to the time points; characterized in that the expected distance setting sub-module (310) further comprises: a judging unit configured to determine a lane change corresponding to the speed trajectory to be selected as a lane change for overtaking or a lane change for yielding, according to the travelling route trajectory and the mapping route trajectory; a first calculating unit configured to, if the lane change is determined as a lane change for overtaking, calculate the expected distance at each time point according to a formula: d_desire = v_obs×x1 + (v_obs - v_adc) ×x2+x3; wherein d_desire is an expected distance for the time point, v_obs is a predicted speed at the time point, v_adc is a speed to be selected at the time point, and x1, x2 and x3 are a first preset parameter, a second preset parameter and a third preset parameter, respectively; and a second calculating unit configured to, if the lane change is determined as a lane change for yielding, calculate the expected distance at each time point according to a formula: d_desire = v_obs×x1 + (v_adc - v_obs) ×x2+x3.
4. The apparatus according to claim 3, wherein the cost function value calculating sub-module (320) comprises: a determining unit configured to determine the distance to be selected at each time point, according to the travelling route trajectory and the mapping route trajectory; and a calculating unit configured to calculate the cost function value of the speed trajectory to be selected at each time point according to a formula cost = max[0, - x4(d - d_desire)], wherein d is a distance to be selected at the time point, d_desire is an expected distance at the time point, and x4 is a fourth preset parameter.
5. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method according to claim 1 or claim 2.
6. A computer program product, comprising computer program instructions, that when executed by a processor, cause the processor to implement the method of claim 1 or claim 2.