Detection method, device and equipment for trailer mounting state and medium
Through the method based on predicting pose and point cloud occupying grid map, the low accuracy and delay problems of tow mount detection are solved, and high-precision and real-time tow mount status detection is realized, which simplifies implementation process.
Patent Information
- Application Number
- CN202411117553.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-13
AI Technical Summary
In the prior art, the accuracy of tow bucket mount detection is low and is not practical in actual production tasks, which is prone to problems of false detection and detection delay.
Determine the detection area based on the predicted position of the tow bucket, generate a point cloud occupying the grid map, and compare the point cloud changes in the two detection areas to determine whether the tow bucket is mounted at the rear of the tow truck, reducing the detection delay And improves accuracy.
Improve the accuracy of the tow bucket load state detection, reduce the delay time of the detection result, enhance the real-timeness of the detection, and simplify the implementation process, avoiding the need to arrange additional sensors and cables.
Smart Images

Figure CN119131678A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of automatic detection technology, and in particular to a method, device, equipment and medium for detecting a trailer loading state. Background Art
[0002] In logistics scenarios, a trailer consisting of a tractor and a trailer is a common logistics vehicle. In unmanned driving scenarios, as human participation decreases, more and more tasks need to be completed automatically by the vehicle end. Among them, detecting whether the trailer is mounted on the rear of the tractor (or whether the trailer is in place) is an important function involving unmanned driving efficiency, safety, and passability.
[0003] There are many ways to detect whether the trailer is in place. The existing solutions are mainly: the first is to install a sensor at the hook of the tractor. The sensor can sense whether there is an object mounted at the hook, and then send the mounting information to the vehicle end. However, in actual production tasks, the mounting information may not be accurate, because the trailer and the mop may break. At this time, the mop is still mounted, but the trailer has been detached, and false detection may occur in this case. The second is to arrange cables and sensors on the tractor and the trailer. This solution can sense whether the mop or the trailer is detached, but the problem is that cables and sensors need to be arranged on the tractor and the trailer, and in actual production tasks, the trailer often needs to be hooked and unhooked, so the implementation of this solution is cumbersome and impractical. The third is to detect by camera. First, the trailer position is detected by the camera, and the detected trailer position is used to determine whether the trailer is connected to the rear of the vehicle. This solution does not have cumbersome cable and sensor installation, and will not only sense the mop but not the trailer position, but the current visual solution has poor stability in position detection and is prone to false detection. If multiple frames are used to improve detection accuracy, there will be a large detection delay. Moreover, if there are multiple trailers nearby, it is not easy to distinguish the target trailer, which can easily lead to false detection.
[0004] In summary, the current solutions have low accuracy in trailer load detection or are not practical and easy to use in actual production tasks. Summary of the invention
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide a method, device, equipment and medium for detecting the trailer mounting status, which improves the detection accuracy of the trailer mounting status, while also reducing the delay time of the detection results, improving the real-time performance of the detection, and is easier to implement.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for detecting a trailer loading state, the method comprising:
[0007] Determining a first detection area based on a predicted position of the trailer at a first moment;
[0008] In a preset coordinate system, generating a first occupancy grid map based on the point cloud within the first detection area;
[0009] Determining a second detection area based on the predicted position of the trailer at the second moment, wherein the size of the second detection area is the same as the size of the first detection area, and the trailer moves under the towing of the tractor during a time period between the first moment and the second moment;
[0010] generating a second occupancy grid map based on the point cloud within the second detection area in the preset coordinate system;
[0011] It is determined whether the trailer is mounted on the rear of the tractor according to the first occupancy grid map and the second occupancy grid map.
[0012] Further, the determining whether the trailer is mounted on the rear of the tractor according to the first occupied grid map and the second occupied grid map includes:
[0013] Controlling the second detection area and the point cloud located in the second detection area to rotate in the second occupancy grid map until the relative position relationship between the second detection area and the second occupancy grid map is a target relationship, and stopping the rotation to obtain a rotated second occupancy grid map, wherein the target relationship is the relative position relationship between the first detection area and the first occupancy grid map;
[0014] It is determined whether the trailer is mounted on the rear of the tractor according to the rotated second occupancy grid map and the first occupancy grid map.
[0015] Further, the determining whether the trailer is mounted on the rear of the tractor according to the rotated second occupied grid map and the first occupied grid map includes:
[0016] Counting the number of first grids occupied by point clouds and the number of first blank rows not occupied by point clouds in the rotated second occupied grid map;
[0017] Counting the number of second grids occupied by point clouds and the number of second blank rows not occupied by point clouds in the first occupied grid map;
[0018] Whether the trailer is mounted on the rear of the tractor is determined according to the first number of blank rows, the first number of grids, the second number of grids, and the second number of blank rows.
[0019] Further, the determining whether the trailer is mounted on the rear of the tractor according to the first number of blank rows, the first number of grids, the second number of grids, and the second number of blank rows includes:
[0020] If the difference between the first number of blank lines and the second number of blank lines is greater than a first threshold, and the difference between the second number of grids and the first number of grids is greater than a second threshold, it is determined that the trailer is not mounted on the rear of the tractor; otherwise, it is determined that the trailer is mounted on the rear of the tractor.
[0021] Furthermore, it also includes:
[0022] The predicted position and posture of the trailer at the first moment and the predicted position and posture of the trailer at the second moment are estimated based on the kinematic model of the tractor, the kinematic model of the trailer, and the geometric constraint characteristics of the trailer.
[0023] Furthermore, before generating the first occupancy grid map based on the point cloud in the first detection area in the preset coordinate system, the method further includes:
[0024] Filtering the point cloud within the first detection area to remove the point cloud with a height value lower than a preset value;
[0025] Before generating a second occupancy grid map based on the point cloud in the second detection area in the preset coordinate system, the method further includes:
[0026] The point cloud within the second detection area is filtered to remove the point cloud having a height value lower than a preset value.
[0027] Furthermore, generating a first occupancy grid map based on the point cloud in the first detection area in a preset coordinate system includes:
[0028] In a preset coordinate system, a map of a preset size is generated based on a reference point, wherein the map is divided into a plurality of grids of the same size, and the preset size is larger than the size of the first detection area;
[0029] The grids occupied by the point cloud are determined according to the position coordinates of the point cloud on the horizontal plane, and the grids occupied by the point cloud are marked to obtain the first occupied grid map.
[0030] In a second aspect, an embodiment of the present disclosure further provides a device for detecting a trailer loading state, the device comprising:
[0031] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting the trailer loading status as described above.
[0032] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for detecting the trailer loading status as described above.
[0033] A method for detecting a trailer loading state provided by an embodiment of the present disclosure comprises the following steps: determining a first detection area based on a predicted position of the trailer at a first moment; generating a first occupancy grid map based on a point cloud within the first detection area in a preset coordinate system; determining a second detection area based on a predicted position of the trailer at a second moment, wherein a size of the second detection area is the same as a size of the first detection area, and the trailer moves under the traction of a tractor during a time period between the first moment and the second moment; generating a second occupancy grid map based on a point cloud within the second detection area in the preset coordinate system; determining whether the trailer is mounted on the rear of the tractor based on the first occupancy grid map and the second occupancy grid map, thereby improving the detection accuracy of the trailer loading state, while also reducing the delay time of the detection result, improving the real-time performance of the detection, and being easier to implement. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0035] Figure 1 is a flow chart of a method for detecting a trailer loading state in an embodiment of the present disclosure;
[0036] Figure 2 is a schematic diagram of a connection relationship between a tractor and a trailer at a first moment in an embodiment of the present disclosure;
[0037] Figure 3 is a schematic diagram of a first detection area in an embodiment of the present disclosure;
[0038] Figure 4 is a schematic diagram of a grid diagram in an embodiment of the present disclosure;
[0039] Figure 5 is a schematic diagram of a connection relationship between a tractor and a trailer at a second moment in an embodiment of the present disclosure;
[0040] Figure 6 is a schematic diagram of a second detection area in an embodiment of the present disclosure;
[0041] Figure 7 is a rotated grid diagram in an embodiment of the present disclosure;
[0042] Figure 8 is a flow chart of a detection method in an embodiment of the present disclosure;
[0043] Fig. 9 is a structural diagram of a device for detecting a trailer loading state in an embodiment of the present disclosure;
[0044] Fig.10 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0045] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0046] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0047] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0048] As described in the background technology, in unmanned logistics transportation scenarios, automatically detecting whether "the trailer is mounted on the rear of the tractor" (or "whether the trailer is in place") is an important function involving unmanned driving efficiency, safety, and passability.
[0049] There are many ways to detect whether the trailer is in place. The existing solutions are mainly: the first is to install a sensor at the hook of the tractor. The sensor can sense whether there is an object mounted at the hook, and then send the mounting information to the vehicle end. However, in actual production tasks, the mounting information may not be accurate, because the trailer and the mop may break. At this time, the mop is still mounted, but the trailer has been detached, and false detection may occur in this case. The second is to arrange cables and sensors on the tractor and the trailer. This solution can sense whether the mop or the trailer is detached, but the problem is that cables and sensors need to be arranged on the tractor and the trailer, and in actual production tasks, the trailer often needs to be hooked and unhooked, so the implementation of this solution is cumbersome and impractical. The third is to detect by camera. First, the trailer position is detected by the camera, and the detected trailer position is used to determine whether the trailer is connected to the rear of the vehicle. This solution does not have cumbersome cable and sensor installation, and will not only sense the mop but not the trailer position, but the current visual solution has poor stability in position detection and is prone to false detection. If multiple frames are used to improve detection accuracy, there will be a large detection delay. Moreover, if there are multiple trailers nearby, it is not easy to distinguish the target trailer, which can easily lead to false detection.
[0050] In summary, the current solutions have low accuracy in trailer loading detection, or are not practical and easy to use in actual production tasks. In view of the above problems, the disclosed embodiments provide a method for detecting trailer loading status, which improves the detection accuracy of trailer loading status, reduces the delay time of the detection result, improves the real-time detection, and is easier to implement without the need for additional sensors and cables.
[0051] Specifically, in response to the current problem of difficult use caused by laying cables and installing sensors, this application proposes a method that does not require adding any components to the trailer, and also avoids the problem of only detecting a part but not the trailer body. In response to the current problems of low detection accuracy and delayed detection results, this application proposes a solution based on an occupied grid map to improve detection accuracy and reduce detection delay.
[0052] Figure 1 : is a flow chart of a method for detecting the trailer loading state in an embodiment of the present disclosure. The method can be executed by a trailer loading state detection device, which can be implemented in software and / or hardware, and can be configured in an electronic device. Figure 1 As shown, the method may specifically include the following steps:
[0053] S110. Determine a first detection area based on the predicted position and posture of the trailer at the first moment.
[0054] The predicted posture of the trailer at the first moment includes the position and posture of the trailer. The predicted posture of the trailer at the first moment can be estimated based on the kinematic model of the tractor, the kinematic model of the trailer, and the geometric constraint characteristics of the trailer.
[0055] After obtaining the predicted posture of the trailer, the first detection area is obtained by expanding the range by a certain amount based on the predicted posture. The advantage of this setting is that since the posture of the trailer is uncertain, by expanding the range by a certain amount, even if the predicted result of the trailer posture is not very accurate, the first detection area can include the real posture of the trailer, which is conducive to ensuring the final detection accuracy.
[0056] For example, see Figure 2 A schematic diagram of the connection relationship between the tractor and the trailer at the first moment is shown, and the corresponding Figure 3 The schematic diagram of the first detection area is shown, wherein 310 is the first detection area, 210 represents a trailer, 220 represents a tractor, and 230 represents a mop for connecting the trailer and the tractor.
[0057] S120. In a preset coordinate system, generate a first occupancy grid map based on the point cloud within the first detection area.
[0058] Specifically, in a preset coordinate system, a map of a preset size is generated based on a reference point, and the map is divided into multiple grids of the same size. The preset size is larger than the size of the first detection area. The reference point can be the origin of the preset coordinate system, or a point in the preset coordinate system, as long as the first detection area is surrounded by the map of the preset size; the grid occupied by the point cloud is determined according to the position coordinates of the point cloud in the horizontal plane, and the grid occupied by the point cloud is marked to obtain the first occupied grid map.
[0059] Furthermore, before generating the first occupancy grid map based on the point cloud in the first detection area in the preset coordinate system, the method further includes:
[0060] The point cloud within the first detection area is filtered to remove the point cloud with a height value lower than a preset value, that is, to filter out the noise point cloud, thereby improving the final detection accuracy.
[0061] For example, see Figure 4 Schematic diagram of a grid map shown, where the grids occupied by the point cloud are not labeled.
[0062] S130. Determine a second detection area based on the predicted position of the trailer at a second moment, wherein the size of the second detection area is the same as the size of the first detection area, and the trailer moves under the traction of the tractor during a time period between the first moment and the second moment.
[0063] The predicted posture of the trailer at the second moment can be estimated based on the kinematic model of the tractor, the kinematic model of the trailer, and the geometric constraint characteristics of the trailer. Based on this posture, a certain range is expanded to obtain the second detection area. In order to facilitate more accurate detection later, the size of the second detection area can be made the same as the size of the first detection area.
[0064] For example, see Figure 5 A schematic diagram of the connection relationship between the tractor and the trailer at the second moment is shown. 510 represents the trailer, 520 represents the tractor, and 530 represents the mop used to connect the trailer and the tractor. Figure 2 , it can be seen that the positional relationship between the trailer and the tractor is slightly different. Figure 5 The tractor is shown making a more extreme left turn.
[0065] It is understandable that when the trailer moves under the towing of the tractor, if the trailer is unhooked from the tractor, that is, the trailer is in an unmounted state, or the trailer is not in place, or the trailer and the trailer are broken, then only the tractor moves forward by itself, while the trailer remains stationary. When the tractor moves forward for a certain distance, a certain distance will be generated between the tractor and the trailer. Based on this objective phenomenon, the technical solution of the present application can more accurately and conveniently detect the trailer's in-place state.
[0066] For example, if the trailer is not in place, i.e., unhooked, the number of point clouds in the second detection area will be significantly reduced compared to the number of point clouds in the first detection area, and whether the trailer is in place can be detected based on the point cloud features.
[0067] S140. Generate a second occupancy grid map based on the point cloud in the second detection area in the preset coordinate system.
[0068] Exemplarily, a second occupied grid map is generated based on the map of the preset size in the preset coordinate system, the map is divided into multiple grids of the same size, the grids occupied by the point cloud are determined according to the position coordinates of the point cloud in the horizontal plane in the second detection area, and the grids occupied by the point cloud are marked to obtain the second occupied grid map.
[0069] Before generating a second occupancy grid map based on the point cloud in the second detection area in the preset coordinate system, the method further includes:
[0070] The point cloud in the second detection area is filtered to remove the point cloud with a height value lower than a preset value, that is, to filter out the noise point cloud, thereby ensuring the final detection accuracy.
[0071] S150: Determine whether the trailer is mounted on the rear of the tractor according to the first occupied grid map and the second occupied grid map.
[0072] Specifically, the second detection area and the point cloud within the second detection area are controlled to rotate in the second occupied grid map until the relative position relationship between the second detection area and the second occupied grid map is a target relationship, and the rotation is stopped to obtain a rotated second occupied grid map, wherein the target relationship is the relative position relationship between the first detection area and the first occupied grid map; and it is determined whether the trailer is mounted on the rear of the tractor according to the rotated second occupied grid map and the first occupied grid map.
[0073] The determining whether the trailer is mounted on the rear of the tractor according to the rotated second occupied grid map and the first occupied grid map comprises:
[0074] Counting the number of first grids occupied by point clouds and the number of first blank rows not occupied by point clouds in the rotated second occupied grid map;
[0075] Counting the number of second grids occupied by point clouds and the number of second blank rows not occupied by point clouds in the first occupied grid map;
[0076] Whether the trailer is mounted on the rear of the tractor is determined according to the first number of blank rows, the first number of grids, the second number of grids, and the second number of blank rows.
[0077] The determining whether the trailer is mounted on the rear of the tractor according to the first number of blank rows, the first number of grids, the second number of grids, and the second number of blank rows includes:
[0078] If the difference between the first number of blank lines and the second number of blank lines is greater than a first threshold, and the difference between the second number of grids and the first number of grids is greater than a second threshold, it is determined that the trailer is not mounted on the rear of the tractor; otherwise, it is determined that the trailer is mounted on the rear of the tractor.
[0079] It is understandable that when the trailer moves under the towing of the tractor, if the trailer is uncoupled from the tractor, that is, the trailer is in an unmounted state, or the trailer is not in place, or the trailer and the trailer are broken, then only the tractor moves forward by itself, and the trailer does not move. When the tractor moves forward for a certain distance, a certain distance will be generated between the tractor and the trailer. Based on this objective phenomenon, if the trailer is not in place, that is, uncoupled, the number of point clouds in the second detection area will be reduced compared to the number of point clouds in the first detection area. Based on this point cloud feature, it is possible to detect whether the trailer is in place.
[0080] For example, see Figure 6 Schematic diagram of a second detection area shown in FIG. 6 , wherein the solid line 610 represents the second detection area before rotation. In order to compare with the first detection area, 610 is rotated to overlap with the first detection area. The second detection area after rotation is the area represented by the dotted line 620. Figure 7 The mesh image after rotation is shown, where the mesh occupied by the point cloud is not labeled.
[0081] The method for detecting the trailer loading status provided in this embodiment detects the trailer loading status through the existing radar of the tractor, without the need to wire the tractor and trailer or install other sensors. The trailer position status is detected by occupying the grid map, which improves the detection accuracy and reduces the delay. The scheme of determining the detection area by estimating the trailer posture can further improve the detection accuracy, and the accuracy of trailer position detection is further improved by rotating the occupation grid map.
[0082] In general, see Figure 8 The flowchart of a detection method shown in the figure specifically includes: predicting the trailer posture, generating detection ROI (Region Of Interest), generating OGM (Occupancy Grid Map), generating rotating OGM and comparing OGM. Among them, predicting the trailer posture: since it is necessary to determine the detection range ROI, the approximate posture of the trailer must be determined first. However, there may be no correct trailer posture for reference, so the trailer posture needs to be estimated. This application uses the kinematic and geometric constraint relationship between the trailer and the tractor to predict the trailer posture. Generate detection ROI: Generate the detection ROI by expanding a certain range (because the posture is uncertain) from the predicted posture of the trailer. Generate occupancy grid map OGM:. Take the point cloud above a certain height and divide it into grids in the xy plane, and the grid with point cloud is recorded as ogm. Generate a rotating OGM: After the vehicle moves a certain distance (usually 0.4 meters, so the detection result can be obtained quickly), generate the detection ROI again, generate a new occupied grid map OGM according to the above steps, and then rotate it to be consistent with the first ROI, so that the relative position of the trailer's ogm in the map is consistent. Compare the two generated OGMs, and judge whether the trailer is in place based on the number of blank rows and the number of ogm statistics at the corresponding position. Specifically: Count the number of blank rows in the front part of the OGM and the number of changes in ogm. If the number of blank rows increases and the number of ogm decreases, it is determined that the trailer is out of place (unhooked). If the blank rows do not change significantly and the ogm does not change significantly, it is determined that the trailer is in place (hooked).
[0083] Fig. 9 FIG. 1 is a schematic diagram of a structure of a detection device for a trailer loading state in an embodiment of the present disclosure. Fig. 9As shown: the device includes: a first determination module 910, a first generation module 920, a second determination module 930, a second generation module 940 and a detection module 950.
[0084] Among them, the first determination module 910 is used to determine the first detection area based on the predicted position of the trailer at the first moment; the first generation module 920 is used to generate a first occupancy grid map based on the point cloud in the first detection area in a preset coordinate system; the second determination module 930 is used to determine the second detection area based on the predicted position of the trailer at the second moment, wherein the size of the second detection area is the same as the size of the first detection area, and the trailer moves under the traction of the tractor in the time period between the first moment and the second moment; the second generation module 940 is used to generate a second occupancy grid map based on the point cloud in the second detection area in the preset coordinate system; the detection module 950 is used to determine whether the trailer is mounted on the rear of the tractor according to the first occupancy grid map and the second occupancy grid map.
[0085] Furthermore, the detection module 950 includes a rotation unit and a determination unit, the rotation unit is used to control the second detection area and the point cloud located in the second detection area to rotate in the second occupancy grid map until the relative position relationship between the second detection area and the second occupancy grid map is a target relationship, and the rotation is stopped to obtain the rotated second occupancy grid map, and the target relationship is the relative position relationship between the first detection area and the first occupancy grid map; the determination unit is used to determine whether the trailer is mounted on the rear of the tractor according to the rotated second occupancy grid map and the first occupancy grid map.
[0086] Furthermore, the determination unit includes: a counting subunit and a determination subunit, the counting subunit is specifically used to: count the number of first grids occupied by point clouds in the rotated second occupied grid map, and the number of first blank rows not occupied by point clouds; count the number of second grids occupied by point clouds in the first occupied grid map, and the number of second blank rows not occupied by point clouds; the determination subunit is specifically used to: determine whether the trailer is mounted on the rear of the tractor according to the number of the first blank rows, the number of the first grids, the number of the second grids, and the number of the second blank rows.
[0087] Furthermore, the determination subunit is specifically used to: if the difference between the first number of blank lines and the second number of blank lines is greater than a first threshold, and the difference between the second number of grids and the first number of grids is greater than a second threshold, then determine that the trailer is not mounted on the rear of the tractor; otherwise, determine that the trailer is mounted on the rear of the tractor.
[0088] Furthermore, it also includes a posture estimation module, which is used to estimate the predicted posture of the trailer at the first moment and the predicted posture at the second moment based on the kinematic model of the tractor, the kinematic model of the trailer and the geometric constraint characteristics of the trailer.
[0089] Furthermore, it also includes: a filtering module, which is used to filter the point cloud in the first detection area before generating a first occupancy grid map based on the point cloud in the first detection area in a preset coordinate system, so as to filter out point clouds with height values lower than a preset value; in the preset coordinate system, before generating a second occupancy grid map based on the point cloud in the second detection area, the point cloud in the second detection area is filtered to filter out point clouds with height values lower than a preset value.
[0090] Furthermore, the first generation module 920 is specifically used to generate a map of a preset size based on a reference point in a preset coordinate system, wherein the map is divided into multiple grids of the same size, and the preset size is larger than the size of the first detection area; the grids occupied by the point cloud are determined according to the position coordinates of the point cloud in the horizontal plane, and the grids occupied by the point cloud are marked to obtain the first occupied grid map.
[0091] The device for detecting the trailer mounting status provided in the embodiment of the present disclosure can execute the steps in the method for detecting the trailer mounting status provided in the method embodiment of the present disclosure, and the execution steps and beneficial effects are no longer repeated here.
[0092] Fig.10 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Fig.10 , which shows a structural schematic diagram of an electronic device 500 suitable for implementing the embodiments of the present disclosure. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0093] like Fig.10As shown, the electronic device 500 may include a processing device 501, a ROM 502, a RAM 503, a bus 504, an input / output (I / O) interface 505, an input device 506, an output device 507, a storage device 508, and a communication device 509. The processing device (e.g., a central processing unit, a graphics processor, etc.) 501 can perform various appropriate actions and processes to implement the method of the embodiment described in the present disclosure according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage device 508 to the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through the bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.
[0094] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart, thereby implementing the method for detecting the trailer loading state as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above functions defined in the method of the embodiment of the present disclosure are executed.
[0095] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0096] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: determines a first detection area based on the predicted position of the trailer at the first moment; generates a first occupancy grid map based on the point cloud in the first detection area in a preset coordinate system; determines a second detection area based on the predicted position of the trailer at the second moment, wherein the size of the second detection area is the same as the size of the first detection area, and the trailer moves under the traction of the tractor during the time period between the first moment and the second moment; generates a second occupancy grid map based on the point cloud in the second detection area in the preset coordinate system; determines whether the trailer is mounted on the rear of the tractor according to the first occupancy grid map and the second occupancy grid map.
[0097] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0098] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0099] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
Claims
1. A method for detecting a trailer loading state, It is characterized in that The method comprises: Determining a first detection area based on a predicted position of the trailer at a first moment; In a preset coordinate system, generating a first occupancy grid map based on the point cloud within the first detection area; Determining a second detection area based on the predicted position of the trailer at the second moment, wherein the size of the second detection area is the same as the size of the first detection area, and the trailer moves under the towing of the tractor during a time period between the first moment and the second moment; generating a second occupancy grid map based on the point cloud within the second detection area in the preset coordinate system; It is determined whether the trailer is mounted on the rear of the tractor according to the first occupancy grid map and the second occupancy grid map.
2. The method according to claim 1, It is characterized in that The determining whether the trailer is mounted on the rear of the tractor according to the first occupied grid map and the second occupied grid map includes: Controlling the second detection area and the point cloud located in the second detection area to rotate in the second occupancy grid map until the relative position relationship between the second detection area and the second occupancy grid map is a target relationship, and stopping the rotation to obtain a rotated second occupancy grid map, wherein the target relationship is the relative position relationship between the first detection area and the first occupancy grid map; It is determined whether the trailer is mounted on the rear of the tractor according to the rotated second occupancy grid map and the first occupancy grid map.
3. The method according to claim 2, It is characterized in that The determining whether the trailer is mounted on the rear of the tractor according to the rotated second occupied grid map and the first occupied grid map comprises: Counting the number of first grids occupied by point clouds and the number of first blank rows not occupied by point clouds in the rotated second occupied grid map; Counting the number of second grids occupied by point clouds and the number of second blank rows not occupied by point clouds in the first occupied grid map; Whether the trailer is mounted on the rear of the tractor is determined according to the first number of blank rows, the first number of grids, the second number of grids, and the second number of blank rows.
4. The method according to claim 3, It is characterized in that The determining whether the trailer is mounted on the rear of the tractor according to the first number of blank rows, the first number of grids, the second number of grids, and the second number of blank rows includes: If the difference between the first number of blank lines and the second number of blank lines is greater than a first threshold, and the difference between the second number of grids and the first number of grids is greater than a second threshold, it is determined that the trailer is not mounted on the rear of the tractor; otherwise, it is determined that the trailer is mounted on the rear of the tractor.
5. The method according to claim 1, It is characterized in that Also includes: The predicted position and posture of the trailer at the first moment and the predicted position and posture of the trailer at the second moment are estimated based on the kinematic model of the tractor, the kinematic model of the trailer, and the geometric constraint characteristics of the trailer.
6. The method according to claim 1, It is characterized in that Before generating the first occupancy grid map based on the point cloud in the first detection area in the preset coordinate system, the method further includes: Filtering the point cloud within the first detection area to remove the point cloud with a height value lower than a preset value; Before generating a second occupancy grid map based on the point cloud in the second detection area in the preset coordinate system, the method further includes: The point cloud within the second detection area is filtered to remove the point cloud having a height value lower than a preset value.
7. The method according to claim 1, It is characterized in that The step of generating a first occupancy grid map based on the point cloud within the first detection area in a preset coordinate system includes: In a preset coordinate system, a map of a preset size is generated based on a reference point, wherein the map is divided into a plurality of grids of the same size, and the preset size is larger than the size of the first detection area; The grids occupied by the point cloud are determined according to the position coordinates of the point cloud on the horizontal plane, and the grids occupied by the point cloud are marked to obtain the first occupied grid map.
8. A device for detecting the loading status of a trailer, It is characterized in that include: A first determination module, configured to determine a first detection area based on a predicted position of the trailer at a first moment; A first generating module, configured to generate a first occupancy grid map based on the point cloud within the first detection area in a preset coordinate system; a second determination module, configured to determine a second detection area based on a predicted position of the trailer at a second moment, wherein a size of the second detection area is the same as a size of the first detection area, and the trailer moves under the towing of the tractor during a time period between the first moment and the second moment; A second generating module, configured to generate a second occupancy grid map based on the point cloud within the second detection area in the preset coordinate system; A detection module is used to determine whether the trailer is mounted on the rear of the tractor according to the first occupancy grid map and the second occupancy grid map.
9. An electronic device, It is characterized in that The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Detection method and system of trailer towing funnel, and unmanned trailer
CN108761479A
Laser map updating method based on grid detection, terminal and computer equipment
CN112380312A
Vehicle environment information sensing method and device, electronic equipment and storage medium
CN112396043A
Method for determining relative pose of camera, electronic equipment and storage medium
CN113724332A
Dynamic target detection method and device, storage medium and terminal
CN115249223A
