Disclosure of Invention
The embodiment of the invention provides a method, a device and a terminal for planning a lane change route of a vehicle, which are used for at least solving at least one technical problem.
In a first aspect, an embodiment of the present invention provides a vehicle lane change route planning method, including:
selecting a lane change curve function according to the motion track shape of the vehicle;
obtaining a plurality of pieces of position information of the vehicle, respectively substituting the position information into the lane-changing curve function, and fitting to obtain a plurality of lane-changing curves;
and calculating the loss corresponding to each lane change curve, and selecting the lane change curve with the loss smaller than a threshold value.
In one embodiment, selecting the lane-change curve function according to the shape of the motion trajectory of the vehicle includes:
selecting a hyperbolic tangent function f (x) as a lane change curve function according to the motion trail of the vehicle, wherein f (x) is a tan (ex) + b + cx + d/x, wherein a parameter a is a lane distance between a lane before change and a lane after change, a parameter b is a starting point position of the lane change curve, a parameter c is a first degree of freedom coefficient, a parameter d is a second degree of freedom coefficient, and a parameter e is a length of the lane change curve.
In one embodiment, obtaining a plurality of position information of the vehicle and respectively substituting the position information into the lane-changing curve function, and fitting to obtain a plurality of lane-changing curves comprises:
acquiring starting point information and end point information of the vehicle as position information, wherein the starting point information comprises a starting point position, a starting point vehicle head direction and a starting point vehicle head direction change rate, and the end point information comprises an end point position and an end point vehicle head direction;
respectively substituting a plurality of position information into the hyperbolic tangent function f (x), and calculating to obtain a plurality of parameter combinations, wherein the parameter combinations comprise a parameter a, a parameter b, a parameter c, a parameter d and a parameter e;
and drawing a plurality of lane change curves according to the parameter combination.
In one embodiment, calculating the corresponding loss for each of the lane change curves comprises:
calculating smoothness loss of each lane change curve;
judging whether the movement locus of each barrier is overlapped and intersected with the lane change curve or not, and if so, calculating the overlapped length to be used as collision loss;
the sum of the smoothness loss and the collision loss results in a loss corresponding to the lane change curve.
In a second aspect, an embodiment of the present invention further provides a vehicle lane change route planning device, including:
the lane change curve function selection module is used for selecting a lane change curve function according to the motion track shape of the vehicle;
the lane change curve fitting module is used for acquiring a plurality of pieces of position information of the vehicle, respectively substituting the position information into the lane change curve function, and fitting to obtain a plurality of lane change curves;
and the lane change curve screening module is used for calculating the loss corresponding to each lane change curve and selecting the lane change curve with the loss smaller than the threshold value.
In one embodiment, the lane change curve function selection module includes:
and the hyperbolic tangent function selecting unit is used for selecting a hyperbolic tangent function f (x) as a lane change curve function according to the motion trail of the vehicle, wherein the f (x) is a tan (ex) + b + cx + d/x, the parameter a is the lane distance between a lane before change and a lane after change, the parameter b is the starting point position of the lane change curve, the parameter c is a first degree of freedom coefficient, the parameter d is a second degree of freedom coefficient, and the parameter e is the length of the lane change curve.
In one embodiment, the lane change curve fitting module comprises:
a position information acquisition unit configured to acquire start point information and end point information of the vehicle as position information, the start point information including a start point position, a start point vehicle head orientation, and a start point vehicle head orientation change rate, the end point information including an end point position and an end point vehicle head orientation;
the parameter calculation unit is used for respectively substituting the plurality of position information into the hyperbolic tangent function f (x) to calculate a plurality of parameter combinations, wherein the parameter combinations comprise a parameter a, a parameter b, a parameter c, a parameter d and a parameter e;
and the lane change curve drawing unit is used for drawing a plurality of lane change curves according to the parameter combination.
In one embodiment, the lane change curve loss calculation module includes:
a smoothness loss calculation unit for calculating smoothness loss of each lane change curve;
the collision loss calculation unit is used for judging whether the movement track of each barrier is overlapped and intersected with the lane change curve or not, and if the movement track of each barrier is overlapped and intersected with the lane change curve, calculating the obtained overlapping length to be used as collision loss;
and the total loss calculation unit is used for obtaining the loss corresponding to the lane change curve by the sum of the smoothness loss and the collision loss.
In a third aspect, an embodiment of the present invention provides a vehicle lane change route planning terminal, where the function may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the structure of the vehicle lane-changing route planning terminal includes a processor and a memory, the memory is used for storing a program for supporting the vehicle lane-changing route planning terminal to execute the vehicle lane-changing route planning method in the first aspect, and the processor is configured to execute the program stored in the memory. The vehicle lane change route planning terminal may further include a communication interface for the vehicle lane change route planning terminal to communicate with other devices or a communication network.
In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer software instructions for a vehicle lane-changing route planning device, which includes a program for executing the vehicle lane-changing route planning method in the first aspect to the vehicle lane-changing route planning device.
One of the above technical solutions has the following advantages or beneficial effects: and selecting a lane change curve function according to the motion track shape of the vehicle, substituting the position information of the vehicle into the lane change curve function, fitting a lane change curve with the shape similar to the motion track shape of the vehicle, and improving the stability of the lane change curve. And calculating the loss of the lane change curve caused by the influence of factors such as obstacles and the like, and improving the real controllability of the lane change curve.
The foregoing summary is provided for the purpose of description only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present invention will be readily apparent by reference to the drawings and following detailed description.
Detailed Description
In the following, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.
Example one
In one embodiment, as shown in fig. 1, a method for planning a lane-changing route of a vehicle is provided, which includes the following steps:
step S10: and selecting a lane change curve function according to the motion track shape of the vehicle.
Step S20: and acquiring a plurality of pieces of position information of the vehicle, respectively substituting each piece of position information into the lane-changing curve function, and fitting to obtain a plurality of lane-changing curves.
Step S30: and calculating the loss corresponding to each lane change curve.
Step S40: and selecting the lane change curve with the loss of the lane change curve smaller than the threshold value.
In one example, a function curve with a line type close to the lane change curve itself can be adopted, then a lane change curve function is extracted, parameters in the lane change curve function can directly influence the curve shape, and the line type of the lane change curve is adjusted by adjusting the values of the parameters. The parameters may include a lane distance between lanes before and after lane changing, a length of a lane changing curve, a starting point position, and the like. Since the specific values of the parameters are unknown, the specific values of the parameters are obtained by substituting the position information of the vehicle into the lane-changing curve function. The location information may include a start point location, an end point location, a start point heading rate, an end point heading, and the like. In the embodiment, a plurality of lane change curves are fitted by acquiring a plurality of pieces of position information, so that an optimal curve is selected according to actual traffic conditions.
The vehicle is affected by obstacles and smoothness of lane change during the lane change process, and is lost. Therefore, a lane change curve having a loss smaller than a threshold value is selected among the plurality of lane change curves as a final lane change curve. Or calculating the loss of each lane change curve, and selecting the lane change curve with the minimum loss as the final lane change curve.
In one embodiment, as shown in fig. 2, step S10 includes:
step S101: selecting a hyperbolic tangent function f (x) as a lane change curve function according to the motion trail of the vehicle, wherein f (x) is a tan (ex) + b + cx + d/x, wherein a parameter a is a lane distance between a lane before change and a lane after change, a parameter b is a starting point position of the lane change curve, a parameter c is a first degree of freedom coefficient, a parameter d is a second degree of freedom coefficient, and a parameter e is a length of the lane change curve.
In one example, the parameter a, the parameter b, the parameter c, and the parameter d are calculated by waiting multiple sets of data of the start point position, the end point position, the start point heading direction change rate, and the end point heading direction into the hyperbolic tangent function. Wherein, the parameter a may be a distance between a center line of the lane before lane change and a center line of the lane after lane change. The parameter b may be at the end of the straight line of travel before the lane change. The purpose is to satisfy the position of the junction between the straight line of going and the lane change curve, locomotive direction, the rate of change of locomotive direction all equals, guarantees to connect smoothly. The parameter e may be the length of a curve formed between the end of the driving route before the lane change and the head of the driving route after the lane change. The parameter c and the parameter d can enable smooth transition between the lane change curve and the driving route before lane change and the driving route after lane change.
It should be noted that the selected lane-changing curve function includes, but is not limited to, a hyperbolic tangent function, and may also be other types of curves, and it is within the scope of the present embodiment that the type of the lane-changing curve function is determined according to the shape of the motion trajectory of the vehicle during the lane changing process under different traffic environments.
In one embodiment, as shown in fig. 2, step S20 includes:
step S201; acquiring starting point information and end point information of a vehicle as position information, wherein the starting point information comprises a starting point position, a starting point vehicle head orientation and a starting point vehicle head orientation change rate, and the end point information comprises an end point position and an end point vehicle head orientation;
step S202; respectively substituting the position information into a hyperbolic tangent function f (x), and calculating to obtain a plurality of parameter combinations, wherein the parameter combinations comprise a parameter a, a parameter b, a parameter c, a parameter d and a parameter e;
step S203: and drawing a plurality of lane change curves according to the parameter combination.
In one embodiment, as shown in fig. 2, the step S30 of calculating the loss corresponding to each lane change curve includes:
step S301: smoothness loss was calculated for each lane change curve.
Step S302: and judging whether the motion trail of each obstacle is overlapped and intersected with the lane change curve or not, and if so, calculating the overlapped length to be used as the collision loss.
Step S303: the sum of the smoothness loss and the collision loss yields the corresponding loss of the lane change curve.
In one example, the current position of the vehicle can be selected as a starting point, 3-7 different end points can be selected, 3-7 lane change curves can be obtained, and then, for each curve, the integral of the square of each derivative can be used as the smoothness loss.
Example two
In a specific embodiment, as shown in fig. 3, there is also provided a vehicle lane change route planning apparatus, including:
the lane change curvefunction selection module 10 is used for selecting a lane change curve function according to the motion track shape of the vehicle;
the lane change curvefitting module 20 is configured to obtain a plurality of pieces of position information of the vehicle, and substitute each piece of position information into a lane change curve function, to obtain a plurality of lane change curves through fitting;
a lane change curveloss calculation module 30, configured to calculate a loss corresponding to each lane change curve;
and the lane changecurve screening module 40 is used for selecting the lane change curve with the loss of the lane change curve smaller than the threshold value.
In one embodiment, as shown in fig. 4, the lane change curvefunction selection module 10 includes:
a hyperbolic tangentfunction selecting unit 101, configured to select a hyperbolic tangent function f (x) as a lane change curve function according to a motion trajectory of a vehicle, where f (x) is a tan (ex) + b + cx + d/x, where a parameter a is a lane distance between a lane before change and a lane after change, a parameter b is a start point position of the lane change curve, a parameter c is a first degree-of-freedom coefficient, a parameter d is a second degree-of-freedom coefficient, and a parameter e is a length of the lane change curve.
In one embodiment, as shown in FIG. 4, lane-change curvefitting module 20 includes:
a positioninformation acquisition unit 201 configured to acquire start point information and end point information of the vehicle as position information, the start point information including a start point position, a start point vehicle head orientation, and a start point vehicle head orientation change rate, the end point information including an end point position, an end point vehicle head orientation;
theparameter calculation unit 202 is configured to substitute the multiple pieces of location information into the hyperbolic tangent function f (x), respectively, and calculate multiple parameter combinations, where the parameter combinations include a parameter a, a parameter b, a parameter c, a parameter d, and a parameter e;
and a lane changecurve drawing unit 203 for drawing a plurality of lane change curves according to the parameter combination.
In one embodiment, as shown in FIG. 4, the lane change curveloss calculation module 30 includes:
a smoothnessloss calculation unit 301 for calculating smoothness losses of the lane change curves;
a collisionloss calculation unit 302, configured to determine whether the motion trajectory of each obstacle coincides and intersects with a lane change curve, and if the trajectory coincides and intersects with the lane change curve, calculate a coincidence length as a collision loss;
and a totalloss calculating unit 303, configured to obtain a loss corresponding to the lane change curve by using a sum of the smoothness loss and the collision loss.
EXAMPLE III
An embodiment of the present invention provides a vehicle lane change route planning terminal, as shown in fig. 5, including:
amemory 400 and aprocessor 500, thememory 400 having stored therein a computer program operable on theprocessor 500. Theprocessor 500, when executing the computer program, implements the vehicle lane change route planning method in the above-described embodiment. The number of thememory 400 and theprocessor 500 may be one or more.
Acommunication interface 600 for thememory 400 and theprocessor 500 to communicate with the outside.
Memory 400 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
If thememory 400, theprocessor 500, and thecommunication interface 600 are implemented independently, thememory 400, theprocessor 500, and thecommunication interface 600 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
Optionally, in a specific implementation, if thememory 400, theprocessor 500, and thecommunication interface 600 are integrated on a single chip, thememory 400, theprocessor 500, and thecommunication interface 600 may complete communication with each other through an internal interface.
Example four
A computer-readable storage medium storing a computer program which, when executed by a processor, implements a vehicle lane change routing method as in any one of embodiments one included herein.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various 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, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various changes or substitutions within the technical scope of the present invention, and these should be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.