WO2023216651A1 - Lane positioning method, computer device, computer-readable storage medium and vehicle - Google Patents

Lane positioning method, computer device, computer-readable storage medium and vehicle Download PDF

Info

Publication number
WO2023216651A1
WO2023216651A1 PCT/CN2023/073864 CN2023073864W WO2023216651A1 WO 2023216651 A1 WO2023216651 A1 WO 2023216651A1 CN 2023073864 W CN2023073864 W CN 2023073864W WO 2023216651 A1 WO2023216651 A1 WO 2023216651A1
Authority
WO
WIPO (PCT)
Prior art keywords
lane
vehicle
road
coordinate system
lanes
Prior art date
Application number
PCT/CN2023/073864
Other languages
French (fr)
Chinese (zh)
Inventor
余红松
郝立良
王健
杨东升
易世春
袁弘渊
Original Assignee
安徽蔚来智驾科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202210501755.4A external-priority patent/CN114820769A/en
Priority claimed from CN202210507812.XA external-priority patent/CN114964287A/en
Application filed by 安徽蔚来智驾科技有限公司 filed Critical 安徽蔚来智驾科技有限公司
Publication of WO2023216651A1 publication Critical patent/WO2023216651A1/en

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance

Definitions

  • the present invention has priority in the application number 202210507812. "Apparatus, Storage Media and Vehicles", the entire contents of which are incorporated herein by reference.
  • the present invention relates to the field of positioning technology, and specifically provides a lane positioning method, computer equipment, computer-readable storage media and vehicles.
  • Vehicles are usually equipped with on-board maps, which are used for positioning and navigation during driving.
  • on-board maps which are used for positioning and navigation during driving.
  • the present invention is proposed to provide a lane positioning method, a computer device, and a computer readable method that solve or at least partially solve the technical problem of how to accurately locate the current driving lane of a vehicle in a road network with road layers of different heights.
  • Storage media and vehicles are provided.
  • the present invention provides a lane positioning method, which method includes: locating a vehicle through a two-dimensional map and determining the vehicle position; obtaining the lanes around the vehicle position and the connectivity between the lanes; Determine the lane ID of the lane where the vehicle is currently located based on the lanes surrounding the vehicle position and the connectivity between the lanes.
  • the step of "determining the lane ID of the lane where the vehicle is currently located based on the lanes surrounding the vehicle position and the connectivity relationship between the lanes" specifically includes: determining the lane ID of the vehicle based on the last determined Whether the last lane ID can be determined; if it can be determined, determine the lane ID of the lane where the vehicle is currently located based on the map range of the lane corresponding to the last lane ID on the two-dimensional map and the current vehicle position; If it cannot be determined, the lane ID of the lane where the vehicle is currently located is determined based on the map range of the lane located within the preset range centered on the current vehicle position and falling on the two-dimensional map and the current vehicle position.
  • the step of "determining the lane ID of the lane where the vehicle is currently located based on the map range of the lane corresponding to the last lane ID on the two-dimensional map and the current vehicle position" specifically includes: Determine whether the current vehicle position falls within the map range corresponding to the last lane ID and the two-dimensional map only contains one lane within the map range; if so, use the last lane ID as the vehicle's current The lane ID of the lane where it is located; if not, obtain other lanes that belong to the same road layer as the lane corresponding to the last lane ID and have a connectivity relationship with the lane corresponding to the last lane ID, and locate according to the other lanes. Based on the map range and the current vehicle position on the two-dimensional map, determine the lane ID of the lane where the vehicle is currently located.
  • the step of "determining the lane ID of the lane where the vehicle is currently located based on the map range of the other lanes falling on the two-dimensional map and the current vehicle position" specifically includes: determining whether the current vehicle position is It only falls within the map range corresponding to one of the other lanes; if so, the lane ID of the other lane is used as the lane ID of the lane where the vehicle is currently located; if not, the lane ID of the other lane is used as the lane ID centered on the current vehicle position.
  • the lanes within the preset range fall within the map range on the two-dimensional map and the current vehicle position, and the lane ID of the lane where the vehicle is currently located is determined.
  • the lane ID of the lane where the vehicle is currently located is determined based on the map range of the lane located within the preset range centered on the current vehicle position and falling on the two-dimensional map and the current vehicle position.
  • the steps specifically include: if the current vehicle position only falls within the map range corresponding to one lane within the preset range, then use the lane ID of the one lane within the preset range as the lane of the lane where the vehicle is currently located.
  • the ID corresponds to a lane with connected lanes and/or the pose of the current vehicle, and the lane ID of the lane where the vehicle is currently located is filtered out from the lane IDs of the candidate lanes.
  • the steps of "lane ID of the current lane” specifically include: determining whether the candidate lane is a virtual lane; when it is determined that it is a virtual lane, obtaining a virtual lane that matches the pose of the current vehicle, if the number of matching virtual lanes is 1, then the lane ID of the matched virtual lane is used as the lane ID of the lane where the vehicle is currently located; if the number of matched virtual lanes is not 1, initialization processing is performed based on the current vehicle position, and the starting lane of the vehicle is redetermined.
  • the lane ID of the starting lane is used as the lane ID of the lane where the vehicle is currently located; when it is determined that it is not a virtual lane, obtain the lane that has a connected relationship with the lane corresponding to the last lane ID from the candidate lane; if If the number of lanes with a connected relationship is 1, then the lane ID of the lane with a connected relationship is used as the lane ID of the lane where the vehicle is currently located; if the number of lanes with a connected relationship is not 1, then the lane ID of the lane with a connected relationship is used as the lane ID of the lane where the vehicle is currently located; if the number of lanes with a connected relationship is not 1, then the lane ID of the lane with a connected relationship is used The position is initialized, the starting lane of the vehicle is re-determined, and the lane ID of the starting lane is used as the lane ID of the lane where the vehicle is currently located.
  • the method further includes: based on the current vehicle position and Carry out initialization processing through the following steps to determine the starting lane of the vehicle: obtain the lane located within the preset range centered on the current vehicle position; determine whether the current vehicle position falls within the map range corresponding to a lane within the preset range within; when it falls within the map range corresponding to only one lane within the preset range, obtain the distance between the current vehicle position and the boundary of the lane within the preset range; if the distance is greater than is equal to the preset distance threshold, then the lane within the preset range is used as the starting lane of the vehicle; if the distance is less than the preset distance threshold, lane positioning abnormal prompt information is output; when there is no When a lane within the preset range is within the map range corresponding to the lane, lane positioning abnormality prompt information is output.
  • the step of "locating the vehicle through a two-dimensional map and determining the vehicle position" specifically includes: positioning the current driving road of the vehicle through a two-dimensional map and determining where the road point in the current driving road is.
  • Two-dimensional coordinates of the two-dimensional rectangular coordinate system obtain the relative height of the road point relative to the vehicle, and determine the origin, x-axis, and y-axis of the world coordinate system based on the origin, x-axis, and y-axis of the two-dimensional rectangular coordinate system , use the relative height as the z-axis coordinate of the road point in the world coordinate system, and back-project the road point from the world coordinate system to the image coordinate system according to the two-dimensional coordinates of the road point and the relative height. ;
  • Determine the road elements located around the vehicle obtain the back-projection position of the road point at the location of the road element to the image coordinate system and obtain the position of the road element determined by the image acquisition device of the vehicle.
  • the road point is at the collection position of the image coordinate system; the back-projection position of the road point at the location of the road element is position matched with the collection position, and the position of the vehicle in the world coordinate system is determined based on the position matching result.
  • the step of "obtaining the relative height of the road point relative to the vehicle” specifically includes: obtaining the plane vector of the plane where the vehicle is located in the vehicle body coordinate system and obtaining the plane vector according to the plane vector.
  • the unit normal vector of the plane; according to the two-dimensional coordinates of the road point and by solving the following equations, it is obtained that the origin, x-axis and y-axis of the two-dimensional rectangular coordinate system are the origin, x-axis and The coordinate zh of the z-axis in the world coordinate system of the y-axis: (xh-x1) ⁇ nx+(yh-y1) ⁇ ny+(zh-z1) ⁇ nz 0, where x1, y1 and z1 represent the vehicle body coordinates
  • the coordinates of the x-axis, y-axis and z-axis in the system, nx, ny and nz represent the coordinates of the unit normal vector on the x-axis, y-axis and z-axis in the vehicle body coordinate system, xh and yh represent the coordinates of the road point
  • the method further includes displaying road connections on the two-dimensional map of the road currently traveled by the vehicle and the roads it has traveled before.
  • the step of "matching the back-projection position of the road point at the location of the road element with the collection position, and determining the position of the vehicle in the world coordinate system based on the result of the position matching" includes: position matching the back-projected position of the road point at the position of the road element with the acquisition position to obtain pose parameters for conversion between the device coordinate system of the image acquisition device and the world coordinate system; and obtaining the location of the vehicle.
  • the road point at the location is back-projected to the back-projection position of the image coordinate system; according to the back-projection position of the road point at the location of the vehicle and the pose parameter, determine where the vehicle is sitting in the world.
  • the position of the standard system is used to obtain pose parameters for conversion between the device coordinate system of the image acquisition device and the world coordinate system.
  • the back-projection position of the road point at the position of the road element is matched with the acquisition position, and the device coordinate system of the image acquisition device and the world coordinate system are converted.
  • d represents the distance calculation function from the back-projection position f (A, O) to the line segment cd, and loss represents the distance calculation function.
  • d calculated distance; with the goal of making the distance loss less than the preset distance threshold, the Levenberg-Marquardt algorithm is used to perform the pose parameter O in the distance error equation. Iteratively optimize, and obtain the pose parameter O when the distance loss is less than the preset distance threshold, and use the pose parameter O as the final position for conversion between the device coordinate system of the image acquisition device and the world coordinate system. posture parameters.
  • the method further includes: using at least two image acquisition devices to collect the road point at the position of the road element. Image collection is performed to obtain a road point image of the road point at the location of the road element; and based on the road point image, the collection position of the road point at the location of the road element in the image coordinate system is determined.
  • a computer device in a second aspect, includes a processor and a storage device.
  • the storage device is adapted to store a plurality of program codes.
  • the program codes are adapted to be loaded and run by the processor to execute the above.
  • a computer-readable storage medium which stores a plurality of program codes, and the program codes are suitable for being loaded and run by a processor to perform the technical solution of the above lane positioning method.
  • a vehicle which vehicle includes the computer device described in the above computer device technical solution.
  • the vehicle can be positioned first through a two-dimensional map to determine the vehicle position (the vehicle position is two-dimensional information, for example, the vehicle position can include the coordinates of the x-axis and y-axis of the vehicle in the world coordinate system) , and then obtain the lanes around the vehicle position and the connectivity between the lanes (if you drive from one lane to another normally, the two lanes have a connectivity, otherwise the two lanes do not have a connectivity), according to the obtained
  • the arriving lane and the connection relationship determine the lane ID of the lane where the vehicle is currently located.
  • the lane ID of the last time can be determined in turn.
  • the map range where the corresponding lane falls on the two-dimensional map the map range where other lanes that belong to the same road layer as the lane corresponding to the last lane ID and have a connectivity relationship with the lane corresponding to the last lane ID fall on the two-dimensional map, and
  • the lanes located within the preset range centered on the current vehicle position fall within the map range on the two-dimensional map, and are combined with the current vehicle position to determine the lane ID of the lane where the vehicle is currently located.
  • initialization processing can be performed based on the vehicle position to determine the starting lane of the vehicle, and the lane ID of the starting lane is used as the first lane ID of the lane where the vehicle is located.
  • initialization processing can also be performed based on the vehicle location. , determine the starting lane of the vehicle, and use the lane ID of the starting lane as the lane ID of the lane where the vehicle is located.
  • the current driving road of the vehicle can be positioned through a two-dimensional map, and the two-dimensional coordinates of the road points on the current driving road in the two-dimensional rectangular coordinate system (including the two-dimensional rectangular coordinate system of the vehicle) can be determined.
  • the road points at the positions of the road elements around the vehicle can be back-projected to the back-projected positions of the image coordinate system and the road elements determined by the image acquisition device of the vehicle
  • the road point at the location is position matched at the acquisition position of the image coordinate system, and then the position of the vehicle in the world coordinate system is determined based on the position matching results.
  • the vehicle's position in the world coordinate system can still be obtained through the two-dimensional map, and it can also be adjusted according to the density of road points.
  • the positioning accuracy of the vehicle (the higher the density, the higher the positioning accuracy, the lower the density, the lower the positioning accuracy), achieving centimeter-level positioning of the vehicle, and no positioning drift will occur after long-term positioning.
  • the road connections that the vehicle is currently traveling on and the roads it has traveled before can be displayed on a two-dimensional map. After the roads are connected, it is possible to exclude road pairs in other road layers using 2D The impact of vehicle positioning display on the map can more clearly show which road and where the vehicle is located.
  • Figure 1 is a schematic flowchart of the main steps of a lane positioning method according to an embodiment of the present invention
  • Figure 2 is a schematic diagram of a road with road layers at different heights according to an embodiment of the present invention
  • Figure 3 is a schematic flowchart of the main steps of a vehicle positioning method according to an embodiment of the present invention.
  • Figure 4 is a schematic diagram of the plane vector a and the unit normal vector n of the plane where the vehicle is located in the vehicle body coordinate system according to an embodiment of the present invention
  • Figure 5 is a schematic diagram of a line segment formed by the back-projection position a of a road point and the collection positions c and d of the two road points closest to the back-projection position a as endpoints according to an embodiment of the present invention
  • Figure 6 is a schematic diagram of a road network including multiple different road layers according to an embodiment of the present invention.
  • Figure 7 is a schematic diagram of a virtual lane according to an embodiment of the present invention.
  • Figure 8 is a schematic diagram 2 of a virtual lane according to an embodiment of the present invention.
  • Figure 9 is a schematic diagram three of a virtual lane according to an embodiment of the present invention.
  • Figure 10 is a schematic flowchart of the main steps of a starting lane determination method according to an embodiment of the present invention.
  • processor may include hardware, software, or a combination of both.
  • the processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor.
  • the processor has data and/or signal processing functions.
  • the processor can be implemented in software, hardware, or a combination of both.
  • Computer-readable storage media includes any suitable medium that can store program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, etc.
  • a and/or B means all possible combinations of A and B, such as just A, just B, or A and B.
  • At least one A or B or “at least one of A and B” have a similar meaning to “A and/or B” and may include just A, just B or A and B.
  • a two-dimensional map is a map represented on a plane in a two-dimensional form.
  • the two-dimensional coordinates of the target object in the two-dimensional rectangular coordinate system can be obtained, that is, the target The coordinates of the object on the x-axis and y-axis in the two-dimensional Cartesian coordinate system.
  • the world coordinate system refers to a three-dimensional rectangular coordinate system with a point in three-dimensional space as the origin.
  • the image coordinate system is a two-dimensional coordinate system with the center of the image plane formed as the origin when the image acquisition device performs image acquisition. Cartesian coordinate system.
  • the device coordinate system of the image acquisition device is a three-dimensional rectangular coordinate system established with the focus center of the image acquisition device as the origin and the optical axis as the z-axis. It should be noted that the device coordinate system of the image acquisition device has the same meaning as the camera coordinate system in the field of computer vision technology, and the device coordinate system will not be described again here.
  • the pose parameters (intrinsic parameters) converted by the image coordinate system and the device coordinate system can project the points in the image coordinate system to the device coordinate system, and can also back-project the points in the device coordinate system to the image coordinate system.
  • the pose parameters (external parameters) converted by the device coordinate system and the world coordinate system can project the points in the device coordinate system to the world coordinate system, and can also back-project the points in the world coordinate system to the device coordinate system. Further, If you use the above internal and external parameters at the same time, you can back-project the points in the world coordinate system to the image coordinate system.
  • the above-mentioned internal parameters and external parameters have the same meaning as the camera internal parameters and camera external parameters in the field of computer vision technology. Both include rotation matrices and translation vectors, which will not be described again here.
  • the vehicle body coordinate system refers to a three-dimensional coordinate system. Its origin is at the point where the center of mass of the carrier is fixedly connected to the carrier.
  • the x-axis points to the right along the axial direction of the carrier, the y-axis points forward, and the z-axis, x-axis, and y-axis satisfy the right-hand rule and point toward the sky.
  • the vehicle body coordinate system can also be called the "right-front-up (R-F-U)" coordinate system.
  • Figure 1 is a schematic flowchart of the main steps of a lane positioning method according to an embodiment of the present invention.
  • the lane positioning method in the embodiment of the present invention mainly includes the following steps S101 to S103.
  • Step S101 Position the vehicle through the two-dimensional map and determine the initial vehicle position.
  • a two-dimensional map is a map represented on a plane in a two-dimensional form.
  • the two-dimensional coordinates of the vehicle in the two-dimensional rectangular coordinate system corresponding to the two-dimensional map can be obtained.
  • the two-dimensional coordinates Including the vehicle's x-axis and y-axis coordinates in the two-dimensional Cartesian coordinate system.
  • Step S102 Obtain the lanes around the vehicle position and the connectivity between lanes.
  • the position of each lane in the road network and the connectivity relationship between different lanes can be determined in advance. After the vehicle position is determined, the lanes surrounding it can be queried based on the vehicle position, and then the number of lanes among these lanes can be queried. connectivity between. In addition, each lane has its own unique lane ID to easily distinguish different lanes.
  • Step S103 Determine the lane ID of the lane where the vehicle is currently located based on the lanes around the vehicle position and the connectivity between lanes.
  • the embodiment of the present invention obtains the lane with a connected relationship based on the connected relationship between the lanes. According to These connected lanes determine which lane the vehicle is driving on, and then obtain the lane ID of the lane where the vehicle is currently located. As shown in Figure 2, the vehicle is driving on the lane of this layer of road, and there is an upper layer of road above this layer of road. On the two-dimensional map, the current layer of road and the upper layer of road will cross and display at a certain position in front of the vehicle.
  • steps S101 to S103 above Even if the vehicle is driving in a road network with road layers of different heights, it can accurately determine where the vehicle is driving through the two-dimensional map and based on the connectivity between lanes. On a driveway.
  • step S101 will be further explained.
  • the vehicle can be positioned through a two-dimensional map and according to the following steps S1011 to S1015 to determine the initial vehicle position.
  • Step S1011 Locate the current driving road of the vehicle through the two-dimensional map, and determine the two-dimensional coordinates of the road points on the current driving road in the two-dimensional rectangular coordinate system.
  • a two-dimensional map is a map represented in a two-dimensional form on a plane.
  • the two-dimensional rectangular coordinate system corresponding to the two-dimensional map of each road point on the current driving road can be obtained.
  • the two-dimensional coordinates in include the coordinates of the x-axis and y-axis of the road point in the two-dimensional Cartesian coordinate system.
  • Step S1012 Obtain the relative height of the road point relative to the vehicle.
  • the relative height refers to the relative height of the road point relative to the vehicle in the world coordinate system determined by the origin, x-axis and y-axis of the two-dimensional rectangular coordinate system in step S1011, along the z-axis direction of the world coordinate system. .
  • Step S1013 Determine the origin, x-axis, and y-axis of the world coordinate system based on the origin, x-axis, and y-axis of the two-dimensional rectangular coordinate system, and use the relative height as the coordinate of the z-axis of the road point in the world coordinate system. According to the Two-dimensional coordinates and relative heights back-project road points from the world coordinate system to the image coordinate system.
  • an image acquisition device is provided on the vehicle.
  • the device parameters of the image acquisition device include internal parameters and external parameters.
  • the internal parameters refer to the posture parameters converted from the image coordinate system and the device coordinate system.
  • the external parameters refer to the device coordinate system and the device coordinate system.
  • the pose parameters for transformation into the world coordinate system. After obtaining the two-dimensional coordinates and relative height of the road point, the internal and external parameters of the image acquisition device can be used to back-project the road point from the world coordinate system to the image coordinate system.
  • an image acquisition device whose image coordinate system is not a two-dimensional rectangular coordinate system can also be used. After image acquisition by such an image acquisition device to obtain a corresponding image, the image acquisition device itself can use the image
  • the coordinate system conversion relationship between the coordinate system and the two-dimensional rectangular coordinate system is to convert the above image into the two-dimensional rectangular coordinate system, and then execute the method described in step S1013.
  • image collection The image coordinate system of the collection device can be a three-dimensional rectangular coordinate system, etc.
  • the image acquisition device can be a three-dimensional camera, radar, etc.
  • radar includes but is not limited to millimeter-wave radar (Millimeter-wave Radar) and laser radar (Laser Radar).
  • the radar may be laser radar.
  • Step S1014 Determine the road elements located around the vehicle, obtain the back-projected position of the road point at the position of the road element to the image coordinate system, and obtain the road point at the position of the road element determined by the image acquisition device of the vehicle. The acquisition position in the image coordinate system.
  • Road elements at least include traffic signs on the road and/or other objects that can play a marking role.
  • Traffic signs at least include lane lines, stop lines, road signs (such as left turn arrows), traffic lights and traffic signs, etc.
  • other objects that can play a marking role include at least rod-shaped objects.
  • an image recognition method may be used to identify road elements and determine the location of the road elements.
  • the embodiment of the present invention does not specifically limit the identification method of road elements, as long as the road elements can be identified and the location of the road elements can be obtained by identifying images (two-dimensional maps and road images collected by the vehicle's image acquisition device).
  • identifying images two-dimensional maps and road images collected by the vehicle's image acquisition device.
  • a road element recognition model based on a neural network can be used to identify road elements in images.
  • a back-projection point corresponding to the road point will be formed in the image coordinate system.
  • the position of the back-projection point in the image coordinate system is the back-projection position of the road point.
  • the image acquisition device of the vehicle collects images of road points located at the positions of road elements around the vehicle to obtain road point images of road points located at the positions of road elements around the vehicle.
  • the road can be determined based on these road point images.
  • the road point at the location of the element is at the collection position of the image coordinate system.
  • At least two image acquisition methods can be used.
  • the device collects images of road points at the locations of road elements around the vehicle to improve the reliability of image collection and vehicle positioning.
  • images of road points located at positions of road elements around the vehicle can be collected through at least two image acquisition devices to obtain road point images of road points located at positions of road elements around the vehicle, Then, based on the road point image, the collection position of the road point located at the position of the road element around the vehicle in the image coordinate system is determined.
  • these image collecting devices Before collecting images of road points through at least two image collecting devices, these image collecting devices need to be calibrated in order to unify the device coordinate systems of these image collecting devices.
  • a conventional calibration method of multiple image acquisition devices can be used for calibration, and the embodiment of the present invention does not specifically limit this.
  • Step S1015 Perform position matching on the back-projection position of the road point at the location of the road element and the collection position, and determine the position of the vehicle in the world coordinate system based on the position matching result.
  • the internal parameters of the image acquisition device are inherent parameters of the image acquisition device, which are determined after the production and deployment of the image acquisition device is completed, while the external parameters of the image acquisition device can be adjusted. Therefore, whether the external parameters of the image acquisition device are accurate will greatly affect the conversion between the device coordinate system of the image acquisition device and the world coordinate system. accuracy.
  • the purpose of position matching the back-projected position of the road point located at the location of the road element around the vehicle and the acquisition position is to obtain accurate external parameters.
  • the image acquisition device can be used at the same time
  • the internal parameters and external parameters project the back-projection position of the road point in the image coordinate system from the image coordinate system to the world coordinate system (project the road point from the image coordinate system to the device coordinate system according to the internal parameters, and then project the road point from the device coordinate system according to the external parameters).
  • coordinate system projected to the world coordinate system project the position of the road point at the vehicle's location in the world coordinate system as the vehicle's position in the world coordinate system.
  • the back-projection position of the road point located at the position of the road element around the vehicle can be position matched with the acquisition position to obtain the position of the device coordinate system of the image acquisition device and the world coordinate system. pose parameters; and then obtain the back-projection position of the road point at the vehicle's location to the image coordinate system, and determine the vehicle's position in the world coordinate system based on the back-projection position and pose parameters of the road point at the vehicle's location.
  • the position of the vehicle in the world coordinate system can be obtained through a two-dimensional map. Therefore, even if the on-board map of the vehicle is a two-dimensional map, the global navigation satellite system cannot be used for positioning.
  • the position of the vehicle in the world coordinate system can also be obtained.
  • the density of road points is different, the distance between adjacent road points in the world coordinate system is also different, and the number of road points at the location of the vehicle is also different. The spacing and number of road points will affect the accuracy of the vehicle's position in the world coordinate system (positioning accuracy), and the higher the density, the higher the positioning accuracy, and the lower the density, the lower the positioning accuracy.
  • the positioning accuracy of the vehicle in the world coordinate system can also be adjusted by adjusting the density of road points, thereby achieving centimeter-level positioning of the vehicle when the global navigation satellite system cannot be used for positioning. Positioning drift will not occur after long-term positioning.
  • step S1012 will be further described.
  • step S1012 since the posture of the vehicle changes with the change of the driving road (for example, the plane where the driving road is located has a certain angle with the preset level, then the vehicle has a certain angle with the preset level. (the same angle), therefore, you can first establish a vehicle body coordinate system based on the vehicle (the vehicle body coordinate system is a local coordinate system relative to the world coordinate system), and use the vector formed by the road point and the origin of the vehicle body coordinate system
  • the relative height of the road point relative to the vehicle is calculated based on the principle that the normal vector of the plane where the vehicle is located in the vehicle body coordinate system is perpendicular to each other and the vector product is zero.
  • the relative height of the road point relative to the vehicle can be obtained through the following steps S10121 to S10123.
  • Step S10121 Obtain the plane vector of the plane where the vehicle is located in the vehicle body coordinate system and obtain the unit normal vector of the plane based on the plane vector.
  • the plane where the vehicle is located refers to the plane formed by the x-axis and y-axis in the vehicle body coordinate system.
  • x 1 and z 1 represent the x-axis and z-axis in the vehicle body coordinate system respectively
  • a represents the plane vector of the plane where the vehicle is located
  • n represents the unit normal vector of the plane where the vehicle is located.
  • x 2 and z 2 respectively represent the x axis and z axis in the "world coordinate system with the origin, x axis and y axis of the two-dimensional rectangular coordinate system as the origin, x axis and y axis respectively".
  • the vehicle is equipped with devices that rely on data from the vehicle body coordinate system, these devices can be used directly to obtain the plane vector of the plane where the vehicle is located.
  • the plane vector of the plane where the vehicle is located in the vehicle body coordinate system can be directly obtained through the accelerometer.
  • Step S10122 According to the two-dimensional coordinates of the road point and by solving the following equations, the z-axis of the road point in the world coordinate system with the origin, x-axis and y-axis of the two-dimensional rectangular coordinate system as the origin, x-axis and y-axis respectively Coordinates zh.
  • x1, y1 and z1 represent the coordinates of the vehicle on the x-axis, y-axis and z-axis in the vehicle body coordinate system
  • nx, ny and nz represent the unit normal vectors on the x-axis, y-axis
  • the coordinates of the z-axis, xh and yh represent the coordinates of the x-axis and y-axis in the two-dimensional coordinates of the road point.
  • (xh-x1, yh-y1, zh-z1) actually represents the vector formed by the two points of the vehicle and the road point in the vehicle body coordinate system
  • (nx, ny, nz) represents the vehicle in the vehicle body coordinate system
  • the unit normal vector of the plane, the vector (xh-x1, yh-y1, zh-z1) and the vector (nx, ny, nz) are perpendicular, so the vector product of these two vectors is equal to zero.
  • xh and yh can be obtained directly from the two-dimensional coordinates of the road point, and the value of the coordinate zh can be obtained by solving the above equation.
  • Step S10123 Determine the relative height of the road point relative to the vehicle according to the coordinate zh.
  • the relative height of the road point relative to the vehicle can be accurately obtained, which is conducive to accurately converting the road point from the world coordinate system to the image coordinate system.
  • Step S1015 will be further described below.
  • step S1015 position matching is performed on the back-projection position of the road point located at the position of the road element around the vehicle and the acquisition position to obtain the device coordinate system of the image acquisition device and the world coordinate system for conversion.
  • this pose parameter can be used as an equation parameter, and a distance error equation is established based on the back-projected position of the road point located at the position of the road element around the vehicle and the acquisition position (the equation parameters of the distance error equation include the above pose parameters ), and then use a nonlinear iterative optimization algorithm to iteratively optimize the pose parameters in the distance error equation with the goal that the distance error equation satisfies the preset convergence conditions, and obtain the optimized pose parameters as the final image acquisition device
  • the pose parameters for conversion between the device coordinate system and the world coordinate system can be used to perform position matching on the back-projected position of the road point located at the location of the road element around the vehicle and
  • Step S10151 Establish a distance error equation shown in the following formula based on the back-projection position and collection position of the road point located at the position of the road element around the vehicle:
  • f(A,O) represents the back-projection position of the current road point
  • A represents the position of the current road point in the world coordinate system
  • O represents the pose parameter for conversion between the device coordinate system and the world coordinate system.
  • cd represents the line segment formed by taking the collection positions of the two road points closest to the back-projected position of the current road point as endpoints
  • d represents the distance calculation function from the back-projected position f (A, O) to the line segment cd
  • loss represents the distance calculation The distance calculated by function d.
  • point a in Figure 5 represents the back-projection point when the road point at the location of the road element is back-projected to the image coordinate system.
  • Points c and d respectively represent the location of the road element determined through the image acquisition device.
  • the road points at are the two closest points to the back-projection point a in the image coordinate system.
  • Step S10152 With the goal of making the distance loss smaller than the preset distance threshold, use the Levenberg-Marquardt algorithm to iteratively optimize the pose parameter O in the distance error equation, and obtain the distance The pose parameter O when the loss is less than the preset distance threshold, the pose parameter O is used as the pose parameter for conversion between the device coordinate system of the final image acquisition device and the world coordinate system.
  • Levenberg-Marquardt algorithm is a conventional nonlinear least squares algorithm in the field of mathematical technology, and its algorithm principle and calculation process will not be described in detail here.
  • step S1015 The above is a further description of step S1015.
  • the vehicle positioning method may also map the vehicle on a two-dimensional map before or after each step.
  • the current driving road and the previously traveled road are displayed for road connectivity, so that the influence of roads in other road layers on the vehicle positioning display using a two-dimensional map can be eliminated, and the vehicle can be more clearly displayed on which road and which location. superior.
  • the vehicle's current driving road and the previously traveled road can be mapped on the two-dimensional map. Display road connections.
  • step S101 The above is the description of the above-mentioned step S101.
  • step S103 shown in FIG. 1 will be further described.
  • the lane ID of the lane where the vehicle is currently located may be determined through the following steps S1031 to S1033 and based on the lanes around the vehicle position and the connectivity between lanes.
  • Step S1031 Determine whether the last lane ID can be determined based on the last determined vehicle position; if the last lane ID can be determined, go to step S1032; if the last lane ID cannot be determined, go to Step S1033.
  • Step S1032 Determine the lane ID of the lane where the vehicle is currently located based on the map range where the lane corresponding to the last lane ID falls on the two-dimensional map and the current vehicle position.
  • the map range where the lane falls on the two-dimensional map refers to the map range of the lane on the two-dimensional map determined based on the actual position of the lane according to the map scale of the two-dimensional map.
  • the current vehicle position is in the map range where the lane corresponding to the last lane ID falls on the two-dimensional map, it means that the vehicle is very likely to continue driving in the lane corresponding to the last lane ID, and the lane ID of the lane where the vehicle is currently located is still the same as the last time.
  • lane ID if the current vehicle position is not located in the map range where the lane corresponding to the last lane ID falls on the two-dimensional map, it means that the vehicle has left the lane corresponding to the last lane ID. At this time, it can be obtained from other locations around the vehicle position.
  • the lane ID in the lane determines the lane the vehicle is currently in.
  • step S1032 the following steps 11 to 13 can be used, and based on the map range of the last lane ID corresponding to the lane falling on the two-dimensional map and the current vehicle position, the location of the lane where the vehicle is currently located can be determined. Lane ID.
  • Step 11 Determine whether the current vehicle position falls within the map range corresponding to the last lane ID and the two-dimensional map only contains one lane within the map range; if the current vehicle position falls within the map range corresponding to the last lane ID and If the 2D map contains only one lane within the map range, go to step 12; otherwise, go to step 13.
  • Step 12 Use the last lane ID as the lane ID of the current lane where the vehicle is located.
  • the current vehicle position is within the map range where the lane corresponding to the last lane ID falls on the two-dimensional map, it means that the vehicle is very likely to continue driving in the lane corresponding to the last lane ID. Furthermore, if the two-dimensional map contains only one lane within the map range, it means that the vehicle must continue driving in the lane corresponding to the last lane ID. Therefore, the last lane ID can be directly used as the lane ID of the current lane of the vehicle.
  • Step 13 Obtain other lanes that belong to the same road layer as the lane corresponding to the last lane ID and have a connectivity relationship with the lane corresponding to the last lane ID, and based on the map range of the other lanes falling on the two-dimensional map and the current vehicle Position, determine the lane ID of the lane the vehicle is currently in.
  • the current vehicle position is not located within the map range corresponding to the last lane ID, it may be located in the same road layer and other nearby lanes fall within the map range on the two-dimensional map. Therefore, these other lanes can be located within the two-dimensional map range.
  • the map range on the map and the current vehicle position determine the lane ID of the lane where the vehicle is currently located.
  • the current vehicle position is within the map range corresponding to the last lane ID, but the two-dimensional map within this map range contains multiple lanes, it means that the vehicle may be located in an intersection area of road layers of different heights (such as an overpass). If the connectivity relationship and position matching are performed on the lanes of each road layer, it will significantly increase the consumption of computing resources. Therefore, in order to reduce the consumption of computing resources, you can first check the "vehicles corresponding to the last lane ID". "Other lanes that belong to the same road layer and have a connected relationship with the lane corresponding to the last lane ID" are used for location matching.
  • the lane ID of the lane where the vehicle is currently located can be determined.
  • the lane ID of the lane where the vehicle is currently located can be determined through the following steps 131 to 133 and based on the map range of the other lanes falling on the two-dimensional map and the current vehicle position. .
  • Step 131 Determine whether the current vehicle position only falls within the map range corresponding to one of the other lanes; if it only falls within the map range corresponding to one of the other lanes, go to step 132; otherwise, go to step 133.
  • Step 132 Use the lane ID of the other lane as the lane ID of the lane where the vehicle is currently located.
  • the lane ID of this other lane can be directly used as the lane ID of the lane where the vehicle is currently located.
  • Step 133 Determine the lane ID of the lane where the vehicle is currently located based on the map range where the lane located within the preset range centered on the current vehicle position falls on the two-dimensional map and the current vehicle position.
  • the search range of the lane is expanded by acquiring lanes located within the preset range centered on the current vehicle position, and the vehicle position is increased.
  • the number of surrounding roads from which the vehicle's current lane can be determined.
  • step 133 after determining that the lane located within the preset range centered on the current vehicle position falls within the map range on the two-dimensional map, it is possible to obtain how many lanes the current vehicle position falls within. Within the map range of lanes, different methods are used to determine the lane ID of the lane where the vehicle is currently located based on the number of lanes.
  • the lane ID of this lane can be used as the lane ID of the vehicle's current lane. Lane ID.
  • these lanes can be used as candidate lanes at this time, and the lanes and lanes that have a connectivity relationship with the lane corresponding to the last lane ID are used.
  • the pose of the current vehicle filter out the lane ID of the lane where the vehicle is currently located from the lane ID of the candidate lane.
  • the candidate lane among the candidate lanes that has a connected relationship with the lane corresponding to the last lane ID can be used as the lane where the vehicle is currently located.
  • a candidate lane that matches the pose of the current vehicle can also be selected from the candidate lanes as the lane where the vehicle is currently located.
  • a candidate lane that has a connected relationship with the lane corresponding to the last lane ID and matches the pose of the current vehicle can also be used as the lane where the vehicle is currently located.
  • the pose of the vehicle refers to the position and attitude (Pose) of the vehicle. For example, if two candidate lanes facing left and right are determined based on the position of the vehicle, and the posture of the vehicle is turning left, then it can be determined that the candidate lane facing left matches the posture of the current vehicle.
  • the candidate lane facing left can be regarded as the current lane of the vehicle.
  • the following steps 1331 to 1335 can be used to filter the lane IDs of the candidate lanes based on the lanes that have a connected relationship with the lane corresponding to the last lane ID and/or the pose of the current vehicle. Lane ID of the lane where the vehicle is currently located.
  • Step 1331 Determine whether the candidate lane is a virtual lane; if it is a virtual lane, go to step 1332; if it is not a virtual lane, go to step 1334.
  • Virtual lanes refer to lanes that are planned when navigating a vehicle through a two-dimensional map and have no actual lane lines on the actual road.
  • the vehicle will pass through a T-shaped intersection when driving forward. There is no specific lane delineated in the T-shaped intersection, that is, there is no lane line.
  • two virtual lanes will be generated at this T-intersection (shown as a dotted line in Figure 7).
  • the vehicle can drive from south to north along one virtual lane (through virtual lane) into the north lane.
  • Vehicles can drive from south to east along another virtual lane (right-turn virtual lane) into the east lane.
  • Step 1332 Obtain the virtual lane that matches the current vehicle's pose.
  • Step 1333 Determine whether the number of virtual lanes matching the current vehicle's pose is 1; if it is 1, then use the lane ID of this matching virtual lane as the lane ID of the lane where the vehicle is currently located; if not 1, then Initialization processing is performed based on the current vehicle position, the starting lane of the vehicle is re-determined, and the lane ID of the starting lane is used as the lane ID of the lane where the vehicle is currently located.
  • Step 1334 Obtain the lane that has a connected relationship with the lane corresponding to the last lane ID from the candidate lanes.
  • Step 1335 Determine whether the number of lanes that have a connected relationship with the lane corresponding to the last lane ID is 1; if it is 1, use the lane ID of this connected lane as the vehicle in the lane where the vehicle is currently located. Lane ID; if it is not 1, initialization processing is performed based on the current vehicle position, the starting lane of the vehicle is re-determined, and the lane ID of the starting lane is used as the lane ID of the lane where the vehicle is currently located.
  • steps 1331 to 1335 when the current vehicle position falls within the map range corresponding to lanes within multiple preset ranges, it is possible to determine the location of the vehicle according to the connected relationship with the lane corresponding to the last lane ID.
  • the lane and the current vehicle's pose can accurately determine the lane ID of the lane where the vehicle is currently located.
  • step S1032 The above is the specific description of step S1032, and the description of step S1033 will continue below.
  • Step S1033 Determine the lane ID of the lane where the vehicle is currently located based on the map range of the lane located within the preset range centered on the current vehicle position on the two-dimensional map and the current vehicle position.
  • the lane search range is expanded by acquiring lanes located within a preset range centered on the current vehicle position, and the number of roads surrounding the vehicle position is increased so that these roads can be Determine the lane the vehicle is currently in.
  • step S1033 determines the lane ID of the lane where the vehicle is currently located based on the map range and the current vehicle position of the lane located within the preset range centered on the current vehicle position on the two-dimensional map.
  • step S201 when the vehicle has just started the lane positioning function or otherwise needs to re-determine the starting lane of the vehicle (such as the situation described in steps 1333 and 1335), the following step S201 can be performed Go to step S206 to perform initialization processing and determine the starting lane of the vehicle.
  • Step S201 Obtain the lane located within the preset range centered on the current vehicle position.
  • Step S202 Determine whether the current vehicle position falls within a map range corresponding to a lane within a preset range; if it falls within a map range corresponding to a lane within a preset range, go to step S203; otherwise, go to step S203. S206.
  • Step S203 Obtain the distance between the current vehicle position and the boundary of the lane within the preset range.
  • Step S204 If the distance is greater than or equal to the preset distance threshold; if yes, go to step S205; if not, go to step S206.
  • Step S205 Use the lane within the preset range as the starting lane of the vehicle.
  • the vehicle's location may fluctuate within a certain range, such as within a range of 5cm to 30cm. If the vehicle position is too close to the boundary of the lane, it may not be possible to accurately determine whether the vehicle is in the lane. In order to avoid the influence of the above fluctuations on the judgment, a distance threshold can be set. If the distance between the current vehicle position and the boundary of the lane is greater than or equal to this distance threshold, it will be judged to be driving in this lane. At this time, this lane can be As the starting lane for vehicles.
  • Step S206 Output lane positioning abnormality prompt information.
  • the lane positioning abnormal prompt information can be output to remind the vehicle user or other personnel to handle the abnormal situation. deal with.
  • the present invention can implement all or part of the process in the method of the above-mentioned embodiment, and can also be completed by instructing relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable file. In the storage medium, when the computer program is executed by the processor, the steps of each of the above method embodiments can be implemented.
  • the computer program includes computer program code, which may be in the form of source code, object code, executable file or some intermediate form.
  • the computer-readable storage medium may include: any entity or device capable of carrying the computer program code, media, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier wave signals, telecommunications signals, and software distribution media, etc.
  • computer-readable storage media Storage media does not include electrical carrier signals and telecommunications signals.
  • the present invention also provides a computer device.
  • the computer equipment includes a processor and a storage device.
  • the storage device may be configured to store a program for executing the lane positioning method of the above method embodiment.
  • the processor may be configured to execute the storage A program in the device, which program includes but is not limited to a program for executing the lane positioning method of the above method embodiment.
  • the computer device may be a device formed including various electronic devices.
  • the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium may be configured to store a program for executing the lane positioning method of the above method embodiment, and the program may be loaded and run by a processor to implement the above lane positioning method. Positioning method.
  • the computer-readable storage medium may be a storage device formed by various electronic devices.
  • the computer-readable storage medium is a non-transitory computer-readable storage medium.
  • the present invention also provides a vehicle.
  • the vehicle may include a computer device as described in the above computer device embodiment.
  • the vehicle may be an autonomous vehicle, an unmanned vehicle, or other vehicles.
  • the vehicle in this embodiment may be a fuel vehicle, an electric vehicle, a hybrid vehicle that mixes electric energy with fuel, or a vehicle that uses other new energy sources.

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Navigation (AREA)

Abstract

A lane positioning method, comprising: positioning a vehicle by means of a two-dimensional map, and determining a position of the vehicle (S101); acquiring a communication relationship between lanes around the position of the vehicle (S102); and according to the communication relationship between the lanes around the position of the vehicle, determining a lane ID of the lane where the vehicle is currently located (S103). By means of the method, even if a vehicle travels in a road network having road layers of different heights, which lane the vehicle travels on can be accurately determined by means of a two-dimensional map and according to a communication relationship between lanes. Further provided are a computer device, a computer-readable storage medium and a vehicle.

Description

车道定位方法、计算机设备、计算机可读存储介质及车辆Lane positioning method, computer equipment, computer-readable storage medium and vehicle
本发明是在申请号为202210507812.X,发明名称为《车道定位方法、计算机设备、计算机可读存储介质及车辆》的优先权以及申请号为202210501755.4,发明名称为《车辆定位方法、装置、计算机设备、存储介质及车辆》的优先权的基础上的继续申请,其全部内容通过引用结合在本发明中。The present invention has priority in the application number 202210507812. "Apparatus, Storage Media and Vehicles", the entire contents of which are incorporated herein by reference.
技术领域Technical field
本发明涉及定位技术领域,具体提供一种车道定位方法、计算机设备、计算机可读存储介质及车辆。The present invention relates to the field of positioning technology, and specifically provides a lane positioning method, computer equipment, computer-readable storage media and vehicles.
背景技术Background technique
车辆上通常会设置车载地图,在车辆行驶过程中通过车载地图进行定位和导航等。当车辆行驶在具有不同高度的道路层的路网中,如果同一位置处存在多个属于不同高度的道路层的道路,这些道路在车载地图上会交叉显示,当车辆行驶在这个位置处时将无法通过车载地图准确定位出车辆行驶在哪条道路上,进一步当每层道路都包含多条车道时更加无法定位出车辆行驶在哪条车道上。Vehicles are usually equipped with on-board maps, which are used for positioning and navigation during driving. When a vehicle is driving in a road network with road layers of different heights, if there are multiple roads belonging to road layers of different heights at the same location, these roads will be cross-displayed on the on-board map. When the vehicle is driving at this location, it will It is impossible to accurately locate which road the vehicle is driving on through the on-board map. Furthermore, when each layer of roads contains multiple lanes, it is even more difficult to locate which lane the vehicle is driving on.
相应地,本领域需要一种新的技术方案来解决上述问题。Accordingly, a new technical solution is needed in this field to solve the above problems.
发明内容Contents of the invention
为了克服上述缺陷,提出了本发明,以提供解决或至少部分地解决如何在具有不同高度的道路层的路网中准确定位车辆当前行驶车道的技术问题的车道定位方法、计算机设备、计算机可读存储介质及车辆。In order to overcome the above shortcomings, the present invention is proposed to provide a lane positioning method, a computer device, and a computer readable method that solve or at least partially solve the technical problem of how to accurately locate the current driving lane of a vehicle in a road network with road layers of different heights. Storage media and vehicles.
在第一方面,本发明提供一种车道定位方法,所述方法包括:通过二维地图对车辆进行定位,确定车辆位置;获取所述车辆位置周围的车道及车道之间的连通关系;根据所述车辆位置周围的车道及所述车道之间连通关系,确定车辆当前所在车道的车道ID。In a first aspect, the present invention provides a lane positioning method, which method includes: locating a vehicle through a two-dimensional map and determining the vehicle position; obtaining the lanes around the vehicle position and the connectivity between the lanes; Determine the lane ID of the lane where the vehicle is currently located based on the lanes surrounding the vehicle position and the connectivity between the lanes.
在上述车道定位方法的一个技术方案中,“根据所述车辆位置周围的车道及所述车道之间连通关系,确定车辆当前所在车道的车道ID”的步骤具体包括:判断根据上一次确定的车辆位置能否确定出上一次的车道ID;若能确定出,则根据所述上一次的车道ID对应车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID;若不能确定出,则根据位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。 In one technical solution of the above lane positioning method, the step of "determining the lane ID of the lane where the vehicle is currently located based on the lanes surrounding the vehicle position and the connectivity relationship between the lanes" specifically includes: determining the lane ID of the vehicle based on the last determined Whether the last lane ID can be determined; if it can be determined, determine the lane ID of the lane where the vehicle is currently located based on the map range of the lane corresponding to the last lane ID on the two-dimensional map and the current vehicle position; If it cannot be determined, the lane ID of the lane where the vehicle is currently located is determined based on the map range of the lane located within the preset range centered on the current vehicle position and falling on the two-dimensional map and the current vehicle position.
在上述车道定位方法的一个技术方案中,“根据所述上一次的车道ID对应车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID”的步骤具体包括:判断当前车辆位置是否落入所述上一次的车道ID对应的地图范围内且在所述地图范围内所述二维地图只包含一条车道;若是,则将所述上一次的车道ID作为车辆当前所在车道的车道ID;若否,则获取与所述上一次的车道ID对应车道属于同一道路层且与所述上一次的车道ID对应车道具有连通关系的其他车道,根据所述其他车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。In one technical solution of the above lane positioning method, the step of "determining the lane ID of the lane where the vehicle is currently located based on the map range of the lane corresponding to the last lane ID on the two-dimensional map and the current vehicle position" specifically includes: Determine whether the current vehicle position falls within the map range corresponding to the last lane ID and the two-dimensional map only contains one lane within the map range; if so, use the last lane ID as the vehicle's current The lane ID of the lane where it is located; if not, obtain other lanes that belong to the same road layer as the lane corresponding to the last lane ID and have a connectivity relationship with the lane corresponding to the last lane ID, and locate according to the other lanes. Based on the map range and the current vehicle position on the two-dimensional map, determine the lane ID of the lane where the vehicle is currently located.
在上述车道定位方法的一个技术方案中,“根据所述其他车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID”的步骤具体包括:判断当前车辆位置是否只落入一条所述其他车道对应的地图范围内;若是,则将所述一条所述其他车道的车道ID作为车辆当前所在车道的车道ID;若否,则根据位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。In one technical solution of the above lane positioning method, the step of "determining the lane ID of the lane where the vehicle is currently located based on the map range of the other lanes falling on the two-dimensional map and the current vehicle position" specifically includes: determining whether the current vehicle position is It only falls within the map range corresponding to one of the other lanes; if so, the lane ID of the other lane is used as the lane ID of the lane where the vehicle is currently located; if not, the lane ID of the other lane is used as the lane ID centered on the current vehicle position. The lanes within the preset range fall within the map range on the two-dimensional map and the current vehicle position, and the lane ID of the lane where the vehicle is currently located is determined.
在上述车道定位方法的一个技术方案中,“根据位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID”的步骤具体包括:若当前车辆位置只落入一条所述预设范围内的车道对应的地图范围内,则将所述一条所述预设范围内的车道的车道ID作为车辆当前所在车道的车道ID;若当前车辆位置落入多条所述预设范围内的车道对应的地图范围内,则将所述多条所述预设范围内的车道作为候选车道,根据与所述上一次的车道ID对应车道具有连通关系的车道和/或当前车辆的位姿,从所述候选车道的车道ID中筛选出车辆当前所在车道的车道ID。In a technical solution of the above lane positioning method, "the lane ID of the lane where the vehicle is currently located is determined based on the map range of the lane located within the preset range centered on the current vehicle position and falling on the two-dimensional map and the current vehicle position." The steps specifically include: if the current vehicle position only falls within the map range corresponding to one lane within the preset range, then use the lane ID of the one lane within the preset range as the lane of the lane where the vehicle is currently located. ID; if the current vehicle position falls within the map range corresponding to multiple lanes within the preset range, then use the multiple lanes within the preset range as candidate lanes, based on the last lane The ID corresponds to a lane with connected lanes and/or the pose of the current vehicle, and the lane ID of the lane where the vehicle is currently located is filtered out from the lane IDs of the candidate lanes.
在上述车道定位方法的一个技术方案中,“根据与所述上一次的车道ID对应车道具有连通关系的车道和/或当前车辆的位姿,从所述候选车道的车道ID中筛选出车辆当前所在车道的车道ID”的步骤具体包括:判断所述候选车道是否为虚拟车道;当判定是虚拟车道时,获取与当前车辆的位姿匹配的虚拟车道,若所述匹配的虚拟车道的数量是1,则将所述匹配的虚拟车道的车道ID作为车辆当前所在车道的车道ID;若所述匹配的虚拟车道的数量不是1,则根据当前车辆位置进行初始化处理,重新确定车辆的起点车道,将所述起点车道的车道ID作为车辆当前所在车道的车道ID;当判定不是虚拟车道时,从所述候选车道中获取与所述上一次的车道ID对应车道具有连通关系的车道;若所述具有连通关系的车道的数量是1,则将所述具有连通关系的车道的车道ID作为车辆当前所在车道的车道ID;若所述具有连通关系的车道的数量不是1,则根据当前车辆位置进行初始化处理,重新确定车辆的起点车道,将所述起点车道的车道ID作为车辆当前所在车道的车道ID。In one technical solution of the above lane positioning method, "select vehicles from the lane IDs of the candidate lanes based on the lanes that have a connected relationship with the lane corresponding to the last lane ID and/or the position and orientation of the current vehicle. The steps of "lane ID of the current lane" specifically include: determining whether the candidate lane is a virtual lane; when it is determined that it is a virtual lane, obtaining a virtual lane that matches the pose of the current vehicle, if the number of matching virtual lanes is 1, then the lane ID of the matched virtual lane is used as the lane ID of the lane where the vehicle is currently located; if the number of matched virtual lanes is not 1, initialization processing is performed based on the current vehicle position, and the starting lane of the vehicle is redetermined. , use the lane ID of the starting lane as the lane ID of the lane where the vehicle is currently located; when it is determined that it is not a virtual lane, obtain the lane that has a connected relationship with the lane corresponding to the last lane ID from the candidate lane; if If the number of lanes with a connected relationship is 1, then the lane ID of the lane with a connected relationship is used as the lane ID of the lane where the vehicle is currently located; if the number of lanes with a connected relationship is not 1, then the lane ID of the lane with a connected relationship is used as the lane ID of the lane where the vehicle is currently located; if the number of lanes with a connected relationship is not 1, then the lane ID of the lane with a connected relationship is used The position is initialized, the starting lane of the vehicle is re-determined, and the lane ID of the starting lane is used as the lane ID of the lane where the vehicle is currently located.
在上述车道定位方法的一个技术方案中,所述方法还包括根据当前车辆位置并 通过下列步骤进行初始化处理,以确定车辆的起点车道:获取位于以当前车辆位置为中心的预设范围内的车道;判断当前车辆位置是否落入一条所述预设范围内的车道对应的地图范围内;当只落入一条所述预设范围内的车道对应的地图范围内时,获取当前车辆位置与所述一条所述预设范围内的车道的边界之间的距离;若所述距离大于等于预设的距离阈值,则将所述一条所述预设范围内的车道作为车辆的起点车道;若所述距离小于预设的距离阈值,则输出车道定位异常提示信息;当没有只落入一条所述预设范围内的车道对应的地图范围内时,输出车道定位异常提示信息。In a technical solution of the above lane positioning method, the method further includes: based on the current vehicle position and Carry out initialization processing through the following steps to determine the starting lane of the vehicle: obtain the lane located within the preset range centered on the current vehicle position; determine whether the current vehicle position falls within the map range corresponding to a lane within the preset range within; when it falls within the map range corresponding to only one lane within the preset range, obtain the distance between the current vehicle position and the boundary of the lane within the preset range; if the distance is greater than is equal to the preset distance threshold, then the lane within the preset range is used as the starting lane of the vehicle; if the distance is less than the preset distance threshold, lane positioning abnormal prompt information is output; when there is no When a lane within the preset range is within the map range corresponding to the lane, lane positioning abnormality prompt information is output.
在上述车道定位方法的一个技术方案中,“通过二维地图对车辆进行定位,确定车辆位置”的步骤具体包括:通过二维地图对车辆当前行驶道路进行定位,确定当前行驶道路中道路点在二维直角坐标系的二维坐标;获取所述道路点相对于车辆的相对高度,根据所述二维直角坐标系的原点、x轴和y轴确定世界坐标系的原点、x轴和y轴,将所述相对高度作为所述道路点在世界坐标系中z轴的坐标,根据所述道路点的二维坐标与所述相对高度将所述道路点由世界坐标系反投影至图像坐标系;确定位于车辆周围的道路元素,获取所述道路元素所在位置处的道路点反投影至图像坐标系的反投影位置以及获取通过车辆的图像采集装置确定来出的所述道路元素所在位置处的道路点在图像坐标系的采集位置;对所述道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,根据位置匹配的结果确定车辆在世界坐标系的位置。In a technical solution of the above lane positioning method, the step of "locating the vehicle through a two-dimensional map and determining the vehicle position" specifically includes: positioning the current driving road of the vehicle through a two-dimensional map and determining where the road point in the current driving road is. Two-dimensional coordinates of the two-dimensional rectangular coordinate system; obtain the relative height of the road point relative to the vehicle, and determine the origin, x-axis, and y-axis of the world coordinate system based on the origin, x-axis, and y-axis of the two-dimensional rectangular coordinate system , use the relative height as the z-axis coordinate of the road point in the world coordinate system, and back-project the road point from the world coordinate system to the image coordinate system according to the two-dimensional coordinates of the road point and the relative height. ; Determine the road elements located around the vehicle, obtain the back-projection position of the road point at the location of the road element to the image coordinate system and obtain the position of the road element determined by the image acquisition device of the vehicle. The road point is at the collection position of the image coordinate system; the back-projection position of the road point at the location of the road element is position matched with the collection position, and the position of the vehicle in the world coordinate system is determined based on the position matching result.
在上述车道定位方法的一个技术方案中,“获取所述道路点相对于车辆的相对高度”的步骤具体包括:获取在车体坐标系中车辆所在平面的平面向量并且根据所述平面向量获取所述平面的单位法向量;根据所述道路点的二维坐标并且通过求解下列方程得到所述道路点在以所述二维直角坐标系的原点、x轴和y轴分别为原点、x轴和y轴的世界坐标系中z轴的坐标zh:(xh-x1)×nx+(yh-y1)×ny+(zh-z1)×nz=0,其中,x1、y1和z1表示车辆在车体坐标系中x轴、y轴和z轴的坐标,nx、ny和nz表示所述单位法向量在车体坐标系中x轴、y轴和z轴的坐标,xh和yh表示所述道路点的二维坐标中x轴和y轴的坐标;根据所述坐标zh确定所述道路点相对于车辆的相对高度。In a technical solution of the above lane positioning method, the step of "obtaining the relative height of the road point relative to the vehicle" specifically includes: obtaining the plane vector of the plane where the vehicle is located in the vehicle body coordinate system and obtaining the plane vector according to the plane vector. The unit normal vector of the plane; according to the two-dimensional coordinates of the road point and by solving the following equations, it is obtained that the origin, x-axis and y-axis of the two-dimensional rectangular coordinate system are the origin, x-axis and The coordinate zh of the z-axis in the world coordinate system of the y-axis: (xh-x1)×nx+(yh-y1)×ny+(zh-z1)×nz=0, where x1, y1 and z1 represent the vehicle body coordinates The coordinates of the x-axis, y-axis and z-axis in the system, nx, ny and nz represent the coordinates of the unit normal vector on the x-axis, y-axis and z-axis in the vehicle body coordinate system, xh and yh represent the coordinates of the road point The coordinates of the x-axis and the y-axis in the two-dimensional coordinates; the relative height of the road point relative to the vehicle is determined based on the coordinates zh.
在上述车道定位方法的一个技术方案中,所述方法还包括在二维地图上,对车辆当前行驶道路及之前行驶过的道路进行道路连通显示。In a technical solution of the above lane positioning method, the method further includes displaying road connections on the two-dimensional map of the road currently traveled by the vehicle and the roads it has traveled before.
在上述车道定位方法的一个技术方案中,“对所述道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,根据位置匹配的结果确定车辆在世界坐标系的位置”的步骤具体包括:对所述道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,得到所述图像采集装置的装置坐标系与世界坐标系进行转换的位姿参数;获取车辆所在位置处的道路点反投影至图像坐标系的反投影位置;根据所述车辆所在位置处的道路点的反投影位置与所述位姿参数,确定车辆在世界坐 标系的位置。In one technical solution of the above lane positioning method, the step of "matching the back-projection position of the road point at the location of the road element with the collection position, and determining the position of the vehicle in the world coordinate system based on the result of the position matching" Specifically, the method includes: position matching the back-projected position of the road point at the position of the road element with the acquisition position to obtain pose parameters for conversion between the device coordinate system of the image acquisition device and the world coordinate system; and obtaining the location of the vehicle. The road point at the location is back-projected to the back-projection position of the image coordinate system; according to the back-projection position of the road point at the location of the vehicle and the pose parameter, determine where the vehicle is sitting in the world. The position of the standard system.
在上述车道定位方法的一个技术方案中,“对所述道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,得到所述图像采集装置的装置坐标系与世界坐标系进行转换的位姿参数”的步骤具体包括:根据所述道路元素所在位置处的道路点的反投影位置与采集位置建立下式所示的距离误差方程:loss=d(f(A,O),cd),其中,f(A,O)表示当前道路点的反投影位置,A表示当前道路点在世界坐标系的位置,O表示装置坐标系与世界坐标系进行转换的位姿参数,cd表示以距离当前道路点的反投影位置最近的两个道路点的采集位置为端点所形成的线段,d表示反投影位置f(A,O)到线段cd的距离计算函数,loss表示所述距离计算函数d计算得到的距离;以使所述距离loss小于预设的距离阈值为目标,采用列文伯格-马夸尔特(Levenberg-Marquardt)算法对所述距离误差方程中的位姿参数O进行迭代优化,并获取使所述距离loss小于预设的距离阈值时的位姿参数O,将所述位姿参数O作为最终的所述图像采集装置的装置坐标系与世界坐标系进行转换的位姿参数。In one technical solution of the above lane positioning method, "the back-projection position of the road point at the position of the road element is matched with the acquisition position, and the device coordinate system of the image acquisition device and the world coordinate system are converted. The step of "pose parameter" specifically includes: establishing a distance error equation shown in the following formula based on the back-projection position and collection position of the road point at the position of the road element: loss=d(f(A,O),cd ), where f(A,O) represents the back-projected position of the current road point, A represents the position of the current road point in the world coordinate system, O represents the pose parameter for conversion between the device coordinate system and the world coordinate system, and cd represents the The collection positions of the two road points closest to the back-projection position of the current road point are the line segments formed by the endpoints. d represents the distance calculation function from the back-projection position f (A, O) to the line segment cd, and loss represents the distance calculation function. d calculated distance; with the goal of making the distance loss less than the preset distance threshold, the Levenberg-Marquardt algorithm is used to perform the pose parameter O in the distance error equation. Iteratively optimize, and obtain the pose parameter O when the distance loss is less than the preset distance threshold, and use the pose parameter O as the final position for conversion between the device coordinate system of the image acquisition device and the world coordinate system. posture parameters.
在上述车道定位方法的一个技术方案中,在“确定位于车辆周围的道路元素,获取所述道路元素所在位置处的道路点反投影至图像坐标系的反投影位置以及获取通过车辆的图像采集装置确定来出的所述道路元素所在位置处的道路点在图像坐标系的采集位置”的步骤之前,所述方法还包括:通过至少两个图像采集装置对所述道路元素所在位置处的道路点进行图像采集,得到所述道路元素所在位置处的道路点的道路点图像;根据所述道路点图像,确定所述道路元素所在位置处的道路点在图像坐标系的采集位置。In a technical solution of the above lane positioning method, in "determining the road elements located around the vehicle, obtaining the back-projected position of the road point at the location of the road element to the image coordinate system and obtaining the image acquisition device passing through the vehicle Before determining that the road point at the position of the road element is at the acquisition position of the image coordinate system, the method further includes: using at least two image acquisition devices to collect the road point at the position of the road element. Image collection is performed to obtain a road point image of the road point at the location of the road element; and based on the road point image, the collection position of the road point at the location of the road element in the image coordinate system is determined.
在第二方面,提供一种计算机设备,该计算机设备包括处理器和存储装置,所述存储装置适于存储多条程序代码,所述程序代码适于由所述处理器加载并运行以执行上述车道定位方法的技术方案中任一项技术方案所述的车道定位方法。In a second aspect, a computer device is provided. The computer device includes a processor and a storage device. The storage device is adapted to store a plurality of program codes. The program codes are adapted to be loaded and run by the processor to execute the above. The lane positioning method described in any one of the technical solutions of the lane positioning method.
在第三方面,提供一种计算机可读存储介质,该计算机可读存储介质其中存储有多条程序代码,所述程序代码适于由处理器加载并运行以执行上述车道定位方法的技术方案中任一项技术方案所述的车道定位方法。In a third aspect, a computer-readable storage medium is provided, which stores a plurality of program codes, and the program codes are suitable for being loaded and run by a processor to perform the technical solution of the above lane positioning method. The lane positioning method described in any technical solution.
在第四方面,提供一种车辆,所述车辆包括上述计算机设备技术方案所述的计算机设备。In a fourth aspect, a vehicle is provided, which vehicle includes the computer device described in the above computer device technical solution.
本发明上述一个或多个技术方案,至少具有如下一种或多种有益效果:One or more of the above technical solutions of the present invention have at least one or more of the following beneficial effects:
在实施本发明的技术方案中,可以先通过二维地图对车辆进行定位,确定车辆位置(车辆位置是二维信息,例如车辆位置可以包括车辆在世界坐标系中x轴和y轴的坐标),再获取车辆位置周围的车道及车道之间的连通关系(如果从一条车道正常驶入另一条车道,则这两条车道具有连通关系,否则这两条车道不具有连通关系),根据获取到的车道及连通关系确定车辆当前所在车道的车道ID。通过上述技术方案,即使车辆行驶在具有不同高度的道路层的路网中,也能够通过二维地图并根据车道 之间的连通关系,准确地确定出车辆行驶在哪一个车道上。In implementing the technical solution of the present invention, the vehicle can be positioned first through a two-dimensional map to determine the vehicle position (the vehicle position is two-dimensional information, for example, the vehicle position can include the coordinates of the x-axis and y-axis of the vehicle in the world coordinate system) , and then obtain the lanes around the vehicle position and the connectivity between the lanes (if you drive from one lane to another normally, the two lanes have a connectivity, otherwise the two lanes do not have a connectivity), according to the obtained The arriving lane and the connection relationship determine the lane ID of the lane where the vehicle is currently located. Through the above technical solution, even if the vehicle is driving in a road network with road layers of different heights, it can pass the two-dimensional map and according to the lane The connection relationship between them accurately determines which lane the vehicle is driving on.
进一步,在实施本发明的一些技术方案中,为了减少计算资源的消耗,在根据车辆位置周围的车道及车道之间连通关系确定车辆当前所在车道的车道ID时,可以依次根据上一次的车道ID对应车道落在二维地图上的地图范围、与上一次的车道ID对应车道属于同一道路层且与上一次的车道ID对应车道具有连通关系的其他车道落在二维地图上的地图范围以及位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围,并结合当前车辆位置确定车辆当前所在车道的车道ID。在上述过程中,只要根据某个地图范围与当前车辆位置确定出车辆当前所在车道的车道ID,就不需要继续进行后续分析了,从而可以极大地减少对计算资源的消耗,提高车道定位的效率。Furthermore, in some technical solutions for implementing the present invention, in order to reduce the consumption of computing resources, when determining the lane ID of the lane where the vehicle is currently located based on the lanes around the vehicle position and the connectivity between lanes, the lane ID of the last time can be determined in turn. The map range where the corresponding lane falls on the two-dimensional map, the map range where other lanes that belong to the same road layer as the lane corresponding to the last lane ID and have a connectivity relationship with the lane corresponding to the last lane ID fall on the two-dimensional map, and The lanes located within the preset range centered on the current vehicle position fall within the map range on the two-dimensional map, and are combined with the current vehicle position to determine the lane ID of the lane where the vehicle is currently located. In the above process, as long as the lane ID of the lane where the vehicle is currently located is determined based on a certain map range and the current vehicle position, there is no need to continue subsequent analysis, which can greatly reduce the consumption of computing resources and improve the efficiency of lane positioning. .
进一步,在实施本发明的一些技术方案中,在车道定位刚刚启动时可以根据车辆位置进行初始化处理,确定车辆的起点车道,将起点车道的车道ID作为车辆所在车道的首条车道ID。同时,在根据车辆位置周围的车道及车道之间连通关系,确定车辆当前所在车道的车道ID的过程中,如果最终无法确定出车辆当前所在车道的车道ID,那么也可以根据车辆位置进行初始化处理,确定车辆的起点车道,将起点车道的车道ID作为车辆所在车道的车道ID。Furthermore, in some technical solutions for implementing the present invention, when lane positioning is just started, initialization processing can be performed based on the vehicle position to determine the starting lane of the vehicle, and the lane ID of the starting lane is used as the first lane ID of the lane where the vehicle is located. At the same time, in the process of determining the lane ID of the lane where the vehicle is currently located based on the lanes around the vehicle position and the connectivity between lanes, if the lane ID of the lane where the vehicle is currently located cannot be determined in the end, initialization processing can also be performed based on the vehicle location. , determine the starting lane of the vehicle, and use the lane ID of the starting lane as the lane ID of the lane where the vehicle is located.
进一步,在实施本发明的一些技术方案中,可以通过二维地图对车辆当前行驶道路进行定位,确定当前行驶道路中道路点在二维直角坐标系的二维坐标(包括车辆在二维直角坐标系中x轴和y轴的坐标),同时获取道路点相对于车辆的相对高度,根据二维直角坐标系的原点、x轴和y轴确定世界坐标系的原点、x轴和y轴,即将上述二维坐标中x轴和y轴的坐标作为道路点在世界坐标系(三维直角坐标系)中x轴和y轴的坐标,进而将上述相对高度作为道路点在世界坐标系中z轴的坐标,然后根据道路点的上述二维坐标与上述相对高度将道路点由世界坐标系反投影至图像坐标系。在将道路点反投影至图像坐标系之后,就可以根据位于车辆周围的道路元素所在位置处的道路点反投影至图像坐标系的反投影位置以及通过车辆的图像采集装置确定来出的道路元素所在位置处的道路点在图像坐标系的采集位置进行位置匹配,进而根据位置匹配的结果确定车辆在世界坐标系的位置。Further, in some technical solutions for implementing the present invention, the current driving road of the vehicle can be positioned through a two-dimensional map, and the two-dimensional coordinates of the road points on the current driving road in the two-dimensional rectangular coordinate system (including the two-dimensional rectangular coordinate system of the vehicle) can be determined. coordinates of the x-axis and y-axis in the system), and at the same time obtain the relative height of the road point relative to the vehicle, and determine the origin, x-axis and y-axis of the world coordinate system based on the origin, x-axis and y-axis of the two-dimensional rectangular coordinate system, that is, The coordinates of the x-axis and y-axis in the above two-dimensional coordinates are used as the coordinates of the x-axis and y-axis of the road point in the world coordinate system (three-dimensional rectangular coordinate system), and then the above-mentioned relative height is used as the coordinates of the road point on the z-axis in the world coordinate system. coordinates, and then back-project the road point from the world coordinate system to the image coordinate system according to the above-mentioned two-dimensional coordinates of the road point and the above-mentioned relative height. After the road points are back-projected to the image coordinate system, the road points at the positions of the road elements around the vehicle can be back-projected to the back-projected positions of the image coordinate system and the road elements determined by the image acquisition device of the vehicle The road point at the location is position matched at the acquisition position of the image coordinate system, and then the position of the vehicle in the world coordinate system is determined based on the position matching results.
通过上述方式,即使车辆的车载地图是二维地图,在无法利用全球导航卫星系统进行定位,也能够通过二维地图获取到车辆在世界坐标系的位置,同时还可以根据道路点的稠密程度调整对车辆的定位精度(稠密程度越高定位精度越高,稠密程度越低定位精度越低),实现对车辆的厘米级定位,在进行长时间定位后不会出现定位漂移。Through the above method, even if the vehicle's on-board map is a two-dimensional map, and the global navigation satellite system cannot be used for positioning, the vehicle's position in the world coordinate system can still be obtained through the two-dimensional map, and it can also be adjusted according to the density of road points. The positioning accuracy of the vehicle (the higher the density, the higher the positioning accuracy, the lower the density, the lower the positioning accuracy), achieving centimeter-level positioning of the vehicle, and no positioning drift will occur after long-term positioning.
进一步,在实施本发明的技术方案中,当车辆行驶在包含多个不同道路层的路网时,可以在二维地图上对车辆当前行驶道路及之前行驶过的道路进行道路连通显示,在对道路进行连通显示之后,以便于可以排除其他道路层中的道路对使用二维 地图进行车辆定位显示的影响,能够更加清晰地显示出车辆位于哪一条道路的哪个位置上。Furthermore, in the technical solution for implementing the present invention, when a vehicle is traveling on a road network that includes multiple different road layers, the road connections that the vehicle is currently traveling on and the roads it has traveled before can be displayed on a two-dimensional map. After the roads are connected, it is possible to exclude road pairs in other road layers using 2D The impact of vehicle positioning display on the map can more clearly show which road and where the vehicle is located.
附图说明Description of the drawings
参照附图,本发明的公开内容将变得更易理解。本领域技术人员容易理解的是:这些附图仅仅用于说明的目的,而并非意在对本发明的保护范围组成限制。此外,图中类似的数字用以表示类似的部件,其中:The disclosure of the present invention will become more understandable with reference to the accompanying drawings. Those skilled in the art can easily understand that these drawings are for illustrative purposes only and are not intended to limit the scope of the present invention. Additionally, like numbers in the figures identify similar parts, where:
图1是根据本发明的一个实施例的车道定位方法的主要步骤流程示意图;Figure 1 is a schematic flowchart of the main steps of a lane positioning method according to an embodiment of the present invention;
图2是根据本发明的一个实施例的不同高度的道路层的道路示意图;Figure 2 is a schematic diagram of a road with road layers at different heights according to an embodiment of the present invention;
图3是根据本发明的一个实施例的车辆定位方法的主要步骤流程示意图;Figure 3 is a schematic flowchart of the main steps of a vehicle positioning method according to an embodiment of the present invention;
图4是根据本发明的一个实施例的在车体坐标系中车辆所在平面的平面向量a与单位法向量n的示意图;Figure 4 is a schematic diagram of the plane vector a and the unit normal vector n of the plane where the vehicle is located in the vehicle body coordinate system according to an embodiment of the present invention;
图5是根据本发明的一个实施例的道路点的反投影位置a以及距离反投影位置a最近的两个道路点的采集位置c和d为端点所形成的线段的示意图;Figure 5 is a schematic diagram of a line segment formed by the back-projection position a of a road point and the collection positions c and d of the two road points closest to the back-projection position a as endpoints according to an embodiment of the present invention;
图6是根据本发明的一个实施例的包含多个不同道路层的路网的示意图Figure 6 is a schematic diagram of a road network including multiple different road layers according to an embodiment of the present invention.
图7是根据本发明的一个实施例的虚拟车道的示意图一;Figure 7 is a schematic diagram of a virtual lane according to an embodiment of the present invention;
图8是根据本发明的一个实施例的虚拟车道的示意图二;Figure 8 is a schematic diagram 2 of a virtual lane according to an embodiment of the present invention;
图9是根据本发明的一个实施例的虚拟车道的示意图三;Figure 9 is a schematic diagram three of a virtual lane according to an embodiment of the present invention;
图10是根据本发明的一个实施例的起点车道确定方法的主要步骤流程示意图。Figure 10 is a schematic flowchart of the main steps of a starting lane determination method according to an embodiment of the present invention.
具体实施方式Detailed ways
下面参照附图来描述本发明的一些实施方式。本领域技术人员应当理解的是,这些实施方式仅仅用于解释本发明的技术原理,并非旨在限制本发明的保护范围。Some embodiments of the invention are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of the present invention.
在本发明的描述中,“处理器”可以包括硬件、软件或者两者的组合。处理器可以是中央处理器、微处理器、图像处理器、数字信号处理器或者其他任何合适的处理器。处理器具有数据和/或信号处理功能。处理器可以以软件方式实现、硬件方式实现或者二者结合方式实现。计算机可读存储介质包括任何合适的可存储程序代码的介质,比如磁碟、硬盘、光碟、闪存、只读存储器、随机存取存储器等等。术语“A和/或B”表示所有可能的A与B的组合,比如只是A、只是B或者A和B。术语“至少一个A或B”或者“A和B中的至少一个”含义与“A和/或B”类似,可以包括只是A、只是B或者A和B。单数形式的术语“一个”、“这个”也可以包含复数形式。In the description of the present invention, "processor" may include hardware, software, or a combination of both. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and/or signal processing functions. The processor can be implemented in software, hardware, or a combination of both. Computer-readable storage media includes any suitable medium that can store program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, etc. The term "A and/or B" means all possible combinations of A and B, such as just A, just B, or A and B. The terms "at least one A or B" or "at least one of A and B" have a similar meaning to "A and/or B" and may include just A, just B or A and B. The singular forms "a," "the" and "the" may also include the plural form.
这里先解释本发明涉及到的一些术语。Here we first explain some terms involved in the present invention.
二维地图是以二维的形式在平面上进行表示的地图,在本发明实施例中通过二维地图对目标对象进行定位,可以得到目标对象在二维直角坐标系的二维坐标,即目标对象在二维直角坐标系中x轴和y轴的坐标。A two-dimensional map is a map represented on a plane in a two-dimensional form. In the embodiment of the present invention, by positioning the target object on the two-dimensional map, the two-dimensional coordinates of the target object in the two-dimensional rectangular coordinate system can be obtained, that is, the target The coordinates of the object on the x-axis and y-axis in the two-dimensional Cartesian coordinate system.
世界坐标系是指以三维空间的一点为原点的三维直角坐标系。The world coordinate system refers to a three-dimensional rectangular coordinate system with a point in three-dimensional space as the origin.
图像坐标系是图像采集装置进行图像采集时成像的像平面的中心为原点的二维 直角坐标系。The image coordinate system is a two-dimensional coordinate system with the center of the image plane formed as the origin when the image acquisition device performs image acquisition. Cartesian coordinate system.
图像采集装置的装置坐标系是以图像采集装置的聚焦中心为原点,以光轴为z轴建立的三维直角坐标系。需要说明的是,图像采集装置的装置坐标系与计算机视觉技术领域中的相机坐标系含义相同,在此不对装置坐标系进行赘述。The device coordinate system of the image acquisition device is a three-dimensional rectangular coordinate system established with the focus center of the image acquisition device as the origin and the optical axis as the z-axis. It should be noted that the device coordinate system of the image acquisition device has the same meaning as the camera coordinate system in the field of computer vision technology, and the device coordinate system will not be described again here.
通过图像坐标系与装置坐标系进行转换的位姿参数(内参)可以将图像坐标系中的点投影至装置坐标系,同时也可以将装置坐标系中的点反投影至图像坐标系。通过装置坐标系与世界坐标系进行转换的位姿参数(外参)可以将装置坐标系中的点投影至世界坐标系,同时也可以将世界坐标系中的点反投影至装置坐标系,进一步如果同时利用上述内参与外参可以将世界坐标系中的点反投影至图像坐标系。需要说明的是,上述内参和外参分别与计算机视觉技术领域中的相机内参和相机外参含义相同,二者均包括旋转矩阵和平移向量,在此不进行赘述。The pose parameters (intrinsic parameters) converted by the image coordinate system and the device coordinate system can project the points in the image coordinate system to the device coordinate system, and can also back-project the points in the device coordinate system to the image coordinate system. The pose parameters (external parameters) converted by the device coordinate system and the world coordinate system can project the points in the device coordinate system to the world coordinate system, and can also back-project the points in the world coordinate system to the device coordinate system. Further, If you use the above internal and external parameters at the same time, you can back-project the points in the world coordinate system to the image coordinate system. It should be noted that the above-mentioned internal parameters and external parameters have the same meaning as the camera internal parameters and camera external parameters in the field of computer vision technology. Both include rotation matrices and translation vectors, which will not be described again here.
车体坐标系是指三维坐标系,其原点在载体质量中心与载体固连处,x轴沿载体轴向指向右,y轴指向前,z轴与x轴和y轴满足右手法则指向天向,车体坐标系也可以称为“右-前-上(R-F-U)”坐标系。The vehicle body coordinate system refers to a three-dimensional coordinate system. Its origin is at the point where the center of mass of the carrier is fixedly connected to the carrier. The x-axis points to the right along the axial direction of the carrier, the y-axis points forward, and the z-axis, x-axis, and y-axis satisfy the right-hand rule and point toward the sky. , the vehicle body coordinate system can also be called the "right-front-up (R-F-U)" coordinate system.
参阅附图1,图1是根据本发明的一个实施例的车道定位方法的主要步骤流程示意图。如图1所示,本发明实施例中的车道定位方法主要包括下列步骤S101至步骤S103。Referring to Figure 1, Figure 1 is a schematic flowchart of the main steps of a lane positioning method according to an embodiment of the present invention. As shown in Figure 1, the lane positioning method in the embodiment of the present invention mainly includes the following steps S101 to S103.
步骤S101:通过二维地图对车辆进行定位,确定初始的车辆位置。Step S101: Position the vehicle through the two-dimensional map and determine the initial vehicle position.
二维地图是以二维的形式在平面上进行表示的地图,通过二维地图对车辆进行定位,可以得到车辆在二维地图对应的二维直角坐标系中的二维坐标,该二维坐标包括车辆在二维直角坐标系中x轴和y轴的坐标。A two-dimensional map is a map represented on a plane in a two-dimensional form. By positioning a vehicle on a two-dimensional map, the two-dimensional coordinates of the vehicle in the two-dimensional rectangular coordinate system corresponding to the two-dimensional map can be obtained. The two-dimensional coordinates Including the vehicle's x-axis and y-axis coordinates in the two-dimensional Cartesian coordinate system.
步骤S102:获取车辆位置周围的车道及车道之间的连通关系。Step S102: Obtain the lanes around the vehicle position and the connectivity between lanes.
如果车辆能够从一条车道驶离并驶入另一条车道,那么这两条车道就具备连通关系,即这两条车道是连通的。If a vehicle can exit one lane and enter another, then the two lanes are connected, that is, the two lanes are connected.
在本发明实施例中可以预先确定路网中每条车道的位置以及不同车道之间的连通关系,在确定出车辆位置之后就可以根据车辆位置查询位于其周围的车道,进而查询得到这些车道之间的连通关系。此外,每条车道都具备各自唯一的车道ID,以便于对不同的车道进行区分。In the embodiment of the present invention, the position of each lane in the road network and the connectivity relationship between different lanes can be determined in advance. After the vehicle position is determined, the lanes surrounding it can be queried based on the vehicle position, and then the number of lanes among these lanes can be queried. connectivity between. In addition, each lane has its own unique lane ID to easily distinguish different lanes.
步骤S103:根据车辆位置周围的车道及车道之间连通关系,确定车辆当前所在车道的车道ID。Step S103: Determine the lane ID of the lane where the vehicle is currently located based on the lanes around the vehicle position and the connectivity between lanes.
当车辆在包含多个不同高度的道路层的路网中行驶时,由于二维地图缺少世界坐标系中z轴的坐标,因此无法对不同道路的高度进行显示。如果同一位置处存在多个属于不同高度的道路层的道路,这些道路在二维地图上会交叉显示,并且当车辆行驶在这个位置处时将无法通过二维地图确定出车辆到底行驶在哪一条车道上。然而,即使二维地图的同一位置处交叉显示了多个属于不同高度的道路层的道路, 车辆必然只能在具有连通关系的车道上行驶,不会从当前车道驶入另一条与其没有连通关系的车道上,因此,本发明实施例根据车道之间连通关系获取具有连通关系的车道,根据这些具有连通关系的车道确定出车辆行驶在哪一条车道上,进而得到车辆当前所在车道的车道ID。如图2所示,车辆行驶在本层道路的车道上,本层道路之上还有一条上层道路,在二维地图上本层道路与上层道路会在车辆前方的某个位置处交叉显示。由于本层道路的车道与上层道路的车道没有连通关系,即使车辆行驶到上述位置处,也可以确定出车辆不会驶入上层道路,仍然继续行驶在本层道路的车道上。When a vehicle travels in a road network that contains multiple road layers with different heights, the heights of different roads cannot be displayed because the two-dimensional map lacks the coordinates of the z-axis in the world coordinate system. If there are multiple roads belonging to road layers of different heights at the same location, these roads will be displayed crosswise on the 2D map, and when the vehicle is driving at this location, it will be impossible to determine which road the vehicle is driving on through the 2D map. on the driveway. However, even if a plurality of roads belonging to road layers of different heights are cross-displayed at the same position on the two-dimensional map, A vehicle must only drive on a lane with a connected relationship, and will not drive from the current lane into another lane that has no connected relationship with it. Therefore, the embodiment of the present invention obtains the lane with a connected relationship based on the connected relationship between the lanes. According to These connected lanes determine which lane the vehicle is driving on, and then obtain the lane ID of the lane where the vehicle is currently located. As shown in Figure 2, the vehicle is driving on the lane of this layer of road, and there is an upper layer of road above this layer of road. On the two-dimensional map, the current layer of road and the upper layer of road will cross and display at a certain position in front of the vehicle. Since the lanes of the road on this layer are not connected to the lanes of the road on the upper layer, even if the vehicle travels to the above position, it can be determined that the vehicle will not drive into the upper road and will continue to drive on the lane of the road on this layer.
通过上述步骤S101至步骤S103所述的方法,即使车辆行驶在具有不同高度的道路层的路网中,也能够通过二维地图并根据车道之间的连通关系,准确地确定出车辆行驶在哪一个车道上。Through the method described in steps S101 to S103 above, even if the vehicle is driving in a road network with road layers of different heights, it can accurately determine where the vehicle is driving through the two-dimensional map and based on the connectivity between lanes. On a driveway.
下面分别对上述步骤S101和步骤S103作进一步说明。The above steps S101 and S103 will be further described below respectively.
首先,对上述步骤S101作进一步说明。First, the above-mentioned step S101 will be further explained.
参阅附图3,在上述步骤S101的一些实施方式中,可以通过二维地图并按照下列步骤S1011至步骤S1015对车辆进行定位,确定初始的车辆位置。Referring to FIG. 3 , in some implementations of the above step S101 , the vehicle can be positioned through a two-dimensional map and according to the following steps S1011 to S1015 to determine the initial vehicle position.
步骤S1011:通过二维地图对车辆当前行驶道路进行定位,确定当前行驶道路中道路点在二维直角坐标系的二维坐标。Step S1011: Locate the current driving road of the vehicle through the two-dimensional map, and determine the two-dimensional coordinates of the road points on the current driving road in the two-dimensional rectangular coordinate system.
二维地图是以二维的形式在平面上进行表示的地图,通过二维地图对车辆当前行驶道路进行定位,可以得到当前行驶道路中每个道路点在二维地图对应的二维直角坐标系中的二维坐标,该二维坐标包括道路点在二维直角坐标系中x轴和y轴的坐标。A two-dimensional map is a map represented in a two-dimensional form on a plane. By locating the current driving road of the vehicle on the two-dimensional map, the two-dimensional rectangular coordinate system corresponding to the two-dimensional map of each road point on the current driving road can be obtained. The two-dimensional coordinates in include the coordinates of the x-axis and y-axis of the road point in the two-dimensional Cartesian coordinate system.
步骤S1012:获取道路点相对于车辆的相对高度。Step S1012: Obtain the relative height of the road point relative to the vehicle.
相对高度是指在以步骤S1011中的二维直角坐标系的原点、x轴和y轴确定出来的世界坐标系中,沿着世界坐标系的z轴方向上,道路点相对于车辆的相对高度。The relative height refers to the relative height of the road point relative to the vehicle in the world coordinate system determined by the origin, x-axis and y-axis of the two-dimensional rectangular coordinate system in step S1011, along the z-axis direction of the world coordinate system. .
步骤S1013:根据二维直角坐标系的原点、x轴和y轴确定世界坐标系的原点、x轴和y轴,将相对高度作为道路点在世界坐标系中z轴的坐标,根据道路点的二维坐标与相对高度将道路点由世界坐标系反投影至图像坐标系。Step S1013: Determine the origin, x-axis, and y-axis of the world coordinate system based on the origin, x-axis, and y-axis of the two-dimensional rectangular coordinate system, and use the relative height as the coordinate of the z-axis of the road point in the world coordinate system. According to the Two-dimensional coordinates and relative heights back-project road points from the world coordinate system to the image coordinate system.
在本实施例中车辆上设置有图像采集装置,图像采集装置的装置参数包括内参和外参,内参是指图像坐标系与装置坐标系进行转换的位姿参数,外参是指装置坐标系与世界坐标系进行转换的位姿参数。在得到道路点的二维坐标与相对高度之后,可以使用图像采集装置的内参和外参将道路点由世界坐标系反投影至图像坐标系。In this embodiment, an image acquisition device is provided on the vehicle. The device parameters of the image acquisition device include internal parameters and external parameters. The internal parameters refer to the posture parameters converted from the image coordinate system and the device coordinate system. The external parameters refer to the device coordinate system and the device coordinate system. The pose parameters for transformation into the world coordinate system. After obtaining the two-dimensional coordinates and relative height of the road point, the internal and external parameters of the image acquisition device can be used to back-project the road point from the world coordinate system to the image coordinate system.
此外,在一些实施例中,也可以采用图像坐标系并不是二维直角坐标系的图像采集设备,在通过这种图像采集设备进行图像采集得到相应图像之后,可以根据图像采集设备自身使用的图像坐标系与二维直角坐标系之间的坐标系转换关系,将上述图像转换到二维直角坐标系,然后再执行步骤S1013所述的方法。例如,图像采 集设备的图像坐标系可以是三维直角坐标系等,图像采集设备可以是三维相机和雷达等。在本发明实施例中雷达包括但不限于毫米波雷达(Millimeter-wave Radar)和激光雷达(Laser Radar),在一个优选实施方式中雷达可以是激光雷达。In addition, in some embodiments, an image acquisition device whose image coordinate system is not a two-dimensional rectangular coordinate system can also be used. After image acquisition by such an image acquisition device to obtain a corresponding image, the image acquisition device itself can use the image The coordinate system conversion relationship between the coordinate system and the two-dimensional rectangular coordinate system is to convert the above image into the two-dimensional rectangular coordinate system, and then execute the method described in step S1013. For example, image collection The image coordinate system of the collection device can be a three-dimensional rectangular coordinate system, etc., and the image acquisition device can be a three-dimensional camera, radar, etc. In the embodiment of the present invention, radar includes but is not limited to millimeter-wave radar (Millimeter-wave Radar) and laser radar (Laser Radar). In a preferred embodiment, the radar may be laser radar.
步骤S1014:确定位于车辆周围的道路元素,获取道路元素所在位置处的道路点反投影至图像坐标系的反投影位置以及获取通过车辆的图像采集装置确定来出的道路元素所在位置处的道路点在图像坐标系的采集位置。Step S1014: Determine the road elements located around the vehicle, obtain the back-projected position of the road point at the position of the road element to the image coordinate system, and obtain the road point at the position of the road element determined by the image acquisition device of the vehicle. The acquisition position in the image coordinate system.
道路元素至少包括道路上的交通标识和/或其他能够起到标识作用的物体,其中,交通标识至少包括车道线、停止线、路标标识(如左转弯箭头)、交通显示灯和交通标志牌等,其他能够起到标识作用的物体至少包括杆状物体。Road elements at least include traffic signs on the road and/or other objects that can play a marking role. Traffic signs at least include lane lines, stop lines, road signs (such as left turn arrows), traffic lights and traffic signs, etc. , other objects that can play a marking role include at least rod-shaped objects.
需要说明的是,在本发明实施例中可以采用图像识别的方法进行道路元素识别,确定出道路元素所在的位置。本发明实施例不对道路元素的识别方法进行具体限定,只要能够通过对图像(二维地图和车辆的图像采集装置采集到的道路图像)进行识别,确定出道路元素并得到道路元素所在的位置即可。例如,可以采用基于神经网络建立的道路元素识别模型对图像进行道路元素识别。It should be noted that in the embodiment of the present invention, an image recognition method may be used to identify road elements and determine the location of the road elements. The embodiment of the present invention does not specifically limit the identification method of road elements, as long as the road elements can be identified and the location of the road elements can be obtained by identifying images (two-dimensional maps and road images collected by the vehicle's image acquisition device). Can. For example, a road element recognition model based on a neural network can be used to identify road elements in images.
在将道路点由世界坐标系反投影至图像坐标系之后,图像坐标系中会形成一个与道路点对应的反投影点,反投影点在图像坐标系位置就是道路点的反投影位置。After the road point is back-projected from the world coordinate system to the image coordinate system, a back-projection point corresponding to the road point will be formed in the image coordinate system. The position of the back-projection point in the image coordinate system is the back-projection position of the road point.
通过车辆的图像采集装置对位于车辆周围的道路元素所在位置处的道路点进行图像采集,得到位于车辆周围道路元素所在位置处的道路点的道路点图像,根据这些道路点图像就可以确定出道路元素所在位置处的道路点在图像坐标系的采集位置。The image acquisition device of the vehicle collects images of road points located at the positions of road elements around the vehicle to obtain road point images of road points located at the positions of road elements around the vehicle. The road can be determined based on these road point images. The road point at the location of the element is at the collection position of the image coordinate system.
进一步,在一些实施方式中,为了防止图像采集装置故障或者被遮挡导致无法对车辆周围道路元素所在位置处的道路点进行图像采集,进而无法实现对车辆位置的确定,可以通过至少两个图像采集装置对车辆周围道路元素所在位置处的道路点进行图像采集,提高图像采集与车辆定位的可靠性。具体地,在这些实施方式中,可以通过至少两个图像采集装置对位于车辆周围道路元素所在位置处的道路点进行图像采集,得到位于车辆周围道路元素所在位置处的道路点的道路点图像,进而根据道路点图像,确定位于车辆周围道路元素所在位置处的道路点在图像坐标系的采集位置。在通过至少两个图像采集装置对道路点进行图像采集之前,要对这些图像采集装置进行标定,以便对这些图像采集装置的装置坐标系进行统一。在本发明实施例中可以采用常规的多个图像采集装置的标定方法进行标定,本发明实施例对此不进行具体限定。Furthermore, in some embodiments, in order to prevent the image acquisition device from malfunctioning or being blocked, resulting in the inability to collect images of road points at the locations of road elements around the vehicle, and thus from being unable to determine the position of the vehicle, at least two image acquisition methods can be used. The device collects images of road points at the locations of road elements around the vehicle to improve the reliability of image collection and vehicle positioning. Specifically, in these embodiments, images of road points located at positions of road elements around the vehicle can be collected through at least two image acquisition devices to obtain road point images of road points located at positions of road elements around the vehicle, Then, based on the road point image, the collection position of the road point located at the position of the road element around the vehicle in the image coordinate system is determined. Before collecting images of road points through at least two image collecting devices, these image collecting devices need to be calibrated in order to unify the device coordinate systems of these image collecting devices. In the embodiment of the present invention, a conventional calibration method of multiple image acquisition devices can be used for calibration, and the embodiment of the present invention does not specifically limit this.
步骤S1015:对道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,根据位置匹配的结果确定车辆在世界坐标系的位置。Step S1015: Perform position matching on the back-projection position of the road point at the location of the road element and the collection position, and determine the position of the vehicle in the world coordinate system based on the position matching result.
图像采集装置的内参是图像采集装置的固有参数,在图像采集装置生产调配完成之后就是确定的了,而图像采集装置的外参是可以调整的。因此,图像采集装置的外参是否准确将会极大影响图像采集装置的装置坐标系与世界坐标系进行转换时 的准确性。本发明实施例对位于车辆周围道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配的目的就是为了获取准确的外参,在得到准确的外参之后就可以同时使用图像采集装置的内参和外参将道路点在图像坐标系的反投影位置由图像坐标系投影到世界坐标系(根据内参将道路点由图像坐标系投影至装置坐标系,根据外参再将道路点由装置坐标系投影至世界坐标系),进一步选取车辆所在位置处的道路点在世界坐标系的位置作为车辆在世界坐标系的位置。具体而言,在一些实施方式中,可以对位于车辆周围道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,得到图像采集装置的装置坐标系与世界坐标系进行转换的位姿参数;进而获取车辆所在位置处的道路点反投影至图像坐标系的反投影位置,根据车辆所在位置处的道路点的反投影位置与位姿参数,确定车辆在世界坐标系的位置。The internal parameters of the image acquisition device are inherent parameters of the image acquisition device, which are determined after the production and deployment of the image acquisition device is completed, while the external parameters of the image acquisition device can be adjusted. Therefore, whether the external parameters of the image acquisition device are accurate will greatly affect the conversion between the device coordinate system of the image acquisition device and the world coordinate system. accuracy. In the embodiment of the present invention, the purpose of position matching the back-projected position of the road point located at the location of the road element around the vehicle and the acquisition position is to obtain accurate external parameters. After obtaining the accurate external parameters, the image acquisition device can be used at the same time The internal parameters and external parameters project the back-projection position of the road point in the image coordinate system from the image coordinate system to the world coordinate system (project the road point from the image coordinate system to the device coordinate system according to the internal parameters, and then project the road point from the device coordinate system according to the external parameters). coordinate system projected to the world coordinate system), and further select the position of the road point at the vehicle's location in the world coordinate system as the vehicle's position in the world coordinate system. Specifically, in some embodiments, the back-projection position of the road point located at the position of the road element around the vehicle can be position matched with the acquisition position to obtain the position of the device coordinate system of the image acquisition device and the world coordinate system. pose parameters; and then obtain the back-projection position of the road point at the vehicle's location to the image coordinate system, and determine the vehicle's position in the world coordinate system based on the back-projection position and pose parameters of the road point at the vehicle's location.
通过上述步骤S1011至步骤S1015所述的方法,可以通过二维地图获取到车辆在世界坐标系的位置,从而即使车辆的车载地图是二维地图,在无法利用全球导航卫星系统进行定位的情况下也能够得到车辆在世界坐标系的位置。此外,道路点的稠密程度不同,相邻道路点在世界坐标系的间距也不同,同时车辆所在位置处的道路点的数量也不同。而道路点的间距和数量会影响车辆在世界坐标系的位置的精度(定位精度),并且稠密程度越高定位精度越高,稠密程度越低定位精度越低。因此,在本实施例中还可以通过调整道路点的稠密程度来调整车辆在世界坐标系的定位精度,从而在无法利用全球导航卫星系统进行定位的情况下实现对车辆的厘米级定位,在进行长时间定位后不会出现定位漂移。Through the method described in the above steps S1011 to S1015, the position of the vehicle in the world coordinate system can be obtained through a two-dimensional map. Therefore, even if the on-board map of the vehicle is a two-dimensional map, the global navigation satellite system cannot be used for positioning. The position of the vehicle in the world coordinate system can also be obtained. In addition, the density of road points is different, the distance between adjacent road points in the world coordinate system is also different, and the number of road points at the location of the vehicle is also different. The spacing and number of road points will affect the accuracy of the vehicle's position in the world coordinate system (positioning accuracy), and the higher the density, the higher the positioning accuracy, and the lower the density, the lower the positioning accuracy. Therefore, in this embodiment, the positioning accuracy of the vehicle in the world coordinate system can also be adjusted by adjusting the density of road points, thereby achieving centimeter-level positioning of the vehicle when the global navigation satellite system cannot be used for positioning. Positioning drift will not occur after long-term positioning.
下面对上述步骤S1012和步骤S1015作进一步说明。The above steps S1012 and S1015 will be further described below.
首先对上述步骤S1012作进一步说明。First, the above step S1012 will be further described.
在根据上述步骤S1012的一些实施方式中,由于车辆的姿态是随着行驶道路的变化而变化的(如行驶道路所在平面与预设水平位具有一定的夹角,那么车辆与预设水平位具有同样的夹角),因此,可以先根据车辆建立一个车体坐标系(相对于世界坐标系而言车体坐标系是一个局部坐标系),利用道路点与车体坐标系的原点形成的向量与车体坐标系中车辆所在平面法向量相互垂直,向量积为零的原则,计算出道路点相对于车辆的相对高度。具体而言,在本实施方式中可以通过下列步骤S10121至步骤S10123获取道路点相对于车辆的相对高度。In some implementations according to the above step S1012, since the posture of the vehicle changes with the change of the driving road (for example, the plane where the driving road is located has a certain angle with the preset level, then the vehicle has a certain angle with the preset level. (the same angle), therefore, you can first establish a vehicle body coordinate system based on the vehicle (the vehicle body coordinate system is a local coordinate system relative to the world coordinate system), and use the vector formed by the road point and the origin of the vehicle body coordinate system The relative height of the road point relative to the vehicle is calculated based on the principle that the normal vector of the plane where the vehicle is located in the vehicle body coordinate system is perpendicular to each other and the vector product is zero. Specifically, in this embodiment, the relative height of the road point relative to the vehicle can be obtained through the following steps S10121 to S10123.
步骤S10121:获取在车体坐标系中车辆所在平面的平面向量并且根据平面向量获取平面的单位法向量。Step S10121: Obtain the plane vector of the plane where the vehicle is located in the vehicle body coordinate system and obtain the unit normal vector of the plane based on the plane vector.
在车体坐标系中车辆所在平面是指由车体坐标系中x轴和y轴形成的平面。如图4所示,x1和z1分别表示车体坐标系中的x轴和z轴,a表示车辆所在平面的平面向量,n表示车辆所在平面的单位法向量。x2和z2分别表示“以二维直角坐标系的原点、x轴和y轴分别为原点、x轴和y轴的世界坐标系”中的x轴和z轴。 In the vehicle body coordinate system, the plane where the vehicle is located refers to the plane formed by the x-axis and y-axis in the vehicle body coordinate system. As shown in Figure 4, x 1 and z 1 represent the x-axis and z-axis in the vehicle body coordinate system respectively, a represents the plane vector of the plane where the vehicle is located, and n represents the unit normal vector of the plane where the vehicle is located. x 2 and z 2 respectively represent the x axis and z axis in the "world coordinate system with the origin, x axis and y axis of the two-dimensional rectangular coordinate system as the origin, x axis and y axis respectively".
如果车辆上设置有依赖于车体坐标系的数据运行的设备,那么可以直接利用这些设备获取车辆所在平面的平面向量。例如,可以通过加速度计直接获取在车体坐标系中车辆所在平面的平面向量。If the vehicle is equipped with devices that rely on data from the vehicle body coordinate system, these devices can be used directly to obtain the plane vector of the plane where the vehicle is located. For example, the plane vector of the plane where the vehicle is located in the vehicle body coordinate system can be directly obtained through the accelerometer.
在获取到车辆所在平面的平面向量之后,可以采用数学技术领域中法向量的常规计算方法,根据车辆所在平面的平面向量计算车辆所在平面的单位法向量,在此不进行赘述。After obtaining the plane vector of the plane where the vehicle is located, conventional calculation methods for normal vectors in the field of mathematics and technology can be used to calculate the unit normal vector of the plane where the vehicle is located based on the plane vector of the plane where the vehicle is located, which will not be described in detail here.
步骤S10122:根据道路点的二维坐标并且通过求解下列方程得到道路点在以二维直角坐标系的原点、x轴和y轴分别为原点、x轴和y轴的世界坐标系中z轴的坐标zh。Step S10122: According to the two-dimensional coordinates of the road point and by solving the following equations, the z-axis of the road point in the world coordinate system with the origin, x-axis and y-axis of the two-dimensional rectangular coordinate system as the origin, x-axis and y-axis respectively Coordinates zh.
(xh-x1)×nx+(yh-y1)×ny+(zh-z1)×nz=0(xh-x1)×nx+(yh-y1)×ny+(zh-z1)×nz=0
在上述方程中,x1、y1和z1表示车辆在车体坐标系中x轴、y轴和z轴的坐标,nx、ny和nz表示单位法向量在车体坐标系中x轴、y轴和z轴的坐标,xh和yh表示道路点的二维坐标中x轴和y轴的坐标。In the above equation, x1, y1 and z1 represent the coordinates of the vehicle on the x-axis, y-axis and z-axis in the vehicle body coordinate system, nx, ny and nz represent the unit normal vectors on the x-axis, y-axis and The coordinates of the z-axis, xh and yh represent the coordinates of the x-axis and y-axis in the two-dimensional coordinates of the road point.
(xh-x1,yh-y1,zh-z1)实际表示的是在车体坐标系中由车辆与道路点这两点形成的向量,(nx,ny,nz)表示在车体坐标系中车辆所在平面的单位法向量,向量(xh-x1,yh-y1,zh-z1)与向量(nx,ny,nz)是垂直的,因此这两个向量的向量积等于零。其中,xh和yh都可以从道路点的二维坐标中直接得到,通过求解上述方程就可以解得坐标zh的值。(xh-x1, yh-y1, zh-z1) actually represents the vector formed by the two points of the vehicle and the road point in the vehicle body coordinate system, (nx, ny, nz) represents the vehicle in the vehicle body coordinate system The unit normal vector of the plane, the vector (xh-x1, yh-y1, zh-z1) and the vector (nx, ny, nz) are perpendicular, so the vector product of these two vectors is equal to zero. Among them, xh and yh can be obtained directly from the two-dimensional coordinates of the road point, and the value of the coordinate zh can be obtained by solving the above equation.
步骤S10123:根据坐标zh确定道路点相对于车辆的相对高度。Step S10123: Determine the relative height of the road point relative to the vehicle according to the coordinate zh.
通过上述步骤S10121至步骤S10123所述的方法,能够准确得出道路点相对于车辆的相对高度,有利于将道路点由世界坐标系准确地转换到图像坐标系。Through the method described in the above steps S10121 to S10123, the relative height of the road point relative to the vehicle can be accurately obtained, which is conducive to accurately converting the road point from the world coordinate system to the image coordinate system.
下面继续对步骤S1015作进一步说明。Step S1015 will be further described below.
在根据上述步骤S1015的一些实施方式中,在对位于车辆周围道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,以获取图像采集装置的装置坐标系与世界坐标系进行转换的位姿参数时可以将这个位姿参数作为方程参数,根据位于车辆周围道路元素所在位置处的道路点的反投影位置与采集位置建立距离误差方程(距离误差方程的方程参数包含上述位姿参数),然后采用非线性迭代优化算法,以距离误差方程满足预设的收敛条件为目标,对距离误差方程中的位姿参数进行迭代优化,获取优化后的位姿参数作为最终的图像采集装置的装置坐标系与世界坐标系进行转换的位姿参数。具体而言,在本实施方式中可以通过下列步骤S10151至步骤S10152对位于车辆周围道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配:In some implementations according to the above step S1015, position matching is performed on the back-projection position of the road point located at the position of the road element around the vehicle and the acquisition position to obtain the device coordinate system of the image acquisition device and the world coordinate system for conversion. When the pose parameter is used, this pose parameter can be used as an equation parameter, and a distance error equation is established based on the back-projected position of the road point located at the position of the road element around the vehicle and the acquisition position (the equation parameters of the distance error equation include the above pose parameters ), and then use a nonlinear iterative optimization algorithm to iteratively optimize the pose parameters in the distance error equation with the goal that the distance error equation satisfies the preset convergence conditions, and obtain the optimized pose parameters as the final image acquisition device The pose parameters for conversion between the device coordinate system and the world coordinate system. Specifically, in this embodiment, the following steps S10151 to S10152 can be used to perform position matching on the back-projected position of the road point located at the location of the road element around the vehicle and the collection position:
步骤S10151:根据位于车辆周围道路元素所在位置处的道路点的反投影位置与采集位置建立下式所示的距离误差方程:Step S10151: Establish a distance error equation shown in the following formula based on the back-projection position and collection position of the road point located at the position of the road element around the vehicle:
loss=d(f(A,O),cd) loss=d(f(A,O),cd)
在上述距离误差方程中,f(A,O)表示当前道路点的反投影位置,A表示当前道路点在世界坐标系的位置,O表示装置坐标系与世界坐标系进行转换的位姿参数,cd表示以距离当前道路点的反投影位置最近的两个道路点的采集位置为端点所形成的线段,d表示反投影位置f(A,O)到线段cd的距离计算函数,loss表示距离计算函数d计算得到的距离。如图5所示,图5中的点a表示道路元素所在位置处的道路点反投影至图像坐标系时的反投影点,点c和d分别表示通过图像采集装置确定出来的道路元素所在位置处的道路点在图像坐标系中距离反投影点a最近的两个点。In the above distance error equation, f(A,O) represents the back-projection position of the current road point, A represents the position of the current road point in the world coordinate system, and O represents the pose parameter for conversion between the device coordinate system and the world coordinate system. cd represents the line segment formed by taking the collection positions of the two road points closest to the back-projected position of the current road point as endpoints, d represents the distance calculation function from the back-projected position f (A, O) to the line segment cd, and loss represents the distance calculation The distance calculated by function d. As shown in Figure 5, point a in Figure 5 represents the back-projection point when the road point at the location of the road element is back-projected to the image coordinate system. Points c and d respectively represent the location of the road element determined through the image acquisition device. The road points at are the two closest points to the back-projection point a in the image coordinate system.
步骤S10152:以使距离loss小于预设的距离阈值为目标,采用列文伯格-马夸尔特(Levenberg-Marquardt)算法对距离误差方程中的位姿参数O进行迭代优化,并获取使距离loss小于预设的距离阈值时的位姿参数O,将位姿参数O作为最终的图像采集装置的装置坐标系与世界坐标系进行转换的位姿参数。Step S10152: With the goal of making the distance loss smaller than the preset distance threshold, use the Levenberg-Marquardt algorithm to iteratively optimize the pose parameter O in the distance error equation, and obtain the distance The pose parameter O when the loss is less than the preset distance threshold, the pose parameter O is used as the pose parameter for conversion between the device coordinate system of the final image acquisition device and the world coordinate system.
需要说明的是,列文伯格-马夸尔特(Levenberg-Marquardt)算法是数学技术领域中一种常规的非线性最小二乘算法,在此不对其算法原理和计算过程进行赘述。It should be noted that the Levenberg-Marquardt algorithm is a conventional nonlinear least squares algorithm in the field of mathematical technology, and its algorithm principle and calculation process will not be described in detail here.
以上是对步骤S1015的进一步说明。The above is a further description of step S1015.
当车辆在包含多个不同道路层的路网中行驶时,由于二维地图缺少世界坐标系中z轴的坐标,因此无法对不同道路的高度进行显示。如图6所示,当同一位置处存在多个属于不同道路层的道路时,这些道路在二维地图上会交叉显示,无法清晰地显示出车辆位于哪一条道路上。在根据本发明的另一个实施例的车辆定位方法中,车辆定位方法除了可以包括前述方法实施例中的步骤S1011至步骤S1015,还可以在每个步骤的之前或之后在二维地图上对车辆当前行驶道路及之前行驶过的道路进行道路连通显示,以便于可以排除其他道路层中的道路对使用二维地图进行车辆定位显示的影响,能够更加清晰地显示出车辆位于哪一条道路的哪个位置上。在一个优选实施方式中,可以在根据道路点的二维坐标与相对高度将道路点由世界坐标系反投影至图像坐标系之前,在二维地图上对车辆当前行驶道路及之前行驶过的道路进行道路连通显示。When a vehicle travels in a road network containing multiple different road layers, the height of different roads cannot be displayed because the two-dimensional map lacks the coordinates of the z-axis in the world coordinate system. As shown in Figure 6, when there are multiple roads belonging to different road layers at the same location, these roads will be displayed crosswise on the two-dimensional map, making it impossible to clearly show which road the vehicle is on. In a vehicle positioning method according to another embodiment of the present invention, in addition to the steps S1011 to S1015 in the foregoing method embodiment, the vehicle positioning method may also map the vehicle on a two-dimensional map before or after each step. The current driving road and the previously traveled road are displayed for road connectivity, so that the influence of roads in other road layers on the vehicle positioning display using a two-dimensional map can be eliminated, and the vehicle can be more clearly displayed on which road and which location. superior. In a preferred embodiment, before back-projecting the road point from the world coordinate system to the image coordinate system according to the two-dimensional coordinates and relative height of the road point, the vehicle's current driving road and the previously traveled road can be mapped on the two-dimensional map. Display road connections.
以上是对上述步骤S101的说明,下面继续对图1所示的步骤S103作进一步说明。The above is the description of the above-mentioned step S101. Next, step S103 shown in FIG. 1 will be further described.
车辆周围车道可能包含多条,如果分别对每条车道进行连通关系判断与位置匹配会显著增加计算资源的消耗,因此,为了减少计算资源的消耗,可以先根据上一次的车道ID对应车道落在二维地图上的地图范围与车辆当前位置,确定车辆当前所在车道的车道ID,如果无法根据上一次的车道ID对应车道落在二维地图上的地图范围确定出车道ID,再继续对其他车道进行连通关系判断与位置匹配。There may be multiple lanes around the vehicle. If the connectivity relationship and location matching are performed on each lane separately, it will significantly increase the consumption of computing resources. Therefore, in order to reduce the consumption of computing resources, you can first locate the lane corresponding to the last lane ID. The map range on the two-dimensional map and the current position of the vehicle are used to determine the lane ID of the lane where the vehicle is currently located. If the lane ID cannot be determined based on the map range of the last lane ID corresponding to the lane on the two-dimensional map, then continue to other lanes. Perform connectivity relationship judgment and location matching.
具体而言,在上述步骤S103的一些实施方式中,可以通过下列步骤S1031至步骤S1033,并根据车辆位置周围的车道及车道之间连通关系,确定车辆当前所在车道的车道ID。 Specifically, in some implementations of the above-mentioned step S103, the lane ID of the lane where the vehicle is currently located may be determined through the following steps S1031 to S1033 and based on the lanes around the vehicle position and the connectivity between lanes.
步骤S1031:判断根据上一次确定的车辆位置能否确定出上一次的车道ID;若能确定出上一次的车道ID,则转至步骤S1032;若不能确定出上一次的车道ID,则转至步骤S1033。Step S1031: Determine whether the last lane ID can be determined based on the last determined vehicle position; if the last lane ID can be determined, go to step S1032; if the last lane ID cannot be determined, go to Step S1033.
步骤S1032:根据上一次的车道ID对应车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。Step S1032: Determine the lane ID of the lane where the vehicle is currently located based on the map range where the lane corresponding to the last lane ID falls on the two-dimensional map and the current vehicle position.
车道落在二维地图上的地图范围是指按照二维地图的地图比例尺,根据车道的实际位置确定出的这条车道在二维地图上的地图范围。The map range where the lane falls on the two-dimensional map refers to the map range of the lane on the two-dimensional map determined based on the actual position of the lane according to the map scale of the two-dimensional map.
如果当前车辆位置位于上一次的车道ID对应车道落在二维地图上的地图范围,说明车辆极有可能仍然在上一次的车道ID对应车道继续行驶,车辆当前所在车道的车道ID仍然是上一次的车道ID;如果当前车辆位置没有位于上一次的车道ID对应车道落在二维地图上的地图范围,说明车辆已经驶离了上一次的车道ID对应车道,此时可以从车辆位置周围的其他车道中确定车辆当前所在车道的车道ID。If the current vehicle position is in the map range where the lane corresponding to the last lane ID falls on the two-dimensional map, it means that the vehicle is very likely to continue driving in the lane corresponding to the last lane ID, and the lane ID of the lane where the vehicle is currently located is still the same as the last time. lane ID; if the current vehicle position is not located in the map range where the lane corresponding to the last lane ID falls on the two-dimensional map, it means that the vehicle has left the lane corresponding to the last lane ID. At this time, it can be obtained from other locations around the vehicle position. The lane ID in the lane determines the lane the vehicle is currently in.
进一步,在步骤S1032的一些优选实施方式中,可以通过下列步骤11至步骤13,并根据上一次的车道ID对应车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。Further, in some preferred implementations of step S1032, the following steps 11 to 13 can be used, and based on the map range of the last lane ID corresponding to the lane falling on the two-dimensional map and the current vehicle position, the location of the lane where the vehicle is currently located can be determined. Lane ID.
步骤11:判断当前车辆位置是否落入上一次的车道ID对应的地图范围内且在地图范围内二维地图只包含一条车道;若当前车辆位置落入上一次的车道ID对应的地图范围内且在地图范围内二维地图只包含一条车道,则转至步骤12;否则,转至步骤13。Step 11: Determine whether the current vehicle position falls within the map range corresponding to the last lane ID and the two-dimensional map only contains one lane within the map range; if the current vehicle position falls within the map range corresponding to the last lane ID and If the 2D map contains only one lane within the map range, go to step 12; otherwise, go to step 13.
步骤12:将上一次的车道ID作为车辆当前所在车道的车道ID。Step 12: Use the last lane ID as the lane ID of the current lane where the vehicle is located.
如果当前车辆位置位于上一次的车道ID对应车道落在二维地图上的地图范围,说明车辆极有可能仍然在上一次的车道ID对应车道继续行驶。进而如果在地图范围内二维地图只包含一条车道,说明车辆必然在上一次的车道ID对应车道继续行驶,因此,可以直接将上一次的车道ID作为车辆当前所在车道的车道ID。If the current vehicle position is within the map range where the lane corresponding to the last lane ID falls on the two-dimensional map, it means that the vehicle is very likely to continue driving in the lane corresponding to the last lane ID. Furthermore, if the two-dimensional map contains only one lane within the map range, it means that the vehicle must continue driving in the lane corresponding to the last lane ID. Therefore, the last lane ID can be directly used as the lane ID of the current lane of the vehicle.
步骤13:获取与上一次的车道ID对应车道属于同一道路层且与上一次的车道ID对应车道具有连通关系的其他车道,根据所述其他车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。Step 13: Obtain other lanes that belong to the same road layer as the lane corresponding to the last lane ID and have a connectivity relationship with the lane corresponding to the last lane ID, and based on the map range of the other lanes falling on the two-dimensional map and the current vehicle Position, determine the lane ID of the lane the vehicle is currently in.
如果当前车辆位置没有位于上一次的车道ID对应的地图范围内,其有可能是位于同一道路层内附近其他车道落在二维地图上的地图范围内,因此可以根据这些其他车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。If the current vehicle position is not located within the map range corresponding to the last lane ID, it may be located in the same road layer and other nearby lanes fall within the map range on the two-dimensional map. Therefore, these other lanes can be located within the two-dimensional map range. The map range on the map and the current vehicle position determine the lane ID of the lane where the vehicle is currently located.
如果当前车辆位置位于上一次的车道ID对应的地图范围内,但是这个地图范围内二维地图包含多条车道,说明车辆可能位于不同高度的道路层的交叉区域(如立交桥)。如果对每个道路层的车道都进行连通关系判断与位置匹配会显著增加计算资源的消耗,因此,为了减小计算资源的消耗,可以先对“与上一次的车道ID对应车 道属于同一道路层且与上一次的车道ID对应车道具有连通关系的其他车道”进行位置匹配,如果当前车辆位置位于上述其他车道对应的地图范围内,说明车辆极有可能在上述其他车道上行驶,进而就可以确定出车辆当前所在车道的车道ID。If the current vehicle position is within the map range corresponding to the last lane ID, but the two-dimensional map within this map range contains multiple lanes, it means that the vehicle may be located in an intersection area of road layers of different heights (such as an overpass). If the connectivity relationship and position matching are performed on the lanes of each road layer, it will significantly increase the consumption of computing resources. Therefore, in order to reduce the consumption of computing resources, you can first check the "vehicles corresponding to the last lane ID". "Other lanes that belong to the same road layer and have a connected relationship with the lane corresponding to the last lane ID" are used for location matching. If the current vehicle position is within the map range corresponding to the above-mentioned other lanes, it means that the vehicle is very likely to be on the above-mentioned other lanes. Driving, the lane ID of the lane where the vehicle is currently located can be determined.
通过上述步骤11至步骤13所述的方法,对“上一次的车道ID对应的地图范围”与当前车辆位置进行匹配,能够准确地确定出车辆是否继续行使在上一次的车道ID对应车道上。By matching the "map range corresponding to the last lane ID" with the current vehicle position through the method described in steps 11 to 13 above, it can be accurately determined whether the vehicle continues to drive in the lane corresponding to the last lane ID.
进一步,在上述步骤13的一些优选实施方式中,可以通过下列步骤131至步骤133,并根据所述其他车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。Further, in some preferred implementations of step 13 above, the lane ID of the lane where the vehicle is currently located can be determined through the following steps 131 to 133 and based on the map range of the other lanes falling on the two-dimensional map and the current vehicle position. .
步骤131:判断当前车辆位置是否只落入一条所述其他车道对应的地图范围内;若只落入一条所述其他车道对应的地图范围内,则转至步骤132;否则,转至步骤133。Step 131: Determine whether the current vehicle position only falls within the map range corresponding to one of the other lanes; if it only falls within the map range corresponding to one of the other lanes, go to step 132; otherwise, go to step 133.
步骤132:将所述一条所述其他车道的车道ID作为车辆当前所在车道的车道ID。Step 132: Use the lane ID of the other lane as the lane ID of the lane where the vehicle is currently located.
如果当前车辆位置位于所述其他车道落在二维地图上的地图范围,说明车辆极有可能在所述其他车道上行驶。进而如果当前车辆位置只位于一条所述其他车道对应的地图范围内,那么说明车辆必然在这条其他车道上行驶,因此,可以直接将这条其他车道的车道ID作为车辆当前所在车道的车道ID。If the current vehicle position is within the map range where the other lane falls on the two-dimensional map, it means that the vehicle is very likely to be traveling on the other lane. Furthermore, if the current vehicle position is only within the map range corresponding to one of the other lanes, it means that the vehicle must be driving on this other lane. Therefore, the lane ID of this other lane can be directly used as the lane ID of the lane where the vehicle is currently located. .
步骤133:根据位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。Step 133: Determine the lane ID of the lane where the vehicle is currently located based on the map range where the lane located within the preset range centered on the current vehicle position falls on the two-dimensional map and the current vehicle position.
在当前车辆位置没有位于所述其他车道落在二维地图上的地图范围内的情况下,通过获取位于以当前车辆位置为中心的预设范围内的车道来扩大车道的搜索范围,增加车辆位置周围道路的数量,以便于能够从这些道路中确定出车辆当前所在的车道。When the current vehicle position is not located within the map range where the other lanes fall on the two-dimensional map, the search range of the lane is expanded by acquiring lanes located within the preset range centered on the current vehicle position, and the vehicle position is increased. The number of surrounding roads from which the vehicle's current lane can be determined.
通过上述步骤131至步骤133所述的方法,对“与上一次的车道ID对应车道属于同一道路层且与上一次的车道ID对应车道具有连通关系的其他车道”与当前车辆位置进行匹配,能够准确地确定出车辆是否行使在上述其他车道上。Through the method described in steps 131 to 133 above, "other lanes that belong to the same road layer as the lane corresponding to the last lane ID and have a connectivity relationship with the lane corresponding to the last lane ID" are matched with the current vehicle position, It can accurately determine whether the vehicle is driving on the other lanes mentioned above.
进一步,在上述步骤133的一些优选实施方式中,在确定出位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围之后,可以获取当前车辆位置落入了几条车道的地图范围内,根据车道的数量采取不同的方式确定车辆当前所在车道的车道ID。Further, in some preferred implementations of the above step 133, after determining that the lane located within the preset range centered on the current vehicle position falls within the map range on the two-dimensional map, it is possible to obtain how many lanes the current vehicle position falls within. Within the map range of lanes, different methods are used to determine the lane ID of the lane where the vehicle is currently located based on the number of lanes.
具体而言,如果当前车辆位置只落入一条预设范围内的车道对应的地图范围内,说明车辆必然行驶在这条车道上,此时可以将这条车道的车道ID作为车辆当前所在车道的车道ID。Specifically, if the current vehicle position only falls within the map range corresponding to a lane within a preset range, it means that the vehicle must be driving on this lane. At this time, the lane ID of this lane can be used as the lane ID of the vehicle's current lane. Lane ID.
如果当前车辆位置落入多条预设范围内的车道对应的地图范围内,此时可以将这些车道作为候选车道,并根据与上一次的车道ID对应车道具有连通关系的车道和 /或当前车辆的位姿,从候选车道的车道ID中筛选出车辆当前所在车道的车道ID。具体地,可以将候选车道中与上一次的车道ID对应车道具有连通关系的候选车道作为车辆当前所在车道。同时,还可以从候选车道中选取与当前车辆的位姿匹配的候选车道作为车辆当前所在车道。在一些情况下,还可以将与上一次的车道ID对应车道具有连通关系并同时与当前车辆的位姿匹配的候选车道作为车辆当前所在车道。其中,车辆的位姿是指车辆的位置和姿态(Pose)。例如,根据车辆的位置确定出朝向左侧和朝向右侧的两条候选车道,此时车辆的姿态是向左转弯,那么可以确定朝向左侧的候选车道与当前车辆的位姿是匹配的,可以将朝向左侧的候选车道作为车辆当前所在车道。If the current vehicle position falls within the map range corresponding to multiple lanes within the preset range, these lanes can be used as candidate lanes at this time, and the lanes and lanes that have a connectivity relationship with the lane corresponding to the last lane ID are used. /or the pose of the current vehicle, filter out the lane ID of the lane where the vehicle is currently located from the lane ID of the candidate lane. Specifically, the candidate lane among the candidate lanes that has a connected relationship with the lane corresponding to the last lane ID can be used as the lane where the vehicle is currently located. At the same time, a candidate lane that matches the pose of the current vehicle can also be selected from the candidate lanes as the lane where the vehicle is currently located. In some cases, a candidate lane that has a connected relationship with the lane corresponding to the last lane ID and matches the pose of the current vehicle can also be used as the lane where the vehicle is currently located. Among them, the pose of the vehicle refers to the position and attitude (Pose) of the vehicle. For example, if two candidate lanes facing left and right are determined based on the position of the vehicle, and the posture of the vehicle is turning left, then it can be determined that the candidate lane facing left matches the posture of the current vehicle. The candidate lane facing left can be regarded as the current lane of the vehicle.
进一步,在一些优选实施方式中可以通过下列步骤1331至步骤1335,并根据与上一次的车道ID对应车道具有连通关系的车道和/或当前车辆的位姿,从候选车道的车道ID中筛选出车辆当前所在车道的车道ID。Furthermore, in some preferred embodiments, the following steps 1331 to 1335 can be used to filter the lane IDs of the candidate lanes based on the lanes that have a connected relationship with the lane corresponding to the last lane ID and/or the pose of the current vehicle. Lane ID of the lane where the vehicle is currently located.
步骤1331:判断候选车道是否为虚拟车道;若是虚拟车道,则转至步骤1332;若不是虚拟车道,则转至步骤1334。Step 1331: Determine whether the candidate lane is a virtual lane; if it is a virtual lane, go to step 1332; if it is not a virtual lane, go to step 1334.
虚拟车道是指在通过二维地图对车辆进行导航时规划出来且在实际道路中没有实际的车道线的车道。Virtual lanes refer to lanes that are planned when navigating a vehicle through a two-dimensional map and have no actual lane lines on the actual road.
如图7所示,车辆在向前行驶时会经过一个丁字路口,丁字路口中没有划定具体的车道,即没有车道线。通过二维地图对车辆进行导航时会在这个丁字路口生成两条虚拟车道(图7虚线所示),车辆沿着一条虚拟车道(直行虚拟车道)可以由南向北驶入北侧的车道,车辆沿着另一条虚拟车道(右转虚拟车道)可以由南向东驶入东侧的车道。As shown in Figure 7, the vehicle will pass through a T-shaped intersection when driving forward. There is no specific lane delineated in the T-shaped intersection, that is, there is no lane line. When the vehicle is navigated through a two-dimensional map, two virtual lanes will be generated at this T-intersection (shown as a dotted line in Figure 7). The vehicle can drive from south to north along one virtual lane (through virtual lane) into the north lane. Vehicles can drive from south to east along another virtual lane (right-turn virtual lane) into the east lane.
步骤1332:获取与当前车辆的位姿匹配的虚拟车道。Step 1332: Obtain the virtual lane that matches the current vehicle's pose.
参阅附图7和图8,当车辆由图7所示位置行驶至图8所示位置时,车辆位置同时落入两条虚拟车道对应的地图范围内。但是,只有直行虚拟车道是与当前车辆的位姿匹配的虚拟车道。Referring to Figures 7 and 8, when the vehicle travels from the position shown in Figure 7 to the position shown in Figure 8, the vehicle position falls within the map range corresponding to the two virtual lanes at the same time. However, only the straight virtual lane is a virtual lane that matches the pose of the current vehicle.
参阅附图7和图9,当车辆由图7所示位置行驶至图9所示位置时,车辆位置同时落入两条虚拟车道对应的地图范围内。但是,只有右转虚拟车道是与当前车辆的位姿匹配的虚拟车道。Referring to Figures 7 and 9, when the vehicle travels from the position shown in Figure 7 to the position shown in Figure 9, the vehicle position falls within the map range corresponding to the two virtual lanes at the same time. However, only the right-turn virtual lane is a virtual lane that matches the pose of the current vehicle.
步骤1333:判断与当前车辆的位姿匹配的虚拟车道的数量是否为1;若为1,则将这条匹配的虚拟车道的车道ID作为车辆当前所在车道的车道ID;若不为1,则根据当前车辆位置进行初始化处理,重新确定车辆的起点车道,将起点车道的车道ID作为车辆当前所在车道的车道ID。Step 1333: Determine whether the number of virtual lanes matching the current vehicle's pose is 1; if it is 1, then use the lane ID of this matching virtual lane as the lane ID of the lane where the vehicle is currently located; if not 1, then Initialization processing is performed based on the current vehicle position, the starting lane of the vehicle is re-determined, and the lane ID of the starting lane is used as the lane ID of the lane where the vehicle is currently located.
步骤1334:从候选车道中获取与上一次的车道ID对应车道具有连通关系的车道。Step 1334: Obtain the lane that has a connected relationship with the lane corresponding to the last lane ID from the candidate lanes.
步骤1335:判断上述与上一次的车道ID对应车道具有连通关系的车道的数量是否为1;若为1,将这条具有连通关系的车道的车道ID作为车辆当前所在车道的车 道ID;若不为1,则根据当前车辆位置进行初始化处理,重新确定车辆的起点车道,将起点车道的车道ID作为车辆当前所在车道的车道ID。Step 1335: Determine whether the number of lanes that have a connected relationship with the lane corresponding to the last lane ID is 1; if it is 1, use the lane ID of this connected lane as the vehicle in the lane where the vehicle is currently located. Lane ID; if it is not 1, initialization processing is performed based on the current vehicle position, the starting lane of the vehicle is re-determined, and the lane ID of the starting lane is used as the lane ID of the lane where the vehicle is currently located.
通过上述步骤1331至步骤1335所述的方法,可以在当前车辆位置落入多条预设范围内的车道对应的地图范围内的情况下,根据与上一次的车道ID对应车道具有连通关系的车道和当前车辆的位姿,准确地确定出车辆当前所在车道的车道ID。Through the methods described in steps 1331 to 1335 above, when the current vehicle position falls within the map range corresponding to lanes within multiple preset ranges, it is possible to determine the location of the vehicle according to the connected relationship with the lane corresponding to the last lane ID. The lane and the current vehicle's pose can accurately determine the lane ID of the lane where the vehicle is currently located.
以上是对步骤S1032的具体说明,下面继续对步骤S1033进行说明。The above is the specific description of step S1032, and the description of step S1033 will continue below.
步骤S1033:根据位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。Step S1033: Determine the lane ID of the lane where the vehicle is currently located based on the map range of the lane located within the preset range centered on the current vehicle position on the two-dimensional map and the current vehicle position.
在没有确定出上一次的车道ID的情况下,通过获取位于以当前车辆位置为中心的预设范围内的车道来扩大车道的搜索范围,增加车辆位置周围道路的数量,以便于能够从这些道路中确定出车辆当前所在的车道。Without determining the last lane ID, the lane search range is expanded by acquiring lanes located within a preset range centered on the current vehicle position, and the number of roads surrounding the vehicle position is increased so that these roads can be Determine the lane the vehicle is currently in.
需要说明的是,步骤S1033中“根据位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID”的方法与前述步骤S1032中步骤133所述的方法相同,在此不再进行赘述。It should be noted that the method of "determining the lane ID of the lane where the vehicle is currently located based on the map range and the current vehicle position of the lane located within the preset range centered on the current vehicle position on the two-dimensional map" in step S1033 is the same as The method described in step 133 in step S1032 is the same and will not be described again.
参阅附图10,在根据本发明的一个实施例中,在车辆刚启动车道定位功能或其他需要重新确定车辆的起点车道(如步骤1333和步骤1335所述的情况)时,可以通过下列步骤S201至步骤S206进行初始化处理,确定车辆的起点车道。Referring to Figure 10, in one embodiment according to the present invention, when the vehicle has just started the lane positioning function or otherwise needs to re-determine the starting lane of the vehicle (such as the situation described in steps 1333 and 1335), the following step S201 can be performed Go to step S206 to perform initialization processing and determine the starting lane of the vehicle.
步骤S201:获取位于以当前车辆位置为中心的预设范围内的车道。Step S201: Obtain the lane located within the preset range centered on the current vehicle position.
步骤S202:判断当前车辆位置是否落入一条预设范围内的车道对应的地图范围内;若落入一条预设范围内的车道对应的地图范围内,则转至步骤S203;否则,转至步骤S206。Step S202: Determine whether the current vehicle position falls within a map range corresponding to a lane within a preset range; if it falls within a map range corresponding to a lane within a preset range, go to step S203; otherwise, go to step S203. S206.
步骤S203:获取当前车辆位置与所述一条预设范围内的车道的边界之间的距离。Step S203: Obtain the distance between the current vehicle position and the boundary of the lane within the preset range.
步骤S204:若所述距离大于等于预设的距离阈值;若是,则转至步骤S205;若否,则转至步骤S206。Step S204: If the distance is greater than or equal to the preset distance threshold; if yes, go to step S205; if not, go to step S206.
步骤S205:将所述一条预设范围内的车道作为车辆的起点车道。Step S205: Use the lane within the preset range as the starting lane of the vehicle.
在通过二维地图对车辆进行定位确定车辆位置时,车辆位置可能在一定范围内波动比如在5cm至30cm范围内波动。如果车辆位置与车道的边界距离太近,可能无法准确地判断出车辆到底是不是在车条车道上。为了避免上述波动对判断的影响,可以设置一个距离阈值,如果当前车辆位置与车道的边界之间的距离大于等于这个距离阈值时才判定其行驶在这条车道上,此时可以将这条车道作为车辆的起点车道。When locating a vehicle to determine its location through a two-dimensional map, the vehicle's location may fluctuate within a certain range, such as within a range of 5cm to 30cm. If the vehicle position is too close to the boundary of the lane, it may not be possible to accurately determine whether the vehicle is in the lane. In order to avoid the influence of the above fluctuations on the judgment, a distance threshold can be set. If the distance between the current vehicle position and the boundary of the lane is greater than or equal to this distance threshold, it will be judged to be driving in this lane. At this time, this lane can be As the starting lane for vehicles.
步骤S206:输出车道定位异常提示信息。Step S206: Output lane positioning abnormality prompt information.
如果通过初始化处理也无法确定出车辆的起点车道,就需要人工进行介入或采取其他手段进行解决,因此这种情况下可以输出车道定位异常提示信息,以提醒车辆用户或其他人员对该异常情况进行处理。If the starting lane of the vehicle cannot be determined through the initialization process, manual intervention or other means are required to solve the problem. Therefore, in this case, the lane positioning abnormal prompt information can be output to remind the vehicle user or other personnel to handle the abnormal situation. deal with.
需要指出的是,尽管上述实施例中将各个步骤按照特定的先后顺序进行了描述, 但是本领域技术人员可以理解,为了实现本发明的效果,不同的步骤之间并非必须按照这样的顺序执行,其可以同时(并行)执行或以其他顺序执行,这些变化都在本发明的保护范围之内。It should be pointed out that although the various steps are described in a specific sequence in the above embodiments, However, those skilled in the art can understand that in order to achieve the effects of the present invention, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders. These changes are within the scope of the present invention. within.
本领域技术人员能够理解的是,本发明实现上述一实施例的方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读存储介质可以包括:能够携带所述计算机程序代码的任何实体或装置、介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器、随机存取存储器、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读存储介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读存储介质不包括电载波信号和电信信号。Those skilled in the art can understand that the present invention can implement all or part of the process in the method of the above-mentioned embodiment, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable file. In the storage medium, when the computer program is executed by the processor, the steps of each of the above method embodiments can be implemented. Wherein, the computer program includes computer program code, which may be in the form of source code, object code, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, media, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier wave signals, telecommunications signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable storage medium can be appropriately added or deleted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media Storage media does not include electrical carrier signals and telecommunications signals.
进一步,本发明还提供了一种计算机设备。在根据本发明的一个计算机设备实施例中,计算机设备包括处理器和存储装置,存储装置可以被配置成存储执行上述方法实施例的车道定位方法的程序,处理器可以被配置成用于执行存储装置中的程序,该程序包括但不限于执行上述方法实施例的车道定位方法的程序。为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该计算机设备可以是包括各种电子设备形成的设备。Furthermore, the present invention also provides a computer device. In one embodiment of the computer equipment according to the present invention, the computer equipment includes a processor and a storage device. The storage device may be configured to store a program for executing the lane positioning method of the above method embodiment. The processor may be configured to execute the storage A program in the device, which program includes but is not limited to a program for executing the lane positioning method of the above method embodiment. For ease of explanation, only the parts related to the embodiments of the present invention are shown. If specific technical details are not disclosed, please refer to the method part of the embodiments of the present invention. The computer device may be a device formed including various electronic devices.
进一步,本发明还提供了一种计算机可读存储介质。在根据本发明的一个计算机可读存储介质实施例中,计算机可读存储介质可以被配置成存储执行上述方法实施例的车道定位方法的程序,该程序可以由处理器加载并运行以实现上述车道定位方法。为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该计算机可读存储介质可以是包括各种电子设备形成的存储装置设备,可选的,本发明实施例中计算机可读存储介质是非暂时性的计算机可读存储介质。Furthermore, the present invention also provides a computer-readable storage medium. In one embodiment of a computer-readable storage medium according to the present invention, the computer-readable storage medium may be configured to store a program for executing the lane positioning method of the above method embodiment, and the program may be loaded and run by a processor to implement the above lane positioning method. Positioning method. For ease of explanation, only the parts related to the embodiments of the present invention are shown. If specific technical details are not disclosed, please refer to the method part of the embodiments of the present invention. The computer-readable storage medium may be a storage device formed by various electronic devices. Optionally, in the embodiment of the present invention, the computer-readable storage medium is a non-transitory computer-readable storage medium.
进一步,本发明还提供了一种车辆。在根据本发明的一个车辆的实施例中,车辆可以包括上述计算机设备实施例所述的计算机设备。在本实施例中车辆可以是自动驾驶车辆、无人车等车辆。此外,按照动力源类型划分,本实施例中车辆可以是燃油车、电动车、电能与燃油混合的混动车或使用其他新能源的车辆等。Furthermore, the present invention also provides a vehicle. In a vehicle embodiment according to the present invention, the vehicle may include a computer device as described in the above computer device embodiment. In this embodiment, the vehicle may be an autonomous vehicle, an unmanned vehicle, or other vehicles. In addition, according to the type of power source, the vehicle in this embodiment may be a fuel vehicle, an electric vehicle, a hybrid vehicle that mixes electric energy with fuel, or a vehicle that uses other new energy sources.
至此,已经结合附图所示的优选实施方式描述了本发明的技术方案,但是,本领域技术人员容易理解的是,本发明的保护范围显然不局限于这些具体实施方式。在不偏离本发明的原理的前提下,本领域技术人员可以对相关技术特征作出等同的更改或替换,这些更改或替换之后的技术方案都将落入本发明的保护范围之内。 So far, the technical solution of the present invention has been described with reference to the preferred embodiments shown in the drawings. However, those skilled in the art can easily understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to relevant technical features, and technical solutions after these modifications or substitutions will fall within the protection scope of the present invention.

Claims (16)

  1. 一种车道定位方法,其特征在于,所述方法包括:A lane positioning method, characterized in that the method includes:
    通过二维地图对车辆进行定位,确定车辆位置;Locate the vehicle through a two-dimensional map and determine its location;
    获取所述车辆位置周围的车道及车道之间的连通关系;Obtain the lanes around the vehicle position and the connectivity between lanes;
    根据所述车辆位置周围的车道及所述车道之间连通关系,确定车辆当前所在车道的车道ID。The lane ID of the lane where the vehicle is currently located is determined based on the lanes surrounding the vehicle position and the connectivity relationship between the lanes.
  2. 根据权利要求1所述的车道定位方法,其特征在于,“根据所述车辆位置周围的车道及所述车道之间连通关系,确定车辆当前所在车道的车道ID”的步骤具体包括:The lane positioning method according to claim 1, wherein the step of "determining the lane ID of the lane where the vehicle is currently located based on the lanes around the vehicle position and the connectivity between the lanes" specifically includes:
    判断根据上一次确定的车辆位置能否确定出上一次的车道ID;Determine whether the last lane ID can be determined based on the last determined vehicle position;
    若能确定出,则根据所述上一次的车道ID对应车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID;If it can be determined, determine the lane ID of the lane where the vehicle is currently located based on the map range where the lane corresponding to the last lane ID falls on the two-dimensional map and the current vehicle position;
    若不能确定出,则根据位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。If it cannot be determined, the lane ID of the lane where the vehicle is currently located is determined based on the map range of the lane located within the preset range centered on the current vehicle position and falling on the two-dimensional map and the current vehicle position.
  3. 根据权利要求2所述的车道定位方法,其特征在于,“根据所述上一次的车道ID对应车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID”的步骤具体包括:The lane positioning method according to claim 2, characterized in that "determine the lane ID of the lane where the vehicle is currently located based on the map range of the lane corresponding to the last lane ID falling on the two-dimensional map and the current vehicle position" The specific steps include:
    判断当前车辆位置是否落入所述上一次的车道ID对应的地图范围内且在所述地图范围内所述二维地图只包含一条车道;Determine whether the current vehicle position falls within the map range corresponding to the last lane ID and the two-dimensional map only contains one lane within the map range;
    若是,则将所述上一次的车道ID作为车辆当前所在车道的车道ID;If so, use the last lane ID as the lane ID of the lane where the vehicle is currently located;
    若否,则获取与所述上一次的车道ID对应车道属于同一道路层且与所述上一次的车道ID对应车道具有连通关系的其他车道,根据所述其他车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。If not, obtain other lanes that belong to the same road layer as the lane corresponding to the last lane ID and have a connected relationship with the lane corresponding to the last lane ID, and based on where the other lanes fall on the two-dimensional map The map range and the current vehicle position determine the lane ID of the lane where the vehicle is currently located.
  4. 根据权利要求3所述的车道定位方法,其特征在于,“根据所述其他车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID”的步骤具体包括:The lane positioning method according to claim 3, wherein the step of "determining the lane ID of the lane where the vehicle is currently located based on the map range of the other lanes falling on the two-dimensional map and the current vehicle position" specifically includes:
    判断当前车辆位置是否只落入一条所述其他车道对应的地图范围内;Determine whether the current vehicle position only falls within the map range corresponding to one of the other lanes;
    若是,则将所述一条所述其他车道的车道ID作为车辆当前所在车道的车道ID;If so, use the lane ID of one of the other lanes as the lane ID of the lane where the vehicle is currently located;
    若否,则根据位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID。If not, the lane ID of the lane where the vehicle is currently located is determined based on the map range of the lane located within the preset range centered on the current vehicle position falling on the two-dimensional map and the current vehicle position.
  5. 根据权利要求2至4中任一项所述的车道定位方法,其特征在于,“根据位于以当前车辆位置为中心的预设范围内的车道落在二维地图上的地图范围与当前车辆位置,确定车辆当前所在车道的车道ID”的步骤具体包括:The lane positioning method according to any one of claims 2 to 4, characterized in that "according to the map range of the lane located within the preset range centered on the current vehicle position falling on the two-dimensional map and the current vehicle position , the steps to determine the lane ID of the lane where the vehicle is currently located specifically include:
    若当前车辆位置只落入一条所述预设范围内的车道对应的地图范围内,则将所述一条所述预设范围内的车道的车道ID作为车辆当前所在车道的车道ID; If the current vehicle position only falls within the map range corresponding to one lane within the preset range, then the lane ID of the lane within the preset range is used as the lane ID of the lane where the vehicle is currently located;
    若当前车辆位置落入多条所述预设范围内的车道对应的地图范围内,则将所述多条所述预设范围内的车道作为候选车道,根据与所述上一次的车道ID对应车道具有连通关系的车道和/或当前车辆的位姿,从所述候选车道的车道ID中筛选出车辆当前所在车道的车道ID。If the current vehicle position falls within the map range corresponding to multiple lanes within the preset range, then the multiple lanes within the preset range are used as candidate lanes, based on the corresponding lane ID of the last time The lanes have connected lanes and/or the position and orientation of the current vehicle, and the lane ID of the lane where the vehicle is currently located is filtered out from the lane IDs of the candidate lanes.
  6. 根据权利要求5所述的车道定位方法,其特征在于,“根据与所述上一次的车道ID对应车道具有连通关系的车道和/或当前车辆的位姿,从所述候选车道的车道ID中筛选出车辆当前所在车道的车道ID”的步骤具体包括:The lane positioning method according to claim 5, characterized in that, "According to the lane that has a connected relationship with the lane corresponding to the last lane ID and/or the position and posture of the current vehicle, from the lane ID of the candidate lane The steps to filter out the lane ID of the lane where the vehicle is currently located include:
    判断所述候选车道是否为虚拟车道;Determine whether the candidate lane is a virtual lane;
    当判定是虚拟车道时,获取与当前车辆的位姿匹配的虚拟车道,若所述匹配的虚拟车道的数量是1,则将所述匹配的虚拟车道的车道ID作为车辆当前所在车道的车道ID;若所述匹配的虚拟车道的数量不是1,则根据当前车辆位置进行初始化处理,重新确定车辆的起点车道,将所述起点车道的车道ID作为车辆当前所在车道的车道ID;When it is determined that it is a virtual lane, obtain a virtual lane that matches the position and orientation of the current vehicle. If the number of matching virtual lanes is 1, use the lane ID of the matching virtual lane as the lane ID of the lane where the vehicle is currently located. ; If the number of matching virtual lanes is not 1, initialization processing is performed based on the current vehicle position, the starting lane of the vehicle is re-determined, and the lane ID of the starting lane is used as the lane ID of the lane where the vehicle is currently located;
    当判定不是虚拟车道时,从所述候选车道中获取与所述上一次的车道ID对应车道具有连通关系的车道;When it is determined that it is not a virtual lane, obtain a lane that has a connectivity relationship with the lane corresponding to the last lane ID from the candidate lane;
    若所述具有连通关系的车道的数量是1,则将所述具有连通关系的车道的车道ID作为车辆当前所在车道的车道ID;若所述具有连通关系的车道的数量不是1,则根据当前车辆位置进行初始化处理,重新确定车辆的起点车道,将所述起点车道的车道ID作为车辆当前所在车道的车道ID。If the number of lanes with a connected relationship is 1, then the lane ID of the lane with a connected relationship is used as the lane ID of the lane where the vehicle is currently located; if the number of lanes with a connected relationship is not 1, then the lane ID of the lane with a connected relationship is used as the lane ID of the lane where the vehicle is currently located. The vehicle position is initialized, the starting lane of the vehicle is redetermined, and the lane ID of the starting lane is used as the lane ID of the lane where the vehicle is currently located.
  7. 根据权利要求2、3、4或6所述的车道定位方法,其特征在于,所述方法还包括根据当前车辆位置并通过下列步骤进行初始化处理,以确定车辆的起点车道:The lane positioning method according to claim 2, 3, 4 or 6, characterized in that the method also includes performing an initialization process according to the current vehicle position and through the following steps to determine the starting lane of the vehicle:
    获取位于以当前车辆位置为中心的预设范围内的车道;Get lanes located within a preset range centered on the current vehicle position;
    判断当前车辆位置是否落入一条所述预设范围内的车道对应的地图范围内;Determine whether the current vehicle position falls within a map range corresponding to a lane within the preset range;
    当只落入一条所述预设范围内的车道对应的地图范围内时,获取当前车辆位置与所述一条所述预设范围内的车道的边界之间的距离;若所述距离大于等于预设的距离阈值,则将所述一条所述预设范围内的车道作为车辆的起点车道;若所述距离小于预设的距离阈值,则输出车道定位异常提示信息;When it falls within the map range corresponding to only one lane within the preset range, obtain the distance between the current vehicle position and the boundary of the lane within the preset range; if the distance is greater than or equal to the preset range, If the distance threshold is set, the lane within the preset range will be used as the starting lane of the vehicle; if the distance is less than the preset distance threshold, lane positioning abnormality prompt information will be output;
    当没有只落入一条所述预设范围内的车道对应的地图范围内时,输出车道定位异常提示信息。When it does not fall within the map range corresponding to only one lane within the preset range, lane positioning abnormality prompt information is output.
  8. 根据权利要求1所述的车道定位方法,其特征在于,“通过二维地图对车辆进行定位,确定车辆位置”的步骤具体包括:The lane positioning method according to claim 1, characterized in that the step of "locating the vehicle through a two-dimensional map and determining the vehicle position" specifically includes:
    通过二维地图对车辆当前行驶道路进行定位,确定当前行驶道路中道路点在二维直角坐标系的二维坐标;Locate the vehicle's current driving road through a two-dimensional map and determine the two-dimensional coordinates of the road points on the current driving road in the two-dimensional Cartesian coordinate system;
    获取所述道路点相对于车辆的相对高度,根据所述二维直角坐标系的原点、x轴和y轴确定世界坐标系的原点、x轴和y轴,将所述相对高度作为所述道路点在世界 坐标系中z轴的坐标,根据所述道路点的二维坐标与所述相对高度将所述道路点由世界坐标系反投影至图像坐标系;Obtain the relative height of the road point relative to the vehicle, determine the origin, x-axis, and y-axis of the world coordinate system based on the origin, x-axis, and y-axis of the two-dimensional rectangular coordinate system, and use the relative height as the road point in the world The coordinates of the z-axis in the coordinate system, back-projecting the road point from the world coordinate system to the image coordinate system according to the two-dimensional coordinates of the road point and the relative height;
    确定位于车辆周围的道路元素,获取所述道路元素所在位置处的道路点反投影至图像坐标系的反投影位置以及获取通过车辆的图像采集装置确定来出的所述道路元素所在位置处的道路点在图像坐标系的采集位置;Determine the road elements located around the vehicle, obtain the back-projection position of the road point at the location of the road element to the image coordinate system, and obtain the road at the location of the road element determined by the image acquisition device of the vehicle The acquisition position of the point in the image coordinate system;
    对所述道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,根据位置匹配的结果确定车辆在世界坐标系的位置。Position matching is performed on the back-projected position of the road point at the location of the road element and the collection position, and the position of the vehicle in the world coordinate system is determined based on the position matching result.
  9. 根据权利要求8所述的车道定位方法,其特征在于,“获取所述道路点相对于车辆的相对高度”的步骤具体包括:The lane positioning method according to claim 8, wherein the step of "obtaining the relative height of the road point relative to the vehicle" specifically includes:
    获取在车体坐标系中车辆所在平面的平面向量并且根据所述平面向量获取所述平面的单位法向量;Obtain the plane vector of the plane where the vehicle is located in the vehicle body coordinate system and obtain the unit normal vector of the plane according to the plane vector;
    根据所述道路点的二维坐标并且通过求解下列方程得到所述道路点在以所述二维直角坐标系的原点、x轴和y轴分别为原点、x轴和y轴的世界坐标系中z轴的坐标zh:According to the two-dimensional coordinates of the road point and by solving the following equations, it is obtained that the road point is in the world coordinate system with the origin, x-axis and y-axis of the two-dimensional rectangular coordinate system as the origin, x-axis and y-axis respectively. The coordinate of the z-axis zh:
    (xh-x1)×nx+(yh-y1)×ny+(zh-z1)×nz=0(xh-x1)×nx+(yh-y1)×ny+(zh-z1)×nz=0
    其中,x1、y1和z1表示车辆在车体坐标系中x轴、y轴和z轴的坐标,nx、ny和nz表示所述单位法向量在车体坐标系中x轴、y轴和z轴的坐标,xh和yh表示所述道路点的二维坐标中x轴和y轴的坐标;Among them, x1, y1 and z1 represent the coordinates of the vehicle on the x-axis, y-axis and z-axis in the vehicle body coordinate system, nx, ny and nz represent the coordinates of the unit normal vector on the x-axis, y-axis and z-axis in the vehicle body coordinate system. The coordinates of the axes, xh and yh represent the coordinates of the x-axis and y-axis in the two-dimensional coordinates of the road point;
    根据所述坐标zh确定所述道路点相对于车辆的相对高度。The relative height of the road point relative to the vehicle is determined based on the coordinate zh.
  10. 根据权利要求8所述的车道定位方法,其特征在于,所述方法还包括在二维地图上,对车辆当前行驶道路及之前行驶过的道路进行道路连通显示。The lane positioning method according to claim 8, characterized in that the method further includes displaying road connections on the two-dimensional map of the road currently traveled by the vehicle and the roads it has traveled before.
  11. 根据权利要求8所述的车道定位方法,其特征在于,“对所述道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,根据位置匹配的结果确定车辆在世界坐标系的位置”的步骤具体包括:The lane positioning method according to claim 8, characterized in that "the back-projected position of the road point at the position of the road element is position matched with the collection position, and the position of the vehicle in the world coordinate system is determined according to the position matching result. The steps for "location" specifically include:
    对所述道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,得到所述图像采集装置的装置坐标系与世界坐标系进行转换的位姿参数;Perform position matching between the back-projection position of the road point at the location of the road element and the acquisition position to obtain pose parameters for conversion between the device coordinate system of the image acquisition device and the world coordinate system;
    获取车辆所在位置处的道路点反投影至图像坐标系的反投影位置;Obtain the back-projection position of the road point at the location of the vehicle to the image coordinate system;
    根据所述车辆所在位置处的道路点的反投影位置与所述位姿参数,确定车辆在世界坐标系的位置。The position of the vehicle in the world coordinate system is determined based on the back-projection position of the road point at the location of the vehicle and the pose parameter.
  12. 根据权利要求11所述的车道定位方法,其特征在于,“对所述道路元素所在位置处的道路点的反投影位置与采集位置进行位置匹配,得到所述图像采集装置的装置坐标系与世界坐标系进行转换的位姿参数”的步骤具体包括:The lane positioning method according to claim 11, characterized in that "the back-projection position of the road point at the position of the road element is matched with the collection position to obtain the device coordinate system of the image collection device and the world The steps of "Pose and Orientation Parameters for Coordinate System Transformation" specifically include:
    根据所述道路元素所在位置处的道路点的反投影位置与采集位置建立下式所示的距离误差方程:According to the back-projection position and collection position of the road point at the location of the road element, a distance error equation shown in the following formula is established:
    loss=d(f(A,O),cd) loss=d(f(A,O),cd)
    其中,f(A,O)表示当前道路点的反投影位置,A表示当前道路点在世界坐标系的位置,O表示装置坐标系与世界坐标系进行转换的位姿参数,cd表示以距离当前道路点的反投影位置最近的两个道路点的采集位置为端点所形成的线段,d表示反投影位置f(A,O)到线段cd的距离计算函数,loss表示所述距离计算函数d计算得到的距离;Among them, f(A,O) represents the back-projection position of the current road point, A represents the position of the current road point in the world coordinate system, O represents the pose parameter for conversion between the device coordinate system and the world coordinate system, and cd represents the distance from the current road point. The collection positions of the two closest road points to the back-projection position of the road point are the line segments formed by the endpoints. d represents the distance calculation function from the back-projection position f (A, O) to the line segment cd. Loss represents the distance calculation function d calculation. the distance obtained;
    以使所述距离loss小于预设的距离阈值为目标,采用列文伯格-马夸尔特(Levenberg-Marquardt)算法对所述距离误差方程中的位姿参数O进行迭代优化,并获取使所述距离loss小于预设的距离阈值时的位姿参数O,将所述位姿参数O作为最终的所述图像采集装置的装置坐标系与世界坐标系进行转换的位姿参数。With the goal of making the distance loss smaller than the preset distance threshold, the Levenberg-Marquardt algorithm is used to iteratively optimize the pose parameter O in the distance error equation, and obtain the The pose parameter O when the distance loss is less than the preset distance threshold is used as the final pose parameter for conversion between the device coordinate system of the image acquisition device and the world coordinate system.
  13. 根据权利要求8所述的车道定位方法,其特征在于,在“确定位于车辆周围的道路元素,获取所述道路元素所在位置处的道路点反投影至图像坐标系的反投影位置以及获取通过车辆的图像采集装置确定来出的所述道路元素所在位置处的道路点在图像坐标系的采集位置”的步骤之前,所述方法还包括:The lane positioning method according to claim 8, characterized in that in "determining the road elements located around the vehicle, obtaining the back-projected position of the road point at the location of the road element to the image coordinate system and obtaining the back-projected position of the vehicle passing by Before the step of "the image acquisition device determines that the road point at the position of the road element is at the acquisition position of the image coordinate system," the method further includes:
    通过至少两个图像采集装置对所述道路元素所在位置处的道路点进行图像采集,得到所述道路元素所在位置处的道路点的道路点图像;Use at least two image acquisition devices to collect images of the road points at the locations of the road elements to obtain road point images of the road points at the locations of the road elements;
    根据所述道路点图像,确定所述道路元素所在位置处的道路点在图像坐标系的采集位置。According to the road point image, the collection position of the road point at the location of the road element in the image coordinate system is determined.
  14. 一种计算机设备,包括处理器和存储装置,所述存储装置适于存储多条程序代码,其特征在于,所述程序代码适于由所述处理器加载并运行以执行权利要求1至13中任一项所述的车道定位方法。A computer device, comprising a processor and a storage device, the storage device being adapted to store a plurality of program codes, characterized in that the program codes are adapted to be loaded and run by the processor to execute claims 1 to 13 The lane positioning method described in any one of the above.
  15. 一种计算机可读存储介质,其中存储有多条程序代码,其特征在于,所述程序代码适于由所述处理器加载并运行以执行权利要求1至13中任一项所述的车道定位方法。A computer-readable storage medium in which a plurality of program codes are stored, characterized in that the program codes are adapted to be loaded and run by the processor to perform the lane positioning described in any one of claims 1 to 13 method.
  16. 一种车辆,其特征在于,所述车辆包括权利要求14所述的计算机设备。 A vehicle, characterized in that the vehicle includes the computer device of claim 14.
PCT/CN2023/073864 2022-05-09 2023-01-30 Lane positioning method, computer device, computer-readable storage medium and vehicle WO2023216651A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210501755.4A CN114820769A (en) 2022-05-09 2022-05-09 Vehicle positioning method and device, computer equipment, storage medium and vehicle
CN202210501755.4 2022-05-09
CN202210507812.XA CN114964287A (en) 2022-05-10 2022-05-10 Lane positioning method, computer device, computer-readable storage medium, and vehicle
CN202210507812.X 2022-05-10

Publications (1)

Publication Number Publication Date
WO2023216651A1 true WO2023216651A1 (en) 2023-11-16

Family

ID=88729614

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/073864 WO2023216651A1 (en) 2022-05-09 2023-01-30 Lane positioning method, computer device, computer-readable storage medium and vehicle

Country Status (1)

Country Link
WO (1) WO2023216651A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003121543A (en) * 2001-10-19 2003-04-23 Nissan Motor Co Ltd Driving lane determining apparatus for vehicle
WO2004111574A1 (en) * 2003-06-18 2004-12-23 Siemens Aktiengesellschaft Navigation system with traffic lane instructions
CN101334287A (en) * 2007-06-29 2008-12-31 爱信艾达株式会社 Vehicle-position-recognition apparatus and vehicle-position-recognition program
JP2020021269A (en) * 2018-07-31 2020-02-06 トヨタ自動車株式会社 Traveling lane determination device
CN112749584A (en) * 2019-10-29 2021-05-04 北京初速度科技有限公司 Vehicle positioning method based on image detection and vehicle-mounted terminal
CN114359384A (en) * 2021-12-30 2022-04-15 广东电网有限责任公司 Vehicle positioning method and device, vehicle system and storage medium
CN114820769A (en) * 2022-05-09 2022-07-29 安徽蔚来智驾科技有限公司 Vehicle positioning method and device, computer equipment, storage medium and vehicle
CN114964287A (en) * 2022-05-10 2022-08-30 安徽蔚来智驾科技有限公司 Lane positioning method, computer device, computer-readable storage medium, and vehicle

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003121543A (en) * 2001-10-19 2003-04-23 Nissan Motor Co Ltd Driving lane determining apparatus for vehicle
WO2004111574A1 (en) * 2003-06-18 2004-12-23 Siemens Aktiengesellschaft Navigation system with traffic lane instructions
CN101334287A (en) * 2007-06-29 2008-12-31 爱信艾达株式会社 Vehicle-position-recognition apparatus and vehicle-position-recognition program
JP2020021269A (en) * 2018-07-31 2020-02-06 トヨタ自動車株式会社 Traveling lane determination device
CN112749584A (en) * 2019-10-29 2021-05-04 北京初速度科技有限公司 Vehicle positioning method based on image detection and vehicle-mounted terminal
CN114359384A (en) * 2021-12-30 2022-04-15 广东电网有限责任公司 Vehicle positioning method and device, vehicle system and storage medium
CN114820769A (en) * 2022-05-09 2022-07-29 安徽蔚来智驾科技有限公司 Vehicle positioning method and device, computer equipment, storage medium and vehicle
CN114964287A (en) * 2022-05-10 2022-08-30 安徽蔚来智驾科技有限公司 Lane positioning method, computer device, computer-readable storage medium, and vehicle

Similar Documents

Publication Publication Date Title
US11320836B2 (en) Algorithm and infrastructure for robust and efficient vehicle localization
EP3361278B1 (en) Autonomous vehicle localization based on walsh kernel projection technique
EP3505869B1 (en) Method, apparatus, and computer readable storage medium for updating electronic map
EP3620823B1 (en) Method and device for detecting precision of internal parameter of laser radar
CN109931944B (en) AR navigation method, AR navigation device, vehicle-side equipment, server side and medium
CN109214248B (en) Method and device for identifying laser point cloud data of unmanned vehicle
CN109270545B (en) Positioning true value verification method, device, equipment and storage medium
CN110386142A (en) Pitch angle calibration method for automatic driving vehicle
CN110426051A (en) A kind of lane line method for drafting, device and storage medium
US8078399B2 (en) Method and device for three-dimensional path planning to avoid obstacles using multiple planes
CN113286985A (en) Path planning method and path planning device
CN109931945A (en) AR air navigation aid, device, equipment and storage medium
CN112154449A (en) Lane line fusion method, lane line fusion device, vehicle, and storage medium
CN112154303B (en) High-precision map positioning method, system, platform and computer readable storage medium
CN111089597A (en) Method and apparatus for positioning based on image and map data
CN112232275B (en) Obstacle detection method, system, equipment and storage medium based on binocular recognition
CN110119138A (en) For the method for self-locating of automatic driving vehicle, system and machine readable media
WO2022110797A1 (en) Calibration method and apparatus, electronic device, and storage medium
CN110031012A (en) Method, system, equipment and the storage medium of the high-precision map of automobile real-time matching
CN110631598A (en) Method, device and equipment for evaluating vehicle positioning accuracy and computer readable storage medium
CN111862200B (en) Unmanned aerial vehicle positioning method in coal shed
CN113469045A (en) Unmanned card-collecting visual positioning method and system, electronic equipment and storage medium
CN116997771A (en) Vehicle, positioning method, device, equipment and computer readable storage medium thereof
CN114820769A (en) Vehicle positioning method and device, computer equipment, storage medium and vehicle
WO2021051361A1 (en) High-precision map positioning method and system, platform and computer-readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23802427

Country of ref document: EP

Kind code of ref document: A1