Vehicle horizontal parking track planning method and device, vehicle and storage medium

文档序号:161757 发布日期:2021-10-29 浏览:37次 中文

阅读说明:本技术 一种车辆水平泊出轨迹规划方法及装置、车辆、存储介质 (Vehicle horizontal parking track planning method and device, vehicle and storage medium ) 是由 李飞 于 2021-08-27 设计创作,主要内容包括:本发明实施例公开一种车辆水平泊出轨迹规划方法及装置、车辆、存储介质,该方法包括:根据车辆信息在根据车辆的初始位置建立的初始世界坐标系上设置目标停车线;将根据车辆环视信息提取得到的可通行空间栅格地图的数据转换到初始世界坐标系上获得目标世界坐标系;根据车辆的当前位置和车辆的最小转弯半径在坐标系上模拟车辆前进规划获得前进轨迹和模拟车辆后退规划获得后退轨迹;判断前进轨迹的终点是否满足完全泊出条件;满足时将前进轨迹选择为车辆行驶的目标轨迹;未满足时判断后退轨迹的长度是否小于前进轨迹的长度;小于则选择前进轨迹为目标轨迹;不小于则选择后退轨迹为目标轨迹;提供合理的泊出轨迹,提高车辆水平泊出的可靠性和安全性。(The embodiment of the invention discloses a method and a device for planning a horizontal parking track of a vehicle, the vehicle and a storage medium, wherein the method comprises the following steps: setting a target stop line on an initial world coordinate system established according to the initial position of the vehicle according to the vehicle information; converting data of a passable space grid map extracted according to the vehicle look-around information into an initial world coordinate system to obtain a target world coordinate system; simulating a vehicle forward planning to obtain a forward track and simulating a vehicle backward planning to obtain a backward track on a coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle; judging whether the end point of the advancing track meets the complete parking condition or not; if the target track is met, selecting the advancing track as a target track for vehicle running; judging whether the length of the backward track is smaller than that of the forward track or not when the length of the backward track is not met; if the target trajectory is smaller than the target trajectory, selecting the forward trajectory as the target trajectory; if not, selecting the backward track as the target track; provides reasonable parking track and improves the reliability and safety of horizontal parking of vehicles.)

1. A method for planning a horizontal pull-in trajectory of a vehicle, comprising:

setting a target stop line on an initial world coordinate system according to vehicle information, wherein the initial world coordinate system is established according to an initial position of a vehicle;

converting data of the passable space grid map to the initial world coordinate system to obtain a target world coordinate system, wherein the passable space grid map is obtained by extracting according to vehicle all-round viewing information;

simulating a vehicle forward planning to obtain a forward track and simulating a vehicle backward planning to obtain a backward track in the target world coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle;

judging whether the end point of the advancing track meets the complete parking condition or not;

selecting the forward trajectory as a target trajectory for the vehicle to travel if the full park condition is satisfied;

if the full park-out condition is not met, judging whether the length of the backward track is smaller than that of the forward track;

if the length of the forward track is smaller than the length of the forward track, selecting the forward track as the target track;

and if the length of the backward track is not less than the length of the forward track, selecting the backward track as the target track.

2. The method of claim 1, wherein after selecting the target trajectory, the method further comprises:

and controlling the vehicle to run according to the target track.

3. The method of claim 2, further comprising:

when the vehicle is controlled to run according to the target track, judging whether the current position of the vehicle meets the complete parking condition;

if not, detecting whether the target track is completely driven or the vehicle is braked and stopped;

if the target track is completely driven or the vehicle is braked, executing the step of converting the data of the grid map of the passable space to the initial world coordinate system to obtain a target world coordinate system;

and if the target track is not completely driven and the vehicle is not braked, controlling the vehicle to drive according to the target track.

4. The method according to any one of claims 1 to 3, wherein the setting of the target stop line on the initial world coordinate system according to the vehicle information includes:

obtaining a parking threshold value, wherein the parking threshold value is equal to the sum of the width of the vehicle and a preset value;

and setting the target stop line on the initial world coordinate system, wherein the equation of the target stop line is liney, y is d, d is a car width + c, y is the target stop line, d is the parking threshold, car width is the width of the vehicle, and c is the preset value.

5. The method of claim 4, wherein the determining whether the end point of the forward trajectory satisfies a full pull-out condition comprises:

acquiring a pose parameter of a terminal point of the advancing track, wherein the pose parameter of the terminal point comprises an x value, a y value and radians corresponding to a course angle in the target world coordinate system;

calculating a first ratio of the circumferential ratio pi to 2;

calculating the absolute value of the difference value between the radian corresponding to the course angle and the first ratio;

judging whether the y value is greater than or equal to the parking threshold value and whether the absolute value is smaller than a radian threshold value, wherein the radian threshold value is equal to a product obtained by multiplying a second ratio of 10 to 180 by a circumferential rate pi;

determining that the endpoint of the current trajectory satisfies the full pull-out condition when the y-value is greater than or equal to the parking threshold and the absolute value is less than the radian threshold.

6. The method according to any one of claims 1 to 3, wherein the simulating a vehicle forward planning to obtain a forward trajectory and simulating a vehicle reverse planning to obtain a reverse trajectory in the target world coordinate system based on the current position of the vehicle and the minimum turning radius of the vehicle comprises:

setting a first reference circle, a second reference circle and a third reference circle on the target world coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle, wherein the first reference circle and the target stop line are tangent to a first tangent point, the first reference circle and the third reference circle are tangent to a second tangent point, the second reference circle and the third reference circle are tangent to a third tangent point, and the third tangent point is the current position of the vehicle;

acquiring a forward reference curve, and generating a forward track by adopting a track generation algorithm according to the forward reference curve, wherein the forward reference curve consists of an arc line corresponding to the third reference circle from the third tangency point to the second tangency point and an arc line corresponding to the first reference circle from the second tangency point to the first tangency point;

when the course angle corresponding to the current position of the vehicle is smaller than a first angle threshold, acquiring a first backward reference curve, and generating a backward track by adopting the track generation algorithm according to the first backward reference curve, wherein the first backward reference curve is that y is 0;

and when the course angle of the vehicle is not less than the first angle threshold, acquiring a second backward reference curve, and generating the backward track by adopting the track generation algorithm according to the second backward reference curve, wherein the second backward reference curve is the second reference circle.

7. The method according to claim 6, characterized in that when the fallback trajectory is generated according to the first fallback reference curve, the length of the fallback trajectory is not greater than a length threshold;

and when the backward track is generated according to the second backward reference curve, the backward track stops being generated when the heading angle corresponding to the current position of the vehicle is larger than a second angle threshold value.

8. The method of claim 7, wherein the center coordinates of the third reference circle are calculated as follows:

O3.x=carp.cx-R*sin(carp.cyaw)

O3.y=carp.cy+R*cos(carp.cyaw)

the center coordinate calculation formula of the second reference circle is as follows:

O2.x=carp.cx+R*sin(carp.cyaw)

O3.y=carp.cy-R*cos(carp.cyaw)

the center coordinate calculation formula of the first reference circle is as follows:

O1.y=d-R;

the current position of the vehicle is corresponding to a value on an X axis of the target world coordinate system, the current position of the vehicle is corresponding to a value on a Y axis of the target world coordinate system, and the current position of the vehicle is corresponding to a radian of a heading angle.

9. The method of claim 8, wherein obtaining a forward reference curve from which forward trajectories are generated using a trajectory generation algorithm comprises:

acquiring a forward reference curve, and generating a forward generation track by adopting a track generation algorithm according to the forward reference curve;

performing collision detection on the forward generated track;

when no collision is detected, taking the forward generated track as a forward track;

the generating a retreating track by adopting the track generation algorithm according to the first retreating reference curve includes:

generating a first backward generation track by adopting the track generation algorithm according to the first backward reference curve;

performing collision detection on the first retreat generated track;

when no collision is detected, taking the first retreat generating trajectory as a retreat trajectory;

the generating the backward trajectory by using the trajectory generation algorithm according to the second backward reference curve includes:

generating a second backward generated track by adopting the track generation algorithm according to the second backward reference curve;

performing collision detection on the second retreat generated trajectory;

when no collision is detected, the second retreat generating trajectory is taken as a retreat trajectory.

10. A vehicle horizontal pull-out trajectory planning apparatus, comprising:

the system comprises a setting module, a display module and a control module, wherein the setting module is used for setting a target stop line on an initial world coordinate system according to vehicle information, and the initial world coordinate system is established according to the initial position of a vehicle;

the conversion module is used for converting data of the passable space grid map to the initial world coordinate system to obtain a target world coordinate system, and the passable space grid map is extracted according to the vehicle all-round viewing information;

the simulation module is used for simulating a vehicle forward planning to obtain a forward track and simulating a vehicle backward planning to obtain a backward track in the target world coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle;

the judging module is used for judging whether the terminal point of the advancing track meets the complete parking condition or not;

a selection module configured to select the forward trajectory as a target trajectory for the vehicle to travel if the determination module determines that the end point of the forward trajectory satisfies the complete parking condition;

the judging module is further configured to judge whether the length of the backward trajectory is smaller than the length of the forward trajectory if it is judged that the end point of the forward trajectory does not satisfy the complete parking-out condition;

the selection module is further configured to select the forward track as the target track if the determination module determines that the length of the backward track is smaller than the length of the forward track; and if the judging module judges that the length of the backward track is not less than that of the forward track, selecting the backward track as the target track.

11. A vehicle, characterized by comprising:

a memory storing executable program code;

a processor coupled with the memory;

the processor invokes the executable program code stored in the memory to perform a vehicle horizontal park trajectory planning method of any of claims 1 to 9.

12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 9.

Technical Field

The invention relates to the technical field of automatic auxiliary driving of automobiles, in particular to a method and a device for planning a horizontal parking track of a vehicle, the vehicle and a storage medium.

Background

With the continuous development and application of intelligent driving technology, automatic parking technology is gradually popularized in the automobile field, and automatic parking are available. At present, in the process of parking a horizontal parking space, angular points of information such as obstacles in a geometric scene are simplified, if a certain obstacle is represented only by two angular points, an obstacle area is not indicated, only the obstacle near the angular point can be known, but the size of the area where the obstacle is located is not known, so that the parking track fails or a useless parking track is planned, and a vehicle has certain potential safety hazard in the process of horizontal parking.

Disclosure of Invention

The embodiment of the invention discloses a method and a device for planning a horizontal parking track of a vehicle, the vehicle and a storage medium, which are used for providing a reasonable parking track and improving the reliability and safety of the horizontal parking of the vehicle.

The first aspect of the embodiment of the invention discloses a method for planning a horizontal parking track of a vehicle, which comprises the following steps:

setting a target stop line on an initial world coordinate system according to vehicle information, wherein the initial world coordinate system is established according to an initial position of a vehicle;

converting data of the passable space grid map to the initial world coordinate system to obtain a target world coordinate system, wherein the passable space grid map is obtained by extracting according to vehicle all-round viewing information;

simulating a vehicle forward planning to obtain a forward track and simulating a vehicle backward planning to obtain a backward track in the target world coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle;

judging whether the end point of the advancing track meets the complete parking condition or not;

selecting the forward trajectory as a target trajectory for the vehicle to travel if the full park condition is satisfied;

if the full park-out condition is not met, judging whether the length of the backward track is smaller than that of the forward track;

if the length of the forward track is smaller than the length of the forward track, selecting the forward track as the target track;

and if the length of the backward track is not less than the length of the forward track, selecting the backward track as the target track.

As an optional implementation manner, in the first aspect of the embodiment of the present invention, after the target track is selected, the method further includes:

and controlling the vehicle to run according to the target track.

As an optional implementation manner, in the first aspect of this embodiment of the present invention, the method further includes:

when the vehicle is controlled to run according to the target track, judging whether the current position of the vehicle meets the complete parking condition;

if not, detecting whether the target track is completely driven or the vehicle is braked and stopped;

if the target track is completely driven or the vehicle is braked and stopped, executing the step of converting the data of the passable space grid map into the initial world coordinate system to obtain a target world coordinate system, and extracting the passable space grid map according to the vehicle all-round information;

and if the target track is not completely driven and the vehicle is not braked, controlling the vehicle to drive according to the target track.

As an alternative implementation, in the first aspect of the embodiment of the present invention, the setting a target stop line on the initial world coordinate system according to the vehicle information includes:

obtaining a parking threshold value, wherein the parking threshold value is equal to the sum of the width of the vehicle and a preset value;

and setting the target stop line on the initial world coordinate system, wherein the equation of the target stop line is liney, y is d, d is a car width + c, y is the target stop line, d is the parking threshold, car width is the width of the vehicle, and c is the preset value.

As an alternative implementation, in the first aspect of the embodiment of the present invention, the determining whether the end point of the forward trajectory satisfies a full park condition includes:

acquiring a pose parameter of a terminal point of the advancing track, wherein the pose parameter of the terminal point comprises an x value, a y value and radians corresponding to a course angle in the target world coordinate system;

calculating a first ratio of the circumferential ratio pi to 2;

calculating the absolute value of the difference value between the radian corresponding to the course angle and the first ratio;

judging whether the y value is greater than or equal to the parking threshold value and whether the absolute value is smaller than a radian threshold value, wherein the radian threshold value is equal to a product obtained by multiplying a second ratio of 10 to 180 by a circumferential rate pi;

determining that the endpoint of the current trajectory satisfies the full pull-out condition when the y-value is greater than or equal to the parking threshold and the absolute value is less than the radian threshold.

As an alternative implementation, in the first aspect of the embodiments of the present invention, the obtaining a forward track by simulating a vehicle forward planning and obtaining a backward track by simulating a vehicle backward planning in the target world coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle includes:

setting a first reference circle, a second reference circle and a third reference circle on the target world coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle, wherein the first reference circle and the target stop line are tangent to a first tangent point, the first reference circle and the third reference circle are tangent to a second tangent point, the second reference circle and the third reference circle are tangent to a third tangent point, and the third tangent point is the current position of the vehicle;

acquiring a forward reference curve, and generating a forward track by adopting a track generation algorithm according to the forward reference curve, wherein the forward reference curve consists of an arc line corresponding to the third reference circle from the third tangency point to the second tangency point and an arc line corresponding to the first reference circle from the second tangency point to the first tangency point;

when the course angle corresponding to the current position of the vehicle is smaller than a first angle threshold, acquiring a first backward reference curve, and generating a backward track by adopting the track generation algorithm according to the first backward reference curve, wherein the first backward reference curve is that y is 0;

and when the course angle of the vehicle is not less than the first angle threshold, acquiring a second backward reference curve, and generating the backward track by adopting the track generation algorithm according to the second backward reference curve, wherein the second backward reference curve is the second reference circle.

As an optional implementation manner, in the first aspect of the embodiment of the present invention, when the fallback trajectory is generated according to the first fallback reference curve, the length of the fallback trajectory is not greater than a length threshold;

and when the backward track is generated according to the second backward reference curve, the backward track stops being generated when the heading angle corresponding to the current position of the vehicle is larger than a second angle threshold value.

As an optional implementation manner, in the first aspect of the embodiment of the present invention, the center coordinate calculation formula of the third reference circle is as follows:

O3.x=carp.cx-R*sin(carp.cyaw)

O3.y=carp.cy+R*cos(carp.cyaw)

the center coordinate calculation formula of the second reference circle is as follows:

O2.x=carp.cx+R*sin(carp.cyaw)

O3.y=carp.cy-R*cos(carp.cyaw)

the center coordinate calculation formula of the first reference circle is as follows:

O1.y=d-R;

the current position of the vehicle is corresponding to a value on an X axis of the target world coordinate system, the current position of the vehicle is corresponding to a value on a Y axis of the target world coordinate system, and the current position of the vehicle is corresponding to a radian of a heading angle.

As an optional implementation manner, in the first aspect of the embodiment of the present invention, the obtaining a forward reference curve, and generating a forward track by using a track generation algorithm according to the forward reference curve includes:

acquiring a forward reference curve, and generating a forward generation track by adopting a track generation algorithm according to the forward reference curve;

performing collision detection on the forward generated track;

when no collision is detected, taking the forward generated track as a forward track;

the generating a retreating track by adopting the track generation algorithm according to the first retreating reference curve includes:

generating a first backward generation track by adopting the track generation algorithm according to the first backward reference curve;

performing collision detection on the first retreat generated track;

when no collision is detected, taking the first retreat generating trajectory as a retreat trajectory;

the generating the backward trajectory by using the trajectory generation algorithm according to the second backward reference curve includes:

generating a second backward generated track by adopting the track generation algorithm according to the second backward reference curve;

performing collision detection on the second retreat generated trajectory;

when no collision is detected, the second retreat generating trajectory is taken as a retreat trajectory.

The second aspect of the embodiment of the invention discloses a vehicle horizontal parking track planning device, which comprises:

the system comprises a setting module, a display module and a control module, wherein the setting module is used for setting a target stop line on an initial world coordinate system according to vehicle information, and the initial world coordinate system is established according to the initial position of a vehicle;

the conversion module is used for converting data of the passable space grid map to the initial world coordinate system to obtain a target world coordinate system, and the passable space grid map is extracted according to the vehicle all-round viewing information;

the simulation module is used for simulating a vehicle forward planning to obtain a forward track and simulating a vehicle backward planning to obtain a backward track in the target world coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle;

the judging module is used for judging whether the terminal point of the advancing track meets the complete parking condition or not;

a selection module configured to select the forward trajectory as a target trajectory for the vehicle to travel if the determination module determines that the end point of the forward trajectory satisfies the complete parking condition;

the judging module is further configured to judge whether the length of the backward trajectory is smaller than the length of the forward trajectory if it is judged that the end point of the forward trajectory does not satisfy the complete parking-out condition;

the selection module is further configured to select the forward track as the target track if the determination module determines that the length of the backward track is smaller than the length of the forward track; and if the judging module judges that the length of the backward track is not less than that of the forward track, selecting the backward track as the target track.

A third aspect of an embodiment of the present invention discloses a vehicle, which may include:

a memory storing executable program code;

a processor coupled with the memory;

the processor calls the executable program code stored in the memory to execute the vehicle horizontal parking trajectory planning method disclosed by the first aspect of the embodiment of the invention.

A fourth aspect of the embodiments of the present invention discloses a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, performs the steps of any one of the methods of the first aspect of the embodiments of the present invention.

A fifth aspect of embodiments of the present invention discloses a computer program product, which, when run on a computer, causes the computer to perform some or all of the steps of any one of the methods of the first aspect.

A sixth aspect of the present embodiment discloses an application publishing platform, where the application publishing platform is configured to publish a computer program product, where the computer program product is configured to, when running on a computer, cause the computer to perform part or all of the steps of any one of the methods in the first aspect.

Compared with the prior art, the embodiment of the invention has the following beneficial effects:

in the embodiment of the invention, firstly, a target parking line is set on an initial world coordinate system according to vehicle information, the initial world coordinate system is established according to the initial position of a vehicle, then data of a passable space grid map is converted to the initial world coordinate system to obtain a target world coordinate system, the passable space grid map is extracted according to vehicle all-round-view information, further, according to the current position of the vehicle and the minimum turning radius of the vehicle, a forward track is obtained by simulating vehicle forward planning in the target world coordinate system, a backward track is obtained by simulating vehicle backward planning, whether the terminal point of the forward track meets a complete parking condition is judged, if the complete parking condition is met, the forward track is selected as a target track for vehicle running, if the complete parking condition is not met, whether the length of the backward track is smaller than the length of the forward track is further judged, if the length of the forward track is less than the length of the forward track, selecting the forward track as a target track, and if the length of the forward track is not less than the length of the forward track, selecting the backward track as the target track; therefore, by implementing the embodiment of the invention, the passable space grid map can be combined to simulate the vehicle advancing planning and the vehicle backing planning for the vehicle, and then the conditions of the advancing track and the backing track and the horizontal complete parking condition of the vehicle are combined to select the reasonable target track from the advancing track or the backing track, so that the invention is suitable for parking scenes of various horizontal parking spaces, and the vehicle can be safely and completely parked horizontally and has higher reliability.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.

Fig. 1 is a schematic flow chart illustrating a method for planning a horizontal parking trajectory of a vehicle according to an embodiment of the present invention;

FIG. 2 is a schematic flow chart illustrating a method for planning a horizontal parking trajectory of a vehicle according to a second embodiment of the present invention;

FIG. 3 is a schematic structural diagram of a horizontal parking trajectory planning apparatus for vehicles according to an embodiment of the present invention;

FIG. 4 is a schematic structural diagram of a vehicle horizontal parking trajectory planning apparatus according to a second embodiment of the present invention;

FIG. 5 is a schematic structural diagram of a vehicle according to an embodiment of the present invention;

FIG. 6 is a schematic illustration of a target stop line as disclosed in an embodiment of the present invention;

FIG. 7 is a schematic illustration of a minimum turning radius of a vehicle according to an embodiment of the present disclosure;

FIG. 8 is a schematic diagram of a forward/backward reference curve and a forward/backward trajectory according to an embodiment of the present invention;

fig. 9 is a schematic diagram of forward/backward reference curves and forward/backward trajectories according to a second embodiment of the present invention;

FIG. 10 is a schematic diagram illustrating a trajectory generation algorithm according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be noted that the terms "first", "second", "third", and "fourth" and the like in the description and the claims of the present invention are used for distinguishing different objects, and are not used for describing a specific order. The terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

The embodiment of the invention discloses a method and a device for planning a horizontal parking track of a vehicle, the vehicle and a storage medium, which are used for providing a reasonable parking track and improving the reliability and safety of the horizontal parking of the vehicle.

The technical solution of the present invention will be described in detail by the following specific examples.

Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for planning a horizontal parking trajectory of a vehicle according to an embodiment of the present invention; as shown in fig. 1, the method for planning a horizontal parking trajectory of a vehicle may include:

101. and setting a target stop line on an initial world coordinate system according to the vehicle information, wherein the initial world coordinate system is established according to the initial position of the vehicle.

The embodiment of the invention is used for horizontally parking out a vehicle, so that it can be understood that the initial position of the vehicle is the position of the vehicle parked on a horizontal parking space, and the initial world coordinate system WXOY is established by taking the initial position of the vehicle as an origin, wherein the Y-axis direction is perpendicular to the vehicle body outwards, and the X-axis direction is parallel to the vehicle body direction.

As an optional implementation manner, step 101 specifically includes the following implementation steps:

acquiring a parking threshold value, wherein the parking threshold value is equal to the sum of the width of the vehicle and a preset value;

and setting a target stop line on the initial world coordinate system, wherein the equation of the target stop line is liney, y is d, d is a vehicle width + c, liney, y is the target stop line, d is a stop threshold, vehicle width is the width of the vehicle, and c is a preset value.

The method comprises the steps of obtaining vehicle information, wherein the vehicle information comprises the width, the length and the like of a vehicle, calculating a parking threshold according to the width of the vehicle in the vehicle information, wherein the parking threshold is equal to the sum of the width of the vehicle and a preset value, the equation of a target parking line is liney, y is d, d is a card width + c, y represents the target parking line, d is the parking threshold, card width is the width of the vehicle, and c is the preset value.

Alternatively, the preset value may be set according to actual conditions, and for example, the preset value may be set to 1.0m, that is, liney, y ═ width +1.0m, and the initial driving direction of the vehicle is set to forward.

Referring to fig. 6, fig. 6 is a schematic view of a target stop line according to an embodiment of the present invention; the rectangles in fig. 6 represent horizontal parking spaces, the three parking spaces shown each represent parked vehicles, and for horizontal parking of vehicles in intermediate parking spaces, an initial world coordinate system WXOY is established with the initial position of the vehicle as the origin, wherein the Y-axis direction is perpendicular to the vehicle body outward, and the X-axis direction is parallel to the vehicle body direction, which is along the vehicle head direction, the dotted line in the figure represents a target parking line, and the dotted-line rectangle is an ideal position after the vehicle is completely horizontally parked.

102. And converting the data of the passable space grid map to the initial world coordinate system to obtain a target world coordinate system, wherein the passable space grid map is obtained by extracting according to the vehicle all-round viewing information.

The visual passable space (freespace) grid map provided by the embodiment of the invention is obtained by extracting a visual algorithm module according to vehicle all-round viewing information, the specific extraction method is the prior art, and is not described herein any more, the visual freespace grid map is established based on a vehicle coordinate system by taking the center of a rear axle of a vehicle as the map center, exemplarily, the size of the freespace grid map can be 200x400, the size is 5cm, and the numerical value is 0 or 1, wherein 0 represents passable, and 1 represents occupied and impassable.

In the embodiment of the invention, the data of the freespace grid map is converted into the initial time coordinate system, so as to obtain the target world coordinate system, wherein a target stop line is already arranged in the target world coordinate system. Meanwhile, it should be noted that the vehicle all-round information is related to the current position of the vehicle, and may be different due to different current positions caused by the vehicle running, so as to accurately indicate the surrounding environment of the vehicle.

103. And according to the current position of the vehicle and the minimum turning radius of the vehicle, simulating a forward planning of the vehicle in a target world coordinate system to obtain a forward track and simulating a backward planning of the vehicle to obtain a backward track.

Referring to fig. 7, fig. 7 is a schematic view of a minimum turning radius of a vehicle according to an embodiment of the present invention. Referring to fig. 7, the minimum turning radius of the vehicle provided by the embodiment of the present invention is the minimum turning radius of the center of the rear axle of the vehicle, which means the maximum front wheel steering angle θ of the vehiclemaxThe turning radius of the time can be obtained by the Ackerman steering principle:

wherein L is the wheelbase of the vehicle and carwidth is the width of the vehicle.

In addition, the vehicle is steered at a maximum front wheel steering angle θmaxWhen the minimum turning radius of the head of the vehicle is RfFrom the ackermann steering principle, one can obtain:

wherein L is1The distance from the rear axle center P to the vehicle front bumper.

104. Judging whether the end point of the advancing track meets the complete parking condition or not; wherein if the full park condition is met, turning to step 105; if the full park condition is not met, the process returns to step 106.

As an alternative embodiment, the determining whether the end point of the forward trajectory satisfies the full pull-out condition includes:

acquiring a pose parameter of a terminal point of an advancing track, wherein the pose parameter of the terminal point comprises an x value, a y value and radians corresponding to a course angle in a target world coordinate system;

calculating a first ratio of the circumferential ratio pi to 2;

calculating the absolute value of the difference between the radian corresponding to the course angle and the first ratio;

judging whether the y value is greater than or equal to a parking threshold value and the absolute value is smaller than a radian threshold value, wherein the radian threshold value is equal to a product obtained by multiplying a second ratio of 10 to 180 by a circumferential rate pi;

when the y value is greater than or equal to the parking threshold and the absolute value is smaller than the radian threshold, determining that the terminal point of the current track meets the complete parking condition;

and when the y value is smaller than the parking threshold or the absolute value is smaller than the radian threshold, determining that the terminal point of the current track does not meet the full parking-out condition.

The radian of the heading angle is used for calculation, and the radian threshold value can be set according to (10/180) × pi, 10 is 10 degrees, 180 is 180 degrees, and is converted into the radian through calculation of (10/180) × pi.

Specifically, the full park condition may be:

-car.cy > ═ d and | car.cyaw-pi/2 | < (10/180) × pi;

the pose parameter of the vehicle position is carp (cx, cy, cyaw), where carp.cy is a coordinate value on the Y axis of the target world coordinate system in the vehicle position, that is, cx in the pose parameter, that is, the representation manner of carp.cy only represents cy of the position point carp, cx is a coordinate value on the X axis of the target world coordinate system in the vehicle position, that is, cy in the pose parameter, carp.cyaw is a radian corresponding to the heading angle of the vehicle, that is, cyaw, d in the pose parameter is the parking threshold described above, and pi is a circumference ratio.

Therefore, in step 104, the pose parameter of the end point of the forward track is represented as Pathfendp (cx, cy, cyaw), where pathfendp.cx is the above x value, pathfendp.cx is the above y value, pathfendp.cyaw is the radian corresponding to the end point heading angle of the forward track, and it is determined whether the end point of the forward track satisfies the complete parking condition, that is:

pathfendp.cy > ═ d and | pathfendp.cyaw-pi/2 | < (10/180) × pi;

and (5) Pathfenda.cy is a coordinate value Y value of the end point of the forward track on the Y axis of the target world coordinate system, and carp.cyaw is the radian corresponding to the vehicle heading angle corresponding to the end point of the forward track.

105. The forward trajectory is selected as a target trajectory for the vehicle to travel.

In step 105, the end point of the forward track satisfies the full parking condition, so after the forward track is selected as the target track and the vehicle is controlled to run according to the target track, the vehicle will be parked out of the parking space completely and horizontally, and the process will be ended.

106. Judging whether the length of the backward track is smaller than that of the forward track; if the length of the forward track is less than the length of the forward track, go to step 107; if not, go to step 108.

In step 106, if the end point of the forward track does not satisfy the complete pull-out condition, it is further determined whether to select the forward track as the target track or the backward track as the target track, and specifically, whether the length of the backward track is smaller than the length of the forward track.

107. And selecting the advancing track as a target track.

In step 107, if the length of the backward trajectory is smaller than the length of the forward trajectory, the forward trajectory is preferred as the target trajectory and the vehicle traveling direction is forward.

108. The back track is selected as the target track.

And when the length of the backward track is not less than that of the forward track, selecting the backward track as a target track, wherein the driving direction of the vehicle is backward.

By implementing the embodiment, a target parking line is set on an initial world coordinate system according to vehicle information, the initial world coordinate system is established according to the initial position of a vehicle, then data of a passable space grid map is converted to the initial world coordinate system to obtain a target world coordinate system, the passable space grid map is extracted according to vehicle all-round information, further, according to the current position of the vehicle and the minimum turning radius of the vehicle, a forward track is obtained by simulating vehicle forward planning and a backward track is obtained by simulating vehicle backward planning in the target world coordinate system, whether the end point of the forward track meets a complete parking condition is judged, if the complete parking condition is met, the forward track is selected as the target track for vehicle running, if the complete parking condition is not met, whether the length of the backward track is smaller than the length of the forward track is further judged, if the length of the forward track is less than the length of the forward track, selecting the forward track as a target track, and if the length of the forward track is not less than the length of the forward track, selecting the backward track as the target track; therefore, by implementing the embodiment of the invention, the passable space grid map can be combined to simulate the vehicle advancing planning and the vehicle backing planning for the vehicle, and then the conditions of the advancing track and the backing track and the horizontal complete parking condition of the vehicle are combined to select the reasonable target track from the advancing track or the backing track, so that the invention is suitable for parking scenes of various horizontal parking spaces, and the vehicle can be safely and completely parked horizontally and has higher reliability.

Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a vehicle horizontal parking track planning method according to a second embodiment of the present invention; as shown in fig. 2, the method for planning a horizontal parking trajectory of a vehicle may include:

201. and setting a target stop line on an initial world coordinate system according to the vehicle information, wherein the initial world coordinate system is established according to the initial position of the vehicle.

202. And converting the data of the passable space grid map to the initial world coordinate system to obtain a target world coordinate system, wherein the passable space grid map is obtained by extracting according to the vehicle all-round viewing information.

203. And according to the current position of the vehicle and the minimum turning radius of the vehicle, simulating a forward planning of the vehicle in a target world coordinate system to obtain a forward track and simulating a backward planning of the vehicle to obtain a backward track.

As an alternative embodiment, the simulating the forward planning of the vehicle to obtain the forward track and the simulating the backward planning of the vehicle to obtain the backward track in the target world coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle may include:

setting a first reference circle, a second reference circle and a third reference circle on a target world coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle, wherein the first reference circle and a target stop line are tangent to a first tangent point, the first reference circle and the third reference circle are tangent to a second tangent point, the second reference circle and the third reference circle are tangent to a third tangent point, and the third tangent point is the current position of the vehicle;

acquiring a forward reference curve, and generating a forward track by adopting a track generation algorithm according to the forward reference curve, wherein the forward reference curve consists of an arc line corresponding to a third tangent point to a second tangent point on a third reference circle and an arc line corresponding to a first tangent point to the first tangent point from the second tangent point on a first reference circle;

when the course angle corresponding to the current position of the vehicle is smaller than a first angle threshold, acquiring a first backward reference curve, and generating a backward track by adopting a track generation algorithm according to the first backward reference curve, wherein the first backward reference curve is that y is 0;

and when the course angle of the vehicle is not less than the first angle threshold, acquiring a second backward reference curve, and generating a backward track by adopting a track generation algorithm according to the second backward reference curve, wherein the second backward reference curve is the second reference circle.

Wherein the minimum turning radius of the vehicle is the minimum turning radius R described above, and three circles, namely a first reference circle O1, a second reference circle O2 and a third reference circle O3, are arranged on a world coordinate system according to the pose parameter carp (cx, cy, cyaw) of the current position of the vehicle and the minimum turning radius R of the vehicle, where a center coordinate calculation formula of the third reference circle O3 is as follows:

O3.x=carp.cx-R*sin(carp.cyaw)

O3.y=carp.cy+R*cos(carp.cyaw)

the center coordinates of the second reference circle O2 are calculated as follows:

O2.x=carp.cx+R*sin(carp.cyaw)

O3.y=carp.cy-R*cos(carp.cyaw)

the center coordinates of the first reference circle O1 are calculated as follows:

O1.y=d-R;

the current position of the vehicle is corresponding to the radian of the corresponding heading angle of the current position of the vehicle, namely the cyaw in the sitting posture parameters.

Referring to fig. 8 and 9, fig. 8 is a schematic diagram of a forward/backward reference curve and a forward/backward trajectory according to a first embodiment of the present invention, and fig. 9 is a schematic diagram of a forward/backward reference curve and a forward/backward trajectory according to a second embodiment of the present invention; in fig. 8 and 9, the center of the first reference circle O1 is represented as (O1.x, O1.y), the radius of the first reference circle O1 is the minimum turning radius R of the vehicle, and the first reference circle O1 is tangent to the first tangent point p1 with the target stop line liney: y ═ d. The center of the second reference circle O2 is denoted as (O2.x, O2.y), the radius of the second reference circle O2 is also the minimum turning radius R of the vehicle, and the second reference circle O2 is tangent to the third reference circle O3 at the third tangent point, i.e., the current position carp (cx, cy, cyaw) of the vehicle. The centers of the third reference circle O3 are denoted as (O3.x, O3.y), the radius of the third reference circle O3 is also the minimum turning radius R of the vehicle, and the first reference circle O1 and the third reference circle O3 are tangent to the second tangent point P13.

When the forward track is generated by using the track generation algorithm, a forward reference curve is obtained from an arc corresponding to the third tangent point carp (cx, cy, cyaw) to the second tangent point P13 on the third reference circle O3 and an arc corresponding to the first tangent point P1 from the second tangent point P13 on the first reference circle O1, and the forward track is generated according to the forward reference curve. Wherein, the arc line corresponding to the third tangent point carp (cx, cy, cyaw) to the second tangent point P13 on the third reference circle O3, i.e. the arc line carp 13 shown in fig. 8 and 9, is an arc line on the edge of the third reference circle O3; the arc corresponding to the second tangency point P13 to the first tangency point P1, i.e. the arc P13P1 shown in fig. 8 and 9, is an arc on the side of the first reference circle O1, and the generated forward trajectory is shown by the bold line in fig. 8 and 9, starting from carp (cx, cy, cyaw), does not completely include the arc pp13 and the arc P13P1, and further extends outward by a certain length at P1.

Further, the obtaining of the forward reference curve and the generating of the forward track by using the track generation algorithm according to the forward reference curve include:

acquiring a forward reference curve, and generating a forward generation track by adopting a track generation algorithm according to the forward reference curve;

performing collision detection on the advancing generated track;

when no collision is detected, the forward generated trajectory is taken as a forward trajectory.

In the above embodiment, the forward generated trajectory is generated according to the trajectory generation algorithm, and then collision detection needs to be further performed on the forward generated trajectory, if collision is detected, detection is exited, an end point is recorded, and the forward generated trajectory before collision is intercepted as the forward trajectory, or is re-planned, and if collision is not detected, the forward generated trajectory is regarded as the forward trajectory.

Further specifically, the collision detection on the forward generated trajectory specifically includes:

whether an obstacle exists on the forward generated track is detected from a third tangent point (the current position carp (cx, cy, cyaw)) track by track, when the obstacle is detected, the previous track point where the obstacle is detected is recorded as an end point, and when the obstacle is not detected, the forward generated track is directly used as the forward track.

Through the embodiment, collision detection can be added to improve the reliability of the advancing track, so that the safety of horizontal parking of the vehicle is improved.

In addition, a backward planning is also performed, and a backward trajectory obtained from the backward trajectory is obtained in two cases:

in the first case, when the heading angle corresponding to the current position of the vehicle is smaller than the first angle threshold (or the first angle threshold is converted into a corresponding radian, and the radian corresponding to the heading angle is smaller than the radian), a retreating track is generated by using a track generation algorithm according to the first retreating reference curve, wherein the first angle threshold may be preset, for example, the first angle threshold may be set to 5 °, the heading angle is less than 5 °, and a retreating track is generated backwards by using a track generation algorithm according to the first retreating reference curve y being 0, that is, the X axis of the reference target world coordinate system, and the length of the retreating track is not greater than the length threshold.

Alternatively, the length threshold may be preset, and for example, the length threshold may be 2 m.

Further, the generating a backward trajectory by using a trajectory generation algorithm according to the first backward reference curve includes:

generating a first backward generation track by adopting a track generation algorithm according to the first backward reference curve;

performing collision detection on the first retreat generated track;

when no collision is detected, the first retreat generating trajectory is taken as the retreat trajectory.

In the above embodiment, a first backward trajectory is generated according to a trajectory generation algorithm, then collision detection needs to be further performed on the first backward trajectory, if collision is detected, the detection is exited, an end point is recorded, a trajectory before collision is intercepted as a backward trajectory, or is replanned, and when collision is not detected, the first backward trajectory is generated as a backward trajectory; according to the embodiment, the reliability of the backward movement track can be improved, and the safety of the horizontal parking of the vehicle can be improved.

Under the second condition, when the course angle corresponding to the current position of the vehicle is not smaller than the first angle threshold value and the course angle of the vehicle is not smaller than the first angle threshold value, a backward track is generated by adopting a track generation algorithm according to a second backward reference curve, and the backward track stops being generated when the course angle corresponding to the current position of the vehicle is larger than the second angle threshold value.

Further, the generating a backward trajectory by using a trajectory generation algorithm according to the second backward reference curve includes:

generating a second backward generated track by adopting a track generation algorithm according to the second backward reference curve; performing collision detection on the second retreat generated track; when no collision is detected, the second retreat generating trajectory is taken as the retreat trajectory.

According to a second reference circle O2, generating a second backward generated track by adopting a track generation algorithm, then further performing collision detection on the second backward track, if collision is detected, exiting the detection, recording an end point, and intercepting the track before the collision as a backward track or replanning the backward track, and if no collision is detected, taking the second backward generated track as the backward track; according to the embodiment, the reliability of the backward movement track can be improved, and the safety of the horizontal parking of the vehicle can be improved.

Note that, in fig. 8 and 9, Pathref1 represents the forward reference curve, Pathforward represents the forward generation trajectory (a black bold curve as shown in fig. 8), Pathref2 represents the second backward reference curve (a second reference circle O2), and pathback represents the second backward generation trajectory (a gray bold curve as shown in fig. 8).

As an alternative implementation, please refer to fig. 10, fig. 10 is a schematic diagram illustrating a principle of a trajectory generation algorithm disclosed in an embodiment of the present invention; with reference to fig. 10, the track generation algorithm adopts a forward-looking window pure tracking method, the vehicle is simplified into a bicycle model, the center of the rear axle of the vehicle is taken as a tangent point (point Q in the figure), the longitudinal body of the vehicle is taken as a tangent line, the vehicle is simulated to run along a reference curve at a speed v by controlling the front wheel steering angle, a curvature continuous path point is obtained, the running distance dl is simulated in a single step, and the maximum adjustment deflection angle delta alpha of the front wheel in the single step is obtainedmaxThe specific process is as follows:

a1, obtaining Q (Qx, Qy, Qyaw).

A2, mapping the Q point to a reference curve to obtain a mapping point P (Px, Py, Pyaw);

and moving the reference curve by a distance L of 1m according to the driving direction of the vehicle by taking the point P as a starting point to acquire a reference point G (Gx, Gy), wherein the point G is a target point on which the vehicle is to travel.

A3, setting O, enabling a circle to pass through two points Q and G, enabling the circle to be tangent to the longitudinal direction of the vehicle at the point Q, enabling the circle center to be O and the radius R, calculating the first turning radius R of the vehicle according to geometry, and obtaining the target deflection angle alpha of the front wheel of the vehicle according to the Ackerman steering principle tan alpha-L/RexpAccording to the vehicle speed and the current rotation angle alphaactDeviation Δ α ═ αexpactIn which α isact∈[-Δαmax,Δαmax]And, true vehicle turning angle: alpha is alphaact=αact+Δα。

A4, turning angle alpha of vehicle according to current front wheelactAnd the dl distance reaches Q1(Q1x, Q1y, Q1yaw), the point position of Q1 can be calculated by calculating beta as L/R from the circle O, wherein L is the length of the circular arc of two points P and G:

Q1yaw=Qyaw

Q1X=QX+R*(sin(Q1yaw)-sin(Qyaw))

Q1y=Qy+R*(cos(Qyaw)-cos(Q1yaw))。

a5, judging whether planning is finished (the situation of course angle or position deviation can be judged) according to the vehicle position Q1(Q1x, Q1y, Q1yaw), if yes, exiting the loop, and if not, jumping to A2 to continue execution.

According to the above-described trajectory generation algorithm, the resulting trajectory starting from the point Q is a generated trajectory, as shown by a broken line in fig. 10.

Based on the track generation algorithm, the forward reference curve is substituted into the reference curve to generate a forward generated track, the first backward reference curve is substituted into the reference curve to generate a first backward generated track, the second backward reference curve is substituted into the reference curve to generate a second backward generated track, and introduction is not substituted into the first backward generated track one by one.

204. Judging whether the end point of the advancing track meets the complete parking condition or not; wherein if the full park condition is met, go to step 205; if the full park condition is not met, the process returns to step 206.

205. The forward trajectory is selected as a target trajectory for the vehicle to travel.

206. Judging whether the length of the backward track is smaller than that of the forward track; if the length of the forward track is less than the length of the forward track, go to step 207; if not, go to step 208.

207. Selecting a forward track as a target track;

208. the back track is selected as the target track.

209. And controlling the vehicle to run according to the target track.

210. Judging whether the current position of the vehicle meets the complete parking condition or not; if yes, ending the process; if not, go to step 211.

211. Detecting whether the target track is completely driven or whether the vehicle is braked and stopped; if the target track is completely driven or the vehicle is braked, turning to step 202; if the target trajectory is not finished and the vehicle is not braked, go to step 209.

It can be understood that when the target track is completely driven but the vehicle is not completely parked, the forward/backward track planning is continued until the vehicle is completely parked, or when the vehicle is stopped after the target track is completely driven or when the target track is not completely driven but the vehicle is stopped, the forward/backward track planning is also carried out again until the vehicle is completely parked; and when the target track is not completely driven and the vehicle is not braked and stopped, continuing to control the vehicle to drive according to the target track.

Through the implementation of the embodiment, the passable space grid map can be combined to simulate the forward planning and the backward planning of the vehicle for the vehicle, then the conditions of the forward track and the backward track and the horizontal complete parking condition of the vehicle are combined to select the reasonable target track from the forward track or the backward track, the vehicle is controlled to run according to the target track, in the process of controlling the target track to run, if the current position meets the complete parking condition, the process is ended, if the current position does not meet the complete parking condition, but the target track is run completely or the vehicle is braked, the planned track is restarted to simulate, and when the target track is not run completely and the vehicle is not braked, the vehicle is controlled to run continuously, the embodiment of the invention is suitable for the horizontal complete parking scenes of various parking spaces, so that the vehicle can be safely and horizontally and completely parked, the reliability is high.

Referring to fig. 3, fig. 3 is a schematic structural diagram of a horizontal parking trajectory planning device for a vehicle according to an embodiment of the present invention; as shown in fig. 3, the vehicle horizontal parking trajectory planning apparatus may include:

a setting module 310, configured to set a target stop line on an initial world coordinate system according to vehicle information, where the initial world coordinate system is established according to an initial position of a vehicle;

the conversion module 320 is used for converting the data of the passable space grid map into an initial world coordinate system to obtain a target world coordinate system, and the passable space grid map is obtained by extracting according to the vehicle all-round viewing information;

the simulation module 330 is configured to simulate a vehicle forward planning to obtain a forward track and simulate a vehicle backward planning to obtain a backward track in a target world coordinate system according to a current position of the vehicle and a minimum turning radius of the vehicle;

a judging module 340, configured to judge whether an end point of the forward trajectory meets a complete parking condition;

a selecting module 350, configured to select the forward trajectory as a target trajectory for vehicle driving if the determining module determines that the end point of the forward trajectory satisfies a complete parking condition;

the determining module 340 is further configured to determine whether the length of the backward trajectory is smaller than the length of the forward trajectory if it is determined that the end point of the forward trajectory does not satisfy the complete parking condition;

the selecting module 350 is further configured to select the forward trajectory as the target trajectory if the determining module 340 determines that the length of the backward trajectory is smaller than the length of the forward trajectory; and if the judging module 340 judges that the length of the backward track is not less than that of the forward track, selecting the backward track as the target track.

By implementing the device, the vehicle forward planning and the vehicle backward planning can be simulated for the vehicle by combining the passable space grid map, and then the reasonable target track is selected from the forward track or the backward track by combining the conditions of the forward track and the backward track and the horizontal complete parking condition of the vehicle, so that the device is suitable for parking scenes of various horizontal parking places, the vehicle can be safely and horizontally parked out completely, and the reliability is higher.

Referring to fig. 4, fig. 4 is a schematic structural diagram of a vehicle horizontal parking trajectory planning device according to a second embodiment of the present invention; the vehicle horizontal parking trajectory planning apparatus shown in fig. 4 is obtained by performing optimization based on the vehicle horizontal parking trajectory planning apparatus shown in fig. 3, and the vehicle horizontal parking trajectory planning apparatus shown in fig. 4 further includes:

and a running control module 410, configured to control the vehicle to run according to the target track after the target track is selected by the selection module 350.

Through the implementation mode, the vehicle can be planned to move forward/backward by combining the passable space grid map, the target track is obtained by simulating the vehicle to move forward and backward, so that the reliability of the vehicle for automatically and completely horizontally parking out of the parking space is improved, and the parking safety can be improved by detecting the target track without collision, so that the vehicle can be safely parked out.

Further, the driving control module 410 is further configured to determine whether the current position of the vehicle meets a complete parking condition when the vehicle is driven according to the target track; if not, detecting whether the target track is completely driven or whether the vehicle is braked and stopped; if the target track is completely driven or the vehicle is braked, triggering the conversion module 320 to convert the data of the passable space grid map into the initial world coordinate system to obtain a target world coordinate system; and if the target track is not completely driven and the vehicle is not braked, triggering the driving control module to execute control of the vehicle to drive according to the target track.

As an alternative embodiment, the setting module 310 is configured to set the target stop line on the initial world coordinate system according to the vehicle information in a specific manner:

acquiring a parking threshold value, wherein the parking threshold value is equal to the sum of the width of the vehicle and a preset value; and setting a target stop line on the initial world coordinate system, wherein the equation of the target stop line is liney, y is d, d is a car width + c, y is the target stop line, d is a stop threshold, car width is the width of the vehicle, and c is a preset value.

As an alternative implementation, the manner for determining whether the end point of the forward trajectory satisfies the full pull-out condition by the determining module 340 is specifically:

acquiring a pose parameter of a terminal point of an advancing track, wherein the pose parameter of the terminal point comprises an x value, a y value and a radian corresponding to a course angle in a target world coordinate system;

calculating a first ratio of the circumferential ratio pi to 2;

calculating the absolute value of the difference between the radian corresponding to the course angle and the first ratio;

judging whether the y value is greater than or equal to a parking threshold value and the absolute value is smaller than a radian threshold value, wherein the radian threshold value is equal to a product obtained by multiplying a second ratio of 10 to 180 by a circumferential rate pi;

when the y value is greater than or equal to the parking threshold and the difference value is smaller than the radian threshold, determining that the terminal point of the current track meets the complete parking condition;

and when the y value is smaller than the parking threshold or the absolute value is smaller than the radian threshold, determining that the terminal point of the current track does not meet the full parking-out condition.

As an alternative embodiment, the simulation module 330 is configured to obtain the forward trajectory by simulating a forward planning of the vehicle and obtain the backward trajectory by simulating a backward planning of the vehicle in the target world coordinate system according to the current position of the vehicle and the minimum turning radius of the vehicle, specifically:

according to the current position of the vehicle and the minimum turning radius of the vehicle, setting a first reference circle, a second reference circle and a third reference circle on a target world coordinate system, wherein the first reference circle and a target stop line are tangent to a first tangent point, the first reference circle and the third reference circle are tangent to a second tangent point, the second reference circle and the third reference circle are tangent to a third tangent point, and the third tangent point is the current position of the vehicle;

acquiring a forward reference curve, and generating a forward track by adopting a track generation algorithm according to the forward reference curve, wherein the forward reference curve consists of an arc line corresponding to a third tangent point to a second tangent point on a third reference circle and an arc line corresponding to a first tangent point from the second tangent point to the first tangent point on a first reference circle;

when the course angle corresponding to the current position of the vehicle is smaller than a first angle threshold, acquiring a first backward reference curve, and generating a backward track by adopting a track generation algorithm according to the first backward reference curve, wherein the first backward reference curve is that y is 0;

and when the course angle of the vehicle is not less than the first angle threshold, acquiring a second backward reference curve, and generating a backward track by adopting a track generation algorithm according to the second backward reference curve, wherein the second backward reference curve is a second reference circle.

Further, the simulation module 330 is configured to obtain a forward reference curve, and generate a forward track by using a track generation algorithm according to the forward reference curve in a manner that:

acquiring a forward reference curve, and generating a forward generation track by adopting a track generation algorithm according to the forward reference curve;

performing collision detection on the advancing generated track;

when no collision is detected, taking the forward generated track as a forward track;

the simulation module 330 is configured to generate a backward trajectory by using a trajectory generation algorithm according to the first backward reference curve in a specific manner:

generating a first backward generation track by adopting a track generation algorithm according to the first backward reference curve;

performing collision detection on the first retreat generated track;

when no collision is detected, taking the first retreat generating trajectory as a retreat trajectory;

the simulation module 330 is configured to generate a backward trajectory by using a trajectory generation algorithm according to the second backward reference curve, specifically:

generating a second backward generated track by adopting a track generation algorithm according to the second backward reference curve;

performing collision detection on the second retreat generated track;

when no collision is detected, the second retreat generating trajectory is taken as the retreat trajectory.

Optionally, when the backward trajectory is generated according to the first backward reference curve, the length of the backward trajectory is not greater than the length threshold;

and when the backward track is generated according to the second backward reference curve, stopping generating the backward track when the heading angle corresponding to the current position of the vehicle is larger than a second angle threshold value.

Optionally, the center coordinate of the third reference circle is calculated as follows:

O3.x=carp.cx-R*sin(carp.cyaw)

O3.y=carp.cy+R*cos(carp.cyaw)

the center coordinate calculation formula of the second reference circle is as follows:

O2.x=carp.cx+R*sin(carp.cyaw)

O3.y=carp.cy-R*cos(carp.cyaw)

the center coordinates of the first reference circle are calculated as follows:

O1.y=d-R;

the current position of the vehicle is corresponding to the radian of the corresponding heading angle of the current position of the vehicle, namely the cyaw in the sitting posture parameters.

Referring to fig. 5, fig. 5 is a schematic structural diagram of a vehicle according to an embodiment of the disclosure; the vehicle shown in fig. 5 may include:

a memory 501 in which executable program code is stored;

a processor 502 coupled to a memory 501;

the processor 502 calls the executable program code stored in the memory 501 to execute a part of the steps of the method for planning the horizontal parking trajectory of any one of the vehicles shown in fig. 1 to 2.

An embodiment of the present invention further discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute a method for planning a horizontal parking trajectory of a vehicle disclosed in fig. 1 to 2.

An embodiment of the present invention further discloses a computer program product, which, when running on a computer, causes the computer to execute part or all of the steps of any one of the methods disclosed in fig. 1 to 2.

An embodiment of the present invention further discloses an application publishing platform, where the application publishing platform is configured to publish a computer program product, where when the computer program product runs on a computer, the computer is enabled to execute part or all of the steps of any one of the methods disclosed in fig. 1 to fig. 2.

It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.

The method and the device for planning the horizontal parking trajectory of the vehicle, the vehicle and the storage medium disclosed by the embodiment of the invention are described in detail, a specific example is applied in the description to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种倒车辅助方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!