Methods, equipment, and storage media for determining the drivable area for residential parking
By generating reference key points and searching for obstacle points in residential parking areas, the outline of the drivable area is determined, solving the problems of large data volume and large space occupation in existing technologies, and improving processing efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUMAN HORIZONS (SHANGHAI) AUTONOMOUS TECH CO LTD
- Filing Date
- 2022-12-27
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, the methods for determining the drivable area of a grid map by the obstruction of parking obstacles in residential areas result in large data volume, large space occupation, and low processing efficiency.
By generating reference key points along the vehicle's trajectory and searching for obstacle points in the direction perpendicular to the vehicle's heading, target points are determined, and the target points are connected to define the outline of the drivable area, reducing the amount of data processed by obstacles occupying the grid map.
It effectively reduces the amount of data processed by obstacles occupying the grid map, reduces space occupation, and improves processing efficiency and accuracy.
Smart Images

Figure CN115782862B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method for determining the drivable area for home parking, a computer device, and a storage medium. Background Technology
[0002] In the Home-Zone Parking (HPA) scenario, vehicle trajectory planning is crucial, and a key input for vehicle trajectory planning is the obstacle occupancy grid map. Currently, the drivable area of the obstacle occupancy grid map is determined by the location of the obstacles. The drivable area obtained in this way is relatively large, resulting in a large space occupied by the corresponding obstacle occupancy grid map and a large amount of data to process. Summary of the Invention
[0003] Therefore, it is necessary to provide a vehicle map processing method, computer equipment, and storage medium that can reduce the amount of data required for processing vehicle trajectory planning by addressing the aforementioned technical problems.
[0004] A method for determining the drivable area for parking in a residential area, the method comprising:
[0005] Obtain obstacle occupancy grid map and vehicle trajectory routes for parking mapping in residential areas;
[0006] Generate reference key points on the vehicle trajectory route;
[0007] Search along the direction perpendicular to the vehicle's heading from the reference key point to both sides of the vehicle's trajectory until the target point is found. The target point is the obstacle point that is closest to the reference key point on a straight line along the search direction, as determined by the obstacle-occupied grid map.
[0008] By connecting the target points on the same side of the vehicle trajectory route in sequence, the outline of the drivable area in the family parking area is obtained, and the drivable area in the family parking area is determined based on the outline of the drivable area.
[0009] In one embodiment, generating a reference key point on the vehicle trajectory includes: calculating the displacement change and angle change of the vehicle relative to the previous reference key point, and generating the current reference key point when the displacement change exceeds a preset displacement change threshold or when the angle change exceeds a preset angle change threshold.
[0010] In one embodiment, generating reference key points on the vehicle trajectory route further includes: using the starting point on the vehicle trajectory route as the first reference key point.
[0011] In one embodiment, the method further includes: determining a first grid point number based on an obstacle-occupied grid map, wherein the first grid point number is the number of non-drivable grid points within a quadrilateral area with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to the two adjacent target points as vertices; when the first grid point number exceeds a preset first grid point number threshold, selecting a point on the vehicle trajectory route between the two reference key points as a new reference key point.
[0012] In one embodiment, selecting a point on the vehicle trajectory route between two reference key points as a new reference key point includes: selecting the midpoint of the two reference key points on the vehicle trajectory route as a new reference key point.
[0013] In one embodiment, the method further includes: determining the number of second grid points based on the obstacle-occupied grid map, wherein the number of second grid points is the number of non-drivable grid points in a quadrilateral area with four target points corresponding to two adjacent reference key points as vertices; and when the number of second grid points exceeds a preset threshold for the number of second grid points, selecting a point on the vehicle trajectory route between two adjacent reference key points as a new reference key point.
[0014] In one embodiment, selecting a point on the vehicle trajectory route as a new reference key point between two adjacent reference key points includes: selecting the midpoint of two adjacent reference key points on the vehicle trajectory route as a new reference key point.
[0015] In one embodiment, the method further includes: determining whether the search line segment corresponding to the current reference key point intersects with the search line segment corresponding to the previous reference key point, wherein the search line segment is the line segment between two target points of the corresponding reference key point; if so, deleting the line segment portion of the search line segment corresponding to the current reference key point on the intersecting side, or not recording the target points of the search line segment corresponding to the current reference key point on the intersecting side, wherein the intersecting side is the side where the intersection point of the search line segment corresponding to the current reference key point and the search line segment corresponding to the previous reference key point is located relative to the vehicle trajectory route.
[0016] In one embodiment, the method further includes: determining, based on the obstacle-occupied grid map, whether there are obstacle points in a quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to the two adjacent target points as vertices; if so, adjusting the position of the side of the quadrilateral region where the two adjacent target points are located in the direction closer to the vehicle trajectory route until there are no obstacle points in the quadrilateral region.
[0017] In one embodiment, based on the obstacle occupancy grid map, determining whether there are obstacle points within a quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to the two adjacent target points as vertices includes: performing a point-spreading operation within the quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to the two adjacent target points as vertices; determining whether the points spread on the obstacle occupancy grid map are located in a non-drivable area; if so, marking the spread points; and marking the quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to the two adjacent target points as vertices as an area to be adjusted.
[0018] In one embodiment, adjusting the position of the side of two adjacent target points in the quadrilateral region toward the direction of the vehicle trajectory until there are no obstacle points in the quadrilateral region includes: adjusting the position of the line connecting the two adjacent target points toward the direction of the vehicle trajectory until there are no marked points in the quadrilateral region.
[0019] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the following steps:
[0020] Obtain obstacle occupancy grid map and vehicle trajectory routes for parking mapping in residential areas;
[0021] Generate reference key points on the vehicle trajectory route;
[0022] Search along the direction perpendicular to the vehicle's heading from the reference key point to both sides of the vehicle's trajectory until the target point is found. The target point is the obstacle point that is closest to the reference key point on a straight line along the search direction, as determined by the obstacle-occupied grid map.
[0023] By connecting the target points on the same side of the vehicle trajectory route in sequence, the outline of the drivable area in the family parking area is obtained, and the drivable area in the family parking area is determined based on the outline of the drivable area.
[0024] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0025] Obtain obstacle occupancy grid map and vehicle trajectory routes for parking mapping in residential areas;
[0026] Generate reference key points on the vehicle trajectory route;
[0027] Search along the direction perpendicular to the vehicle's heading from the reference key point to both sides of the vehicle's trajectory until the target point is found. The target point is the obstacle point that is closest to the reference key point on a straight line along the search direction, as determined by the obstacle-occupied grid map.
[0028] By connecting the target points on the same side of the vehicle trajectory route in sequence, the outline of the drivable area in the family parking area is obtained, and the drivable area in the family parking area is determined based on the outline of the drivable area.
[0029] The aforementioned method, computer equipment, and storage medium for determining the drivable area of residential parking involves generating reference key points from the vehicle trajectory route in the residential parking map. Based on these reference key points, a search is performed in the obstacle occupancy grid map to obtain the target points corresponding to the reference key points. By sequentially connecting the target points on the same side of the vehicle trajectory route, the outline of the drivable area in the residential parking area is obtained. The drivable area in the residential parking area is then determined based on this outline. During the target point search process, the obstacle point closest to the reference key point on the straight line along the search direction in the obstacle occupancy grid map is identified as the target point. This significantly reduces the amount of data processed in the obstacle occupancy grid map, thereby reducing the space occupied by the obstacle occupancy grid map. Attached Figure Description
[0030] Figure 1 This is a flowchart illustrating a method for determining the drivable area for parking in a residential area, as shown in one embodiment.
[0031] Figure 1A This is an example schematic diagram of parking mapping in a residential area in one embodiment;
[0032] Figure 1B This is a schematic diagram illustrating an example of generating reference key points in one embodiment;
[0033] Figure 1C This is an example schematic diagram of the target point search process in one embodiment;
[0034] Figure 1D This is an example schematic diagram of a drivable area in a residential parking area in one embodiment;
[0035] Figure 2 This is an example schematic diagram of reference key points in a vehicle trajectory route in one embodiment;
[0036] Figure 3 This is an example schematic diagram of reference key points in a vehicle trajectory route in one embodiment;
[0037] Figure 4 This is an example schematic diagram illustrating the processing of intersecting regions of search line segments in one embodiment;
[0038] Figure 5 This is a schematic diagram illustrating an example of the quadrilateral region adjustment process in one embodiment;
[0039] Figure 6 This is an example illustration of an obstacle-occupying point-scattering operation in a grid map, as shown in one embodiment.
[0040] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0042] In one embodiment, such as Figure 1 As shown, a method for determining the drivable area for parking in a residential area is provided. Taking the application of this method to a computer device as an example, the method includes the following steps:
[0043] Step 102: Obtain the obstacle occupancy grid map and vehicle trajectory route for parking in the residential area.
[0044] Among them, family area parking is parking in the context of a family area, which has a dedicated parking space. The driving route for family area parking is relatively long, for example, the vehicle automatically parks from the front door of the house to the target parking space.
[0045] Among them, obstacle-occupied grid map is a map description method that includes obstacles. It divides the environment corresponding to the parking map of the family area into a series of grids. Each grid corresponds to a pixel in the environment, and each pixel may or may not include obstacles.
[0046] The vehicle trajectory route is the driving path of the vehicle when parking in the residential area. Specifically, when the vehicle parks in the residential area according to the vehicle trajectory route, the surrounding environment can be collected by a laser sensor to obtain an obstacle occupancy grid map for parking in the residential area.
[0047] For example, such as Figure 1A As shown, Figure 1A This diagram illustrates a residential area parking mapping in one embodiment. Figure 1A The gray areas are grids containing obstacles, which can be called non-drivable areas, while the white areas are grids without obstacles, which can be called initially defined drivable areas. The black lines represent the vehicle's trajectory.
[0048] Step 104: Generate reference key points on the vehicle trajectory route.
[0049] Among them, reference key points are key points on the vehicle trajectory route. The current reference key point can be determined based on the position of the vehicle at the current position and the position of the previous reference key point, or based on the angle of the vehicle at the current position and the angle of the previous reference key point. Alternatively, multiple reference key points can be determined on the vehicle trajectory route based on actual business needs, actual product needs, or actual application scenarios.
[0050] For example, such as Figure 1B As shown, Figure 1B This diagram illustrates the generation of reference key points in one embodiment. Figure 1B The black line in the middle represents the vehicle's trajectory, and there are multiple black dots on the trajectory as key reference points.
[0051] Step 106: Search along both sides of the vehicle trajectory in the direction perpendicular to the reference key point until the target point is found. The target point is the obstacle point that is closest to the reference key point on the straight line along the search direction, as determined by the obstacle-occupied grid map.
[0052] Here, the vehicle's heading is the direction the vehicle is traveling from its current position. At the reference key point, a search can be performed along the perpendicular direction of the vehicle's travel from the reference key point to both sides of the vehicle's trajectory until the target point is found. The target point can be the obstacle point closest to the reference key point on a straight line along the search direction, as determined by the obstacle occupancy grid map. This can be understood as follows: since the obstacle occupancy grid map includes drivable areas, and drivable areas include obstacles, the first obstacle point encountered while searching along the perpendicular direction of the vehicle's heading from the reference key point is determined as the target point.
[0053] For example, such as Figure 1C As shown, Figure 1C This diagram illustrates the target point search process in one embodiment. Figure 1C The reference key points are the black dots on the vehicle trajectory (black line). Searching along the perpendicular direction of the vehicle's travel at the reference key point, moving to both sides of the vehicle trajectory, the two nearest obstacle points are the target points (white dots). Figure 1C The black areas in the diagram represent non-drivable areas, while the white areas represent initially defined drivable areas.
[0054] Step 108: By connecting the target points on the same side of the vehicle trajectory route in sequence, the outline of the drivable area in the family area parking is obtained, and the drivable area in the family area parking is determined based on the outline of the drivable area.
[0055] Specifically, after obtaining the target points corresponding to the reference key points on the vehicle trajectory route, the target points on the same side of the vehicle trajectory route can be connected sequentially to obtain the outline of the drivable area in the family parking area. The area enclosed by the outline of the drivable area is then determined as the drivable area in the family parking area.
[0056] For example, such as Figure 1D As shown, Figure 1D This diagram illustrates a drivable area in a residential parking area according to one embodiment. Figure 1D The black area is the non-drivable area, the white area is the initially defined drivable area, the black line is the vehicle trajectory route, and the gray line is the outline of the drivable area. The area enclosed by the outline of the drivable area is determined as the final drivable area for family parking.
[0057] In the aforementioned method for determining the drivable area of residential parking, reference key points are generated from the vehicle trajectory route of the residential parking map. A search is then performed on the obstacle occupancy grid map based on these reference key points to obtain the target points corresponding to the reference key points. By sequentially connecting the target points on the same side of the vehicle trajectory route, the outline of the drivable area in the residential parking area is obtained. The drivable area in the residential parking area is further determined based on this outline. During the target point search process, the obstacle point closest to the reference key point on the straight line along the search direction in the obstacle occupancy grid map is identified as the target point. This significantly reduces the amount of data processed in the obstacle occupancy grid map, thereby reducing the space occupied by the obstacle occupancy grid map.
[0058] In one embodiment, generating reference key points on the vehicle trajectory route includes:
[0059] Calculate the displacement and angle changes of the vehicle relative to the previous reference key point;
[0060] When the displacement change exceeds a preset displacement change threshold, or when the angle change exceeds a preset angle change threshold, a current reference key point is generated.
[0061] The displacement change refers to the change in the vehicle's displacement at the current reference key point compared to its displacement at the previous reference key point. It can be determined by the difference between the vehicle's displacement at the current reference key point and its displacement at the previous reference key point. Here, the previous reference key point is the reference key point on the vehicle's trajectory that precedes the current reference key point.
[0062] Among them, the angle change is the change between the vehicle angle at the current reference key point and the vehicle angle at the previous reference key point, which can be determined by the difference between the vehicle angle at the current reference key point and the angle at the previous reference key point.
[0063] Furthermore, after obtaining the displacement change and angle change, the displacement change can be compared with a preset displacement change threshold. When the displacement change exceeds the preset threshold, a current reference key point on the vehicle trajectory is generated. Alternatively, the angle change can be compared with a preset angle change threshold. When the angle change exceeds the preset threshold, a current reference key point on the vehicle trajectory is generated. The preset displacement change threshold and preset angle change threshold can be predetermined based on actual business needs, product requirements, or application scenarios.
[0064] In this embodiment, generating reference key points on the vehicle trajectory route further includes: taking the starting point on the vehicle trajectory route as the first reference key point.
[0065] The first reference key point on the vehicle trajectory route can be directly determined by the starting point on the vehicle trajectory route; that is, the starting point on the vehicle trajectory route is the first reference key point on the vehicle trajectory route.
[0066] In one embodiment, the above method further includes:
[0067] The number of first grid points is determined based on the grid map occupied by obstacles. The number of first grid points is the number of non-drivable grid points in a quadrilateral area with two adjacent target points on the same side of the vehicle trajectory and two reference key points corresponding to the two adjacent target points as vertices.
[0068] When the number of first grid points exceeds a preset threshold, a point on the vehicle trajectory is selected as a new reference key point between the two reference key points.
[0069] In the obstacle-occupied grid map, a quadrilateral region can be formed by using two adjacent target points on the same side of the vehicle's trajectory and the two reference key points corresponding to those two adjacent target points as vertices. The number of non-drivable grid points within this quadrilateral region is then counted to obtain the first grid point count. Non-drivable grid points are those occupied by obstacles in the obstacle-occupied grid map and are therefore not drivable.
[0070] Furthermore, the selection of two reference key points on the vehicle trajectory is determined by comparing the number of the first grid points with a preset threshold for the number of the first grid points. If the selection is inappropriate, a new reference key point is selected from the two existing reference key points on the vehicle trajectory. Specifically, when the number of the first grid points exceeds the preset threshold, it indicates that the selection of the two reference key points on the vehicle trajectory is inappropriate, resulting in too many non-drivable grid points within the aforementioned quadrilateral area. Therefore, it is necessary to reselect a new reference key point from the two existing reference key points on the vehicle trajectory.
[0071] In this embodiment, selecting a point on the vehicle trajectory route between two reference key points as a new reference key point includes: selecting the midpoint of the two reference key points on the vehicle trajectory route as a new reference key point.
[0072] Specifically, selecting a point on the vehicle trajectory between two reference key points to determine a new reference key point can be achieved by using the midpoint of the two reference key points on the vehicle trajectory as the new reference key point. The midpoint can be obtained by averaging the positions of the two reference key points.
[0073] For example, such as Figure 2 As shown, Figure 2 A schematic diagram of reference key points in a vehicle trajectory route is shown in one embodiment. In the vehicle trajectory route (black line), two adjacent target points (white points) on the same side and the two reference key points (black points) corresponding to the two adjacent target points form a quadrilateral region. When the number of non-drivable grids in the quadrilateral region (black areas in the quadrilateral region) exceeds the standard, the midpoint of the two reference key points on the vehicle trajectory route is determined as a new reference key point.
[0074] In one embodiment, the above method further includes:
[0075] The number of second grid points is determined based on the grid map occupied by obstacles. The number of second grid points is the number of non-driveable grid points in a quadrilateral area with the four target points corresponding to two adjacent reference key points as vertices.
[0076] When the number of second grid points exceeds the preset threshold for the number of second grid points, a point on the vehicle trajectory route is selected as a new reference key point between two adjacent reference key points.
[0077] In the obstacle-occupied grid map, both sides of the vehicle trajectory include drivable areas. The reference key points on the vehicle trajectory correspond to two target points. Then, the four target points corresponding to the two adjacent reference key points on the vehicle trajectory can be used as vertices to form a quadrilateral region. The number of drivable grid points in the quadrilateral region is obtained and determined as the number of second grid points.
[0078] Furthermore, the selection of two reference key points on the vehicle trajectory is determined by comparing the number of second grid points with a preset threshold. If the selection is inappropriate, a new reference key point is selected from the two existing reference key points on the vehicle trajectory. Specifically, when the number of second grid points exceeds the preset threshold, it indicates that the selection of the two reference key points on the vehicle trajectory is inappropriate, resulting in too many non-drivable grid points within the aforementioned quadrilateral area. Therefore, it is necessary to reselect a new reference key point from the two existing reference key points on the vehicle trajectory.
[0079] In this embodiment, selecting a point on the vehicle trajectory route as a new reference key point between two adjacent reference key points includes: selecting the midpoint of two adjacent reference key points on the vehicle trajectory route as a new reference key point.
[0080] Specifically, selecting a point on the vehicle trajectory between two reference key points to determine a new reference key point can be achieved by using the midpoint of the two reference key points on the vehicle trajectory as the new reference key point. The midpoint can be obtained by averaging the positions of the two reference key points.
[0081] For example, such as Figure 3 As shown, Figure 3 The diagram shows a reference key point in a vehicle trajectory route in one embodiment. In the vehicle trajectory route (black line), the two target points (white points) corresponding to the two reference key points (black points) are respectively used as vertices to form a quadrilateral region. When the number of non-drivable grids in the quadrilateral region (black areas in the quadrilateral region) exceeds the standard, the midpoint of the two reference key points on the vehicle trajectory route is determined as a new reference key point.
[0082] In one embodiment, the above method further includes:
[0083] Determine whether the search line segment corresponding to the current reference key point intersects with the search line segment corresponding to the previous reference key point. The search line segment is the line segment between the two target points of the corresponding reference key point.
[0084] If so, delete the segment of the search line corresponding to the current reference key point on the intersecting side, or do not record the target point of the search line corresponding to the current reference key point on the intersecting side. The intersecting side is the side where the intersection of the search line corresponding to the current reference key point and the search line corresponding to the previous reference key point is located relative to the vehicle trajectory route.
[0085] The search segment is the line segment between two target points corresponding to a reference key point. That is, the search segment is obtained by connecting the two target points corresponding to the reference point. Therefore, connecting all target points corresponding to reference key points along the vehicle trajectory route yields the corresponding search segments. At this point, intersecting search segments may occur, leading to inaccuracies in the subsequent drivable area outline. Therefore, it is necessary to optimize the intersecting areas of the search segments. Specifically, it determines whether the search segment corresponding to the current reference key point intersects with the search segment corresponding to the previous reference key point. Intersection can be understood as whether they coincide or overlap.
[0086] Furthermore, when it is determined that the search line segment corresponding to the current reference key point intersects with the search line segment corresponding to the previous reference key point, the target point on the intersection side of the search line segment corresponding to the current reference key point can be deleted, or the target point on the intersection side of the search line segment corresponding to the current reference key point can be not recorded.
[0087] The intersecting side, relative to the vehicle trajectory, is the side where the search line segment corresponding to the current reference key point intersects with the search line segment corresponding to the previous reference key point. The current reference key point can be any reference key point within the vehicle trajectory.
[0088] For example, such as Figure 4 As shown, Figure 4 This diagram illustrates the processing of intersecting regions of search line segments in one embodiment. Figure 4 In the middle, the search line segment corresponding to the current reference key point intersects with the search line segment corresponding to the previous reference key point (e.g., Figure 4 (The dashed line portion) will then delete the target point on the side where the search line segment intersects with the current reference key point. Figure 4 (The white dots connected by the dashed line) Finally, the search line segment corresponding to the current reference key point does not intersect with the search line segment corresponding to the previous reference key point.
[0089] In one embodiment, the above method further includes:
[0090] Based on the obstacle-occupied grid map, determine whether there are obstacle points in the quadrilateral area with two adjacent target points on the same side of the vehicle trajectory and the two reference key points corresponding to the two adjacent target points as vertices.
[0091] If so, adjust the positions of the two adjacent target points in the quadrilateral area towards the direction of the vehicle's trajectory until there are no obstacle points in the quadrilateral area.
[0092] In the obstacle-occupying grid map, a quadrilateral region can be formed using two adjacent target points on the same side of the vehicle trajectory and their corresponding two reference key points as vertices. The presence of an obstacle point within this quadrilateral region is then determined. If an obstacle point exists, the positions of the two adjacent target points' edges within the quadrilateral region are adjusted towards the vehicle trajectory until no obstacle point remains in the quadrilateral region. Specifically, this adjustment can involve moving the edges of the two adjacent target points in the quadrilateral region a preset distance towards the vehicle trajectory, and then re-evaluating whether the resulting quadrilateral region contains any obstacles, until it is determined that no obstacle point exists within the quadrilateral region.
[0093] For example, such as Figure 5 As shown, Figure 5 A schematic diagram of the quadrilateral region adjustment process in one embodiment is shown. Figure 5 The black lines represent the vehicle's trajectory, the gray lines represent the edges where two adjacent target points are located, the black areas represent areas with obstacles, and the dashed lines represent the edges where two adjacent target points are located after adjustment.
[0094] In one embodiment, determining whether there are obstacle points within a quadrilateral region with vertices of two adjacent target points on the same side of the vehicle trajectory and the two reference key points corresponding to those two adjacent target points, based on the obstacle occupancy grid map, includes:
[0095] Spread points within a quadrilateral area with two adjacent target points on the same side of the vehicle trajectory and the two reference key points corresponding to those two adjacent target points as vertices;
[0096] Whether the points marked on the grid map occupied by the obstacle are located in a non-drivable area;
[0097] If so, the scattered points will be marked, and the quadrilateral area with two adjacent target points on the same side of the vehicle trajectory and the two reference key points corresponding to those two adjacent target points as vertices will be marked as the area to be adjusted.
[0098] Specifically, a quadrilateral region is formed by using two adjacent target points on the same side of the vehicle's trajectory and the two reference key points corresponding to those two adjacent target points as vertices. A pixel-scattering operation is then performed on this quadrilateral region. This pixel-scattering operation is a type of pixel extraction operation. The extracted pixel values determine whether the pixel is an obstacle or a non-obstacle point. If it is an obstacle, the extracted pixel is located in a non-drivable area; if it is a non-obstacle point, the extracted pixel is located in a drivable area.
[0099] Specifically, this can be done by extracting pixels from the aforementioned quadrilateral region, determining whether the extracted pixel is an obstacle or not based on its pixel value, and marking it if it is an obstacle located in a non-drivable area. Then, the quadrilateral region with two adjacent target points on the same side of the vehicle's trajectory and their corresponding two reference key points as vertices is marked as the region to be adjusted. If the region to be adjusted includes a non-drivable area, then that quadrilateral region needs to be adjusted.
[0100] In this embodiment, adjusting the positions of the sides of two adjacent target points within the quadrilateral region closer to the vehicle's trajectory direction until there are no obstacle points within the quadrilateral region includes:
[0101] Adjust the position of the line connecting two adjacent target points towards the direction of the vehicle's trajectory until there are no more marked scattered points in the quadrilateral area.
[0102] Specifically, the positions of the sides of two adjacent target points in the quadrilateral area are adjusted towards the direction of the vehicle's trajectory until there are no obstacle points in the quadrilateral area. This can be done by adjusting the line connecting the two adjacent target points towards the direction of the vehicle's trajectory, checking whether there are any marked scattered points in the adjusted quadrilateral area. If not, the corresponding position is determined as the adjusted position of the two adjacent target points. If there are, the line connecting the two adjacent target points is adjusted towards the direction of the vehicle's trajectory until there are no marked scattered points in the quadrilateral area.
[0103] For example, such as Figure 6 As shown, Figure 6 This diagram illustrates an example of an obstacle-occupying grid map dodging operation. Figure 6The quadrilateral region is formed by two adjacent target points on the same side of the vehicle trajectory route and two reference key points (black points) corresponding to the two adjacent target points (white points) as vertices. Points are scattered in the quadrilateral region (such as multiple gray points). If it is determined that there is an undriveable area in the quadrilateral region based on the scattered points, the edge containing the two adjacent target points in the quadrilateral region is adjusted towards the direction of the vehicle trajectory route until there are no obstacle points in the quadrilateral region. The dotted line part is the edge containing the two adjacent target points after adjustment.
[0104] It should be understood that although the steps in the flowchart above are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart above may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0105] In one embodiment, a computer device is provided, which may be a vehicle-mounted terminal or a server, and its internal structure diagram may be as follows. Figure 7 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a method for determining the drivable area for parking in a residential area.
[0106] Figure 7 The computer device shown is merely an example, and computer devices can have more than [specific examples]. Figure 7The more or fewer components shown can be combined into two or more components, or they can have different component configurations. For example, when the computer device is a vehicle-mounted terminal, it may also include a display screen and an input device. The display screen can be a liquid crystal display screen or an e-ink display screen, and the input device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse, etc. When the computer device is a server, it may also include a database for storing an obstacle occupancy grid map. Furthermore, the various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0107] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps: acquiring an obstacle occupancy grid map and a vehicle trajectory route for a residential parking area mapping; generating reference key points on the vehicle trajectory route; searching along both sides of the vehicle trajectory route from the reference key points in a direction perpendicular to the vehicle's heading until a target point is found and the search ends; the target point is the obstacle point closest to the reference key point on a straight line along the search direction, determined according to the obstacle occupancy grid map; by sequentially connecting the target points on the same side of the vehicle trajectory route, a drivable area outline in the residential parking area is obtained; and the drivable area in the residential parking area is determined based on the drivable area outline.
[0108] In one embodiment, when the processor executes the computer program, it further performs the following steps: calculating the displacement change and angle change of the vehicle relative to the previous reference key point, and generating the current reference key point when the displacement change exceeds a preset displacement change threshold or when the angle change exceeds a preset angle change threshold.
[0109] In one embodiment, when the processor executes the computer program, it also performs the following steps: using the starting point on the vehicle trajectory route as the first reference key point.
[0110] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining a first grid point number based on the obstacle-occupied grid map, wherein the first grid point number is the number of non-drivable grid points in a quadrilateral area with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to the two adjacent target points as vertices; when the first grid point number exceeds a preset first grid point number threshold, selecting a point on the vehicle trajectory route between the two reference key points as a new reference key point.
[0111] In one embodiment, when the processor executes the computer program, it also performs the following steps: selecting the midpoint of two reference key points on the vehicle trajectory route as a new reference key point.
[0112] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining the number of second grid points based on the obstacle-occupied grid map, wherein the number of second grid points is the number of non-drivable grid points in a quadrilateral area with four target points corresponding to two adjacent reference key points as vertices; and when the number of second grid points exceeds a preset threshold for the number of second grid points, selecting a point on the vehicle trajectory route between two adjacent reference key points as a new reference key point.
[0113] In one embodiment, when the processor executes the computer program, it also performs the following steps: selecting the midpoint of two adjacent reference key points on the vehicle trajectory route as a new reference key point.
[0114] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining whether the search line segment corresponding to the current reference key point intersects with the search line segment corresponding to the previous reference key point, wherein the search line segment is the line segment between the two target points of the corresponding reference key point; if so, deleting the line segment portion of the search line segment corresponding to the current reference key point on the intersecting side, or not recording the target points of the search line segment corresponding to the current reference key point on the intersecting side, wherein the intersecting side is the side where the intersection point of the search line segment corresponding to the current reference key point and the search line segment corresponding to the previous reference key point is located relative to the vehicle trajectory route.
[0115] In one embodiment, when the processor executes the computer program, it further performs the following steps: based on the obstacle-occupied grid map, it determines whether there are obstacle points in a quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to the two adjacent target points as vertices; if so, it adjusts the position of the side of the quadrilateral region where the two adjacent target points are located in the direction closer to the vehicle trajectory route until there are no obstacle points in the quadrilateral region.
[0116] In one embodiment, when the processor executes the computer program, it further performs the following steps: scattering points within a quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to those two adjacent target points as vertices; depending on whether the scattered points on the grid map occupied by the obstacle are located in an inaccessible area, if so, marking the scattered points; and marking the quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to those two adjacent target points as vertices as an area to be adjusted.
[0117] In one embodiment, when the processor executes the computer program, it also performs the following steps: adjusting the position of the line connecting two adjacent target points toward the direction of the vehicle trajectory until there are no marked points in the quadrilateral region.
[0118] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon. When executed by a processor, the computer program performs the following steps: acquiring an obstacle occupancy grid map and a vehicle trajectory route for a residential parking area mapping; generating reference key points on the vehicle trajectory route; searching along both sides of the vehicle trajectory route from the reference key points in a direction perpendicular to the vehicle's heading until a target point is found and the search ends; the target point is the obstacle point closest to the reference key point on a straight line along the search direction, determined according to the obstacle occupancy grid map; connecting the target points on the same side of the vehicle trajectory route sequentially to obtain the outline of the drivable area in the residential parking area; and determining the drivable area in the residential parking area based on the drivable area outline.
[0119] In one embodiment, when the processor executes the computer program, it further performs the following steps: calculating the displacement change and angle change of the vehicle relative to the previous reference key point, and generating the current reference key point when the displacement change exceeds a preset displacement change threshold or when the angle change exceeds a preset angle change threshold.
[0120] In one embodiment, when the processor executes the computer program, it also performs the following steps: using the starting point on the vehicle trajectory route as the first reference key point.
[0121] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining a first grid point number based on the obstacle-occupied grid map, wherein the first grid point number is the number of non-drivable grid points in a quadrilateral area with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to the two adjacent target points as vertices; when the first grid point number exceeds a preset first grid point number threshold, selecting a point on the vehicle trajectory route between the two reference key points as a new reference key point.
[0122] In one embodiment, when the processor executes the computer program, it also performs the following steps: selecting the midpoint of two reference key points on the vehicle trajectory route as a new reference key point.
[0123] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining the number of second grid points based on the obstacle-occupied grid map, wherein the number of second grid points is the number of non-drivable grid points in a quadrilateral area with four target points corresponding to two adjacent reference key points as vertices; and when the number of second grid points exceeds a preset threshold for the number of second grid points, selecting a point on the vehicle trajectory route between two adjacent reference key points as a new reference key point.
[0124] In one embodiment, when the processor executes the computer program, it also performs the following steps: selecting the midpoint of two adjacent reference key points on the vehicle trajectory route as a new reference key point.
[0125] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining whether the search line segment corresponding to the current reference key point intersects with the search line segment corresponding to the previous reference key point, wherein the search line segment is the line segment between the two target points of the corresponding reference key point; if so, deleting the line segment portion of the search line segment corresponding to the current reference key point on the intersecting side, or not recording the target points of the search line segment corresponding to the current reference key point on the intersecting side, wherein the intersecting side is the side where the intersection point of the search line segment corresponding to the current reference key point and the search line segment corresponding to the previous reference key point is located relative to the vehicle trajectory route.
[0126] In one embodiment, when the processor executes the computer program, it further performs the following steps: based on the obstacle-occupied grid map, it determines whether there are obstacle points in a quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to the two adjacent target points as vertices; if so, it adjusts the position of the side of the quadrilateral region where the two adjacent target points are located in the direction closer to the vehicle trajectory route until there are no obstacle points in the quadrilateral region.
[0127] In one embodiment, when the processor executes the computer program, it further performs the following steps: scattering points within a quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to those two adjacent target points as vertices; depending on whether the scattered points on the grid map occupied by the obstacle are located in an inaccessible area, if so, marking the scattered points; and marking the quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to those two adjacent target points as vertices as an area to be adjusted.
[0128] In one embodiment, when the processor executes the computer program, it also performs the following steps: adjusting the position of the line connecting two adjacent target points toward the direction of the vehicle trajectory until there are no marked points in the quadrilateral region.
[0129] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0130] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0131] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for determining the drivable area for parking in a residential area, the method comprising: Obtain obstacle occupancy grid map and vehicle trajectory routes for parking mapping in residential areas; Generate reference key points on the vehicle trajectory route, including: Calculate the displacement change and angle change of the vehicle relative to the previous reference key point; when the displacement change exceeds a preset displacement change threshold, or when the angle change exceeds a preset angle change threshold, generate the current reference key point; The search continues along the vertical direction of the vehicle's heading from the reference key point to both sides of the vehicle's trajectory until a target point is found. The target point is the obstacle point that is closest to the reference key point on a straight line along the search direction, as determined by the obstacle-occupying grid map. The number of first grid points is determined based on the obstacle-occupied grid map. The number of first grid points is the number of non-drivable grid points in a quadrilateral area with two adjacent target points on the same side of the vehicle trajectory and two reference key points corresponding to the two adjacent target points as vertices. When the number of first grid points exceeds a preset threshold, a point on the vehicle trajectory is selected between the two reference key points as a new reference key point. or, The number of second grid points is determined based on the obstacle-occupied grid map. The number of second grid points is the number of non-drivable grid points in a quadrilateral area with four target points corresponding to two adjacent reference key points as vertices. When the number of second grid points exceeds a preset threshold, a point on the vehicle trajectory is selected between the two adjacent reference key points as a new reference key point. By sequentially connecting the target points on the same side of the vehicle trajectory route, the outline of the drivable area in the family parking area is obtained, and the drivable area in the family parking area is determined based on the outline of the drivable area.
2. The method of claim 1, wherein, The process of generating reference key points on the vehicle trajectory route also includes: The starting point on the vehicle trajectory route is taken as the first reference key point.
3. The method according to claim 1, characterized in that, The step of selecting a point on the vehicle trajectory route between the two reference key points as a new reference key point includes: Select the midpoint of the two reference key points on the vehicle trajectory as the new reference key point; Selecting a point on the vehicle trajectory route as a new reference key point between two adjacent reference key points includes: The midpoint of two adjacent reference key points on the vehicle trajectory is selected as the new reference key point.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Determine whether the search line segment corresponding to the current reference key point intersects with the search line segment corresponding to the previous reference key point, wherein the search line segment is the line segment between the two target points of the corresponding reference key point; If so, delete the segment of the search line corresponding to the current reference key point on the intersecting side, or do not record the target point of the search line corresponding to the current reference key point on the intersecting side. The intersecting side is the side where the search line corresponding to the current reference key point intersects with the search line corresponding to the previous reference key point relative to the vehicle trajectory.
5. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Based on the obstacle-occupied grid map, determine whether there are obstacle points within a quadrilateral area with two adjacent target points on the same side of the vehicle trajectory and two reference key points corresponding to the two adjacent target points as vertices. If so, adjust the position of the two adjacent target points in the quadrilateral region toward the direction of the vehicle trajectory until there are no obstacle points in the quadrilateral region.
6. The method according to claim 5, characterized in that, The step of determining whether there are obstacle points within a quadrilateral region with vertices of two adjacent target points on the same side of the vehicle trajectory and two reference key points corresponding to those two adjacent target points, based on the obstacle occupancy grid map, includes: A point-scattering operation is performed within a quadrilateral region with two adjacent target points on the same side of the vehicle trajectory route and two reference key points corresponding to the two adjacent target points as vertices; Whether the points marked on the grid map occupied by the obstacle are located in a non-drivable area; If so, the scattered points are marked, and the quadrilateral area with two adjacent target points on the same side of the vehicle trajectory and the two reference key points corresponding to the two adjacent target points as vertices is marked as the area to be adjusted. The step of adjusting the position of the two adjacent target points in the quadrilateral region towards the direction of the vehicle trajectory until there are no obstacle points in the quadrilateral region includes: Adjust the position of the line connecting the two adjacent target points toward the direction of the vehicle trajectory until there are no more marked points in the quadrilateral area.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.