Method and device for calculating relative position of vehicle and roadside event, electronic equipment and computer program product

By calculating the relative position of the vehicle and the road side event, it is difficult to accurately judge the impact after receiving the information of the vehicle's receiving side incident, realize more accurate driving safety and path planning, and improve the accuracy of the application of road collaboration technology.

CN119360658APending Publication Date: 2025-01-24MUSHROOM CHELIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411476334.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In vehicle-road collaboration technology, when a vehicle receives positioning information of roadside events, it is difficult to accurately calculate the relative position of roadside events and vehicles due to network transmission delays and vehicle position changes, which affects driving safety and path planning.

Method used

By obtaining the current positioning information of the vehicle, including the latitude and longitude, and the orientation, the road side event is calculated relative to the vehicle's orientation angle, and combined with the vehicle's orientation and road orientation data to correct the relative position of the vehicle and road events.

Benefits of technology

The secondary verification and filtering of the opposite side events has been realized, the accuracy of judging the impact of the road side incident on the vehicle is improved, and the vehicle can make timely adjustment of driving direction to improve traffic safety and driving efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119360658A_ABST
    Figure CN119360658A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for calculating the relative position of a vehicle and a roadside event, electronic equipment and a computer program product, and the method comprises the steps: obtaining the current positioning information of the vehicle when the positioning information of the roadside event is received, the positioning information of the roadside event comprises the latitude and longitude of the roadside event, the current positioning information of the vehicle comprises the current longitude and latitude and the current orientation of the vehicle; calculating the azimuth angle of the roadside event relative to the vehicle according to the current latitude and longitude of the vehicle and the latitude and longitude of the roadside event; and calculating the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the azimuth angle of the roadside event relative to the vehicle. According to the method, the distance between the roadside event and the vehicle is considered, the relative direction is also considered, and the influence of the roadside event on the vehicle can be more accurately judged. The roadside events are subjected to secondary verification and filtering, and only the roadside events influencing vehicle driving safety and path planning are reserved, so that the application accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle-road collaboration technology, and in particular to a method, device, electronic device, and computer program product for calculating the relative position of a vehicle and a roadside event. Background Art

[0002] Vehicle-to-Everything (V2X) is a technology that connects vehicles to the surrounding environment (such as other vehicles, infrastructure, pedestrians, networks, etc.) through communication technology, aiming to improve traffic safety, driving efficiency and driving experience. In vehicle-to-everything applications, roadside units (RSUs) can sense, detect and transmit information about events on the road, such as traffic accidents, obstacles, road construction, etc. By obtaining this information in real time, vehicles can make corresponding adjustments based on current road conditions to avoid potential dangers or optimize driving paths.

[0003] Although the V2X link can provide real-time traffic information, due to the latency of network transmission, the position of the vehicle may have changed when the vehicle receives the roadside event. In addition, in actual applications, the vehicle usually only reacts to the road events on its left, right and front after perceiving and fusing them, so as to make plans and avoidance actions in these areas. Therefore, in order to make good use of the roadside event data, it is crucial to assist the vehicle (social vehicle or autonomous driving vehicle) to make timely adjustments to the driving direction according to the roadside event and accurately calculate the relative position of the roadside event and the vehicle. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device, and computer program product for calculating the relative position of a vehicle and a roadside event, so as to realize secondary verification and filtering of roadside events and improve the accuracy of judging the impact of roadside events on vehicles.

[0005] The present application embodiment adopts the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a method for calculating the relative position of a vehicle and a roadside event, wherein the method for calculating the relative position of a vehicle and a roadside event includes:

[0007] When receiving the positioning information of the roadside event, obtaining the current positioning information of the vehicle, wherein the positioning information of the roadside event includes the longitude and latitude of the roadside event, and the current positioning information of the vehicle includes the current longitude and latitude and current direction of the vehicle;

[0008] Calculating the azimuth of the roadside event relative to the vehicle based on the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event;

[0009] The relative position of the vehicle and the roadside event is calculated according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle.

[0010] Optionally, after obtaining the current positioning information of the vehicle, the relative position calculation method between the vehicle and the roadside event further includes:

[0011] Determining whether the vehicle triggers a direction correction condition according to the current direction of the vehicle and the road direction data of the road section where the vehicle is located;

[0012] When a direction correction condition is triggered, correcting the current direction of the vehicle to obtain a corrected direction of the vehicle;

[0013] The calculating the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle comprises:

[0014] The relative position of the vehicle and the roadside event is calculated according to the corrected orientation of the vehicle and the azimuth of the roadside event relative to the vehicle.

[0015] Optionally, the road orientation data includes a lane line direction, and determining whether the vehicle triggers an orientation correction condition according to the current orientation of the vehicle and the road orientation data of the road section where the vehicle is located includes:

[0016] Obtaining the lane line direction of the lane where the vehicle is located from the high-precision map data;

[0017] Calculating the difference between the current orientation of the vehicle and the direction of the lane line;

[0018] Determining whether the vehicle triggers a direction correction condition according to a difference between the current direction of the vehicle and the direction of the lane line;

[0019] When the orientation correction condition is triggered, correcting the current orientation of the vehicle to obtain a corrected orientation of the vehicle includes:

[0020] When a direction correction condition is triggered, the current direction of the vehicle is smoothly corrected according to the difference between the current direction of the vehicle and the direction of the lane line to obtain a corrected direction of the vehicle.

[0021] Optionally, determining whether the vehicle triggers a direction correction condition according to the current direction of the vehicle and the road direction data of the road section where the vehicle is located includes:

[0022] In the absence of high-precision map data, obtaining the road direction of the road where the vehicle is located through the basic map;

[0023] Calculating a difference between a current orientation of the vehicle and an orientation of the road;

[0024] determining whether the vehicle triggers a heading correction condition according to a difference between the current heading of the vehicle and the road heading;

[0025] When the orientation correction condition is triggered, correcting the current orientation of the vehicle to obtain a corrected orientation of the vehicle includes:

[0026] Calculating an average value of the vehicle orientation of the vehicle within a preset time window;

[0027] According to the average value of the vehicle orientation in the preset time window, a direction angle filter is used to perform filtering correction to obtain a corrected orientation of the vehicle.

[0028] Optionally, calculating the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle includes:

[0029] Determining a quadrant position of the roadside event relative to the vehicle based on the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event;

[0030] Adjusting the azimuth angle of the roadside event relative to the vehicle according to the quadrant position of the roadside event relative to the vehicle to obtain an adjusted azimuth angle;

[0031] The relative position of the vehicle and the roadside event is calculated according to the current orientation of the vehicle and the adjusted azimuth.

[0032] Optionally, the calculating the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the adjusted azimuth includes:

[0033] Calculating a relative angle of the roadside event relative to the vehicle based on the current orientation of the vehicle and the adjusted azimuth;

[0034] Adjusting the relative angle of the roadside event with respect to the vehicle to a preset angle range to obtain an adjusted relative angle;

[0035] The relative position of the vehicle and the roadside event is determined according to the adjusted relative angle.

[0036] Optionally, after obtaining the current positioning information of the vehicle, the relative position calculation method between the vehicle and the roadside event further includes:

[0037] comparing the current longitude and latitude of the vehicle with the longitude and latitude of the roadside event;

[0038] If the deviation between the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event is less than a preset deviation threshold, the relative position of the vehicle and the roadside event is output as the current position of the vehicle.

[0039] In a second aspect, an embodiment of the present application further provides a device for calculating the relative position of a vehicle and a roadside event, wherein the device for calculating the relative position of a vehicle and a roadside event comprises:

[0040] an acquisition unit, configured to acquire current location information of the vehicle upon receiving location information of a roadside event, wherein the location information of the roadside event includes the longitude and latitude of the roadside event, and the current location information of the vehicle includes the current longitude and latitude and current direction of the vehicle;

[0041] A first calculation unit, configured to calculate an azimuth of the roadside event relative to the vehicle according to the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event;

[0042] The second calculation unit is used to calculate the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the azimuth angle of the roadside event relative to the vehicle.

[0043] In a third aspect, an embodiment of the present application further provides an electronic device, including:

[0044] Processor; and

[0045] A memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes any of the aforementioned methods for calculating the relative position of a vehicle and a roadside event.

[0046] In a fourth aspect, an embodiment of the present application further provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements any of the aforementioned methods for calculating the relative position of a vehicle and a roadside event.

[0047] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: the relative position calculation method of the vehicle and the roadside event in the embodiment of the present application, when receiving the positioning information of the roadside event, obtains the current positioning information of the vehicle, the positioning information of the roadside event includes the longitude and latitude of the roadside event, and the current positioning information of the vehicle includes the current longitude and latitude and current orientation of the vehicle; then, according to the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event, calculates the azimuth of the roadside event relative to the vehicle; finally, according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle, calculates the relative position of the vehicle and the roadside event. The relative position calculation method of the vehicle and the roadside event in the embodiment of the present application not only considers the distance between the roadside event and the vehicle, but also considers the relative direction between the roadside event and the vehicle, and can more accurately judge the impact of the roadside event on the vehicle. By performing secondary verification and filtering on the received roadside events, only those roadside events that have an impact on vehicle driving safety and path planning are retained, thereby improving the accuracy of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0049] Figure 1 A schematic diagram of a flow chart of a method for calculating the relative position of a vehicle and a roadside event in an embodiment of the present application;

[0050] Figure 2 It is a structural schematic diagram of a device for calculating the relative position of a vehicle and a roadside event in an embodiment of the present application;

[0051] Figure 3 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0053] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0054] The present application embodiment provides a method for calculating the relative position of a vehicle and a roadside event, such as Figure 1As shown, a flow chart of a method for calculating the relative position of a vehicle and a roadside event in an embodiment of the present application is provided, and the method for calculating the relative position of a vehicle and a roadside event at least includes the following steps S110 to S130:

[0055] Step S110, upon receiving the positioning information of the roadside event, obtaining the current positioning information of the vehicle, wherein the positioning information of the roadside event includes the longitude and latitude of the roadside event, and the current positioning information of the vehicle includes the current longitude and latitude and current direction of the vehicle.

[0056] The "vehicle" in the embodiment of the present application can be any vehicle with V2X communication function traveling on the road, including social vehicles and autonomous driving vehicles. When the roadside unit monitors specific traffic events on the road, such as traffic accidents, road construction and other events, it will send relevant information of the event, such as the location, event and type of the event, to vehicles within the affected area.

[0057] Since the vehicle is in a real-time driving state, the roadside events actually received will have a certain lag. Therefore, after the vehicle receives the relevant information of the roadside event, the embodiment of the present application adopts a secondary verification method to further determine the impact of the roadside event on the vehicle. Specifically, after the vehicle receives the latitude and longitude position and other information of the roadside event, it is necessary to obtain the current positioning information of the vehicle itself. The current positioning information of the vehicle may specifically include the current longitude and latitude and the current orientation of the vehicle. The current longitude and latitude can be obtained through the vehicle-mounted GPS or other positioning systems, and the current orientation can be obtained through the vehicle-mounted sensors, such as the heading field value of the Amap positioning.

[0058] Step S120, calculating the azimuth of the roadside event relative to the vehicle based on the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event.

[0059] After obtaining the current longitude and latitude of the vehicle, the difference in longitude and latitude between the vehicle and the roadside event is used. The vehicle is used as the origin of the coordinate system, the meridian is used as the y-axis, and the inverse tangent function (Math.atan2) is used to calculate the cotangent value of the two points. The cotangent value is then converted into the azimuth of the roadside event relative to the vehicle's position. This azimuth represents the angular position of the roadside event in the plane coordinate system where the vehicle is located, and the result is between ±180°.

[0060] Step S130, calculating the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle.

[0061] The azimuth calculated in the above steps represents the angular position of the roadside event in the plane coordinate system where the vehicle is located. However, in actual scenarios, the vehicle itself will also have a certain angle relative to the road plane, that is, the current orientation of the vehicle. Therefore, it is necessary to combine the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle to calculate the actual relative orientation between the vehicle and the roadside event. The relative orientation calculated here can clearly indicate whether the roadside event is located directly in front of the vehicle, directly behind, in front of the left, in front of the right, behind the left, or behind the right, as well as the specific relative angle. Then, based on the clear relative position calculated, it can be verified whether the roadside event has an impact on the current vehicle's driving.

[0062] To facilitate the understanding of the above-mentioned embodiments, in a typical smart driving road application scenario, it is assumed that a vehicle is traveling on a smart road. The road has a variety of sensors and roadside units (RSUs) that can monitor and transmit event information on the road in real time. The vehicle receives a notification sent by the RSU through the V2X link, informing it that an obstacle event has occurred at a certain location ahead. Due to network delays, the position of the vehicle may have changed when it receives the information. Through the embodiments of the present application, the latest longitude and latitude and orientation of the vehicle can be obtained in real time, and then the azimuth and relative angle of the roadside event relative to the vehicle are calculated in combination with the longitude and latitude of the event location. For example, the calculation results show that the roadside event occurred 45 degrees to the right of the front of the vehicle. The vehicle system automatically adjusts the driving path based on this information to avoid collision with obstacles.

[0063] The relative position calculation method of the vehicle and the roadside event in the embodiment of the present application not only considers the distance between the roadside event and the vehicle, but also considers the relative direction between the roadside event and the vehicle, and can more accurately judge the impact of the roadside event on the vehicle. By performing secondary verification and filtering on the received roadside events, only those roadside events that have an impact on vehicle driving safety and path planning are retained, thereby improving the accuracy of the application.

[0064] In some embodiments of the present application, after obtaining the current positioning information of the vehicle, the method for calculating the relative position of the vehicle and the roadside event also includes: determining whether the vehicle triggers an orientation correction condition based on the current orientation of the vehicle and the road orientation data of the road section where the vehicle is located; when the orientation correction condition is triggered, correcting the current orientation of the vehicle to obtain a corrected orientation of the vehicle; calculating the relative position of the vehicle and the roadside event based on the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle includes: calculating the relative position of the vehicle and the roadside event based on the corrected orientation of the vehicle and the azimuth of the roadside event relative to the vehicle.

[0065] Taking into account different road scenarios, the vehicle may be traveling in a straight line, or it may change lanes, overtake or turn. In the case of changing lanes, overtaking or turning, the vehicle's orientation will change instantaneously. If the vehicle receives a roadside event while changing lanes or overtaking, directly calculating the relative position may be inaccurate due to the change in the vehicle's orientation.

[0066] Based on this, after receiving a roadside event, the embodiment of the present application can further determine whether the vehicle may be in the above-mentioned special situation such as changing lanes or overtaking according to the current direction of the vehicle and the road direction data of the road section where the vehicle is located. If the above situation occurs, it means that the current direction of the vehicle has an instantaneous change, and the direction correction condition is triggered at this time. It is necessary to adopt a certain correction strategy to correct the current direction of the vehicle, so as to compensate for the calculation error caused by this instantaneous change in direction. Of course, if it is determined that the vehicle has not triggered the correction condition, for example, the vehicle is in a straight-line driving state, the subsequent calculation can be performed directly.

[0067] In some embodiments of the present application, the road orientation data includes a lane line direction, and determining whether the vehicle triggers an orientation correction condition based on the current orientation of the vehicle and the road orientation data of the road section where the vehicle is located includes: obtaining the lane line direction of the lane where the vehicle is located from high-precision map data; calculating the difference between the current orientation of the vehicle and the lane line direction; determining whether the vehicle triggers the orientation correction condition based on the difference between the current orientation of the vehicle and the lane line direction; and correcting the current orientation of the vehicle to obtain a corrected orientation of the vehicle when the orientation correction condition is triggered includes: smoothly correcting the current orientation of the vehicle based on the difference between the current orientation of the vehicle and the lane line direction to obtain a corrected orientation of the vehicle when the orientation correction condition is triggered.

[0068] In the presence of high-precision map data, the embodiment of the present application can obtain the lane direction laneDirection from the high-precision map data as the road orientation data, and then calculate the difference between the vehicle's current orientation carAngle and the lane direction laneDirection, that is, deltaAngle = carAngle-laneDirection. If deltaAngle exceeds a preset angle difference threshold, such as 5 degrees, it is considered that the vehicle may be in a state such as lane change or turning. At this time, the vehicle's current orientation carAngle is greatly affected by lane change or turning, and the vehicle's current orientation carAngle can be smoothly corrected according to deltaAngle. The correction strategy can, for example, adopt proportional smoothing correction, that is, gradually adjust carAngle according to the size of the difference, for example, it can be expressed as follows:

[0069] if(Math.abs(deltaAngle)>threshold){

[0070] carAngle=laneDirection+alpha*deltaAngle;

[0071] }

[0072] Among them, alpha is an adjustment coefficient used to control the speed of correction, and threshold is the angle difference threshold for determining whether to correct. The size can be flexibly set according to needs.

[0073] In some embodiments of the present application, determining whether the vehicle triggers a direction correction condition based on the current direction of the vehicle and the road direction data of the road section where the vehicle is located includes: in the absence of high-precision map data, obtaining the road direction of the road where the vehicle is located through a basic map; calculating the difference between the current direction of the vehicle and the road direction; determining whether the vehicle triggers the direction correction condition based on the difference between the current direction of the vehicle and the road direction; when the direction correction condition is triggered, correcting the current direction of the vehicle to obtain the corrected direction of the vehicle includes: calculating the average value of the vehicle direction within a preset time window; based on the average value of the vehicle direction within the preset time window, using a directional angle filter to perform filtering correction to obtain the corrected direction of the vehicle.

[0074] If the vehicle in the actual scene does not have high-precision map data, such as general social vehicles, the orientation data of the current road of the vehicle can also be obtained from the ordinary standard map, and then the difference between the current orientation of the vehicle and the road orientation is calculated in the manner of the aforementioned embodiment. If the difference between the current orientation of the vehicle and the road orientation is greater than the angle difference threshold, the correction condition is triggered. The average orientation value within the time window is introduced, and the filtering correction is performed using the direction angle filter.

[0075] The above embodiment takes into account the instantaneous nature of the vehicle's current orientation when calculating the relative position, and adaptively adopts different correction strategies to make appropriate corrections, thereby improving the accuracy of the relative position calculation. Through the setting of the above correction strategy, the embodiment of the present application can be applied to a variety of complex road environments, not only limited to straight roads, but also can accurately calculate the relative position in scenes such as curved roads and intersections.

[0076] In some embodiments of the present application, calculating the relative position of the vehicle and the roadside event based on the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle includes: determining the quadrant position of the roadside event relative to the vehicle based on the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event; adjusting the azimuth of the roadside event relative to the vehicle based on the quadrant position of the roadside event relative to the vehicle to obtain an adjusted azimuth; calculating the relative position of the vehicle and the roadside event based on the current orientation of the vehicle and the adjusted azimuth.

[0077] When calculating the relative position of the vehicle and the roadside event based on the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle, the quadrant position of the roadside event relative to the vehicle can be determined based on the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event. Then, the calculated azimuth is adjusted based on the quadrant position to be between 0 and 360 degrees so as to be consistent with the value range and representation of the vehicle's current orientation carAngle, thereby ensuring the accuracy of the relative position calculation.

[0078] To facilitate understanding of the embodiments of the present application, a pseudo code example for determining the quadrant position of a roadside event relative to a vehicle in an embodiment of the present application is provided below:

[0079] / / Calculate the azimuth of the roadside event relative to the vehicle position and convert it into an angle value

[0080] double_angle=Math.atan2(Math.abs(carLon-poiLon),Math.abs(carLat-poiLat))*(180 / Math.PI);

[0081] if(poiLon>carLon){

[0082] / / The event is in the first quadrant of the vehicle

[0083] if(poiLat>carLat){

[0084] poiAngle = (int)_angle;

[0085] }

[0086] / / The event is in the second quadrant of the vehicle

[0087] else{

[0088] poiAngle = 180 - (int)_angle;

[0089] }

[0090]

[0091] Among them, carLon represents the longitude of the vehicle, carLat represents the latitude of the vehicle, poiLon represents the longitude of the roadside event, poiLat represents the latitude of the roadside event, and carAngle represents the current direction of the vehicle, in degrees (0-360 degrees). For example, 0 degrees represents the vehicle facing north, 90 degrees represents the vehicle facing east, 180 degrees represents the vehicle facing south, and 270 degrees represents the vehicle facing west. The vehicle's driving direction can be determined through this parameter.

[0092] By comparing the absolute values ​​of poiLon and carLon, poiLat and carLat, the quadrant position of the roadside event relative to the vehicle (divided into quadrant 1, quadrant 2, quadrant 3, and quadrant 4) can be determined. If poiLon>carLon and poiLat>carLat, the roadside event is located in the first quadrant relative to the vehicle.

[0093] In some embodiments of the present application, calculating the relative position of the vehicle and the roadside event based on the current orientation of the vehicle and the adjusted azimuth includes: calculating the relative angle of the roadside event relative to the vehicle based on the current orientation of the vehicle and the adjusted azimuth; adjusting the relative angle of the roadside event relative to the vehicle to a preset angle range to obtain an adjusted relative angle; and determining the relative position of the vehicle and the roadside event based on the adjusted relative angle.

[0094] The relative angle relativeAngle of the roadside event relative to the vehicle's driving direction is calculated by subtracting the current orientation carAngle of the vehicle from the adjusted azimuth angle obtained in the above embodiment. According to the absolute value of the relative angle, it can be determined that the event is located at several special angles of the vehicle, such as directly in front, directly behind, relatively in front, and relatively behind. For example, if the absolute value is between 0 degrees and 90 degrees, it is considered that the roadside event is roughly in front of the vehicle, and if it is between 90 degrees and 270 degrees, the roadside event is roughly to the side and rear of the vehicle.

[0095] In order to ensure the accuracy of relative position calculation, the value of the relative angle relativeAngle is adjusted to a standardized range between -180 degrees and 180 degrees, so as to avoid discontinuity or out-of-range situations in angle calculation. The relative position of the vehicle and the roadside event is further clarified according to the adjusted relative angle, that is, it is determined whether the roadside event is located on the left side or the right side of the vehicle. Here, a certain threshold range can be considered in the judgment. For example, if the adjusted relative angle relativeAngle is less than the first angle threshold such as -5, it is considered that the roadside event is located on the left side of the vehicle. If relativeAngle is greater than the second angle threshold, the first angle threshold such as 5.

[0096] Finally, by judging the sign and size of the relative angle relativeAngle, determine whether the event is located in front of, behind, left front, right front, left rear or right rear of the vehicle, and return the corresponding relative position enumeration value RelativePosition.

[0097] To facilitate understanding of the above embodiment, a pseudo code example for calculating the relative position of a roadside event and a vehicle in an embodiment of the present application is provided as follows:

[0098] / / Calculate the relative angle, that is, the event azimuth minus the vehicle's orientation angle

[0099] int relativeAngle=poiAngle-carAngle;

[0100] int absRelativeAngle=Math.abs(relativeAngle);

[0101] / / Determine if the event is front, back, or side

[0102] int frontBack;

[0103] if(absRelativeAngle==180){

[0104] frontBack=1; / / "directly behind"

[0105] }else if(absRelativeAngle>90&&absRelativeAngle<270){

[0106] frontBack=2; / / "back"

[0107] }else if(absRelativeAngle==0){

[0108] frontBack=3; / / "directly in front"

[0109] }else{

[0110]

[0111]

[0112]

[0113]

[0114] In some embodiments of the present application, after obtaining the current positioning information of the vehicle, the method for calculating the relative position of the vehicle and the roadside event also includes: comparing the current longitude and latitude of the vehicle with the longitude and latitude of the roadside event; if the deviation between the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event is less than a preset deviation threshold, then outputting the relative position of the vehicle and the roadside event as the current position of the vehicle.

[0115] As a special case, after obtaining the longitude and latitude of the roadside event and the current longitude and latitude of the vehicle, the embodiment of the present application can first compare the longitude and latitude of the roadside event with the current longitude and latitude of the vehicle to determine whether the vehicle is currently near the location of the roadside event. If the deviation between the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event is very small, it means that the vehicle is currently at or near the location of the roadside event. In this case, the relative position of the vehicle and the roadside event is directly output as the result of the current position of the vehicle.

[0116] To facilitate understanding of the above embodiment, a pseudo code example for determining whether the position of a vehicle and a roadside event are the same in an embodiment of the present application is provided as follows:

[0117]

[0118] int poiAngle=0.

[0119] Where t1 and t2 are custom deviation thresholds.

[0120] In summary, the relative position calculation method of a vehicle and a roadside event of the present application has achieved at least the following technical effects:

[0121] 1) High-precision relative position calculation: This application not only considers the distance between the roadside event and the vehicle, but also the relative direction, which can more accurately determine the impact of the roadside event on the vehicle;

[0122] 2) Secondary verification and filtering mechanism: By performing secondary verification and filtering on the received events, only those events that have an impact on vehicle driving safety and path planning are retained, thereby improving the accuracy of the application;

[0123] 3) Adaptive correction strategy: To solve the problem that the current orientation of the vehicle is instantaneous when calculating the relative position, an adaptive correction strategy is provided to make appropriate corrections and improve accuracy;

[0124] 4) Wide applicability: This application is applicable to a variety of complex road environments, including urban roads, highways, tunnels, etc., and is not limited to straight roads, but can also accurately calculate relative positions in scenes such as curved roads and intersections.

[0125] The present application also provides a device 200 for calculating the relative position of a vehicle and a roadside event. Figure 2 As shown, a schematic diagram of the structure of a relative position calculation device for a vehicle and a roadside event in an embodiment of the present application is provided. The relative position calculation device 200 for a vehicle and a roadside event includes: an acquisition unit 210, a first calculation unit 220, and a second calculation unit 230, wherein:

[0126] The acquisition unit 210 is used to acquire the current positioning information of the vehicle when receiving the positioning information of the roadside event, wherein the positioning information of the roadside event includes the longitude and latitude of the roadside event, and the current positioning information of the vehicle includes the current longitude and latitude and current direction of the vehicle;

[0127] A first calculation unit 220, configured to calculate an azimuth of the roadside event relative to the vehicle according to the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event;

[0128] The second calculation unit 230 is used to calculate the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle.

[0129] In some embodiments of the present application, the relative position calculation device 200 of the vehicle and the roadside event also includes: a determination unit, which is used to determine whether the vehicle triggers an orientation correction condition based on the current orientation of the vehicle and the road orientation data of the road section where the vehicle is located after acquiring the current positioning information of the vehicle; a correction unit, which is used to correct the current orientation of the vehicle when the orientation correction condition is triggered to obtain a corrected orientation of the vehicle; the first calculation unit 220 is specifically used to calculate the relative position of the vehicle and the roadside event based on the corrected orientation of the vehicle and the azimuth of the roadside event relative to the vehicle.

[0130] In some embodiments of the present application, the road orientation data includes a lane line direction, and the determination unit is specifically used to: obtain the lane line direction of the lane where the vehicle is located from high-precision map data; calculate the difference between the current orientation of the vehicle and the lane line direction; determine whether the vehicle triggers an orientation correction condition based on the difference between the current orientation of the vehicle and the lane line direction; the correction unit is specifically used to: when the orientation correction condition is triggered, smoothly correct the current orientation of the vehicle based on the difference between the current orientation of the vehicle and the lane line direction to obtain the corrected orientation of the vehicle.

[0131] In some embodiments of the present application, the determination unit is specifically used to: in the absence of high-precision map data, obtain the road orientation of the road where the vehicle is located through a basic map; calculate the difference between the current orientation of the vehicle and the road orientation; determine whether the vehicle triggers an orientation correction condition based on the difference between the current orientation of the vehicle and the road orientation; the correction unit is specifically used to: calculate the average vehicle orientation of the vehicle within a preset time window; based on the average vehicle orientation within the preset time window, use a directional angle filter to perform filtering correction to obtain the corrected orientation of the vehicle.

[0132] In some embodiments of the present application, the second calculation unit 230 is specifically used to: determine the quadrant position of the roadside event relative to the vehicle based on the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event; adjust the azimuth of the roadside event relative to the vehicle based on the quadrant position of the roadside event relative to the vehicle to obtain an adjusted azimuth; calculate the relative position of the vehicle and the roadside event based on the current orientation of the vehicle and the adjusted azimuth.

[0133] In some embodiments of the present application, the second calculation unit 230 is specifically used to: calculate the relative angle of the roadside event relative to the vehicle based on the current orientation of the vehicle and the adjusted azimuth; adjust the relative angle of the roadside event relative to the vehicle to a preset angle range to obtain the adjusted relative angle; determine the relative position of the vehicle and the roadside event based on the adjusted relative angle.

[0134] In some embodiments of the present application, the relative position calculation device 200 of the vehicle and the roadside event also includes: a comparison unit, which is used to compare the current longitude and latitude of the vehicle with the longitude and latitude of the roadside event after acquiring the current positioning information of the vehicle; and an output unit, which is used to output the relative position of the vehicle and the roadside event as the current position of the vehicle if the deviation between the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event is less than a preset deviation threshold.

[0135] It can be understood that the above-mentioned device for calculating the relative position of a vehicle and a roadside event can implement the various steps of the method for calculating the relative position of a vehicle and a roadside event provided in the aforementioned embodiment, and the relevant explanations on the method for calculating the relative position of a vehicle and a roadside event are applicable to the device for calculating the relative position of a vehicle and a roadside event, which will not be repeated here.

[0136] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 3At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0137] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0138] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0139] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a relative position calculation device for the vehicle and the roadside event at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:

[0140] When receiving the positioning information of the roadside event, obtaining the current positioning information of the vehicle, wherein the positioning information of the roadside event includes the longitude and latitude of the roadside event, and the current positioning information of the vehicle includes the current longitude and latitude and current direction of the vehicle;

[0141] Calculating the azimuth of the roadside event relative to the vehicle based on the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event;

[0142] The relative position of the vehicle and the roadside event is calculated according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle.

[0143] The above application Figure 1The method performed by the relative position calculation device of the vehicle and the roadside event disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0144] The present application also provides a computer program product, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 1 The method executed by the relative position calculation device of the vehicle and the roadside event in the embodiment shown is specifically used to execute:

[0145] When receiving the positioning information of the roadside event, obtaining the current positioning information of the vehicle, wherein the positioning information of the roadside event includes the longitude and latitude of the roadside event, and the current positioning information of the vehicle includes the current longitude and latitude and current direction of the vehicle;

[0146] Calculating the azimuth of the roadside event relative to the vehicle based on the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event;

[0147] The relative position of the vehicle and the roadside event is calculated according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle.

[0148] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0149] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0150] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0152] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0153] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0154] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0155] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0156] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0157] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for calculating the relative position of a vehicle and a roadside event, wherein: The method for calculating the relative position of the vehicle and the roadside event includes: When receiving the positioning information of the roadside event, obtaining the current positioning information of the vehicle, wherein the positioning information of the roadside event includes the longitude and latitude of the roadside event, and the current positioning information of the vehicle includes the current longitude and latitude and current direction of the vehicle; Calculating the azimuth of the roadside event relative to the vehicle based on the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event; The relative position of the vehicle and the roadside event is calculated according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle.

2. The method for calculating the relative position of a vehicle and a roadside event according to claim 1, wherein: After obtaining the current positioning information of the vehicle, the relative position calculation method between the vehicle and the roadside event further includes: Determining whether the vehicle triggers a direction correction condition according to the current direction of the vehicle and the road direction data of the road section where the vehicle is located; When a direction correction condition is triggered, the current direction of the vehicle is corrected to obtain a corrected direction of the vehicle; The calculating the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle comprises: The relative position of the vehicle and the roadside event is calculated according to the corrected orientation of the vehicle and the azimuth of the roadside event relative to the vehicle.

3. The method for calculating the relative position between a vehicle and a roadside event according to claim 2, wherein: The road orientation data includes a lane line direction, and determining whether the vehicle triggers an orientation correction condition according to the current orientation of the vehicle and the road orientation data of the road section where the vehicle is located includes: Obtaining the lane line direction of the lane where the vehicle is located from the high-precision map data; Calculating the difference between the current orientation of the vehicle and the direction of the lane line; Determining whether the vehicle triggers a direction correction condition according to a difference between the current direction of the vehicle and the direction of the lane line; When the orientation correction condition is triggered, correcting the current orientation of the vehicle to obtain a corrected orientation of the vehicle includes: When a direction correction condition is triggered, the current direction of the vehicle is smoothly corrected according to the difference between the current direction of the vehicle and the direction of the lane line to obtain a corrected direction of the vehicle.

4. The method for calculating the relative position of a vehicle and a roadside event according to claim 2, wherein: The determining whether the vehicle triggers the orientation correction condition according to the current orientation of the vehicle and the road orientation data of the road section where the vehicle is located comprises: In the absence of high-precision map data, obtaining the road direction of the road where the vehicle is located through the basic map; Calculating a difference between a current orientation of the vehicle and an orientation of the road; determining whether the vehicle triggers a heading correction condition according to a difference between the current heading of the vehicle and the road heading; When the orientation correction condition is triggered, correcting the current orientation of the vehicle to obtain a corrected orientation of the vehicle includes: Calculating an average value of the vehicle orientation of the vehicle within a preset time window; According to the average value of the vehicle orientation in the preset time window, a direction angle filter is used to perform filtering correction to obtain a corrected orientation of the vehicle.

5. The method for calculating the relative position between a vehicle and a roadside event according to claim 1, wherein: The calculating the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the azimuth of the roadside event relative to the vehicle comprises: Determining a quadrant position of the roadside event relative to the vehicle based on the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event; Adjusting the azimuth angle of the roadside event relative to the vehicle according to the quadrant position of the roadside event relative to the vehicle to obtain an adjusted azimuth angle; The relative position of the vehicle and the roadside event is calculated according to the current orientation of the vehicle and the adjusted azimuth.

6. The method for calculating the relative position of a vehicle and a roadside event according to claim 5, wherein: Calculating the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the adjusted azimuth includes: Calculating a relative angle of the roadside event relative to the vehicle based on the current orientation of the vehicle and the adjusted azimuth; Adjusting the relative angle of the roadside event with respect to the vehicle to a preset angle range to obtain an adjusted relative angle; The relative position of the vehicle and the roadside event is determined according to the adjusted relative angle.

7. The method for calculating the relative position between a vehicle and a roadside event according to claim 1, wherein: After obtaining the current positioning information of the vehicle, the relative position calculation method between the vehicle and the roadside event further includes: comparing the current longitude and latitude of the vehicle with the longitude and latitude of the roadside event; If the deviation between the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event is less than a preset deviation threshold, the relative position of the vehicle and the roadside event is output as the current position of the vehicle.

8. A device for calculating the relative position of a vehicle and a roadside event, wherein: The relative position calculation device of the vehicle and the roadside event comprises: an acquisition unit, configured to acquire current location information of the vehicle upon receiving location information of a roadside event, wherein the location information of the roadside event includes the longitude and latitude of the roadside event, and the current location information of the vehicle includes the current longitude and latitude and current direction of the vehicle; A first calculation unit, configured to calculate an azimuth of the roadside event relative to the vehicle according to the current longitude and latitude of the vehicle and the longitude and latitude of the roadside event; The second calculation unit is used to calculate the relative position of the vehicle and the roadside event according to the current orientation of the vehicle and the azimuth angle of the roadside event relative to the vehicle.

9. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes the method for calculating the relative position of a vehicle and a roadside event according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the method for calculating the relative position of a vehicle and a roadside event according to any one of claims 1 to 7 is implemented.