A method, apparatus and vehicle for correcting a parking space
Patent Information
- Application Number
- CN202310394955.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2043-04-13
AI Technical Summary
而在感知模块检测车位(即寻库)的过程中,车辆离车位尚有一段距离,存在检测到的车位不准确的问题,使得规划出的路线与实际停车位存在偏差,若控制车辆沿着规划好的泊车路线行驶进入车位,将会导致车辆偏斜,从而造成自动泊车成功率低
[0040]本申请实施例提供一种修正车位的泊车方法,该修正车位的泊车方法通过获取车辆周围的至少一个车位,并接收用户输入的选择指令;根据选择指令从至少一个车位中选取目标车位,获取车辆的初始位置和车辆信息,根据初始位置和车辆信息确定车辆的起始参考线,并根据初始位置和目标车位规划初始泊车路径;控制车辆沿初始泊车路径行驶,并实时获取后置摄像头对应的摄像头纵坐标;基于摄像头纵坐标、起始参考线和目标车位的相对位置,实时更新泊车行驶路径,并控制车辆按照更新后的泊车行驶路径行驶,直至车辆行驶至目标车位。本申请可以实时检测车位,完成车位位置的修正,使得规划出的泊车路线更加准确,避免车辆驶入车位时存在偏斜,从而可以提高自动泊车成功率。
Smart Images

Figure CN116252778B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving, and more specifically, to a parking method, apparatus, and vehicle for correcting parking spaces. Background Technology
[0002] Autonomous vehicles, also known as driverless cars, computer-driven cars, or wheeled mobile robots, are intelligent connected vehicles that achieve driverless operation through computer systems. Relying on the collaboration of artificial intelligence, computer vision, radar, monitoring equipment, and global positioning systems, autonomous vehicles enable computers to work in tandem with the vehicle and the road, operating the motor vehicle automatically and safely without any human intervention. Autonomous parking is a crucial function of autonomous driving.
[0003] During automatic parking, the accuracy of parking is limited by the precision of the parking space detected by the perception module. Parking space detection primarily relies on surround-view cameras and ultrasonic radar. In open spaces, surround-view cameras detect parking space lines to identify spaces; in multi-level parking spaces, ultrasonic sensors and surround-view cameras are used. Based on the identified parking space coordinates, a parking route is planned according to the vehicle's current position, and the control module guides the vehicle to complete the parking according to the planned route. However, during the perception module's parking space detection (i.e., finding the parking space), if the vehicle is still some distance from the space, the detected space may be inaccurate, causing a deviation between the planned route and the actual parking space. If the vehicle is controlled to drive along the planned parking route into the space, it will cause the vehicle to veer, resulting in a low success rate for automatic parking. Summary of the Invention
[0004] The purpose of this invention is to provide a parking method, apparatus, vehicle, and readable storage medium for correcting parking spaces.
[0005] In a first aspect, the present invention provides a parking method for correcting parking spaces, wherein the vehicle is equipped with a rear-facing camera, the method comprising:
[0006] The system acquires at least one parking space around the vehicle and receives a selection command input by the user.
[0007] According to the selection instruction, a target parking space is selected from the at least one parking space, the initial position and vehicle information of the vehicle are obtained, the starting reference line of the vehicle is determined according to the initial position and the vehicle information, and the initial parking path is planned according to the initial position and the target parking space.
[0008] Control the vehicle to drive along the initial parking path and obtain the camera's longitudinal coordinates corresponding to the rear camera in real time;
[0009] Based on the relative positions of the camera's vertical coordinates, the starting reference line, and the target parking space, the parking path is updated in real time, and the vehicle is controlled to drive along the updated parking path until the vehicle reaches the target parking space.
[0010] In an optional implementation, the vehicle information includes the vehicle width, and the initial position is set at the rear axle center of the vehicle before parking begins. Determining the starting reference line of the vehicle based on the initial position and the vehicle information includes:
[0011] A two-dimensional coordinate system is established with the initial position as the origin;
[0012] The starting reference line of the vehicle is determined based on the two-dimensional coordinate system and the vehicle width.
[0013] In an optional implementation, the step of updating the parking path in real time based on the relative position of the camera's longitudinal coordinate, the starting reference line, and the target parking space includes:
[0014] Determine whether the vertical coordinate of the camera exceeds the starting reference line;
[0015] When the vertical coordinate of the camera does not exceed the starting reference line, control the vehicle to continue driving according to the initial parking path;
[0016] When the vertical coordinate of the camera exceeds the starting reference line, the current position of the vehicle and the current parking position coordinate of the target parking space are obtained at preset intervals, and the parking driving path is updated in real time based on the current position and the current parking position coordinate of the target parking space.
[0017] In an optional implementation, the preset period includes a first preset time period and a second preset time period, the target parking space includes a first group of parking spots and a second group of parking spots, the first group of parking spots being the parking spots closest to the initial position among the target parking spaces, and the step of acquiring the current position of the vehicle and the current parking spot coordinates of the target parking space at preset intervals, and updating the parking driving path in real time based on the current position and the current parking spot coordinates of the target parking space, includes:
[0018] At each of the first preset time intervals, the current position of the vehicle and the current coordinates of the first group of parking spots are obtained; the first parking path is planned in real time based on the previous coordinates of the first group of parking spots, the current coordinates of the first group of parking spots, and the current position of the vehicle.
[0019] The vehicle is controlled to drive along the first parking path, and the detection of the second group of parking spots is determined based on the longitudinal coordinate of the camera and the current parking spot coordinates of the first group of parking spots.
[0020] When the detection of the second group of parking spots begins, the current position of the vehicle and the current parking spot coordinates of the second group of parking spots are obtained at the second preset time intervals; a second parking path is planned in real time based on the previous parking spot coordinates of the second group of parking spots, the current parking spot coordinates of the second group of parking spots, and the current position of the vehicle.
[0021] In an optional implementation, the first group of parking spots includes a first parking spot and a second parking spot. The step of planning a first parking path in real time based on the previous coordinates of the first group of parking spots, the current coordinates of the first group of parking spots, and the current position of the vehicle includes:
[0022] Calculate the difference between the previous coordinates and the current coordinates of the first parking spot and the second parking spot, respectively, to obtain the corresponding difference between the horizontal and vertical coordinates.
[0023] Determine whether the difference between the horizontal coordinate and the difference between the vertical coordinate corresponding to each parking spot are both less than a preset difference between the horizontal coordinate and the preset difference between the vertical coordinate;
[0024] If both the difference in the horizontal coordinate and the difference in the vertical coordinate are less than the preset difference in the horizontal coordinate and the preset difference in the vertical coordinate, then the current coordinates of the current parking spot will be used as the updated parking spot coordinates.
[0025] If the difference in the horizontal coordinate and / or the difference in the vertical coordinate are greater than or equal to the preset difference in the horizontal coordinate and the preset difference in the vertical coordinate, then the updated parking space coordinates are calculated using a preset method based on the previous coordinates of the current parking space and the current coordinates of the current parking space.
[0026] The first parking path is planned in real time based on the updated parking location coordinates of the first parking location, the updated parking location coordinates of the second parking location, and the current position of the vehicle.
[0027] In an optional implementation, determining whether to start detecting the second group of parking spots based on the camera's longitudinal coordinate and the current parking spot coordinates of the first group of parking spots includes:
[0028] Determine whether the vertical coordinate of the camera is equal to half of the sum of the vertical coordinates of the current parking spot coordinates of the first group of parking spots;
[0029] If they are equal, then start detecting the second group of parking spots; if they are not equal, then execute the process of obtaining the current position of the vehicle and the current parking spot coordinates of the first group of parking spots at each of the first preset time intervals.
[0030] In an optional embodiment, the vehicle is further provided with a taillight, and the method includes:
[0031] When the vertical coordinate of the camera exceeds the starting reference line, the lighting is kept on.
[0032] Secondly, the present invention provides a parking device for correcting parking spaces, wherein the vehicle is equipped with a rear-facing camera, the device comprising:
[0033] The receiving module is used to acquire at least one parking space around the vehicle and receive selection instructions input by the user.
[0034] The determination module is used to select a target parking space from the at least one parking space according to the selection instruction, obtain the initial position and vehicle information of the vehicle, determine the starting reference line of the vehicle according to the initial position and the vehicle information, and plan an initial parking path according to the initial position and the target parking space.
[0035] The acquisition module is used to control the vehicle to drive along the initial parking path and to acquire the camera longitudinal coordinates corresponding to the rear camera in real time.
[0036] The control module is used to update the parking driving path in real time based on the relative position of the camera's longitudinal coordinate, the starting reference line, and the target parking space, and control the vehicle to drive according to the updated parking driving path until the vehicle reaches the target parking space.
[0037] Thirdly, the present invention provides a vehicle including a memory and a processor, the memory storing a computer program that, when executed on the processor, performs the parking method for correcting parking spaces.
[0038] Fourthly, the present invention provides a readable storage medium storing a computer program that, when run on a processor, executes the parking method for correcting parking spaces.
[0039] The beneficial effects of the embodiments of the present invention are:
[0040] This application provides a parking method for correcting parking spaces. The method involves: acquiring at least one parking space around the vehicle and receiving a selection command from the user; selecting a target parking space from the at least one space according to the selection command; acquiring the vehicle's initial position and vehicle information; determining the vehicle's starting reference line based on the initial position and vehicle information; planning an initial parking path based on the initial position and the target parking space; controlling the vehicle to drive along the initial parking path; and acquiring the camera's longitudinal coordinates corresponding to the rear camera in real time; updating the parking path in real time based on the relative position of the camera's longitudinal coordinates, the starting reference line, and the target parking space; and controlling the vehicle to drive along the updated parking path until the vehicle reaches the target parking space. This application can detect parking spaces in real time and correct their positions, making the planned parking route more accurate and avoiding deviations when the vehicle enters the parking space, thereby improving the success rate of automatic parking.
[0041] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0042] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope of protection of the present invention. In the various drawings, similar components are numbered similarly.
[0043] Figure 1 A schematic flowchart of a parking method for modifying parking spaces according to an embodiment of this application is shown;
[0044] Figure 2 This illustration shows a target parking space and a vehicle in a parking method for modifying parking spaces according to an embodiment of this application;
[0045] Figure 3 This paper illustrates a flowchart of determining the vertical coordinate of a camera in a parking method for correcting parking spaces according to an embodiment of this application.
[0046] Figure 4 This paper illustrates a flowchart of a parking method for correcting parking spaces according to an embodiment of this application, which shows the real-time updating of the parking driving path.
[0047] Figure 5 This paper illustrates a first flowchart of a parking method for modifying parking spaces according to an embodiment of this application, showing the planning of a first parking path.
[0048] Figure 6 This paper illustrates a second flowchart of a parking method for modifying parking spaces according to an embodiment of this application, showing the planning of a first parking path.
[0049] Figure 7 A schematic diagram of a parking device for correcting parking spaces provided in an embodiment of this application is shown.
[0050] Explanation of key component symbols:
[0051] 10-Parking device for correcting parking spaces; 11-Receiving module; 12-Determining module; 13-Acquiring module; 14-Control module. Detailed Implementation
[0052] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0053] The components of the embodiments of the invention described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0054] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of the invention, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0055] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0056] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the invention pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the invention.
[0057] Example 1
[0058] Please refer to Figure 1This application proposes a method for detecting parking spaces using a rear-facing camera, applicable to vehicles equipped with a rear-facing camera. This method is suitable for vehicles reversing into parking spaces, but not for vehicles parking in the front. The rear-facing camera is located at the rear of the vehicle and is typically used to display the rear view and a panoramic view of the vehicle reversing.
[0059] In this application, the parking lines of each parking space are detected in real time by a rear-mounted camera to correct the parking space position, making automatic parking more accurate. Exemplarily, this method for detecting parking spaces using a rear-mounted camera includes steps S100 to S400.
[0060] Step S100: Obtain at least one parking space around the vehicle and receive a selection instruction input by the user.
[0061] Understandably, the vehicle is equipped with an APA (Auto Parking Assist) system, which assists in parking. When parking, activating the APA system allows the car's radar to automatically sense the surrounding environment and safely park the car in the parking space. However, when using the APA system, the driver needs to remain in the car and observe the parking situation.
[0062] In this application, after receiving an automatic parking command, the vehicle will enter a parking space search mode to search for a parking space. During the search, the vehicle will use a rear-mounted camera (i.e., a rearview mirror camera) until at least one parking space is found around the vehicle. This rear-mounted camera can be a wide-angle camera. However, due to issues such as focus and lighting, parking spaces closer to the vehicle are more accurately identified, while those farther away are less clear, resulting in lower recognition accuracy.
[0063] After the vehicle finds at least one parking space, the search will stop, and the found parking space will be displayed on a corresponding display device, allowing the user to select the parking space according to their actual needs, i.e., inputting a selection command. The vehicle will receive the user's selection command, which includes the target parking space selected by the user. The direction from which the vehicle is facing is considered forward, and the direction from which the parking space is facing is considered backward. The selection command can choose either the parking space to the left of the vehicle or the parking space to the right of the vehicle as the target parking space.
[0064] Step S200: Select a target parking space from at least one parking space according to the selection instruction, obtain the initial position and vehicle information of the vehicle, determine the starting reference line of the vehicle according to the initial position and vehicle information, and plan the initial parking path according to the initial position and target parking space.
[0065] It's understandable that the core of an autonomous driving system can be summarized as: perception, planning, and control—the interaction between these three layers. Based on the user's input, a target parking space is selected from at least one available space. After determining the desired parking space, the vehicle's current position is used as its initial position, along with vehicle information. This information includes the vehicle's rear axle centerline, rear overhang length, and width.
[0066] A two-dimensional coordinate system will be established with the coordinates corresponding to the vehicle's initial position as the origin. In other words, the two-dimensional coordinate system will be established with the coordinates corresponding to the center point of the vehicle's rear axle as the origin. The vehicle's starting reference line will be calculated based on this two-dimensional coordinate system and the vehicle width in the vehicle information. That is, the starting line for detecting the parking space will be calculated based on the two-dimensional coordinate system, the coordinates of the initial position, and half of the vehicle width. Furthermore, the coordinates corresponding to the four parking points of the target parking space will be determined under this two-dimensional coordinate system, and the current coordinates of the vehicle in the perception layer will be updated to reflect the vehicle's initial position.
[0067] Exemplary, such as Figure 2 As shown, when the vehicle finishes searching for the parking space and begins to enter the parking area, the vehicle's position at this moment will be recorded, i.e., the center point of the rear axle of the vehicle is O(x0, y0), and the vehicle width is represented by w. A two-dimensional coordinate system is established with O(x0, y0). If the selected instruction is to select the parking space on the right side of the vehicle as the target parking space, the starting reference line for detecting the target parking space using the rear camera is Y = y0 - 0.5 * w. If the selected instruction is to select the parking space on the left side of the vehicle as the target parking space, the starting reference line is Y = y0 + 0.5 * w.
[0068] For example, if a vehicle is traveling in a straight line while searching for a parking space, the coordinates of the rear camera on the Y-axis will always be Y = y0 - 0.5w or Y = y0 + 0.5w. Only after exceeding this starting line will the rear camera mounted at the rear of the vehicle be closer to the target parking space than when searching for a space, thus enabling the rear camera to identify the target parking space more accurately and correct the recorded coordinates of the target parking space.
[0069] After determining the initial position of the vehicle and the coordinates of the target parking space, an initial parking path is planned based on the initial position of the vehicle and the target parking space so that the vehicle can drive along the initial parking path and complete automatic parking. The planning of the parking path is well known to those skilled in the art and is not difficult to understand or implement, so it will not be elaborated on here.
[0070] Step S300: Control the vehicle to drive along the initial parking path and obtain the longitudinal coordinates of the rear camera in real time.
[0071] Understandably, vehicle information includes the vehicle's rear overhang length. After planning the initial parking path, the vehicle will be controlled to drive along the initial parking path, and the vehicle's current position, i.e., the vehicle's current coordinates, will be obtained in real time. Based on the vehicle's rear overhang length and the vertical coordinate of the current coordinates, the vertical coordinate of the rear camera, i.e., the camera's vertical coordinate, will be calculated in real time.
[0072] For example, when a vehicle is parked in a single-step parallel parking maneuver, the rear overhang of the vehicle is L_r, the current vertical coordinate of the vehicle is y, that is, the real-time coordinate of the center of the rear axle of the vehicle in the Y-axis direction is y, and the vertical coordinate of the camera is Y_c. At this time, the vertical coordinate of the camera is Y_c=y+L_r.
[0073] Step S400: Based on the relative position of the camera's longitudinal coordinates, the starting reference line, and the target parking space, update the parking path in real time, and control the vehicle to drive according to the updated parking path until the vehicle reaches the target parking space.
[0074] Understandably, after determining the rear camera's longitudinal coordinates, the starting reference line, and the relative position of the target parking space, the system will determine whether to begin detecting the target parking space's location based on the camera's longitudinal coordinates and the starting reference line. Once detection begins, the system will update the vehicle's parking path in real-time based on the vehicle's current position and the relative position of the target parking space, and control the vehicle to follow the updated path until it reaches the target parking space. Specifically, the system can determine whether the vehicle has reached the target parking space based on whether the current coordinates of the second set of parking space locations are equal to the coordinates of the second set of parking space locations when the vehicle was initially positioned. Alternatively, it can use multiple pre-installed surround-view cameras on the vehicle to determine whether the vehicle has reached the target parking space based on the vehicle's current position and the position of the target parking space.
[0075] In one implementation, such as Figure 3 As shown, the parking path is updated in real time based on the relative position of the camera's vertical coordinate, the starting reference line, and the target parking space, including sub-steps S310 to S330.
[0076] Sub-step S310: Determine whether the camera's vertical coordinate exceeds the starting reference line.
[0077] Understandably, the system will determine whether the real-time acquired camera coordinates exceed the defined starting reference line. If the camera coordinates do not exceed the starting reference line, sub-step S320 will be executed: the vehicle will continue to drive along the initial parking path. If the camera coordinates exceed the starting reference line, sub-step S330 will be executed. The value exceeding the starting reference line can be either below or above it, and can be determined based on actual needs.
[0078] For example, when the vehicle's parking space is on the front side and the parking space is on the rear side, if the selected instruction is to select the parking space on the right side of the vehicle as the target parking space, then it is determined whether the vertical coordinate of the camera is lower than the starting reference line. If it is lower than the starting reference line, then sub-step S330 is executed; if it is higher than or equal to the starting reference line, then sub-step S320 is executed. If the selected instruction is to select the parking space on the left side of the vehicle as the target parking space, then it is determined whether the vertical coordinate of the camera is higher than the starting reference line. If it is higher than the starting reference line, then sub-step S330 is executed; if it is lower than or equal to the starting reference line, then sub-step S320 is executed.
[0079] Sub-step S330: At preset intervals, obtain the current position of the vehicle and the current parking position coordinates of the target parking space, and update the parking driving path in real time based on the current position and the current parking position coordinates of the target parking space.
[0080] When the camera's longitudinal coordinate exceeds the starting reference line, that is, when the vehicle's rear camera enters the starting line for detecting the parking space, it begins to detect and correct the relative position of the target parking space. The vehicle's perception layer will acquire the vehicle's current position and the current parking space coordinates at preset intervals, and update the vehicle's parking path in real time based on the vehicle's current position, the target parking space coordinates, and the previous parking space coordinates. The parking path can be either a first parking path or a second parking path.
[0081] Each parking space includes four parking spots. The preset period includes a first preset time period and a second preset time period. The target parking spaces include a first group of parking spots and a second group of parking spots. The first group of parking spots consists of the target parking spots closest to the initial position. For example, ... Figure 2 As shown, the first group of parking spots are A1 and A2, and the second group of parking spots are A3 and A4.
[0082] In one implementation, such as Figure 4 As shown, sub-step S330 includes sub-steps S331 to S333.
[0083] Sub-step S331: At each first preset time interval, obtain the current position of the vehicle and detect the current parking space coordinates of the first group of parking spaces; plan the first parking path based on the previous parking space coordinates of the first group of parking spaces, the current parking space coordinates of the first group of parking spaces, and the current position of the vehicle.
[0084] In this application, the perception layer acquires the vehicle's current position and the current coordinates of the first set of parking spots at first preset time intervals. This means acquiring the coordinates of the parking spots closest to the vehicle within the target parking space. For example, if the first preset time interval is 100ms, the perception layer will perform detection and acquisition at 100ms intervals. Based on the current coordinates of the first set of parking spots and the previous coordinates, the updated coordinates of the first set of parking spots are determined. Then, based on the updated coordinates of the first set of parking spots and the vehicle's current position, a first parking path is planned in real time.
[0085] In one implementation, such as Figure 5 As shown, the first group of parking spots includes a first parking spot and a second parking spot. The first parking path is planned in real time based on the previous parking spot coordinates of the first group of parking spots, the current parking spot coordinates of the first group of parking spots, and the current position of the vehicle, including sub-steps S10 to S50.
[0086] Sub-step S10: Calculate the difference between the previous coordinates and the current coordinates of the first parking position and the second parking position, respectively, to obtain the corresponding difference between the horizontal and vertical coordinates.
[0087] Understandably, after obtaining the current position of the vehicle and the current coordinates of the first group of parking spots, that is, after determining the coordinates corresponding to the first and second parking spots respectively, the difference between the x-coordinate and y-coordinate of the previous coordinate and the current coordinate of the first parking spot will be calculated to obtain the corresponding x-coordinate difference and y-coordinate difference; the difference between the x-coordinate and y-coordinate of the previous coordinate and the current coordinate of the second parking spot will be calculated to obtain the corresponding x-coordinate difference and y-coordinate difference.
[0088] For example, when the vehicle is initially in its position, the parking spots closest to the vehicle in the target parking space are denoted as the first parking spot A1(x1, y1) and the second parking spot A2(x2, y2). When the rear camera just enters the starting line of the detected parking space, the first detected parking spot is denoted as A11(x1, y1). 11 y 11 The second parking spot is denoted as A21(x). 21 y 21 ), calculate the difference between the previous coordinates and the current coordinates of the first and second parking positions respectively, in other words, calculate A11(x 11 y 11 ), A21(x 21 y 21 The difference between the x-coordinate and y-coordinate of A1(x1, y1) and A2(x2, y2) is used to obtain the difference in the x-coordinate, which is x. 11 -x1 and x 21 -x2, the difference in the ordinate y 11-y1 and y 21 -y2.
[0089] Sub-step S20: Determine whether the difference between the horizontal and vertical coordinates corresponding to each parking spot is less than the preset difference between the horizontal and vertical coordinates.
[0090] The system will determine whether the differences in the x-coordinates and y-coordinates corresponding to the first and second parking positions are both less than preset differences in x-coordinates and y-coordinates. Specifically, it will determine whether the differences in the x-coordinates and y-coordinates of the first and second parking positions are both less than preset differences in x-coordinates and y-coordinates. For example, if the difference in the x-coordinates of the first parking position is x... 11 -x1, the difference in the ordinate is y 11 -y1, where the preset difference between the horizontal and vertical coordinates is 50mm, then determine whether x... 11 -x1<50mm and y 11 -y1<50mm.
[0091] If the difference between the horizontal coordinate and the vertical coordinate are both less than the preset difference between the horizontal coordinate and the preset difference between the vertical coordinate, then execute sub-step S30. If the difference between the horizontal coordinate and the preset difference between the horizontal coordinate and the preset difference between the vertical coordinate and the preset difference between the vertical coordinate and the preset difference between the horizontal coordinate and the preset difference between the vertical coordinate and the preset difference between the horizontal coordinate and the preset difference between the vertical coordinate and the preset difference between the vertical coordinate and the preset difference between the horizontal coordinate and the vertical coordinate, then execute sub-step S40.
[0092] Sub-step S30: Use the current coordinates of the current parking spot as the updated parking spot coordinates.
[0093] When the difference between the x-coordinate and the y-coordinate of the first or second parking spot is determined to be less than the preset difference between the x-coordinate and the y-coordinate, the current coordinates of the first or second parking spot are used as the updated parking spot coordinates. For example, when x 11 -x1<50mm and y 11 When -y1 < 50mm, the current coordinates A11(x) of the first parking position will be... 11 y 11 () as the updated parking spot coordinates.
[0094] Sub-step S40: Calculate the updated parking space coordinates based on the previous coordinates and the current coordinates of the current parking space using a preset method.
[0095] When either the difference in the horizontal coordinate or the difference in the vertical coordinate of the first parking spot or the second parking spot is greater than or equal to the preset difference in the horizontal coordinate or the preset difference in the vertical coordinate, the updated parking spot coordinates will be calculated based on the previous coordinates of the current parking spot and the average of the horizontal and vertical coordinates of the current coordinates corresponding to the current parking spot, where the current parking spot is the first parking spot or the second parking spot.
[0096] For example, when x 11 -x1>50mm, y 11 When -y1 < 50mm, the mean x-coordinate of the previous and current coordinates of the first parking position A1 will be calculated as (x 11 +x1) / 2, the mean of the ordinate is (y 11 +y1) / 2, then the updated parking space coordinates A1 of the first parking space are ((x 11 +x1) / 2,(y 11 +y1) / 2).
[0097] Sub-step S50: Plan the first parking path in real time based on the updated parking location coordinates of the first parking location, the updated parking location coordinates of the second parking location, and the current position of the vehicle.
[0098] After determining the updated parking space coordinates of each parking space in the first group of parking spaces, that is, after determining the updated parking space coordinates of the first parking space and the second parking space, the first parking path is planned in real time based on the updated parking space coordinates of the first parking space, the updated parking space coordinates of the second parking space, and the current position of the vehicle, that is, the current coordinates.
[0099] Sub-step S332: Control the vehicle to drive along the first parking path, and determine whether to start detecting the second group of parking spots based on the camera's longitudinal coordinate and the current parking spot coordinates of the first group of parking spots.
[0100] Understandably, after planning the first parking path within the first preset time period, the vehicle is controlled to drive along the planned first parking path. In this application, every first preset time period, it is also determined whether to start detecting the second group of parking spaces based on the camera's longitudinal coordinate and the current parking space coordinates of the first group of parking spaces. If the detection of the second group of parking spaces is not started, sub-step S331 will continue to be executed, that is, the first parking path will continue to be planned based on the first group of parking spaces, and the vehicle will be controlled to drive along the first parking path; if the detection of the second group of parking spaces is not started, sub-step S333 will be executed.
[0101] In one implementation, such as Figure 6 As shown, in this application, determining whether to start detecting the second group of parking spots is based on the camera's vertical coordinate and the current parking spot coordinates of the first group of parking spots includes sub-steps S60 to S70.
[0102] Sub-step S60: Determine whether the camera's vertical coordinate is equal to half the sum of the vertical coordinates of the current parking spot coordinates in the first group of parking spots.
[0103] Understandably, the process involves determining whether the camera's vertical coordinate is equal to the average of the sums of the vertical coordinates of the current parking positions in the first group of parking positions; that is, determining whether the camera's vertical coordinate is equal to half the sum of the vertical coordinates of the first and second parking positions. If it is equal, then sub-step S70 is executed: determine to start detecting the second group of parking positions; if it is not equal, then sub-step S331 is executed.
[0104] For example, the vertical coordinate of the camera is Y_c, and the vertical coordinate of the first parking spot is y_c. 1n The ordinate of the second parking spot is y. 2n Determine if Y_c is equal to (y 1n +y 2n )*0.5.
[0105] Sub-step S333: When the detection of the second group of parking spots begins, the current position of the vehicle and the current parking spot coordinates of the second group of parking spots are obtained at second preset time intervals; the second parking path is planned in real time based on the previous parking spot coordinates of the second group of parking spots, the current parking spot coordinates of the second group of parking spots, and the current position of the vehicle.
[0106] Understandably, when detecting the second group of parking spots, the perception layer will acquire the current location of the vehicle and the current coordinates of the parking spots in the second group at second preset time intervals. This means acquiring the coordinates of all parking spots in the target parking area except those closest to the vehicle. The second group of parking spots includes the third and fourth parking spots. Figure 2 As shown, the third parking spot is A3 and the fourth parking spot is A4.
[0107] The updated parking space coordinates of the second group of parking spaces are determined based on the current parking space coordinates and the coordinates of the previous two parking spaces. A second parking path is then planned in real-time based on the updated parking space coordinates of the second group of parking spaces and the vehicle's current position. In other words, the differences in the x-coordinate and y-coordinate of the previous and current coordinates of the third and fourth parking spaces are calculated respectively to obtain the corresponding x-coordinate difference and y-coordinate difference values. The updated parking space coordinates corresponding to the third and fourth parking spaces are then determined based on the x-coordinate difference, y-coordinate difference, and y-coordinate difference of the third and fourth parking spaces, as well as preset x-coordinate differences and preset y-coordinate differences. In this application, the method for real-time planning of the second parking path based on the second group of parking spaces is the same as the method for real-time planning of the first parking path based on the first group of parking spaces described above, and will not be elaborated further here.
[0108] In one implementation, after obtaining the updated coordinates of the first set of parking spots and the updated coordinates of the second set of parking spots, the corresponding parking path can be replanned at the planning layer or the control layer.
[0109] Understandably, the planning layer will replan the parking path, and the control layer will perform simple logic control to correct the parking path. The parking path will be updated in real time through the planning layer or the control layer, mainly based on factors such as the platform's computing power, the vehicle's current position relative to the parking space, and the vehicle's response time.
[0110] For example, it is determined whether the platform computing power of the processor is sufficient. If it is sufficient, then adjustment and planning are performed at the planning layer; if it is insufficient, then adjustment and planning are performed at the control layer. The processor can be an MCU (Microcontroller Unit) or a Central Processing Unit (CPU), etc.
[0111] For example, if the processor is an MCU, the vehicle will occupy about 200ms of the entire MCU's resources when planning the route. During this process, if there is a 200ms delay in communication between the MCU and the vehicle, that is, if the parking path is replanned by the planning layer while the vehicle is in motion and the MCU resources are limited, it may cause a safety accident. At this time, the perception layer can send the vehicle's current position, the current parking space coordinates of the target parking space, and the previous parking space coordinates to the control layer for simple correction and real-time update to obtain the parking driving path. If the platform has sufficient computing power, the parking path can be replanned by the planning layer.
[0112] The system determines whether the vehicle has deviated from its intended path based on its current position relative to the target parking space. If it has, the planning layer is selected; otherwise, the control layer is selected. For example, if the difference between the current position of the vehicle and the current position of the target parking space is greater than a preset difference, the vehicle is considered to have deviated significantly. In this case, the problem cannot be solved by correcting the vehicle's pose through the control layer, and the parking path needs to be replanned through the planning layer.
[0113] The system will also assess the vehicle's response time. If the vehicle is in motion and its current response time is greater than the preset delay response time, and if the vehicle's current position is very close to the target parking space and there is a possibility of collision, the vehicle needs to stop and the parking path needs to be replanned through the planning layer.
[0114] In one embodiment, the vehicle is also equipped with a taillight.
[0115] Understandably, the camera's sensing accuracy is closely related to light. When the camera's vertical coordinate exceeds the starting reference line, the lights will be kept on. This allows the rear camera to improve its detection accuracy, especially in dimly lit parking areas.
[0116] In this application, parking spaces can be detected in real time and their positions can be corrected, making the planned parking route more accurate and avoiding deviation when the vehicle enters the parking space, thereby improving the success rate of automatic parking.
[0117] The parking method for modified parking spaces based on the above embodiments, Figure 7 A schematic diagram of a parking space correction device 10 according to an embodiment of this application is shown. The parking space correction device 10 includes:
[0118] The receiving module 11 is used to acquire at least one parking space around the vehicle and receive a selection command input by the user.
[0119] The determining module 12 is used to select a target parking space from the at least one parking space according to the selection instruction, obtain the initial position and vehicle information of the vehicle, determine the starting reference line of the vehicle according to the initial position and the vehicle information, and plan an initial parking path according to the initial position and the target parking space.
[0120] The acquisition module 13 is used to control the vehicle to drive along the initial parking path and to acquire the camera longitudinal coordinates corresponding to the rear camera in real time.
[0121] The control module 14 is used to update the parking driving path in real time based on the relative position of the camera's longitudinal coordinate, the starting reference line, and the target parking space, and control the vehicle to drive according to the updated parking driving path until the vehicle reaches the target parking space.
[0122] The parking device 10 for correcting parking spaces in this embodiment is used to execute the parking method for correcting parking spaces in the above embodiment. The implementation schemes and beneficial effects involved in the above embodiments are also applicable in this embodiment, and will not be repeated here.
[0123] This application also provides a vehicle, including a memory and a processor. The memory stores a computer program, and the computer program executes the above-described parking method for correcting parking spaces when it runs on the processor.
[0124] This application also provides a computer-readable storage medium storing a computer program that, when executed on a processor, implements the above-described parking method for correcting parking spaces.
[0125] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, as an alternative implementation, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0126] In addition, the functional modules or units in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0127] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0128] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A parking method for correcting parking spaces, characterized in that, The vehicle is equipped with a rear-facing camera, and the method includes: The system acquires at least one parking space around the vehicle and receives a selection command input by the user. According to the selection instruction, a target parking space is selected from the at least one parking space, the initial position and vehicle information of the vehicle are obtained, the starting reference line of the vehicle is determined according to the initial position and the vehicle information, and the initial parking path is planned according to the initial position and the target parking space. Control the vehicle to drive along the initial parking path and obtain the camera's longitudinal coordinates corresponding to the rear camera in real time; Based on the relative position of the camera's vertical coordinate, the starting reference line, and the target parking space, the parking driving path is updated in real time, and the vehicle is controlled to drive according to the updated parking driving path until the vehicle reaches the target parking space. The real-time updating of the parking path based on the relative position of the camera's longitudinal coordinates, the starting reference line, and the target parking space includes: Determine whether the vertical coordinate of the camera exceeds the starting reference line; When the vertical coordinate of the camera does not exceed the starting reference line, control the vehicle to continue driving according to the initial parking path; When the vertical coordinate of the camera exceeds the starting reference line, the current position of the vehicle and the current parking position coordinate of the target parking space are obtained at preset intervals, and the parking driving path is updated in real time based on the current position and the current parking position coordinate of the target parking space. The preset period includes a first preset time period and a second preset time period, and the target parking space includes a first group of parking spaces and a second group of parking spaces. The first group of parking spaces is the parking space closest to the initial position among the target parking spaces. The step of acquiring the current position of the vehicle and the current parking space coordinates of the target parking space at preset intervals, and updating the parking path in real time based on the current position and the current parking space coordinates, includes: At each of the first preset time intervals, the current position of the vehicle and the current coordinates of the first group of parking spots are obtained; the first parking path is planned in real time based on the previous coordinates of the first group of parking spots, the current coordinates of the first group of parking spots, and the current position of the vehicle. The vehicle is controlled to drive along the first parking path, and the detection of the second group of parking spots is determined based on the longitudinal coordinate of the camera and the current parking spot coordinates of the first group of parking spots. When the detection of the second group of parking spots begins, the current position of the vehicle and the current parking spot coordinates of the second group of parking spots are obtained at the second preset time intervals; a second parking path is planned in real time based on the previous parking spot coordinates of the second group of parking spots, the current parking spot coordinates of the second group of parking spots, and the current position of the vehicle.
2. The parking method for adjusting parking spaces according to claim 1, characterized in that, The vehicle information includes the vehicle width. The initial position is set at the rear axle center of the vehicle before parking begins. Determining the vehicle's starting reference line based on the initial position and the vehicle information includes: A two-dimensional coordinate system is established with the initial position as the origin; The starting reference line of the vehicle is determined based on the two-dimensional coordinate system and the vehicle width.
3. The parking method for adjusting parking spaces according to claim 1, characterized in that, The first group of parking spots includes a first parking spot and a second parking spot. The step of planning a first parking path in real time based on the previous coordinates of the first group of parking spots, the current coordinates of the first group of parking spots, and the current position of the vehicle includes: Calculate the difference between the previous coordinates and the current coordinates of the first parking spot and the second parking spot, respectively, to obtain the corresponding difference between the horizontal and vertical coordinates. Determine whether the difference between the horizontal coordinate and the difference between the vertical coordinate corresponding to each parking spot are both less than a preset difference between the horizontal coordinate and the preset difference between the vertical coordinate; If both the difference in the horizontal coordinate and the difference in the vertical coordinate are less than the preset difference in the horizontal coordinate and the preset difference in the vertical coordinate, then the current coordinates of the current parking spot will be used as the updated parking spot coordinates. If the difference in the horizontal coordinate and / or the difference in the vertical coordinate are greater than or equal to the preset difference in the horizontal coordinate and the preset difference in the vertical coordinate, then the updated parking space coordinates are calculated using a preset method based on the previous coordinates of the current parking space and the current coordinates of the current parking space. The first parking path is planned in real time based on the updated parking location coordinates of the first parking location, the updated parking location coordinates of the second parking location, and the current position of the vehicle.
4. The parking method for adjusting parking spaces according to claim 1, characterized in that, The step of determining whether to start detecting the second group of parking spots based on the camera's longitudinal coordinate and the current parking spot coordinates of the first group of parking spots includes: Determine whether the vertical coordinate of the camera is equal to half of the sum of the vertical coordinates of the current parking spot coordinates of the first group of parking spots; If they are equal, then start detecting the second group of parking spots; if they are not equal, then execute the process of obtaining the current position of the vehicle and detecting the current parking spot coordinates of the first group of parking spots at each of the first preset time intervals.
5. The parking method for adjusting parking spaces according to claim 1, characterized in that, The vehicle is also equipped with a taillight, and the method includes: When the vertical coordinate of the camera exceeds the starting reference line, the lighting is kept on.
6. A parking device for correcting parking spaces, characterized in that, The vehicle is equipped with a rear-facing camera, the device comprising: The receiving module is used to acquire at least one parking space around the vehicle and receive selection instructions input by the user. The determination module is used to select a target parking space from the at least one parking space according to the selection instruction, obtain the initial position and vehicle information of the vehicle, determine the starting reference line of the vehicle according to the initial position and the vehicle information, and plan an initial parking path according to the initial position and the target parking space. The acquisition module is used to control the vehicle to drive along the initial parking path and to acquire the camera longitudinal coordinates corresponding to the rear camera in real time. The control module is used to update the parking driving path in real time based on the relative position of the camera's longitudinal coordinate, the starting reference line, and the target parking space, and control the vehicle to drive according to the updated parking driving path until the vehicle reaches the target parking space. The real-time updating of the parking path based on the relative position of the camera's longitudinal coordinates, the starting reference line, and the target parking space includes: Determine whether the vertical coordinate of the camera exceeds the starting reference line; When the vertical coordinate of the camera does not exceed the starting reference line, control the vehicle to continue driving according to the initial parking path; When the vertical coordinate of the camera exceeds the starting reference line, the current position of the vehicle and the current parking position coordinate of the target parking space are obtained at preset intervals, and the parking driving path is updated in real time based on the current position and the current parking position coordinate of the target parking space. The preset period includes a first preset time period and a second preset time period, and the target parking space includes a first group of parking spaces and a second group of parking spaces. The first group of parking spaces is the parking space closest to the initial position among the target parking spaces. The step of acquiring the current position of the vehicle and the current parking space coordinates of the target parking space at preset intervals, and updating the parking path in real time based on the current position and the current parking space coordinates, includes: At each of the first preset time intervals, the current position of the vehicle and the current coordinates of the first group of parking spots are obtained; the first parking path is planned in real time based on the previous coordinates of the first group of parking spots, the current coordinates of the first group of parking spots, and the current position of the vehicle. The vehicle is controlled to drive along the first parking path, and the detection of the second group of parking spots is determined based on the longitudinal coordinate of the camera and the current parking spot coordinates of the first group of parking spots. When the detection of the second group of parking spots begins, the current position of the vehicle and the current parking spot coordinates of the second group of parking spots are obtained at the second preset time intervals; a second parking path is planned in real time based on the previous parking spot coordinates of the second group of parking spots, the current parking spot coordinates of the second group of parking spots, and the current position of the vehicle.
7. A vehicle, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed on the processor, performs the parking method for correcting parking spaces as described in any one of claims 1 to 5.
8. A readable storage medium, characterized in that, It stores a computer program that, when run on a processor, executes the parking method for correcting parking spaces as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Visual positioning method for correcting automatic parking path
CN111678518A