Obstacle avoidance method and device
By installing a camera on the vehicle, obtaining image data and speed functions, extracting the dimension information of obstacles, and controlling the vehicle, the problem of difficult to identify and deal with irregular obstacles in the prior art is solved, and safe and efficient obstacle avoidance is achieved.
Patent Information
- Application Number
- CN202310904559.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-21
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2043-07-21
AI Technical Summary
The prior art is difficult to quickly identify and deal with irregularly shaped obstacles, which causes the vehicle to slow down or change direction when driving, affecting driving safety, and has high hardware costs.
By a camera installed at the opening of the front bumper of the vehicle, the image data captured by the camera and the vehicle speed function are obtained, the outline and dimension information of the obstacle are extracted using image processing technology, and the vehicle is controlled based on this information, including adjusting the suspension height or deceleration.
It realizes the rapid identification and processing of irregular obstacles, avoids vehicle scratches, reduces the adverse impact on driving safety, and saves hardware costs.
Smart Images

Figure CN116872919B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle control, and in particular to an obstacle avoidance method and device. Background Art
[0002] During driving, vehicles often encounter obstacles falling from the road, which affects driving safety and requires the driver to be distracted to identify and deal with them quickly, which often causes the vehicle to slow down and change direction, thus posing a driving safety hazard to other vehicles.
[0003] In the existing technology, the solution for obstacle avoidance generally uses radar detection technology: radar emits radio waves to calculate distance identification and reminder. However, obstacles are often irregular in shape, making them difficult to identify with radar detection and measurement technology. They can only identify the distance from the vehicle, but not the specific height of the obstacle, and the hardware cost is high. Summary of the invention
[0004] In view of the above problems, the present invention is proposed to provide an obstacle avoidance method and device, which can quickly identify the size of the obstacle, and adjust the chassis height or perform avoidance measures such as deceleration to avoid scratches on the vehicle chassis and reduce adverse effects on driving safety.
[0005] According to a first aspect of the present invention, there is provided an obstacle avoidance method, comprising:
[0006] Acquire first image data taken by the camera at a first moment, second image data taken at a second moment, the camera shooting angle, and a speed function of the vehicle between the first moment and the second moment;
[0007] Extracting the target obstacle in the first image data to obtain a first contour; extracting the target obstacle in the second image data to obtain a second contour;
[0008] Determine the size information of the target obstacle according to the speed function, the camera shooting angle, the first contour and the second contour;
[0009] The vehicle is controlled based on the size information of the target obstacle.
[0010] Optionally, the camera is installed at the opening of the front bumper of the vehicle, the angle between the upper shooting boundary and the lower shooting boundary of the camera is the camera shooting angle, and the upper shooting boundary is set as the horizontal boundary.
[0011] Optionally, determining the size information of the target obstacle according to the speed function, the camera shooting angle, the first profile, and the second profile includes:
[0012] Determining a travel distance of the vehicle between a first moment and a second moment according to the speed function;
[0013] Determine, according to the first contour, upper and lower boundaries and left and right boundaries of the target obstacle in the first image data;
[0014] Determine, according to the second contour, upper and lower boundaries and left and right boundaries of the target obstacle in the second image data;
[0015] Determine the height of the target obstacle according to the driving distance, the upper and lower boundaries of the target obstacle in the first image data, the upper and lower boundaries of the target obstacle in the second image data, and the camera shooting angle;
[0016] The width of the target obstacle is determined according to the height of the obstacle and the left and right boundaries of the target obstacle in the first image data; the height of the target obstacle and the width of the target obstacle constitute the size information of the target obstacle.
[0017] Optionally, determining the height of the target obstacle according to the driving distance, the upper and lower boundaries of the target obstacle in the first image data, the upper and lower boundaries of the target obstacle in the second image data, and the camera shooting angle includes:
[0018] According to the driving distance, the upper and lower boundaries of the target obstacle in the first image data, the upper and lower boundaries of the target obstacle in the second image data, and the camera shooting angle, the height of the target obstacle is determined by the following formula:
[0019] h=tgA*ΔL / (ab)
[0020] Wherein, h is the height of the target obstacle, A is the camera shooting angle, ΔL is the driving distance, a is the ratio of the pixel height of the upper and lower boundaries of the target obstacle in the first image data to the total pixel height of the first image data; b is the ratio of the pixel height of the upper and lower boundaries of the target obstacle in the second image data to the total pixel height of the second image data.
[0021] Optionally, the obstacle size information includes a target obstacle height and a target obstacle width;
[0022] According to the target obstacle size information, the vehicle is controlled, including:
[0023] comparing the target obstacle height with a first height, the first height being the height of the vehicle suspension relative to the ground when the vehicle suspension is raised to a maximum height;
[0024] If the target obstacle height is less than the first height, the height of the vehicle suspension is adjusted according to the target obstacle height.
[0025] Optionally, the method further includes:
[0026] If the height of the target obstacle is greater than or equal to the first height, obtaining the vehicle control mode;
[0027] If the vehicle control mode is the manual driving mode, the vehicle suspension is controlled to rise to a first height and a prompt message is issued.
[0028] Optionally, after issuing the prompt message, the method further includes:
[0029] Get the target distance between the vehicle and the target obstacle;
[0030] If the target distance is less than the distance threshold, the vehicle is controlled to brake.
[0031] Optionally, the method further includes:
[0032] If the height of the target obstacle is greater than or equal to the first height, obtaining the vehicle control mode;
[0033] If the vehicle control mode is the automatic driving mode, the target distance between the vehicle and the obstacle is obtained;
[0034] If the target distance is greater than or equal to the distance threshold, the vehicle speed is controlled within the speed threshold, and the path is replanned according to the width of the target obstacle.
[0035] According to a second aspect of the present invention, there is provided an obstacle avoidance device, comprising:
[0036] An acquisition module, used to acquire first image data taken by the camera at a first moment, second image data taken at a second moment, a camera shooting angle, and a speed function of the vehicle between the first moment and the second moment;
[0037] An extraction module, configured to extract the target obstacle in the first image data to obtain a first contour; and to extract the target obstacle in the second image data to obtain a second contour;
[0038] A calculation module, used to determine the size information of the target obstacle according to the speed function, the camera shooting angle, the first profile and the second profile;
[0039] The control module is used to control the vehicle according to the size information of the target obstacle.
[0040] According to a third aspect of the present invention, a controller is provided, the controller comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the aforementioned obstacle avoidance method.
[0041] According to a fourth aspect of the present invention, a vehicle is provided, the vehicle comprising a vehicle body and a controller installed in the vehicle body, wherein the controller executes the aforementioned obstacle avoidance method.
[0042] The above one or more technical solutions in the embodiments of this specification have at least the following technical effects:
[0043] The embodiment of this specification provides an obstacle avoidance method and device, which obtains the first image data taken by the camera at the first moment, the second image data taken at the second moment, the camera shooting angle, and the speed function of the vehicle between the first moment and the second moment; extracts the target obstacle in the first image data to obtain the first outline; extracts the target obstacle in the second image data to obtain the second outline; determines the size information of the target obstacle according to the speed function, the camera shooting angle, the first outline and the second outline; and controls the vehicle according to the size information of the target obstacle. In this way, obstacle recognition and avoidance can be achieved based on the existing software and hardware equipment of the vehicle, which greatly saves costs. After taking multiple shots of the road conditions, the width and height of the obstacle are quickly calculated and processed by the algorithm, and the chassis is adjusted vertically to ensure that the vehicle passes the obstacle efficiently and safely.
[0044] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] By reading the detailed description of the preferred embodiment below, various other advantages and benefits will become clear to those of ordinary skill in the art. The accompanying drawings are only used for the purpose of illustrating the preferred embodiment and are not considered to be limiting of the present invention. Moreover, the same reference figures are used to represent the same parts throughout the accompanying drawings.
[0046] In the attached picture:
[0047] Figure 1 A flow chart of an obstacle avoidance method in an embodiment of the present invention is shown.
[0048] Figure 2 A schematic diagram showing imaging within a camera viewfinder in an embodiment of the present invention is shown.
[0049] Figure 3 A schematic diagram showing a vehicle identifying a target obstacle in an embodiment of the present invention is shown.
[0050] icon:
[0051] 1- camera; 2- front bumper opening; 3- road surface; 4- target obstacle; 5- image data; 6- obstacle in the image data. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0053] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0055] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0056] The embodiment of the present invention provides an obstacle avoidance method, combining Figure 1 As shown in the flowchart, the obstacle avoidance method includes steps 101 to 104:
[0057] Step 101: obtaining first image data taken by a camera at a first moment, second image data taken at a second moment, the camera shooting angle, and a speed function of the vehicle between the first moment and the second moment;
[0058] The obstacle avoidance method of this embodiment is executed by a controller, and the controller is installed in a vehicle. The vehicle also includes a chassis and a vehicle suspension with adjustable height. The camera is installed at the opening of the front bumper of the vehicle, and the opening is located in the middle of the bumper. It should be noted that this embodiment requires some processing of the camera, the purpose of which is to set the camera's upper shooting boundary to a horizontal boundary. In actual processing, the upper part of the opening can be partially blocked, and the camera's upper shooting boundary can be calibrated to be a horizontal boundary. The angle between the camera's upper shooting boundary and the camera's lower shooting boundary is the camera shooting angle. In this embodiment, the camera's shooting angle is known, and combined with Figure 2As shown, the camera shooting angle is marked as A.
[0059] The vehicle of this embodiment can be an autonomous driving vehicle or a manually driven vehicle, which needs to be determined according to the vehicle driving mode. When the vehicle is driving, the camera on the front bumper will take pictures of the vehicle's path to be driven to obtain image data. The image data taken at the first moment is called the first image data. The image data taken at the second moment is called the second image data. It should be noted that the second moment is later than the first moment, and the second image data taken at the second moment is historical image data compared to the first image data. In addition, the first moment and the second moment can be two adjacent shooting cycles of the camera, or one or more shooting cycles are separated from the first moment and the second moment.
[0060] Step 102: extracting the target obstacle in the first image data to obtain a first contour; extracting the target obstacle in the second image data to obtain a second contour;
[0061] It should be noted that when the vehicle is driving, the camera will periodically take pictures of the driving path. There may or may not be obstacles on the road ahead. Specifically, it is necessary to perform obstacle recognition on the captured image data, that is, to extract the obstacle outline. If the obstacle outline is extracted, it means that there is an obstacle on the road ahead.
[0062] In this embodiment, the target obstacle in the first image data and the target obstacle in the second image data are extracted respectively. For example, a first outline is extracted from the first image data taken at the first moment, and a second outline is extracted from the second image data taken at the second moment. This indicates that there is an obstacle on the road ahead.
[0063] In actual driving, the extracted first contour and the second contour correspond to the same target obstacle. The difference lies in that when the camera shoots the target obstacle, the distance between the vehicle and the target obstacle is different and the shooting time is different.
[0064] Images composed of the same number of pixels will be obtained by shooting with a camera. Therefore, it is not difficult to understand that the pixels of the target obstacle in the first image data and the second image data are different, and thus the first contour and the second contour extracted are also different.
[0065] When extracting the first contour, existing technology can be used to obtain the contour boundary of the obstacle by extracting image features, including binarizing the pixels in the image based on the difference between the first contour boundary and the road surface, or performing pixel grayscale or brightness processing to obtain the boundary pixel points of the obstacle.
[0066] Step 103: Determine the size information of the target obstacle according to the speed function, the camera shooting angle, the first contour and the second contour;
[0067] In this embodiment, after obtaining the speed function, the camera shooting angle, the first profile and the second profile, the size information of the obstacle can be obtained through algorithm processing based on these data. The size information mainly refers to the height and width of the target obstacle.
[0068] Specifically, the algorithm processing steps may include:
[0069] Determine the travel distance of the vehicle between the first moment and the second moment according to the speed function;
[0070] Determine, according to the first contour, upper and lower boundaries and left and right boundaries of the target obstacle in the first image data;
[0071] Determine, according to the second contour, upper and lower boundaries and left and right boundaries of the target obstacle in the second image data;
[0072] Determine the height of the target obstacle according to the driving distance, the upper and lower boundaries of the target obstacle in the first image data, the upper and lower boundaries of the target obstacle in the second image data, and the camera shooting angle;
[0073] The width of the target obstacle is determined according to the height of the obstacle and the left and right boundaries of the target obstacle in the first image data; the height of the target obstacle and the width of the target obstacle constitute the size information of the target obstacle.
[0074] The speed function mainly refers to the relationship between the speed and time between the first moment and the second moment, so as to calculate the driving distance of the vehicle between the first moment and the second moment. It is not difficult to understand that the camera periodically takes pictures of the driving path, and there will be a time difference between the two pictures. During this time difference, if the vehicle continues to drive, it will have a certain driving distance. Due to this driving distance, the target obstacles imaged in the first image data and the second image data are different.
[0075] In the above steps, the first contour and the second contour have been extracted respectively, and both contours refer to pixel contours. Therefore, the boundary pixel points of the first contour and the second contour can be determined respectively. That is, the upper and lower boundaries and the left and right boundaries of the first contour are determined, and the upper and lower boundaries and the left and right boundaries of the second contour are determined. Among them, when determining the upper and lower boundaries, the topmost pixel point and the bottommost pixel point are first determined, and the pixel height of the target obstacle is determined according to the topmost pixel point and the bottommost pixel point; similarly, when determining the left and right boundaries, the leftmost pixel point and the rightmost pixel point are first determined, and the pixel width of the target obstacle is determined according to the leftmost pixel point and the rightmost pixel point. Then, combined with the driving distance, based on the trigonometric function relationship, the height and width of the target obstacle can be calculated.
[0076] Specifically, combined with Figure 3 As shown, the camera 1 shoots the target obstacle 4 on the road surface 3 through the front bumper opening 2 to obtain image data 5. The target obstacle 6 in the image data divides the entire image data 5 into three parts, namely, the upper part of the obstacle, the obstacle, and the lower part of the obstacle. Figure 2 As shown, based on the trigonometric function relationship, a right triangle with the position of camera 1 as the vertex is made for two shots. The angle between the upper boundary and the lower boundary of camera 1 is the camera shooting angle A, and L1 is the distance between camera 1 and the target obstacle 6 when the second image data is shot at the second moment. L2 is the distance between camera 1 and the target obstacle 6 when the first image data is shot at the first moment. h is the actual height of the target obstacle. H1 is the virtual imaging height when shooting the first image data, and H2 is the virtual imaging height when shooting the second image data. It can be understood that when the camera is shooting, the upper boundary of camera 1 reaches the target obstacle at the first position height, and the lower boundary reaches the target obstacle at the second position height. The difference between the position heights of the two boundaries is H1 or H2. According to the pixels in the first image data and the second image data, the ratio a of H1 to h and the ratio b of H2 to h can be calculated. Among them, a is equal to the ratio of the total pixel height of the first image data to the pixel height of the obstacle; b is equal to the ratio of the total pixel height of the second image data to the pixel height of the obstacle. Furthermore, based on the speed function, the travel distance ΔL between the first moment and the second moment can be calculated.
[0077] Therefore, in this embodiment, the height of the obstacle can be determined by the following formula:
[0078] L2=b*ΔL / (ab)
[0079] h=tgA*ΔL / (ab)
[0080] Wherein, h is the height of the obstacle, A is the camera shooting angle, ΔL is the driving distance, a is the ratio of the pixel height of the upper and lower boundaries of the obstacle in the image data to the total pixel height of the image data; b is the ratio of the pixel height of the upper and lower boundaries of the obstacle in the second image data to the total pixel height of the second image data.
[0081] Furthermore, the target obstacle width may be determined based on the target obstacle height h and the pixel width of the target obstacle; the target obstacle height and the target obstacle width constitute the size information of the target obstacle.
[0082] To ensure the accuracy of the measured data, multiple groups of photos can be taken and calculated, and then the average value can be taken.
[0083] Step 104: Control the vehicle according to the target obstacle size information.
[0084] In this embodiment, after obtaining the size information of the target obstacle, the vehicle can be controlled according to the size information of the target obstacle. The control of the vehicle mainly refers to adjusting the height of the vehicle suspension, the vehicle speed and the vehicle driving path.
[0085] Specifically, controlling the vehicle may include the following steps:
[0086] Comparing the target obstacle height with a first height; the first height being the height of the vehicle suspension relative to the ground when the vehicle suspension is raised to a maximum height;
[0087] If the target obstacle height is less than the first height, the height of the vehicle suspension is adjusted according to the target obstacle height.
[0088] After calculating the height of the target obstacle, the target obstacle height will be compared with the first height to determine whether the target obstacle height exceeds the maximum height that the vehicle suspension can adjust, that is, the first height. If the target obstacle height does not exceed the first height, it means that it is possible to directly pass through the target obstacle by adjusting the vehicle suspension. If it is decided to directly pass through the target obstacle, it is also necessary to consider that the width of the target obstacle is smaller than the wheelbase of the vehicle. When adjusting the height of the vehicle suspension, the height of the vehicle suspension can be directly adjusted to the first height, or it can be adjusted to a position slightly higher than the height of the target obstacle.
[0089] In addition, based on different vehicle control modes, the control strategy when the target obstacle is greater than or equal to the first height should also be considered. In an optional implementation, if the height of the target obstacle is greater than or equal to the first height, the vehicle control mode is obtained;
[0090] If the vehicle control mode is the automatic driving mode, the target distance between the vehicle and the obstacle is obtained;
[0091] If the target distance is greater than or equal to the distance threshold, the vehicle speed is controlled within the speed threshold, and the path is replanned according to the width of the target obstacle.
[0092] Among them, the vehicle control mode of this embodiment belongs to automatic driving. If the height of the target obstacle is greater than or equal to the first height, it means that there may be a risk of scratching the chassis, and you can choose to slow down and detour. Of course, it is also necessary to look at the target distance between the vehicle and the target obstacle. If the target distance is close, it is best to slow down and brake. If the target distance is appropriate, such as the target distance is greater than or equal to the distance threshold, it means that there is enough time to control the vehicle speed within the speed threshold, and then re-plan the path according to the width of the target obstacle. The value of the speed threshold can be set to 10-20km / h or other reasonable ranges, which is not limited in this embodiment.
[0093] In another optional implementation, if the target obstacle height is greater than or equal to the first height, the vehicle control mode is acquired;
[0094] If the vehicle control mode is the manual driving mode, the vehicle suspension is controlled to rise to a first height and a prompt message is issued.
[0095] Furthermore, the target distance between the vehicle and the target obstacle can also be obtained;
[0096] If the target distance is less than the distance threshold, the vehicle is controlled to brake.
[0097] In this embodiment, the vehicle control mode is a manual driving mode. When the height of the target obstacle is greater than or equal to the first height, it indicates that there may be a risk of scratching the chassis and the target obstacle cannot be passed directly. Therefore, it is necessary to provide prompt information to the driver, such as voice prompt information. Furthermore, the target distance between the vehicle and the target obstacle can be obtained, and the target distance is compared with the distance threshold. If the target distance is less than the distance threshold, it means that the distance to the target obstacle is relatively close and the driver may not have time to make an effective response. At this time, the controller can control the vehicle to brake. If the target distance is greater than or equal to the distance threshold, it can wait for the driver to make an effective response, such as slowing down to avoid the obstacle.
[0098] In summary, an obstacle avoidance method provided in an embodiment of this specification obtains the first image data taken by the camera at the first moment, the second image data taken at the second moment, the camera shooting angle, and the speed function of the vehicle between the first moment and the second moment; extracts the target obstacle in the first image data to obtain the first outline; extracts the target obstacle in the second image data to obtain the second outline; determines the size information of the target obstacle according to the speed function, the camera shooting angle, the first outline, and the second outline; and controls the vehicle according to the size information of the target obstacle. In this way, obstacle recognition and avoidance can be achieved based on the existing software and hardware equipment of the vehicle, which greatly saves costs. After taking multiple shots of the road conditions, the width and height of the obstacle are quickly calculated and processed by the algorithm, and the chassis is adjusted vertically to ensure that the vehicle passes the obstacle efficiently and safely.
[0099] Based on the same inventive concept, an embodiment of the present invention further provides an obstacle avoidance device, comprising:
[0100] An acquisition module, used to acquire first image data taken by the camera at a first moment, second image data taken at a second moment, a camera shooting angle, and a speed function of the vehicle between the first moment and the second moment;
[0101] An extraction module, configured to extract the target obstacle in the first image data to obtain a first contour; and to extract the target obstacle in the second image data to obtain a second contour;
[0102] A calculation module, used to determine the size information of the target obstacle according to the speed function, the camera shooting angle, the first profile and the second profile;
[0103] The control module is used to control the vehicle according to the size information of the target obstacle. The camera is installed at the opening of the front bumper of the vehicle, the angle between the upper shooting boundary and the lower shooting boundary of the camera is the camera shooting angle, and the upper shooting boundary is set as the horizontal boundary.
[0104] In an optional implementation, the calculation module is further used for:
[0105] Determining a travel distance of the vehicle between a first moment and a second moment according to the speed function;
[0106] Determine, according to the first contour, upper and lower boundaries and left and right boundaries of the target obstacle in the first image data;
[0107] Determine, according to the second contour, upper and lower boundaries and left and right boundaries of the target obstacle in the second image data;
[0108] Determine the height of the target obstacle according to the driving distance, the upper and lower boundaries of the target obstacle in the first image data, the upper and lower boundaries of the target obstacle in the second image data, and the camera shooting angle;
[0109] The width of the target obstacle is determined according to the height of the obstacle and the left and right boundaries of the target obstacle in the first image data; the height of the target obstacle and the width of the target obstacle constitute the size information of the target obstacle.
[0110] In an optional implementation, the calculation module is further used for:
[0111] According to the driving distance, the upper and lower boundaries of the target obstacle in the first image data, the upper and lower boundaries of the target obstacle in the second image data, and the camera shooting angle, the height of the target obstacle is determined by the following formula:
[0112] h=tgA*ΔL / (ab)
[0113] Wherein, h is the height of the target obstacle, A is the camera shooting angle, ΔL is the driving distance, a is the ratio of the pixel height of the upper and lower boundaries of the target obstacle in the first image data to the total pixel height of the first image data; b is the ratio of the pixel height of the upper and lower boundaries of the target obstacle in the second image data to the total pixel height of the second image data.
[0114] In an optional implementation, the control module is further configured to:
[0115] comparing the target obstacle height with a first height, the first height being the height of the vehicle suspension relative to the ground when the vehicle suspension is raised to a maximum height;
[0116] If the target obstacle height is less than the first height, the height of the vehicle suspension is adjusted according to the target obstacle height.
[0117] In an optional implementation, the control module is further configured to:
[0118] If the height of the target obstacle is greater than or equal to the first height, obtaining the vehicle control mode;
[0119] If the vehicle control mode is the manual driving mode, the vehicle suspension is controlled to rise to a first height and a prompt message is issued.
[0120] In an optional implementation, the control module is further configured to:
[0121] Get the target distance between the vehicle and the target obstacle;
[0122] If the target distance is less than the distance threshold, the vehicle is controlled to brake.
[0123] In an optional implementation, the control module is further configured to:
[0124] If the height of the target obstacle is greater than or equal to the first height, obtaining the vehicle control mode;
[0125] If the vehicle control mode is the automatic driving mode, the target distance between the vehicle and the obstacle is obtained;
[0126] If the target distance is greater than or equal to the distance threshold, the vehicle speed is controlled within the speed threshold, and the path is replanned according to the width of the target obstacle.
[0127] In summary, an obstacle avoidance device provided in an embodiment of this specification obtains the first image data taken by the camera at the first moment, the second image data taken at the second moment, the camera shooting angle, and the speed function of the vehicle between the first moment and the second moment; extracts the target obstacle in the first image data to obtain the first outline; extracts the target obstacle in the second image data to obtain the second outline; determines the size information of the target obstacle according to the speed function, the camera shooting angle, the first outline, and the second outline; and controls the vehicle according to the size information of the target obstacle. In this way, obstacle recognition and avoidance can be achieved based on the existing software and hardware equipment of the vehicle, which greatly saves costs. After taking multiple shots of the road conditions, the width and height of the obstacle are quickly calculated and processed by an algorithm, and the chassis is adjusted vertically to ensure that the vehicle passes the obstacle efficiently and safely.
[0128] According to the third aspect of the present invention, a controller is provided, which includes an obstacle avoidance device, a memory, a processor and a communication unit. The memory stores machine-readable instructions executable by the processor. When the controller is running, the processor and the memory communicate through a bus, the processor executes the machine-readable instructions, and executes an obstacle avoidance method.
[0129] The memory, processor and communication unit are electrically connected to each other directly or indirectly to achieve signal transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. An obstacle avoidance device includes at least one software function module that can be stored in the memory in the form of software or firmware. The processor is used to execute the executable module stored in the memory (for example, a software function module or computer program included in the obstacle avoidance device).
[0130] Among them, the memory can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0131] In some embodiments, the processor is used to perform one or more functions described in this embodiment. In some embodiments, the processor may include one or more processing cores (eg, a single-core processor (S) or a multi-core processor (S)).
[0132] In this embodiment, the memory is used to store the program, and the processor is used to execute the program after receiving the execution instruction. The process definition method disclosed in any implementation of this embodiment can be applied to the processor, or implemented by the processor.
[0133] The communication unit is used to establish a communication connection between the controller and other devices through the network, and to send and receive data through the network.
[0134] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the controller described above can refer to the corresponding process in the aforementioned method, and will not be elaborated here.
[0135] According to a fourth aspect of the present invention, a vehicle is provided, comprising a vehicle body, a controller installed in the vehicle body, a chassis and a vehicle suspension on the chassis, wherein the controller is used to implement the aforementioned obstacle avoidance method.
[0136] In summary, a vehicle provided in an embodiment of the present specification obtains the first image data taken by a camera at a first moment, the second image data taken at a second moment, the camera shooting angle, and the speed function of the vehicle between the first moment and the second moment; extracts the target obstacle in the first image data to obtain the first outline; extracts the target obstacle in the second image data to obtain the second outline; determines the size information of the target obstacle according to the speed function, the camera shooting angle, the first outline, and the second outline; and controls the vehicle according to the size information of the target obstacle. In this way, obstacle recognition and avoidance can be achieved based on the existing software and hardware equipment of the vehicle, which greatly saves costs. After taking multiple shots of the road conditions, the width and height of the obstacle are quickly calculated and processed by an algorithm, and the chassis is adjusted vertically to ensure that the vehicle passes the obstacle efficiently and safely.
[0137] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the controller in the vehicle described above can refer to the corresponding process in the aforementioned method, and will not be elaborated here.
[0138] The above are only various embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An obstacle avoidance method, characterized in that: include: Acquire first image data taken by the camera at a first moment, second image data taken at a second moment, the camera shooting angle, and a speed function of the vehicle between the first moment and the second moment; Extracting the target obstacle in the first image data to obtain a first contour; Extracting the target obstacle in the second image data to obtain a second contour; Determine and obtain the size information of the target obstacle according to the speed function, the camera shooting angle, the first profile, and the second profile; wherein the height of the target obstacle and the width of the target obstacle constitute the size information of the target obstacle; Controlling the vehicle according to the size information of the target obstacle; Wherein, the camera is installed at the opening of the front bumper of the vehicle, the angle between the upper shooting boundary and the lower shooting boundary of the camera is the camera shooting angle, and the upper shooting boundary is set as a horizontal boundary; The target obstacle height is determined by the following formula: h=tgA*ΔL / (ab) h is the height of the target obstacle, A is the camera shooting angle, ΔL is the travel distance of the vehicle between the first moment and the second moment determined according to the speed function, a is the ratio of the pixel height of the upper and lower boundaries of the target obstacle in the first image data to the total pixel height of the first image data, and b is the ratio of the pixel height of the upper and lower boundaries of the target obstacle in the second image data to the total pixel height of the second image data.
2. The method according to claim 1, characterized in that The determining the size information of the target obstacle according to the speed function, the camera shooting angle, the first profile, and the second profile includes: determining a travel distance of the vehicle between a first moment and a second moment according to the speed function; Determine, according to the first contour, upper and lower boundaries and left and right boundaries of the target obstacle in the first image data; Determining upper and lower boundaries of the target obstacle in the second image data according to the second contour; Determine the height of the target obstacle according to the driving distance, the upper and lower boundaries of the target obstacle in the first image data, the upper and lower boundaries of the target obstacle in the second image data, and the camera shooting angle; The target obstacle width is determined according to the height of the obstacle and the left and right boundaries of the target obstacle in the first image data; the target obstacle height and the target obstacle width constitute the size information of the target obstacle.
3. The method according to claim 1, characterized in that: The controlling of the vehicle according to the target obstacle size information includes: comparing the target obstacle height with a first height, the first height being the height of the vehicle suspension relative to the ground when the vehicle suspension is raised to a maximum height; If the target obstacle height is less than the first height, the height of the vehicle suspension is adjusted according to the target obstacle height.
4. The method according to claim 3, characterized in that: The method further comprises: If the target obstacle height is greater than or equal to the first height, obtaining a vehicle control mode; If the vehicle control mode is a manual driving mode, the vehicle suspension is controlled to rise to the first height and a prompt message is issued.
5. The method according to claim 4, characterized in that After the prompt message is sent, the method further includes: Obtaining a target distance between the vehicle and a target obstacle; If the target distance is less than the distance threshold, the vehicle is controlled to brake.
6. The method according to claim 3, characterized in that The method further comprises: If the target obstacle height is greater than or equal to the first height, obtaining a vehicle control mode; If the vehicle control mode is the automatic driving mode, obtaining a target distance between the vehicle and the obstacle; If the target distance is greater than or equal to the distance threshold, the vehicle speed is controlled within the speed threshold, and the path is replanned according to the target obstacle width.
7. An obstacle avoidance device, characterized in that: Using the obstacle avoidance method according to any one of claims 1 to 6, the device comprises: An acquisition module, used to acquire first image data taken by the camera at a first moment, second image data taken at a second moment, a camera shooting angle, and a speed function of the vehicle between the first moment and the second moment; An extraction module, configured to extract the target obstacle in the first image data to obtain a first contour; and to extract the target obstacle in the second image data to obtain a second contour; A calculation module, used for determining the size information of the target obstacle according to the speed function, the camera shooting angle, the first profile and the second profile; The control module is used to control the vehicle according to the size information of the target obstacle.
8. A controller, characterized in that: The controller includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the obstacle avoidance method described in any one of claims 1 to 6 when executing the computer program.
Citation Information
Patent Citations
Obstacle recognition device and method
CN111353337A
Road obstacle avoidance method and device for autonomous vehicle and readable storage medium
CN114559961A
Distance detection method and device and vehicle
CN114973190A