Method, electronic device and storage medium for determining parking space
By obtaining the target position and parking space group database of unmanned vehicles and combining parking cost calculation to select parking spaces, the problem of high computing power and error detection of unmanned vehicles when identifying parking spaces is solved, and the successful parking of intelligently selecting suitable parking spaces is achieved.
Patent Information
- Application Number
- CN202210054861.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-18
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-01-18
AI Technical Summary
When identifying parking spaces, driverless vehicles have high computing power requirements and are prone to mis-detection. They cannot intelligently select alternative parking spaces when designated parking spaces are occupied, resulting in abnormal parking failures.
By obtaining the target position and parking space group database of driverless vehicles, identify the target parking space group, and select the appropriate parking space in the target parking space group, considering the parking cost including angle deviation, distance cost and obstacle cost, and construct virtual parking spaces to ensure successful parking.
It provides multiple optional parking spaces, reducing abnormal parking failures, and improving parking intelligence and success rate of driverless vehicles.
Smart Images

Figure CN114590271B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of unmanned driving technology, and in particular to a method for determining a parking space, an electronic device, and a storage medium. Background Art
[0002] In autonomous and assisted driving, autonomous vehicles use sensors to perceive their surroundings. These sensors include, but are not limited to, millimeter-wave radar, lidar, ultrasonic radar, and visual sensors. These sensors detect and classify the surrounding environment and transmit this information to the control module, which then makes decisions about the vehicle's future direction, speed, and parking. These decisions are then executed by actuators, completing the entire assisted or autonomous driving process.
[0003] Currently, autonomous vehicles identify parking spaces based on camera data. This method requires high computing power and can result in false detections. Furthermore, when assigned a parking space, the autonomous vehicle specifies a unique parking space. However, if that space is occupied, the vehicle doesn't know where to park, demonstrating insufficient intelligence. Summary of the Invention
[0004] The main technical problem solved by the embodiments of the present application is to provide a method for determining a parking space, so that an unmanned vehicle can intelligently select a suitable parking space for parking.
[0005] To solve the above technical problems, in a first aspect, embodiments of the present application provide a method for determining a parking space, comprising:
[0006] Obtaining a target position of the unmanned vehicle and a parking space group database, wherein the parking space group database includes at least one parking space group, and the parking space group includes at least one parking space;
[0007] Determining a target parking space group corresponding to the unmanned vehicle according to the target posture of the unmanned vehicle;
[0008] A target parking space for the driverless vehicle is determined based on the target parking space group.
[0009] In some embodiments, determining a target parking space group corresponding to the unmanned vehicle based on the target position of the unmanned vehicle includes:
[0010] If the target posture of the unmanned vehicle is located in a parking space in the parking space group database, the target parking space group is determined to be the parking space group to which the parking space matched with the target posture belongs.
[0011] In some embodiments, determining the target parking space of the unmanned vehicle based on the target parking space group includes:
[0012] Obtaining the occupancy status of each parking space in the target parking space group;
[0013] Consider unoccupied parking spaces as candidate parking spaces;
[0014] The target parking space is determined based on the candidate parking spaces.
[0015] In some embodiments, determining the target parking space based on the candidate parking spaces includes:
[0016] If the number of the candidate parking spaces is 1, use the candidate parking space as the target parking space;
[0017] If the number of the candidate parking spaces is greater than 1, the parking cost of each candidate parking space is calculated, and the target parking space is determined to be the candidate parking space with the minimum parking cost.
[0018] In some embodiments, determining the target parking space based on the candidate parking spaces includes:
[0019] If the number of the candidate parking spaces is 0, a first virtual parking space is constructed according to the current position of the unmanned vehicle, and the target parking space is determined to be the first virtual parking space.
[0020] In some embodiments, calculating the parking cost of each candidate parking space includes:
[0021] Calculating an angle deviation cost, a distance cost, and an obstacle cost for the candidate parking space;
[0022] The parking cost is determined according to the angle deviation cost, the distance cost, and the obstacle cost.
[0023] In some embodiments, determining the parking cost of the candidate parking space based on the angle deviation cost, the distance cost, and the obstacle cost includes:
[0024] Divide the area where the candidate parking space is located into N areas, and calculate the obstacle costs of the N areas, where N is an integer greater than 1;
[0025] According to the relative position of the unmanned vehicle and the N areas, the parking cost of the candidate parking space is determined to include the angle deviation cost, the distance cost or the obstacle cost of M areas, wherein the M areas are selected from the N areas.
[0026] In some embodiments, determining a target parking space group corresponding to the unmanned vehicle based on the target position of the unmanned vehicle further includes:
[0027] If the target posture of the unmanned vehicle is not located in any parking space in the parking space group database, a second virtual parking space is constructed according to the target posture, and the target parking space is determined to be the second virtual parking space.
[0028] To solve the above technical problems, in a second aspect, an embodiment of the present application provides an electronic device, including:
[0029] at least one processor, and
[0030] a memory communicatively coupled to the at least one processor, wherein:
[0031] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect above.
[0032] In order to solve the above technical problems, in a third aspect, an embodiment of the present application provides a readable storage medium, which stores a program or instruction, and when the program or instruction is executed by a processor, the method described in the first aspect above is implemented.
[0033] Beneficial effects of the embodiments of the present application: Different from the prior art, the method for determining a parking space provided by the embodiments of the present application first obtains the target posture of the unmanned vehicle and a parking space group database, wherein the parking space group database includes at least one parking space group, and each parking space group includes at least one parking space; then, based on the target posture of the unmanned vehicle, the target parking space group corresponding to the unmanned vehicle is determined; finally, in the target parking space group, the target parking space of the unmanned vehicle is determined. In this scheme, the target posture (position and posture) of the unmanned vehicle and the pre-set parking space group database are combined to determine the target parking space group for optional parking, so that the target parking space group is the optimal parking space group in the parking space group database and is most convenient for the unmanned vehicle to park from the target posture. Based on the fact that the target parking space group also includes at least one parking space, the final target parking space is determined from the target parking space group. Even if some parking spaces in the target parking space group are occupied by other vehicles or obstacles, other parking spaces in the target parking space group can be selected as target parking spaces for parking, providing multiple parking spaces to choose from for the unmanned vehicle. Therefore, the unmanned vehicle can intelligently select a suitable parking space for parking, reducing abnormal parking failures. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0035] Figure 1 This is a schematic diagram of an application scenario of the method for determining a parking space in some embodiments of the present application;
[0036] Figure 2 This is a flowchart of a method for determining a parking space in some embodiments of the present application;
[0037] Figure 3 A schematic diagram of the division of parking spaces in some embodiments of the present application;
[0038] Figure 4 This is a schematic diagram of the structure of an electronic device in some embodiments of the present application. DETAILED DESCRIPTION
[0039] The present application is described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but are not intended to limit the present application in any form. It should be noted that those skilled in the art may make several variations and improvements without departing from the scope of the present application. These all fall within the scope of protection of the present application.
[0040] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0041] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other and are all within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flow chart. In addition, the words "first", "second", "third", etc. used herein do not limit the data and execution order, but only distinguish between the same items or similar items with basically the same functions and effects.
[0042] Unless otherwise defined, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which this application belongs. The terms used in this specification and in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the relevant listed items.
[0043] In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0044] Autonomous vehicles are intelligent mobile devices that use onboard sensor systems to perceive the road environment, automatically plan driving routes, and control the vehicle to reach a predetermined destination. Specifically, onboard sensors perceive the vehicle's surroundings and, based on this information, control the vehicle's steering and speed, enabling it to safely and reliably navigate the road and reach its intended parking location.
[0045] Unmanned vehicles can be used in a variety of scenarios. In some scenarios, unmanned vehicles can be used as unmanned passenger buses or unmanned logistics vehicles. For an example of an unmanned logistics vehicle, please refer to Figure 1 ,The application scenario includes a central console, multiple unmanned logistics vehicles and parking spaces.
[0046] The central console is a device with computing, processing and control capabilities, such as a computer, server or mobile terminal such as a tablet computer.
[0047] Each unmanned logistics vehicle is connected to the central control console. If a vehicle hasn't received a handling task from the console, it can park in a waiting area. When a task arrives, it automatically drives to the loading area, finds a parking space, and waits for loading. Once loading is complete, it automatically drives to the unloading area, finds a parking space, and waits for unloading. After unloading, the vehicle returns to the waiting area to await the next task.
[0048] Specifically, if a user needs to transport goods from loading location A to unloading location B, they first use the client in the center console to send the location of loading location A to the unmanned logistics vehicle. The unmanned logistics vehicle then plans a route and, when it arrives near loading location A, uses its built-in algorithm to identify a suitable parking space P1 and parks in P1. After loading, the user then sends the location of unloading location B. The unmanned logistics vehicle then plans a route and, when it arrives near unloading location B, uses its built-in algorithm to identify a suitable parking space P2, parks in P2, and unloads the goods. Once unloading is complete, the unmanned logistics vehicle returns to the waiting area, completing its mission. It is understood that the locations of loading location A and unloading location B can be sent simultaneously to the unmanned logistics vehicle via the center console, and there are no restrictions on the interactive control between the center console and the unmanned logistics vehicle.
[0049] It is understandable that whether an unmanned vehicle can successfully park is a key link in intelligent driving and task completion. In some embodiments known to the inventors of the present application, the unmanned vehicle will identify the location of the parking space based on the camera information and then park. However, this method requires high computing power. In addition, the camera's field of view is limited, so the unmanned logistics vehicle needs to search for parking spaces while driving, and it is impossible to coordinate parking space information. Parking takes a long time. In addition, false detection often occurs. In other embodiments known to the inventors of the present application, when issuing a task to an unmanned vehicle, a unique parking space is specified. However, when this parking space is occupied, the vehicle does not know where to park and does not perform intelligently enough.
[0050] In view of this, some embodiments of the present application provide a method for determining a parking space. First, a target position and a parking space group database of an unmanned vehicle are obtained, wherein the parking space group database includes at least one parking space group, each parking space group including at least one parking space. Then, a target parking space group corresponding to the unmanned vehicle is determined based on the target position of the unmanned vehicle. Finally, a target parking space for the unmanned vehicle is determined within the target parking space group. In this scheme, a target parking space group for parking is determined based on the target position (position and posture) of the unmanned vehicle and a pre-set parking space group database. This target parking space group is optimal and most convenient for the unmanned vehicle to park from the target position in the parking space group database. Because the target parking space group also includes at least one parking space, a final target parking space is determined from the target parking space group. Even if some parking spaces in the target parking space group are already occupied by other vehicles or obstacles, other parking spaces in the target parking space group can be selected as target parking spaces for parking. This provides the unmanned vehicle with multiple parking spaces to choose from, allowing the unmanned vehicle to intelligently select a suitable parking space for parking and reducing parking errors.
[0051] The technical solution of this application is described in detail below.
[0052] See first Figure 2 , Figure 2 This is a flow chart of a method for determining a parking space in some embodiments of the present application. Figure 2 As shown, the method S100 includes but is not limited to the following steps:
[0053] S10: Obtain the target posture and parking space group database of the unmanned vehicle.
[0054] It can be understood that the target pose reflects the position and pose of the destination sent to the unmanned vehicle, that is, the position and pose of the set destination. Figure 1 In the example shown, the target pose can be sent to the vehicle by the central console when issuing a task. For example, it can include the location of the loading site A and the vehicle's pose upon arrival at loading site A, or the location of the loading site B and the vehicle's pose upon arrival at unloading site B. The pose can be represented by the parameters (x, y, z, yaw), where x represents the horizontal coordinate of the unmanned vehicle's rear axle center in the world coordinate system, y represents the vertical coordinate of the unmanned vehicle's rear axle center in the world coordinate system, z represents the height of the unmanned vehicle's rear axle center in the world coordinate system, and yaw represents the angle between the unmanned vehicle's front face and the x-axis of the world coordinate system.
[0055] The parking space group database includes at least one parking space group, wherein each parking space group includes at least one parking space. For example, the parking space group database includes three parking space groups: ParkingSpaceGroup1#, ParkingSpaceGroup2#, and ParkingSpaceGroup3#. ParkingSpaceGroup1# includes three parking spaces, ParkingSpaceGroup2# includes four parking spaces, and ParkingSpaceGroup3# includes one parking space.
[0056] Each parking space can be represented by coordinate points and positional relationships in the world coordinate system. For example, a parking space, ParkingSpace, is represented by the parameters (Point1, Point2, Point3, Point4, Pose). Point1, Point2, Point3, and Point4 represent the four vertices of a rectangular parking frame. These four vertices can be arranged counterclockwise. Each vertex is a point in the world coordinate system. A point, pint, is represented by the parameters (x, y, z), where x is the point's horizontal coordinate in the world coordinate system, y is the point's vertical coordinate in the world coordinate system, and z is the point's height in the world coordinate system.
[0057] The parameter Pose in the parking space ParkingSpace represents the position of the vehicle's rear axle center after the vehicle is parked within the rectangular parking frame. The pose Pose in the parking space ParkingSpace can be a hypothetical pose of a parked vehicle set by those skilled in the art for each parking space. The pose is represented by the parameters (x, y, z, yaw), where x represents the horizontal coordinate of the vehicle's rear axle center after the vehicle is parked within the rectangular parking frame, y represents the vertical coordinate of the vehicle's rear axle center after the vehicle is parked within the rectangular parking frame, z represents the height of the vehicle's rear axle center after the vehicle is parked within the rectangular parking frame, and yaw represents the angle between the vehicle's front facing the rear axle center and the x-axis of the world coordinate system after the vehicle is parked within the rectangular parking frame.
[0058] It is understandable that the parking space group database can be pre-set by those skilled in the art based on site planning, and can be stored in the unmanned vehicle or in other computing and processing devices (such as computers or servers, etc.) that are communicatively connected to the unmanned vehicle for retrieval.
[0059] S20: Determine a target parking space group corresponding to the unmanned vehicle according to the target posture of the unmanned vehicle.
[0060] It is understood that the target pose Goal also includes corresponding parameters (x, y, z, yaw). Thus, based on the parameters of the target pose Goal and the parameters of each parking space in the parking space group database, a target parking space group suitable for the autonomous vehicle can be matched. This target parking space group can be the optimal parking space group in the parking space group database that is most convenient for the autonomous vehicle to park from the target pose.
[0061] In some embodiments, the above step S20 specifically includes:
[0062] S21: If the target posture of the unmanned vehicle is located in a parking space in the parking space group database, determine that the target parking space group is the parking space group to which the parking space matched by the target posture belongs.
[0063] When the autonomous vehicle reaches a target position, it needs to find a parking space to park. The target parking group is determined based on the positional relationship between the target position and each parking space in the parking group database. Specifically, each parking space in the parking group database is traversed, and each parking space is compared with the target position to determine whether the target position is located in the parking space. If the target position is located in parking space ParkingSpaceGroup2#.ParkingSpace1, it indicates that the target position matches parking space ParkingSpaceGroup2#.ParkingSpace1. Since parking space ParkingSpaceGroup2#.ParkingSpace1 is the first parking space in parking space group ParkingSpaceGroup2#, parking space group ParkingSpaceGroup2# is selected as the target parking group.
[0064] Specifically, to determine whether the target posture is located in a parking space, the following method can be used for screening. The following takes the parking space ParkingSpace1 as an example to schematically illustrate the determination process.
[0065] (1) Highly screened
[0066] Set the parameters p_up (e.g., to 1 meter) and p_down (e.g., to -1 meter) to represent the allowable height error. Calculate delta_z = ParkingSpace1.z - Goal.z. If p_up > delta_z > p_down, then the target pose Goal is likely in ParkingSpace1 and go to (2). Otherwise, it is not likely in ParkingSpace1.
[0067] (2) Location screening
[0068] Determine whether the center parameters (Goal.x, Goal.y) of the target pose are in the rectangular parking frame composed of Point1, Point2, Point3, and Point4 of ParkingSpace1. If so, it means that the target pose Goal is in the parking space ParkingSpace1; otherwise, it is not in the parking space ParkingSpace1.
[0069] In this embodiment, if the target posture matches a parking space in the parking space group database, the parking space group to which the parking space belongs is used as the target parking space group. It can be understood that the target parking space group includes multiple parking spaces, thereby providing multiple optional parking spaces for the unmanned vehicle to avoid the vehicle not knowing where to park when some parking spaces are occupied.
[0070] S30: Determine a target parking space for the unmanned vehicle based on the target parking space group.
[0071] In this embodiment, a nearby parking space not occupied by other vehicles can be selected from the target parking space group as the target parking space. The final target parking space is determined from the target parking space group. Even if some parking spaces in the target parking space group are occupied by other vehicles or obstacles, other parking spaces in the target parking space group can be selected as the target parking space for parking. This provides the autonomous vehicle with multiple parking space options, allowing it to intelligently select the appropriate parking space for parking, reducing parking errors.
[0072] In some embodiments, the above step S30 specifically includes:
[0073] S31: Obtain the occupancy status of each parking space in the target parking space group.
[0074] S32: Taking unoccupied parking spaces as candidate parking spaces.
[0075] S33: Determine a target parking space based on the candidate parking spaces.
[0076] Among them, the occupancy of parking spaces includes being occupied by other vehicles (i.e., already parked vehicles) or being occupied by obstacles. Figure 1 In the embodiment shown, it is possible to obtain from the center console which parking spaces have been blocked by other vehicles, and it is possible to sense which parking spaces have faulty objects through cameras on unmanned vehicles or cameras installed in the parking lot, thereby obtaining the occupancy status of each parking space in the target parking space group.
[0077] If a parking space is not occupied by other vehicles and there are no obstacles in the space, then the parking space is a candidate parking space. Thus, the final target parking space can be determined from the candidate parking spaces. In this embodiment, all candidate parking spaces are available for the driverless vehicle to park.
[0078] In some embodiments, the aforementioned step S33 specifically includes:
[0079] S34: If the number of candidate parking spaces is 1, the candidate parking space is used as the target parking space.
[0080] It is understandable that if there is only one candidate parking space, the unmanned vehicle has no other choice and uses the only candidate parking space as the target parking space for parking.
[0081] S35: If the number of candidate parking spaces is greater than 1, the parking cost of each candidate parking space is calculated, and the target parking space is determined to be the candidate parking space with the minimum parking cost.
[0082] It will be appreciated that if the number of candidate parking spaces is greater than one, it indicates that there are multiple available candidate parking spaces for the autonomous vehicle to select. Based on the varying lengths and parking difficulties of the routes that the autonomous vehicle would need to travel from its current position to each candidate parking space, a parking cost can be calculated for each candidate parking space. This cost reflects the length and difficulty of the route to the candidate parking space. For example, the shorter the route, the lower the parking difficulty and the lower the parking cost. Specifically, if obstacles are relatively far away from a parking space (ParkingSpace1) or if there are no vehicles parked in other adjacent parking spaces, the autonomous vehicle will have an easier time entering that parking space, and thus, the parking difficulty will be reduced.
[0083] Therefore, determining the target parking space as a candidate parking space with the lowest parking cost can facilitate parking of the unmanned vehicle and reduce parking time and error rate.
[0084] In some embodiments, the aforementioned “calculating the parking cost of each candidate parking space” includes:
[0085] S351: Calculate the angle deviation cost, distance cost, and obstacle cost of the candidate parking space.
[0086] The angular deviation cost of a candidate parking space refers to the cost of the angular deviation between the orientation yaw of the candidate parking space and the orientation yaw of the autonomous vehicle's current position. The current position refers to the position of the autonomous vehicle when it drives near the designated target position and determines the parking space.
[0087] For example, delta_angle is used to represent the angular deviation between the orientation yaw of the candidate parking space and the orientation yaw in the current position of the unmanned vehicle. Then, the function AngleCost(delta_angle) can be defined as the angle deviation cost, AngleCost(delta_angle) = 180 / Max(30,180-delta_angle).
[0088] The distance cost of a candidate parking space refers to the cost of the distance between the center of the candidate parking space and the current position of the autonomous vehicle. It can be understood that the distance cost is positively correlated with the distance between the two.
[0089] For example, vehicle_dis represents the distance between the center of a candidate parking space and the current position of the autonomous vehicle, i.e., the distance from the vehicle to the candidate parking space. Then, a function VehicleDisCost(vehicle_dis) can be defined as the distance cost, where VehicleDisCost(vehicle_dis) = vehicle_dis.
[0090] The obstacle cost of a candidate parking space refers to the cost generated by the distance between the nearest obstacle and the candidate parking space. It can be understood that the farther the obstacle is, the smaller the obstacle cost is.
[0091] For example, if obstacle_dis represents the distance between the nearest obstacle and a candidate parking space, the function ObstacleDisCost(obstacle_dis) can be defined as the obstacle cost. It's understood that if there are no obstacles or the distance to the nearest obstacle is greater than 10 meters, obstacle_dis can be infinite. ObstacleDisCost(obstacle_dis) = 100 / Max(p_vehicle_length * 1.5, obstacle_dis). Here, p_vehicle_length is the length of the autonomous vehicle.
[0092] S352: Determine the parking cost based on the angle deviation cost, the distance cost, and the obstacle cost.
[0093] The parking cost is determined by combining the aforementioned angular deviation cost, distance cost, and obstacle cost. This evaluation of the parking cost for each candidate parking space based on angular deviation, distance, and obstacle considerations accurately determines the parking convenience of each candidate space. As you can see, the lower the parking cost, the more convenient parking.
[0094] In some embodiments, the aforementioned step S352 specifically includes:
[0095] a) Divide the area where the candidate parking spaces are located into N areas and calculate the obstacle costs of the N areas.
[0096] b) determining, based on the relative position of the unmanned vehicle and the N areas, parking costs for the candidate parking space, including angle deviation costs, distance costs, or obstacle costs for the M areas, where the M areas are selected from the N areas.
[0097] Where N is an integer greater than 1 and can be set according to actual conditions. Figure 3 ,exist Figure 3 In the illustrated embodiment, the area surrounding a candidate parking space is divided into nine zones (N=9). Specifically, the candidate parking space and its surrounding area are divided into nine zones based on the lines defined by the candidate parking space's four vertices (Point1, Point2, Point3, and Point4). Zone 5# is a candidate parking space. It is understood that the autonomous vehicle's current location could be in any of these nine zones, and faulty objects may exist in zones other than Zone 5.
[0098] Thus, the obstacle cost of each region can be calculated. We can define obstacle_dis[i] to represent the distance from the nearest obstacle in region i to the candidate parking space. We define the function ObstacleDisCost(obstacle_dis[i]) to be the obstacle cost generated by the nearest obstacle in region i.
[0099] ObstacleDisCost(obstacle_dis[i])=100 / Max(p_vehicle_length*1.5,obstacle_dis[i]).
[0100] It is understandable that some relatively large obstacles may belong to multiple areas at the same time. If there is no obstacle in an area or the obstacle distance is greater than 10 meters, then obstacle_dis[i] can be set to infinity.
[0101] Based on regional symmetry, Figure 3Area 5# in the diagram is classified as Category A; symmetrical areas 2# and 8# are classified as Category B; symmetrical areas 7# and 9# are classified as Category C; symmetrical areas 1# and 3# are classified as Category D; and symmetrical areas 4# and 6# are classified as Category E. If the autonomous vehicle's current position (i.e., the center of the rear axle) is in Category A, parking is simple with minor adjustments, making it the easiest. If the autonomous vehicle is in Category B, parking is simple with forward or reverse movement. If the autonomous vehicle is in Category C, forward and left / right adjustments are necessary. If the autonomous vehicle is in Category C, parking requires counter-movement and backward and left / right adjustments. If the autonomous vehicle is in Category E, parking requires rotation, which is more complex.
[0102] The obstacle costs in the parking cost vary depending on the current location of the autonomous vehicle. For example, if the autonomous vehicle is in area 2#, obstacles in areas 4#, 6#, 7#, and 9# have no impact on parking. Including the obstacle costs in areas 4#, 6#, 7#, and 9# in the parking cost would result in an inaccurate and overly large parking cost, affecting the optimality and rationality of the target parking space.
[0103] Therefore, based on the relative position of the autonomous vehicle and these N areas, the parking cost of the candidate parking space is determined to include an angle deviation cost, a distance cost, or an obstacle cost for each of the M areas, where the M areas are selected from the N areas. This means selecting M areas from the N areas where obstacles may affect parking, and factoring the obstacle costs of these M areas into the parking cost, making the parking cost more accurate.
[0104] For example, the parking cost is calculated in the following manner.
[0105] (A) When the current location of the autonomous vehicle is in a Class A area, the parking cost Cost is calculated using the following formula:
[0106] Cost = AngleCost (delta_angle)
[0107] That is, when the current position of the unmanned vehicle is in area 5#, since only the direction needs to be slightly adjusted to make the vehicle stop straight, only the angle deviation cost needs to be considered.
[0108] (B) When the current location of the autonomous vehicle is in a Class B area, the parking cost Cost is calculated using the following formula:
[0109] If the current position of the unmanned vehicle is in area 2#, Cost = AngleCost(delta_angle)+1*VehicleDisCost(vehicle_dis)+2*ObstacleDisCost(obstacle_dis[2])+0.5*ObstacleDisCost(obstacle_dis[1])+0.5*ObstacleDisCo st(obstacle_dis[3]).
[0110] If the current position of the unmanned vehicle is in area 8#, Cost = AngleCost(delta_angle)+1*VehicleDisCost(vehicle_dis)+2*ObstacleDisCost(obstacle_dis[8])+0.5*ObstacleDisCost(obstacle_dis[7])+0.5*ObstacleDisCo st(obstacle_dis[9]).
[0111] (C) When the current location of the autonomous vehicle is in a Class C area, the parking cost Cost is calculated using the following formula:
[0112] If the current position of the unmanned vehicle is in area 7#, Cost = AngleCost(delta_angle)+1.5*VehicleDisCost(vehicle_dis)+1.5*ObstacleDisCost(obstacle_dis[7])+1.5*ObstacleDisCost(obstacle_dis[8])+0.5*ObstacleDisCost(obstacle_dis[4]).
[0113] If the current position of the unmanned vehicle is in area 9#, Cost = AngleCost(delta_angle)+1.5*VehicleDisCost(vehicle_dis)+1.5*ObstacleDisCost(obstacle_dis[9])+1.5*ObstacleDisCost(obstacle_dis[8])+0.5*ObstacleDisCost(obstacle_dis[6]).
[0114] (D) When the current location of the autonomous vehicle is in a Class D area, the parking cost Cost is calculated using the following formula:
[0115] If the current position of the unmanned vehicle is in area 1#, Cost = AngleCost(delta_angle)+1.5*VehicleDisCost(vehicle_dis)+1.5*ObstacleDisCost(obstacle_dis[1])+1*ObstacleDisCost(obstacle_dis[2])+1*ObstacleDisCost(obstacle_dis[4])+0.5*ObstacleDisCost(obstacle_dis[3]).
[0116] If the current position of the unmanned vehicle is in area 3#, Cost = AngleCost(delta_angle)+1.5*VehicleDisCost(vehicle_dis)+1.5*ObstacleDisCost(obstacle_dis[3])+1*ObstacleDisCost(obstacle_dis[2])+1*ObstacleDisCost(obstacle_dis[6])+0.5*ObstacleDisCost(obstacle_dis[1]).
[0117] (E) When the current location of the autonomous vehicle is in a Category E area, the parking cost Cost is calculated using the following formula:
[0118] If the current position of the unmanned vehicle is in area 4#, Cost = AngleCost(delta_angle)+2*VehicleDisCost(vehicle_dis)+2*ObstacleDisCost(obstacle_dis[4])+1*ObstacleDisCost(obstacle_dis[1])+1*ObstacleDisCost(obstacle_dis[7])+0.5*ObstacleDisCost(obstacle_dis[2])+0.5*ObstacleDisCost (obstacle_dis[8]).
[0119] If the current position of the unmanned vehicle is in area 6#, Cost = AngleCost(delta_angle)+2*VehicleDisCost(vehicle_dis)+2*ObstacleDisCost(obstacle_dis[6])+1*ObstacleDisCost(obstacle_dis[3])+1*ObstacleDisCost(obstacle_dis[9])+0.5*ObstacleDisCost(obstacle_dis[2])+0.5*ObstacleDisCost(obstacle_dis[8]).
[0120] In this embodiment, based on the relative position between the current position of the unmanned vehicle and the N areas, M areas where obstacles affect parking are selected from the N areas, and the obstacle costs of these M areas are included in the parking cost according to different weights, making the parking cost more accurate.
[0121] S36: If the number of candidate parking spaces is 0, construct a first virtual parking space according to the current position of the unmanned vehicle, and determine the target parking space as the first virtual parking space.
[0122] It is understood that if all parking spaces in the target parking space group are occupied by other vehicles or there are obstacles, there are no candidate parking spaces available. In this case, a first virtual parking space is constructed based on the current position of the unmanned vehicle, and the target parking space is determined to be the first virtual parking space. Specifically, the four vertices of the first virtual parking space are inferred based on the position and size of the vehicle in the current position, and the posture in the current position is used as the corresponding parking posture in the first virtual parking space.
[0123] For example, the parameters p_parking_space_width (e.g., set to 2.5 meters) and p_parking_space_length (e.g., set to 5.3 meters) represent the width and length of the virtual parking space, respectively. p_vehicle_width (e.g., set to 1.8 meters) and p_vehicle_length (e.g., set to 4.5 meters) represent the width and length of the vehicle, respectively. p_back (e.g., set to 1.4) represents the distance from the center of the vehicle's rear axle to the rear edge of the vehicle. The goal of constructing the virtual parking frame is: when the vehicle is parked in the virtual parking space, the boundaries of the vehicle's four sides are parallel to the four corresponding boundaries of the parking frame, the distance from the vehicle's left edge to the left edge of the parking frame is equal to the distance from the vehicle's right edge to the right edge of the parking frame, and the distance from the vehicle's front edge to the front edge of the parking frame is equal to the distance from the vehicle's rear edge to the rear edge of the parking frame.
[0124] Set the distance from the front edge of the vehicle to the front edge of the parking space to gap_front, the distance from the rear edge of the vehicle to the rear edge of the parking space to gap_back, the distance from the left edge of the vehicle to the left edge of the parking space to gap_left, and the distance from the right edge of the vehicle to the right edge of the parking space to gap_right. Then,
[0125] gap_front=gap_back=(p_parking_space_length-p_vehicle_length) / 2;
[0126] gap_left=gap_right=(p_parking_space_width-p_vehicle_width) / 2.
[0127] Among them, p_parking_space_length is the length of the first virtual parking space, p_vehicle_length is the length of the vehicle body, p_parking_space_width is the width of the first virtual parking space, and p_vehicle_width is the width of the vehicle body.
[0128] Set the distance from the vehicle's posture Pose to the front boundary of the parking space as dis_front, the distance from Pose to the back boundary of the parking space as dis_back, the distance from Pose to the left boundary of the parking space as dis_left, and the distance from Pose to the right boundary of the parking space as dis_right. Then,
[0129] dis_front=p_vehicle_length+gap_front-p_back;
[0130] dis_back=gap_back+p_back;
[0131] dis_left=p_vehicle_width / 2+gap_left;
[0132] dis_right=p_vehicle_width / 2+gap_right.
[0133] Therefore, the four vertices of the first virtual parking space can be inferred based on the above parameters, which are specifically calculated by the following formula, where Now represents the current posture. It can be understood that the current posture Now also has corresponding parameters (x, y, z, yaw);
[0134] Point1.x=Now.x+cos(Now.yaw)*dis_front-sin(Now.yaw)*dis_left;
[0135] Point1.y=Now.y+sin(Now.yaw)*dis_front+cos(Now.cos)*dis_left;
[0136] Point2.x=Now.x+cos(Now.yaw)*dis_front+sin(Now.yaw)*dis_right;
[0137] Point2.y=Now.y+sin(Now.yaw)*dis_front-cos(Now.cos)*dis_right;
[0138] Point3.x=Now.x-cos(Now.yaw)*dis_back+sin(Now.yaw)*dis_right;
[0139] Point3.y=Now.y-sin(Now.yaw)*dis_back+cos(Now.cos)*dis_right;
[0140] Point4.x=Now.x-cos(Now.yaw)*dis_back-sin(Now.yaw)*dis_left;
[0141] Point4.y=Now.y-sin(Now.yaw)*dis_back-cos(Now.cos)*dis_left.
[0142] Among them, (Point1.x, Point1.y, Now.z) are the coordinates of vertex Point1 of the first virtual parking space, (Point2.x, Point2.y, Now.z) are the coordinates of vertex Point2 of the first virtual parking space, (Point3.x, Point3.y, Now.z) are the coordinates of vertex Point3 of the first virtual parking space, (Point4.x, Point4.y, Now.z) are the coordinates of vertex Point4 of the first virtual parking space, and Pose of the first virtual parking space is the current pose.
[0143] In this embodiment, a first virtual parking space is constructed according to the current position of the unmanned vehicle, and the target parking space is determined to be the first virtual parking space, so that the unmanned vehicle can park on the spot at the current position and the task can be completed directly without restarting.
[0144] In some embodiments, the above step S20 further specifically includes:
[0145] S22: If the target posture of the unmanned vehicle is not located in any parking space in the parking space group database, construct a second virtual parking space according to the target posture, and determine the target parking space as the second virtual parking space.
[0146] In this embodiment, after the traversal and screening are completed in the manner of S21 above, if the target posture does not match the corresponding parking space, that is, the target posture does not belong to any parking space in the parking space group database, a second virtual parking space is constructed according to the target posture, and the target parking space is determined to be the second virtual parking space.
[0147] Specifically, the four vertices of the second virtual parking space can be inferred based on the position and vehicle size in the target pose. The pose in the target pose serves as the corresponding parking pose in the second virtual parking space. The calculation process for the parameters Point1, Point2, Point3, and Point4 for the second virtual parking space is similar to that for the first virtual parking space. Based on the above formula, the current pose Now is replaced with the target pose Goal. This will not be further elaborated here. The Pose of the second virtual parking space is the target pose.
[0148] In this embodiment, if the target posture does not match the corresponding parking space, that is, the target posture does not belong to any parking space in the parking space group database, a second virtual parking space is constructed according to the target posture, and the target parking space is determined to be the second virtual parking space, so that the unmanned vehicle can park normally without affecting the execution of the task.
[0149] The method for determining a parking space provided in an embodiment of the present application first obtains a target position of an unmanned vehicle and a parking space group database, wherein the parking space group database includes at least one parking space group, each parking space group including at least one parking space; then, based on the target position of the unmanned vehicle, determines a target parking space group corresponding to the unmanned vehicle; and finally, determines a target parking space for the unmanned vehicle within the target parking space group. In this scheme, the target position (position and posture) of the unmanned vehicle is combined with a pre-set parking space group database to determine a target parking space group for parking, such that the target parking space group is the optimal parking space group in the parking space group database and the most convenient parking space for the unmanned vehicle to park from the target position. Because the target parking space group also includes at least one parking space, the final target parking space is determined from the target parking space group. Even if some parking spaces in the target parking space group are already occupied by other vehicles or obstacles, other parking spaces in the target parking space group can be selected as target parking spaces for parking. This provides the unmanned vehicle with multiple parking spaces to choose from, allowing the unmanned vehicle to intelligently select a suitable parking space for parking and reducing parking errors.
[0150] After determining the target parking space, the autonomous vehicle can send a message to the vehicle network (e.g., the communication network between the center console and each autonomous vehicle) indicating that it will park in the target parking space, i.e., occupy the target parking space. This can effectively prevent other vehicles from mistaking the target parking space as their own before the autonomous vehicle is ready to park, thereby avoiding parking collisions. In addition, the autonomous vehicle can plan a path based on the target parking space, drive to the target parking space, and park according to its position.
[0151] The above describes the methods of the present application. In order to better implement the methods of the present application, the following describes the equipment of the present application.
[0152] See also Figure 4 , is a hardware structure diagram of an electronic device 60 provided in an embodiment of the present application, specifically, Figure 4 As shown, the electronic device 60 includes at least one processor 61 and a memory 62 ( Figure 4 (a bus connection and a processor are used as an example).
[0153] The electronic device 60 is a device with computing, processing, and storage capabilities, and can be, for example, an unmanned vehicle, a hardware module in an unmanned vehicle, or a central console or server communicatively connected to the unmanned vehicle. The form of the electronic device is not limited herein.
[0154] The processor 61 is used to provide computing and control capabilities to control the electronic device 60 to perform corresponding tasks and control the electronic device 60 to perform any one of the methods for determining a parking space provided in the above embodiments.
[0155] It is understandable that the processor 61 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0156] Memory 62, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the method for determining a parking space in the embodiments of the present invention. Processor 61 can implement any of the methods for determining a parking space provided in the above embodiments by executing the non-transitory software programs, instructions, and modules stored in memory 62. Specifically, memory 62 can include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state memory device. In some embodiments, memory 62 can also include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0157] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the method for determining a parking space as described above.
[0158] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0159] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, or of course by hardware. Those skilled in the art can understand that all or part of the processes in the above embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Based on the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the present application as described above. For the sake of simplicity, they are not provided in detail. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for determining a parking space, characterized in that: include: Obtaining a target position of the unmanned vehicle and a parking space group database, wherein the parking space group database includes at least one parking space group, and the parking space group includes at least one parking space; Determining a target parking space group corresponding to the unmanned vehicle according to the target posture of the unmanned vehicle; Obtaining the occupancy status of each parking space in the target parking space group; Consider unoccupied parking spaces as candidate parking spaces; If the number of the candidate parking spaces is 1, use the candidate parking space as the target parking space; If the number of the candidate parking spaces is greater than 1, calculating the parking cost of each candidate parking space and determining the target parking space as the candidate parking space with the minimum parking cost; The calculating of the parking cost of each candidate parking space includes: Calculating an angle deviation cost, a distance cost, and an obstacle cost for the candidate parking space; Divide the area where the candidate parking space is located into N areas, and calculate the obstacle costs of the N areas, where N is an integer greater than 1; According to the relative position of the unmanned vehicle and the N areas, the parking cost of the candidate parking space is determined to include the angle deviation cost, the distance cost or the obstacle cost of M areas, wherein the M areas are selected from the N areas.
2. The method according to claim 1, characterized in that Determining a target parking space group corresponding to the unmanned vehicle according to the target posture of the unmanned vehicle includes: If the target posture of the unmanned vehicle is located in a parking space in the parking space group database, the target parking space group is determined to be the parking space group to which the parking space matched with the target posture belongs.
3. The method according to claim 1, characterized in that Determining the target parking space based on the candidate parking spaces includes: If the number of the candidate parking spaces is 0, a first virtual parking space is constructed according to the current position of the unmanned vehicle, and the target parking space is determined to be the first virtual parking space.
4. The method according to any one of claims 1 to 3, characterized in that The step of determining a target parking space group corresponding to the unmanned vehicle according to the target posture of the unmanned vehicle further includes: If the target posture of the unmanned vehicle is not located in any parking space in the parking space group database, a second virtual parking space is constructed according to the target posture, and the target parking space is determined to be the second virtual parking space.
5. An electronic device, characterized in that: include: at least one processor, and a memory communicatively coupled to the at least one processor, wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.
6. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Intelligent parking method for automatic driving vehicle and intelligent control equipment
CN111696382A