Vehicle positioning method and device, electronic equipment and storage medium
By building the current local map of the vehicle and performing ICP matching, the accuracy problem of vehicle positioning method during long-term use is solved, and the high-accuracy automatic parking function is achieved.
Patent Information
- Application Number
- CN202310558960.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-17
- Publication Date
- 2024-11-22
AI Technical Summary
When the existing vehicle positioning method is used for a long time, the positioning results are not accurate enough, which is affected by environmental appearance changes and light factors, resulting in accumulated errors and affecting the accuracy of positioning.
By constructing the current local map of the target vehicle and matching the relative position of the offline map based on the map, the relative position of the vehicle's starting point is calculated, and errors are further eliminated through ICP matching to ensure the accuracy of the positioning results.
It realizes vehicle positioning that can maintain high accuracy under long-term positioning, eliminates errors through ICP matching, ensuring that the vehicle can accurately identify parking spaces and automatically park.
Smart Images

Figure CN118999596A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent driving technology, and in particular to a vehicle positioning method and device, electronic equipment, and storage medium. Background Art
[0002] With the continuous development of intelligent driving technology, Autonomous Valet Parking (AVP) has become one of the important research topics for autonomous driving in low-speed scenarios. Automatic valet parking mainly involves the vehicle automatically entering the parking lot to search for an available parking space after switching to AVP mode, and automatically parking in any available parking space found.
[0003] The realization of the automatic valet parking function mainly relies on the precise positioning of the vehicle. At present, compared with the laser positioning method, the SLAM-based visual positioning method is favored because of its low cost. This visual positioning method mainly uses the constructed map to match descriptors to obtain the position and posture of the vehicle relative to the origin of the map.
[0004] However, due to the interference of factors such as the change of the environment appearance and the load lighting factors, the existing method will accumulate more errors as the usage time increases. Therefore, the existing method can only build an accurate visual map and achieve accurate positioning when the positioning time is short. When the usage time is long, the accumulated error will be too large, which will affect the accuracy of positioning. Summary of the invention
[0005] Based on the above-mentioned deficiencies in the prior art, the present application provides a vehicle positioning method and device, an electronic device, and a storage medium to solve the problem that the positioning results of the existing vehicle positioning methods are not accurate enough during long-term positioning.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] The first aspect of the present application provides a vehicle positioning method, comprising:
[0008] Construct a current local map of the target vehicle at its current location;
[0009] If the relative position of the starting point of the target vehicle has not been located, the relative position of the starting point of the target vehicle is located based on the relative position between the current local map and the offline map; wherein the relative position of the starting point of the target vehicle refers to the relative position between the coordinate origin of the offline map and the starting point of the target vehicle on the offline map;
[0010] Based on the current local map pose of the target vehicle and the relative pose of the starting point of the target vehicle, a current rough pose of the target vehicle on the offline map is calculated; wherein the current local map pose of the target vehicle refers to the relative pose between the starting position of the target vehicle and the current position of the target vehicle;
[0011] Based on the current rough pose, determining a current area of interest of the offline map;
[0012] The current local map is projected onto the offline map based on the origin relative position and posture to obtain current projected point cloud data; wherein the origin relative position and posture refers to the relative position and posture between the coordinate origin of the offline map and the global coordinate origin; the global coordinate origin is the starting position of the target vehicle;
[0013] Performing ICP matching on the current region of interest of the offline map and the current projected point cloud data to obtain the current relative position of the target vehicle;
[0014] The current absolute position of the target vehicle on the offline map is calculated by using the current relative position of the target vehicle and the position from the coordinate origin of the offline map to the current area of interest of the offline map.
[0015] Optionally, in the above vehicle positioning method, after constructing the current local map of the target vehicle at the current position, the method further includes:
[0016] Determine whether the relative position and posture of the starting point of the target vehicle has been currently located; wherein, if it is determined that the relative position and posture of the starting point of the target vehicle has been currently located, then perform the calculation based on the current local map position and posture of the target vehicle and the relative position and posture of the starting point of the target vehicle to obtain the current rough position and posture of the target vehicle on the offline map;
[0017] If it is determined that the relative position of the starting point of the target vehicle has not been located yet, the current local map is subjected to ICP matching with the initial region of interest of the offline map to obtain a current matching result; wherein the initial region of interest of the offline map is an area with the coordinate origin of the offline map as the center and a preset threshold as the radius;
[0018] If the current matching result converges, the current matching result is determined as the origin relative pose;
[0019] Based on the origin relative pose and the current local map pose of the target vehicle, the starting point relative pose of the target vehicle is calculated.
[0020] Optionally, in the above vehicle positioning method, it also includes:
[0021] If the current matching result has not converged, after the target vehicle advances a preset distance, the process returns to executing the process of constructing a current local map of the target vehicle at the current position.
[0022] Optionally, in the above-mentioned vehicle positioning method, the step of calculating the relative position and posture of the starting point of the target vehicle based on the relative position and posture of the origin and the current local map position and posture of the target vehicle comprises:
[0023] Based on the current visual odometer data and current inertial navigation information of the target vehicle, the relative position and posture of the target vehicle from the starting position to the current position are calculated to obtain the current local map position and posture of the target vehicle;
[0024] Multiplying the origin relative pose by the current local map pose of the target vehicle to obtain a relative pose from the coordinate origin of the offline map to the current position of the target vehicle;
[0025] The relative posture from the coordinate origin of the offline map to the current position of the target vehicle is determined as the relative posture of the starting point of the target vehicle.
[0026] Optionally, in the above vehicle positioning method, the step of constructing a current local map of the target vehicle at the current position includes:
[0027] When the target vehicle travels a preset distance each time, acquiring each image captured by each surround view camera of the target vehicle at the current position;
[0028] Projecting each of the images into a bird's-eye view, and stitching each of the bird's-eye view into a current surround stitching image;
[0029] Performing semantic extraction on the current surround view splicing image through a pre-trained network model to obtain current semantic features;
[0030] Based on the current visual odometer data and current inertial navigation information of the target vehicle, the current semantic features are projected into a global coordinate system to obtain a current local map of the target vehicle at the current position.
[0031] Optionally, in the above-mentioned vehicle positioning method, the current rough position of the target vehicle on the offline map is calculated based on the current local map position of the target vehicle and the relative position of the starting point of the target vehicle, including:
[0032] Based on the current visual odometer data and current inertial navigation information of the target vehicle, the relative position and posture of the target vehicle from the starting position to the current position are calculated to obtain the current local map position and posture of the target vehicle;
[0033] Based on the current local map pose of the target vehicle and the relative pose from the starting position of the target vehicle to the starting point of the target vehicle, the pose of the target vehicle from the starting point to the current position is calculated;
[0034] The current rough posture of the target vehicle on the offline map is calculated by using the posture of the target vehicle from the starting point to the current position and the relative posture of the starting point of the target vehicle.
[0035] Optionally, in the above vehicle positioning method, determining the current area of interest of the offline map based on the current rough posture includes:
[0036] Determine the displacement data in the current rough pose as the region center coordinates;
[0037] An area in the offline map with the location of the center coordinates of the area as the center and a preset distance as the radius is determined as the current area of interest of the offline map.
[0038] A second aspect of the present application provides a vehicle positioning device, comprising:
[0039] A map construction unit, used to construct a current local map of the target vehicle at the current position;
[0040] An initial positioning unit, used for locating the relative position of the starting point of the target vehicle based on the relative position between the current local map and the offline map when the relative position of the starting point of the target vehicle has not been located; wherein the relative position of the starting point of the target vehicle refers to the relative position between the coordinate origin of the offline map and the starting point of the target vehicle on the offline map;
[0041] A rough calculation unit, configured to calculate a current rough position of the target vehicle on the offline map based on the current local map position of the target vehicle and the relative position of the starting point of the target vehicle; wherein the current local map position of the target vehicle refers to the relative position between the starting position of the target vehicle and the current position of the target vehicle;
[0042] A region determination unit, configured to determine a current region of interest of the offline map based on the current rough pose;
[0043] A map projection unit, configured to project the current local map onto the offline map based on the origin relative position and posture to obtain current projection point cloud data; wherein the origin relative position and posture refers to the relative position and posture between the coordinate origin of the offline map and the global coordinate origin; the global coordinate origin is the starting position of the target vehicle;
[0044] A first matching unit is used to perform ICP matching on the current region of interest of the offline map and the current projected point cloud data to obtain the current relative position of the target vehicle;
[0045] The absolute posture calculation unit is used to calculate the current absolute posture of the target vehicle on the offline map by using the current relative posture of the target vehicle and the posture from the coordinate origin of the offline map to the current area of interest of the offline map.
[0046] Optionally, in the above-mentioned vehicle positioning device, the initial positioning unit includes:
[0047] A second matching unit is used to perform ICP matching between the current local map and the initial region of interest of the offline map to obtain a current matching result; wherein the initial region of interest of the offline map is an area with a coordinate origin of the offline map as the center and a preset threshold as the radius;
[0048] A result output unit, configured to determine the current matching result as an origin-relative position and posture when the current matching result converges;
[0049] A starting point positioning unit is used to calculate the starting point relative posture of the target vehicle based on the origin relative posture and the current local map posture of the target vehicle.
[0050] Optionally, in the above vehicle positioning device, it also includes:
[0051] The returning unit is used to return to the map building unit to execute the construction of the current local map of the target vehicle at the current position after the target vehicle advances a preset distance when the current matching result has not converged.
[0052] Optionally, in the above-mentioned vehicle positioning device, the starting point positioning unit includes:
[0053] A first calculation unit is used to calculate the relative position of the target vehicle from the starting position to the current position based on the current visual odometer data and the current inertial navigation information of the target vehicle, so as to obtain the current local map position of the target vehicle;
[0054] A second calculation unit is used to multiply the origin relative posture by the current local map posture of the target vehicle to obtain a relative posture from the coordinate origin of the offline map to the current position of the target vehicle;
[0055] The starting point posture determination unit determines the relative posture from the coordinate origin of the offline map to the current position of the target vehicle as the starting point relative posture of the target vehicle.
[0056] Optionally, in the above-mentioned vehicle positioning device, the map construction unit includes:
[0057] An image acquisition unit, used for acquiring each image acquired by each surround-view camera of the target vehicle at a current position each time the target vehicle travels a preset distance;
[0058] An image stitching unit, used for projecting each of the images into a bird's-eye view, and stitching each of the bird's-eye view into a current surround stitching image;
[0059] A feature extraction unit, used for performing semantic extraction on the current surround view splicing image through a pre-trained network model to obtain current semantic features;
[0060] The feature projection unit is used to project the current semantic feature into a global coordinate system based on the current visual odometer data and current inertial navigation information of the target vehicle to obtain a current local map of the target vehicle at the current position.
[0061] Optionally, in the above-mentioned vehicle positioning device, the rough calculation unit includes:
[0062] A third calculation unit calculates the relative position of the target vehicle from the starting position to the current position based on the current visual odometer data and the current inertial navigation information of the target vehicle to obtain the current local map position of the target vehicle;
[0063] a fourth calculation unit, configured to calculate a posture of the target vehicle from a starting point to a current position based on a current local map posture of the target vehicle and a relative posture from a starting position of the target vehicle to a starting point of the target vehicle;
[0064] The fifth calculation unit is used to calculate the current rough posture of the target vehicle on the offline map by using the posture of the target vehicle from the starting point to the current position and the relative posture of the starting point of the target vehicle.
[0065] Optionally, in the above-mentioned vehicle positioning device, the area determination unit includes:
[0066] A coordinate determination unit, used to determine the displacement data in the current rough posture as the region center coordinates;
[0067] The area division unit is used to determine an area in the offline map with the location of the area center coordinates as the center and a preset distance as the radius as the current area of interest of the offline map.
[0068] A third aspect of the present application provides an electronic device, including:
[0069] Memory and processor;
[0070] Wherein, the memory is used to store programs;
[0071] The processor is used to execute the program, and when the program is executed, it is specifically used to implement the vehicle positioning method as described in any one of the above.
[0072] A fourth aspect of the present application provides a computer storage medium for storing a computer program, which, when executed, is used to implement a vehicle positioning method as described in any one of the above.
[0073] The present application provides a vehicle positioning method, which first constructs a current local map of the target vehicle at the current position. When the relative position and posture of the starting point of the target vehicle has not been located, the relative position and posture of the starting point of the target vehicle is first located based on the relative position and posture between the current local map and the offline map, so that the current rough position and posture of the target vehicle on the offline map can be calculated based on the current local map position and posture of the target vehicle and the relative position and posture of the starting point of the target vehicle. Among them, the current local map position and posture of the target vehicle refers to the relative position and posture between the starting position of the target vehicle and the current position of the target vehicle. The relative position and posture of the starting point of the target vehicle refers to the relative position and posture between the coordinate origin of the offline map and the starting point of the target vehicle on the offline map. Since the current local map pose will have accumulated errors, the current rough pose obtained will also have errors. Therefore, the current area of interest of the offline map will be further determined based on the current rough pose, and then the current local map will be projected onto the offline map based on the origin relative pose to obtain the current projected point cloud data, so as to perform ICP matching between the current area of interest of the offline map and the current projected point cloud data to obtain the current relative pose of the target vehicle. Among them, the origin relative pose refers to the relative pose between the coordinate origin of the offline map and the global coordinate origin. Finally, the current absolute pose of the target vehicle on the offline map is calculated using the current relative pose of the target vehicle and the pose from the coordinate origin of the offline map to the current area of interest of the offline map, so as to eliminate the error through ICP matching, ensuring that even long-term positioning can have accurate positioning results. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0075] Figure 1 A flow chart of a vehicle positioning method provided in an embodiment of the present application;
[0076] Figure 2 A flowchart of a method for constructing a local map provided in an embodiment of the present application;
[0077] Figure 3 A flowchart of a starting point positioning method provided in an embodiment of the present application;
[0078] Figure 4 A flowchart of a method for calculating the relative position of a starting point provided in an embodiment of the present application;
[0079] Figure 5 A logical schematic diagram of vehicle starting point positioning provided in an embodiment of the present application;
[0080] Figure 6 A flowchart of a method for calculating a current rough pose provided in an embodiment of the present application;
[0081] Figure 7 A logical schematic diagram of positioning a vehicle during travel provided by an embodiment of the present application;
[0082] Figure 8 A schematic diagram of the architecture of a vehicle positioning device provided in an embodiment of the present application;
[0083] Fig. 9 A schematic diagram of the architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0084] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0085] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0086] The present application embodiment provides a vehicle positioning method, such as Figure 1 As shown, the specific steps include:
[0087] S101, constructing a current local map of the target vehicle at the current position.
[0088] Specifically, after starting the AVP function, it is necessary to start locating the target vehicle in real time so that the vehicle can be controlled to continue driving, find an empty parking space and park based on the positioning data.
[0089] In an embodiment of the present application, during the driving of the target vehicle, a local map of the target vehicle at the current position is constructed based on the image collected by the target vehicle at the current position, so as to determine the position of the target vehicle in the offline map based on the local map to control the driving of the target vehicle.
[0090] Optionally, in another embodiment of the present application, a specific implementation of step S101 is as follows: Figure 2 As shown, the following steps are included:
[0091] S201. When the target vehicle travels a preset distance each time, obtain each image captured by each surround view camera of the target vehicle at the current position.
[0092] It should be noted that, since the surrounding environment that the target vehicle can obtain does not change much when the target vehicle travels a short distance, in the embodiment of the present application, a local map is constructed accordingly when the target vehicle travels a preset distance. For example, a local map may be constructed and corresponding positioning may be performed every time the target vehicle travels 3 meters.
[0093] S202: Project each image into a bird's-eye view, and stitch each bird's-eye view into a current surround stitching image.
[0094] S203, performing semantic extraction on the current surround stitching image through a pre-trained network model to obtain current semantic features.
[0095] S204: Based on the current visual odometer data and current inertial navigation information of the target vehicle, the current semantic features are projected into the global coordinate system to obtain a current local map of the target vehicle at the current position.
[0096] Among them, the current inertial navigation information may include the speed and acceleration of the vehicle. Therefore, based on the current visual odometer data and current inertial navigation information of the target vehicle, the origin of the vehicle relative to the global coordinate system can be obtained, that is, the position of the starting point of the target vehicle after the AVP function is turned on, so that the current semantic features can be projected into the global coordinate system to obtain the current local map of the target vehicle at its current position.
[0097] For example, the current semantic feature is feature = [u, v, 1], and the coordinates of the origin of the global coordinate system are [x w ,y w ,z w ] T , then the current local map of the target vehicle at the current position can be specifically expressed as: Among them, [R o ,t o ] represents the current visual odometer data of the target vehicle and the fusion posture of the current inertial navigation information.
[0098] S102: Determine whether the relative position of the starting point of the target vehicle has been located.
[0099] The relative position of the starting point of the target vehicle refers to the relative position between the coordinate origin of the offline map and the starting point of the target vehicle on the offline map.
[0100] It should be noted that the position of the vehicle obtained through the information on the target vehicle is relative to the target vehicle itself, and to achieve automatic parking, it is necessary to locate its position relative to the map. To locate the target vehicle in real time on the offline map, it is necessary to first determine its starting point on the offline map, so as to locate the relative position of the target vehicle on the offline map based on the starting point.
[0101] Because the driver usually cannot park the vehicle accurately at the designated location, the theoretical initial position is usually not accurate enough. Therefore, in the embodiment of the present application, before positioning the target vehicle in real time during the moving process, it is necessary to first locate the starting point of the target vehicle, that is, locate the starting point of the target vehicle on the offline map. Therefore, it is necessary to first determine whether the relative position of the starting point of the target vehicle has been located.
[0102] If it is determined that the relative position of the starting point of the target vehicle has been located, it means that the starting point positioning has been completed, so the subsequent positioning of the target vehicle during its movement can be performed at this time, so step S104 can be directly executed at this time. If it is determined that the relative position of the starting point of the target vehicle has not been located at present, it is necessary to locate the starting point, so step S103 needs to be executed first, and step S104 needs to be executed after step S103 is executed.
[0103] S103: Based on the relative position between the current local map and the offline map, locate the relative position of the starting point of the target vehicle.
[0104] Since the position of the target vehicle in the current local map can be obtained based on the starting position of the target vehicle and the current position of the target vehicle, the relative position between the current local map and the offline map can be further used to project the position of the target vehicle onto the offline map, and further locate the relative position of the starting point of the target vehicle.
[0105] Optionally, in another embodiment of the present application, a specific implementation of step S103 is as follows: Figure 3 As shown, the following steps are included:
[0106] S301: Perform ICP matching on the current local map and the initial region of interest of the offline map to obtain a current matching result.
[0107] The initial area of interest of the offline map is an area with the coordinate origin of the offline map as the center and the preset threshold as the radius.
[0108] It should be noted that by performing ICP matching on the point cloud data in two different coordinate systems, the relative position and posture in the two coordinate systems can be obtained. Therefore, in the embodiment of the present application, the point cloud data of the current local map is matched with the point cloud data of the initial area of interest of the offline map by ICP matching to obtain the current matching result, so as to obtain the relative position and posture between the global coordinate system and the offline map.
[0109] S302: Determine whether the current matching result is convergent.
[0110] In order to avoid excessive errors, it is necessary to determine whether the current matching result has converged in the embodiment of the present application, that is, to determine whether the current matching result is greater than a certain threshold.
[0111] If the current matching result converges, the current position of the target vehicle can be used as the starting point of the target vehicle in the offline map, so step S303 can be executed at this time. If the current matching result does not converge, it is necessary to continue locating the starting point after building the next local map.
[0112] Optionally, in another embodiment of the present application, if the current matching result has not converged, the process returns to step S101 after the target vehicle advances a preset distance. That is, in the embodiment of the present application, the current local map is constructed each time the target vehicle advances a preset distance. After the current local map is constructed, the process returns to continue locating the starting point.
[0113] S303: Determine the current matching result as the origin relative posture.
[0114] Since the current position of the target vehicle at this time can be used as the starting point of the target vehicle in the offline map, accordingly, the current matching result obtained at this time is the posture between the two matching point cloud data, that is, the relative posture of the origin.
[0115] The origin relative position refers to the relative position between the coordinate origin of the offline map and the global coordinate origin. The global coordinate origin is the starting position of the target vehicle.
[0116] S304: Based on the relative pose of the origin and the current local map pose of the target vehicle, the relative pose of the starting point of the target vehicle is calculated.
[0117] The current local map position of the target vehicle refers to the relative position between the starting position of the target vehicle and the current position of the target vehicle.
[0118] Since the relative pose of the origin and the current local map pose have been obtained, that is, the relative pose between the starting position of the target vehicle and the coordinate origin of the offline map is known, and the relative pose between the starting position of the target vehicle and the current position of the target vehicle is also known, the relative pose from the coordinate origin of the offline map to the current position of the target vehicle can be calculated based on the relative pose of the origin and the current local map pose of the target vehicle, that is, the relative pose of the starting point of the target vehicle is obtained.
[0119] It should be noted that the relative posture from the coordinate origin of the offline map to the current position of the target vehicle can specifically be the relative posture from the coordinate origin of the offline map to the rear axle center of the target vehicle at the current position, that is, the rear axle center of the target vehicle can be used to represent the target vehicle.
[0120] Specifically, a specific implementation of step S304 is as follows: Figure 4 As shown, including:
[0121] S401. Based on the current visual odometer data and current inertial navigation information of the target vehicle, the relative position and posture of the target vehicle from the starting position to the current position is calculated to obtain the current local map position and posture of the target vehicle.
[0122] Since the current visual odometer data and current inertial navigation information of the target vehicle can reflect the specific driving conditions of the target vehicle from the starting position to the current position, the current visual odometer data and current inertial navigation information of the target vehicle can be used to calculate the driving conditions of the target vehicle from the starting position to the current position.
[0123] S402: Multiply the relative pose of the origin by the current local map pose of the target vehicle to obtain the relative pose from the coordinate origin of the offline map to the current position of the target vehicle.
[0124] Specific as Figure 5 As shown, the relative position T from the coordinate origin Mco of the known offline map to the starting position Gco of the target vehicle icp , that is, the relative position of the origin is known, and the relative position T from the starting position Gco to the current position Vco of the target vehicle is calculated frame , that is, the current local map pose of the target vehicle is calculated. Obviously, by multiplying the relative pose of the origin with the current local map pose of the target vehicle, the relative pose T from the coordinate origin of the offline map to the current position of the target vehicle can be obtained. init , that is: T init =T icp *T frame .
[0125] S403: Determine the relative posture from the coordinate origin of the offline map to the current position of the target vehicle as the relative posture of the starting point of the target vehicle.
[0126] Since the current position at this time is the starting point, the relative position from the coordinate origin of the obtained offline map to the current position of the target vehicle is determined as the relative position of the starting point of the target vehicle.
[0127] S104: Based on the current local map pose of the target vehicle and the relative pose of the starting point of the target vehicle, a current rough pose of the target vehicle on the offline map is calculated.
[0128] The current local map pose of the target vehicle refers to the relative pose between the starting position of the target vehicle and the current position of the target vehicle. The starting position of the target vehicle refers to the position where the target vehicle starts when positioning begins. Specifically, it refers to the position of the rear axle center of the target vehicle when the target vehicle starts after positioning begins.
[0129] The relative position of the starting point of the target vehicle refers to the relative position between the coordinate origin of the offline map and the starting point of the target vehicle on the offline map. The starting point of the target vehicle refers to the starting point of the target vehicle on the offline map, that is, the first position point of the located target vehicle on the offline map. Similarly, it can specifically refer to the position of the rear axle center of the target vehicle on the offline map at that time.
[0130] Since the current local map pose of the target vehicle is the positioning information of the target vehicle in the global coordinate system, and the relative pose at the starting point of the target vehicle is the relative pose of the starting point of the target vehicle in the offline map, by continuing to track from the starting point, the current rough pose of the target vehicle on the offline map can be obtained.
[0131] Specifically, a specific implementation of step S104 is as follows: Figure 6 As shown, the following steps are included:
[0132] S601. Based on the current visual odometer data and current inertial navigation information of the target vehicle, the relative position and posture of the target vehicle from the starting position to the current position is calculated to obtain the current local map position and posture of the target vehicle.
[0133] S602: Based on the current local map posture of the target vehicle and the relative posture from the starting position of the target vehicle to the starting point of the target vehicle, calculate the posture of the target vehicle from the starting point to the current position.
[0134] Specifically, Figure 7 As shown, since the relative position T of the target vehicle from the starting position Gco to the current position is calculated in step S601, frame , and the relative position T from the starting position Gco of the target vehicle to the starting point Vco of the target vehicle init_frame , is the local map pose when the target vehicle travels to the starting point, so it has been calculated before, that is, it has been calculated when the starting point is positioned. Therefore, it can be seen that by multiplying the inverse matrix of the current local map pose of the target vehicle by the relative pose from the starting position of the target vehicle to the starting point of the target vehicle, the pose of the target vehicle from the starting point to the current position can be obtained. That is, the pose T1 of the target vehicle from the starting point to the current position is calculated as:
[0135]
[0136] S603: Calculate the current rough position of the target vehicle on the offline map by using the position of the target vehicle from the starting point to the current position and the relative position of the starting point of the target vehicle.
[0137] See also Figure 7 The position T1 of the target vehicle from the starting point Vco to the current position has been calculated by step S602, and the relative position of the starting point of the target vehicle is determined, and if the following is done previously Figure 3 The positioning of the starting point shown in FIG. 1 has determined the relative position of the starting point of the target vehicle, and the inverse matrix of the relative position of the starting point of the target vehicle is the position T from the starting point Vco to the coordinate origin Mco of the offline map. init So from the figure, we can see the current rough position T of the target vehicle on the offline map pred , it can be calculated by the following formula:
[0138] T pred =T init *T1
[0139] It should be noted that since the current local map pose of the target vehicle is calculated based on the current visual odometer data and the current inertial navigation information, there will be accumulated errors. Therefore, based on the current local map pose of the target vehicle and the relative pose of the starting point of the target vehicle, a rough pose is calculated, so it needs to be optimized through subsequent steps to ensure the accuracy of the results.
[0140] S105: Based on the current rough position and posture, determine the current area of interest of the offline map.
[0141] Since the current rough posture can roughly represent a posture change of the target vehicle at the current position, and in the IPC matching algorithm, the closer the distance between the two point clouds, the better the matching effect, so in the embodiment of the present application, the current area of interest of the offline map will be determined based on the current rough posture, so as to determine an area of interest as close as possible to the current actual position of the target vehicle for matching.
[0142] Specifically, a specific implementation of step S105 includes: determining the displacement data in the current rough posture as the region center coordinates, and determining the area in the offline map with the location of the region center coordinates as the center and a preset distance as the radius as the current area of interest of the offline map.
[0143] It should be noted that the vehicle's position is a 4*4 matrix, which is used to represent the vehicle's position and its posture at that position. The matrix contains data for representing displacement, specifically the data in the 0th row and the 3rd column and the data in the 1st row and the 3rd column. Therefore, it is used as the center of the current region of interest, that is, the center coordinate roi of the current region of interest. center (roi x ,roi y ) can be expressed as:
[0144] roi x =T pred (0,3)
[0145] roi y =T pred (1,3)
[0146] S106. Project the current local map onto the offline map based on the relative position of the origin to obtain current projected point cloud data.
[0147] The origin-relative pose refers to the relative pose between the coordinate origin of the offline map and the global coordinate origin, so the origin-relative pose can be used to convert data between the two coordinate systems. The global coordinate origin is the starting position of the target vehicle.
[0148] Since what is ultimately needed is the relative pose of the target vehicle at its current position and the coordinate origin of the offline map, it is necessary to project the current local map onto the offline map based on the relative pose of the origin to obtain the current projected point cloud data.
[0149] S107: Perform ICP matching on the current region of interest of the offline map and the current projected point cloud data to obtain the current relative position and posture of the target vehicle.
[0150] It should be noted that when ICP matching is performed on two point cloud data in the same coordinate system, what is obtained is the relative pose between the two point cloud data.
[0151] So specifically Figure 6 As shown in the figure, by performing ICP matching on the point cloud data of the current region of interest (ROI) of the offline map and the current projected point cloud data frame_1, the relative position T between the two point cloud data can be obtained. icp .
[0152] S108. Calculate the current absolute position of the target vehicle on the offline map by using the current relative position of the target vehicle and the position from the coordinate origin of the offline map to the current area of interest of the offline map.
[0153] Since the coordinate origin of the offline map and the current area of interest of the offline map are both fixed, the pose from the coordinate origin of the offline map to the current area of interest of the offline map can be directly calculated. Specifically, it can be the pose from the coordinate origin of the offline map to the center of the current area of interest of the offline map, that is, the pose can be obtained as follows: Figure 7 The pose T shown in roi So if Figure 6 As shown, at this time, the coordinate origin of the offline map is transferred to the position T of the center of the current area of interest of the offline map. roi , multiplied by the relative position T between the two point cloud data calculated in step S107 icp The inverse matrix of the offline map coordinate origin to the current position of the target vehicle on the offline map can be obtained, that is, the absolute position T of the current position of the target vehicle on the offline map can be obtained. curr , thereby determining the current position of the target vehicle on the offline map, and then controlling its driving.
[0154] The embodiment of the present application provides a vehicle positioning method, which first constructs a current local map of the target vehicle at the current position. When the relative position and posture of the starting point of the target vehicle has not yet been located, the relative position and posture of the starting point of the target vehicle is first located based on the relative position and posture between the current local map and the offline map, so that the current rough position and posture of the target vehicle on the offline map can be calculated based on the current local map position and posture of the target vehicle and the relative position and posture of the starting point of the target vehicle. Among them, the current local map position and posture of the target vehicle refers to the relative position and posture between the starting position of the target vehicle and the current position of the target vehicle. The relative position and posture of the starting point of the target vehicle refers to the relative position and posture between the coordinate origin of the offline map and the starting point of the target vehicle on the offline map. Since the current local map pose will have accumulated errors, the current rough pose obtained will also have errors. Therefore, the current area of interest of the offline map will be further determined based on the current rough pose, and then the current local map will be projected onto the offline map based on the origin relative pose to obtain the current projected point cloud data, so as to perform ICP matching between the current area of interest of the offline map and the current projected point cloud data to obtain the current relative pose of the target vehicle. Among them, the origin relative pose refers to the relative pose between the coordinate origin of the offline map and the global coordinate origin. Finally, the current relative pose of the target vehicle and the pose from the coordinate origin of the offline map to the current area of interest of the offline map are used to calculate the current absolute pose of the target vehicle on the offline map, so as to eliminate the error through ICP matching and ensure the accuracy of the positioning result.
[0155] Another embodiment of the present application provides a vehicle positioning device, such as Figure 8 As shown, including:
[0156] The map construction unit 801 is used to construct a current local map of the target vehicle at the current position.
[0157] The initial positioning unit 802 is used to locate the relative position of the starting point of the target vehicle based on the relative position between the current local map and the offline map when the relative position of the starting point of the target vehicle has not been located.
[0158] The relative position of the starting point of the target vehicle refers to the relative position between the coordinate origin of the offline map and the starting point of the target vehicle on the offline map.
[0159] The rough calculation unit 803 is used to calculate the current rough position of the target vehicle on the offline map based on the current local map position of the target vehicle and the relative position of the starting point of the target vehicle.
[0160] The current local map position of the target vehicle refers to the relative position between the starting position of the target vehicle and the current position of the target vehicle.
[0161] The region determination unit 804 is used to determine the current region of interest of the offline map based on the current rough pose.
[0162] The map projection unit 805 is used to project the current local map onto the offline map based on the relative position of the origin to obtain current projected point cloud data.
[0163] The origin relative pose refers to the relative pose between the coordinate origin of the offline map and the global coordinate origin. The global coordinate origin is the starting position of the target vehicle.
[0164] The first matching unit 806 is used to perform ICP matching between the current region of interest of the offline map and the current projected point cloud data to obtain the current relative position and posture of the target vehicle.
[0165] The absolute posture calculation unit 807 is used to calculate the current absolute posture of the target vehicle on the offline map by using the current relative posture of the target vehicle and the posture from the coordinate origin of the offline map to the current area of interest of the offline map.
[0166] Optionally, in another embodiment of the present application, the vehicle positioning device further includes:
[0167] The judgment unit is used to judge whether the relative position of the starting point of the target vehicle has been located.
[0168] Among them, if it is determined that the relative position of the starting point of the target vehicle has been located, the rough calculation unit executes based on the current local map position of the target vehicle and the relative position of the starting point of the target vehicle to calculate the current rough position of the target vehicle on the offline map.
[0169] The second matching unit is used to perform ICP matching between the current local map and the initial area of interest of the offline map to obtain a current matching result when it is determined that the relative position of the starting point of the target vehicle has not yet been located.
[0170] The initial area of interest of the offline map is an area with the coordinate origin of the offline map as the center and the preset threshold as the radius.
[0171] The result output unit is used to determine the current matching result as the relative position and posture of the origin when the current matching result converges.
[0172] The starting point positioning unit is used to calculate the starting point relative posture of the target vehicle based on the origin relative posture and the current local map posture of the target vehicle.
[0173] Optionally, in another embodiment of the present application, the vehicle positioning device further includes:
[0174] The return unit is used to return to the map construction unit to execute construction of the current local map of the target vehicle at the current position after the target vehicle advances a preset distance when the current matching result has not converged.
[0175] Optionally, in a vehicle positioning device provided in another embodiment of the present application, the starting point positioning unit includes:
[0176] The first calculation unit is used to calculate the relative position of the target vehicle from the starting position to the current position based on the current visual odometer data and the current inertial navigation information of the target vehicle, so as to obtain the current local map position of the target vehicle.
[0177] The second calculation unit is used to multiply the relative position and posture of the origin by the current local map position and posture of the target vehicle to obtain the relative position and posture from the coordinate origin of the offline map to the current position of the target vehicle.
[0178] The starting point posture determination unit determines the relative posture from the coordinate origin of the offline map to the current position of the target vehicle as the starting point relative posture of the target vehicle.
[0179] Optionally, in a vehicle positioning device provided in another embodiment of the present application, a map construction unit includes:
[0180] The image acquisition unit is used to obtain each image captured by each surround-view camera of the target vehicle at the current position when the target vehicle travels a preset distance.
[0181] The image stitching unit is used to project each image into a bird's-eye view image, and stitch each bird's-eye view image into a current surround stitching image.
[0182] The feature extraction unit is used to perform semantic extraction on the current surround view splicing image through a pre-trained network model to obtain the current semantic features.
[0183] The feature projection unit is used to project the current semantic features into the global coordinate system based on the current visual odometer data and the current inertial navigation information of the target vehicle to obtain the current local map of the target vehicle at the current position.
[0184] Optionally, in a vehicle positioning device provided in another embodiment of the present application, the rough calculation unit includes:
[0185] The third calculation unit calculates the relative position and posture of the target vehicle from the starting position to the current position based on the current visual odometer data and the current inertial navigation information of the target vehicle, and obtains the current local map position and posture of the target vehicle.
[0186] The fourth calculation unit is used to calculate the posture of the target vehicle from the starting point to the current position based on the current local map posture of the target vehicle and the relative posture from the starting position of the target vehicle to the starting point of the target vehicle.
[0187] The fifth calculation unit is used to calculate the current rough posture of the target vehicle on the offline map by using the posture of the target vehicle from the starting point to the current position and the relative posture of the starting point of the target vehicle.
[0188] Optionally, in a vehicle positioning device provided in another embodiment of the present application, the area determination unit includes:
[0189] The coordinate determination unit is used to determine the displacement data in the current rough posture as the coordinates of the center of the region.
[0190] The area division unit is used to determine an area in the offline map with a location of the area center coordinates as the center and a preset distance as the radius as the current area of interest of the offline map.
[0191] It should be noted that the specific working process of each unit provided in the above embodiments of the present application can refer to the corresponding steps in the above method embodiments, which will not be repeated here.
[0192] Another embodiment of the present application provides an electronic device, such as Fig. 9 As shown, including:
[0193] Memory 901 and processor 902 .
[0194] The memory 901 is used to store programs.
[0195] The processor 902 is used to execute the program stored in the memory 901, and when the program is executed, it is specifically used to implement the vehicle positioning method provided in any one of the above embodiments.
[0196] Another embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement the vehicle positioning method provided in any one of the above embodiments.
[0197] Computer storage media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0198] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0199] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A vehicle positioning method, characterized in that: include: Construct a current local map of the target vehicle at its current location; If the relative position of the starting point of the target vehicle has not been located, the relative position of the starting point of the target vehicle is located based on the relative position between the current local map and the offline map; wherein the relative position of the starting point of the target vehicle refers to the relative position between the coordinate origin of the offline map and the starting point of the target vehicle on the offline map; Based on the current local map pose of the target vehicle and the relative pose of the starting point of the target vehicle, a current rough pose of the target vehicle on the offline map is calculated; wherein the current local map pose of the target vehicle refers to the relative pose between the starting position of the target vehicle and the current position of the target vehicle; Based on the current rough pose, determining a current area of interest of the offline map; The current local map is projected onto the offline map based on the origin relative position and posture to obtain current projected point cloud data; wherein the origin relative position and posture refers to the relative position and posture between the coordinate origin of the offline map and the global coordinate origin; the global coordinate origin is the starting position of the target vehicle; Performing ICP matching on the current region of interest of the offline map and the current projected point cloud data to obtain the current relative position of the target vehicle; The current absolute position of the target vehicle on the offline map is calculated by using the current relative position of the target vehicle and the position from the coordinate origin of the offline map to the current area of interest of the offline map.
2. The method according to claim 1, characterized in that The method of locating the relative position of the starting point of the target vehicle based on the relative position between the current local map and the offline map includes: Performing ICP matching between the current local map and the initial region of interest of the offline map to obtain a current matching result; wherein the initial region of interest of the offline map is a region with a coordinate origin of the offline map as the center and a preset threshold as the radius; If the current matching result converges, the current matching result is determined as the origin relative pose; Based on the origin relative pose and the current local map pose of the target vehicle, the starting point relative pose of the target vehicle is calculated.
3. The method according to claim 2, characterized in that Also includes: If the current matching result has not converged, after the target vehicle advances a preset distance, the process returns to executing the process of constructing a current local map of the target vehicle at the current position.
4. The method according to claim 2, characterized in that: The step of calculating the relative position and posture of the starting point of the target vehicle based on the relative position and posture of the origin and the current local map position and posture of the target vehicle comprises: Based on the current visual odometer data and current inertial navigation information of the target vehicle, the relative position and posture of the target vehicle from the starting position to the current position are calculated to obtain the current local map position and posture of the target vehicle; Multiplying the origin relative pose by the current local map pose of the target vehicle to obtain a relative pose from the coordinate origin of the offline map to the current position of the target vehicle; The relative posture from the coordinate origin of the offline map to the current position of the target vehicle is determined as the relative posture of the starting point of the target vehicle.
5. The method according to claim 1, characterized in that The constructing of a current local map of the target vehicle at the current position includes: When the target vehicle travels a preset distance each time, acquiring each image captured by each surround view camera of the target vehicle at the current position; Projecting each of the images into a bird's-eye view, and stitching each of the bird's-eye view into a current surround stitching image; Performing semantic extraction on the current surround view splicing image through a pre-trained network model to obtain current semantic features; Based on the current visual odometer data and current inertial navigation information of the target vehicle, the current semantic features are projected into a global coordinate system to obtain a current local map of the target vehicle at the current position.
6. The method according to claim 1, characterized in that The step of calculating a current rough position of the target vehicle on the offline map based on the current local map position of the target vehicle and the relative position of the starting point of the target vehicle comprises: Based on the current visual odometer data and current inertial navigation information of the target vehicle, the relative position and posture of the target vehicle from the starting position to the current position are calculated to obtain the current local map position and posture of the target vehicle; Based on the current local map pose of the target vehicle and the relative pose from the starting position of the target vehicle to the starting point of the target vehicle, the pose of the target vehicle from the starting point to the current position is calculated; The current rough posture of the target vehicle on the offline map is calculated by using the posture of the target vehicle from the starting point to the current position and the relative posture of the starting point of the target vehicle.
7. The method according to claim 1, characterized in that The determining, based on the current rough pose, a current area of interest of the offline map comprises: Determine the displacement data in the current rough pose as the region center coordinates; An area in the offline map with the location of the center coordinates of the area as the center and a preset distance as the radius is determined as the current area of interest of the offline map.
8. A vehicle positioning device, characterized in that: include: A map construction unit, used to construct a current local map of the target vehicle at the current position; An initial positioning unit, used for locating the relative position of the starting point of the target vehicle based on the relative position between the current local map and the offline map when the relative position of the starting point of the target vehicle has not been located; wherein the relative position of the starting point of the target vehicle refers to the relative position between the coordinate origin of the offline map and the starting point of the target vehicle on the offline map; A rough calculation unit, configured to calculate a current rough position of the target vehicle on the offline map based on the current local map position of the target vehicle and the relative position of the starting point of the target vehicle; wherein the current local map position of the target vehicle refers to the relative position between the starting position of the target vehicle and the current position of the target vehicle; A region determination unit, configured to determine a current region of interest of the offline map based on the current rough pose; A map projection unit, configured to project the current local map onto the offline map based on the origin relative position and posture to obtain current projection point cloud data; wherein the origin relative position and posture refers to the relative position and posture between the coordinate origin of the offline map and the global coordinate origin; the global coordinate origin is the starting position of the target vehicle; A first matching unit is used to perform ICP matching on the current region of interest of the offline map and the current projected point cloud data to obtain the current relative position of the target vehicle; The absolute posture calculation unit is used to calculate the current absolute posture of the target vehicle on the offline map by using the current relative posture of the target vehicle and the posture from the coordinate origin of the offline map to the current area of interest of the offline map.
9. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program, and when the program is executed, it is specifically used to implement the vehicle positioning method as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that: Used to store a computer program, which, when executed, is used to implement the vehicle positioning method as described in any one of claims 1 to 7.
Citation Information
Cited By
Motor vehicle auxiliary parking method and device and computer readable storage medium
CN120986388A
