Obstacle detection method and system applied to automatic charging equipment and medium
The obstacle detection method, which combines multi-level point cloud filtering and connected domain analysis, solves the problems of low obstacle detection efficiency and misidentification of the robotic arm in the automatic charging system, achieves high-reliability and real-time obstacle recognition, and ensures the safe operation of the robotic arm.
Patent Information
- Application Number
- CN202510876720.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-06-27
AI Technical Summary
Existing obstacle detection technology has low processing efficiency and poor real-time performance in automatic charging systems, and the robotic arm's own point cloud is easily misidentified as an obstacle, which increases detection complexity and makes it difficult to meet safety requirements.
A method combining multi-level point cloud filtering and connected domain analysis is adopted to generate point clouds by depth image scaling. The robotic arm is modeled using the improved MDH algorithm. The robotic arm point cloud is filtered in combination with the extended cylinder model, and a two-dimensional mask image is generated by camera intrinsic parameter projection for obstacle recognition.
It achieves efficient and real-time obstacle detection and can provide detection feedback within 30ms, ensuring the safe movement of the robotic arm, reducing computational complexity, and improving detection reliability and robustness.
Smart Images

Figure CN120766246A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing technology, and in particular relates to an obstacle detection method, system and medium applied to automatic charging equipment. Background Art
[0002] With the widespread adoption of electric vehicles (EVs), automatic charging technology has become an important direction for improving user experience and charging station efficiency. Automatic charging systems use industrial robotic arms to automatically plug and unplug charging pile cables and are widely used in public charging stations, parking lots, and other scenarios. In automatic charging scenarios, the robotic arm needs to move from the charging pile to the vehicle's cable inlet to complete the plug-in and unplug operations. Due to the complex environment of charging stations, with the presence of dynamic obstacles (such as moving people and vehicles) and static obstacles (such as equipment and debris), automatic charging equipment, such as charging cabinets, must have efficient obstacle detection capabilities. Therefore, the precise control and environmental perception capabilities of the robotic arm are key to achieving automatic charging, and obstacle detection is the core link to ensure the safe operation of the robotic arm.
[0003] Currently, obstacle detection technology mainly relies on visual sensors (such as depth cameras and RGB cameras) and point cloud processing algorithms. By analyzing the three-dimensional point cloud data in the scene, potential obstacles (such as people, vehicles, and objects) on the robot's path are identified to avoid collisions. Point cloud data processing is the mainstream method for obstacle detection. The three-dimensional point cloud data generated by the depth camera can reconstruct the three-dimensional structure of the scene and identify the position, shape, and size of obstacles. However, the amount of point cloud data is huge, and processing efficiency and real-time performance are key challenges. In addition, the projection of the robot itself in the point cloud may be mistaken for an obstacle, increasing the complexity of detection. Summary of the Invention
[0004] In view of this, in one aspect, some embodiments disclose an obstacle detection method applied to an automatic charging device, comprising the steps of:
[0005] S1. Use a depth camera to obtain a depth image of the automatic charging scene to form a three-dimensional point cloud;
[0006] S2. Perform multi-level filtering on the formed three-dimensional point cloud to filter out the environmental point cloud; wherein the multi-level filtering includes:
[0007] Filter the point cloud based on the cuboid range of the robot's workspace;
[0008] Filtering vehicle point clouds based on vehicle pose at the charging port;
[0009] Filter the robotic arm point cloud;
[0010] S3. Analyze the filtered three-dimensional point cloud to determine whether there are effective obstacles.
[0011] Furthermore, in some embodiments of the obstacle detection method for automatic charging equipment, in step S1, the resolution of the depth image is dynamically adjusted, and the original depth image is scaled from the original resolution W×H to W / scale_factor×H / scale_factor using the nearest neighbor interpolation method of OpenCV according to the scaling factor parameter; wherein scale_factor is the scaling factor.
[0012] In the obstacle detection method for an automatic charging device disclosed in some embodiments, in step S2, filtering the robotic arm point cloud includes:
[0013] The robotic arm is modeled according to the improved MDH algorithm, and the point clouds within the modeling range of the robotic arm are filtered out in the point cloud coordinate system.
[0014] In the obstacle detection method for an automatic charging device disclosed in some embodiments, in step S2, filtering the robotic arm point cloud includes:
[0015] First, a precise mathematical model of the six-axis robotic arm was established. Using an improved MDH parameterization method, eight sets of transformation matrix parameters were defined. Based on these eight sets of transformation matrix parameters, the six axes and two long links were modeled. By multiplying the continuous homogeneous transformation matrices, the real-time position coordinates of each joint of the robotic arm were accurately calculated, accurately filtering out the point cloud information belonging to the robotic arm.
[0016] The three axes and one connecting rod at the end of the robotic arm are extended. By calculating the direction vectors between adjacent joints, the starting end of each axis segment is extended backward by a fixed distance to ensure that the actual physical shape of the robotic arm is fully enclosed. An additional fixed-length gun head is added to the end of the robotic arm to cover the geometric range of the end effector and charging gun.
[0017] Then, an accurate cylinder collision detection model is established, and the three axes and one connecting rod at the end of the above-mentioned robotic arm are modeled as a cylinder with a certain radius. For any point in the point cloud, the distance from the point to the cylinder axis is calculated: first, the point is projected onto the cylinder axis to determine whether the projected point is within the height range of the cylinder; then the vertical distance from the point to the axis is calculated and compared with the cylinder radius. If the vertical distance is less than or equal to the cylinder radius and the projection is within the height range, the point is determined to be inside the robotic arm and is removed from the obstacle point cloud.
[0018] In some embodiments of the obstacle detection method for automatic charging equipment disclosed, step S3 specifically includes:
[0019] The filtered 3D point cloud is projected onto the 2D image plane through the camera intrinsic parameter matrix to generate a 2D mask of the obstacle distribution. The projection process uses a perspective transformation model. For a 3D point (x, y, z), its pixel coordinates (u, v) on the image plane are:
[0020]
[0021] where f x 、f y is the focal length of the camera internal parameter, C x 、C y is the optical center coordinate;
[0022] The binary mask is processed by closing operation, and the use of 3×3 rectangular structure elements can effectively connect adjacent discrete points and fill small holes while maintaining the overall shape characteristics of the obstacle;
[0023] Finally, an intelligent obstacle identification strategy based on connected domain analysis is proposed. The eight-connected connected domain labeling algorithm is used to segment the processed binary mask. The area of each connected region is counted, and an area threshold is set to filter out noise areas with too small an area. Only connected domains with an area larger than the threshold are retained as real obstacles.
[0024] In some embodiments of the obstacle detection method for an automatic charging device, in step S3, the filtered three-dimensional point cloud is subjected to discrete point filtering to eliminate the error scattered points generated by the device, and then a suitable threshold is set for the number of point clouds for judgment.
[0025] In the obstacle detection method for an automatic charging device disclosed in some embodiments, in step S2, filtering the robotic arm point cloud includes:
[0026] Use a deep learning segmentation model to segment the robotic arm from the RGB image acquired by the camera and remove the robotic arm from the obstacle mask.
[0027] On the other hand, some embodiments disclose an obstacle detection system for an automatic charging device, including:
[0028] a point cloud acquisition module configured to acquire a depth image of the automatic charging scene using a camera to form a three-dimensional point cloud;
[0029] A point cloud filtering module is configured to perform multi-level filtering on the generated three-dimensional point cloud to filter out the environmental point cloud; wherein the multi-level filtering includes: filtering the point cloud based on the rectangular range of the manipulator workspace; filtering the vehicle point cloud based on the vehicle posture of the charging port; and filtering the manipulator point cloud;
[0030] The point cloud analysis module is configured to analyze the filtered three-dimensional point cloud to determine whether there are valid obstacles.
[0031] On the other hand, some embodiments disclose an electronic device including a processor and a memory; the memory stores code, and when the code is processed by the processor, the obstacle detection method for an automatic charging pile disclosed in an embodiment of the present invention is executed.
[0032] On the other hand, some embodiments disclose a computer-readable storage medium having computer executable code stored thereon. When the computer executable code is read and processed, the obstacle detection method for an automatic charging pile disclosed in an embodiment of the present invention is executed.
[0033] The obstacle detection method for automatic charging equipment disclosed in an embodiment of the present invention combines multi-level point cloud filtering with connected domain analysis. First, the depth image is scaled to generate a point cloud, significantly reducing the number of point clouds. Then, a three-layer filtering strategy is used: the robot's workspace volume filtering, the vehicle point cloud filtering, and the robot model filtering. The environmental point cloud in the scene is completely filtered out. The remaining point cloud is the obstacle point. Finally, the remaining point cloud is mapped into a two-dimensional mask image. Using connected domain analysis technology, an area threshold is set to determine whether there are valid obstacles in the mask image. The embodiment of the present invention uses improved MDH parameters to accurately model the robot arm and uses an extended cylinder model to represent the volume of each joint and connecting rod of the robot arm, effectively eliminating the interference of the robot arm itself in the point cloud. This method achieves highly reliable obstacle detection while ensuring real-time performance. It can provide detection feedback within 30 milliseconds, ensuring that the robot arm does not encounter obstacles during movement, thereby achieving the goal of safe charging. It can accurately identify obstacles in complex environments without relying on feature extraction algorithms, saving a lot of computing power. It also has strong robustness, providing a strong guarantee for the safe operation of the automatic charging system. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flowchart of an obstacle detection method for automatic charging equipment disclosed in some embodiments;
[0035] Figure 2 Flowchart of the obstacle detection method applied to automatic charging equipment disclosed in Example 1. DETAILED DESCRIPTION
[0036] The term "embodiment" is used herein specifically to describe any embodiment as "exemplary," and should not be construed as superior or preferable to other embodiments. Performance indicators in the embodiments of the present invention were tested using conventional testing methods in the art, unless otherwise specified. It should be understood that the terms used in the embodiments of the present invention are intended solely to describe specific implementations and are not intended to limit the disclosure of the embodiments of the present invention.
[0037] Unless otherwise defined, technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which embodiments of the application belong. The methods and techniques of the present embodiments are generally performed according to conventional methods and techniques of the art, except to the extent that specific methods and techniques are otherwise described herein.
[0038] The terms "substantial" and "about" are used herein to describe small fluctuations. For example, they can mean less than or equal to ± 5%, such as less than or equal to ± 2%, such as less than or equal to ± 1%, such as less than or equal to ± 0.5%, such as less than or equal to ± 0.2%, such as less than or equal to ± 0.1%, such as less than or equal to ± 0.05%. Numerical data may, in the text herein, be presented in a range format. It is to be understood that such a range format is used merely for convenience and brevity and thus should be interpreted in a flexible manner to include not only the numerical values explicitly recited as the limits of the range, but also to include all the individual numerical values or sub-ranges within that range as if each numerical value and sub-range is explicitly recited. For example, a range of "1% to 5%" should be interpreted to include not only the explicitly recited values of 1% to 5%, but also include individual values and sub-ranges within the indicated range, such as 2% to 4%, 3.5% and 4.1%, etc. The same principle applies to ranges reciting only one numerical value, such as "less than 10%". Furthermore, such an interpretation should apply regardless of the breadth of the range or the characteristics being described.
[0039] Generally, the device applied to the automatic charging scene of electric vehicles includes a charging cabinet, a depth camera, a mechanical arm, and a point cloud processing unit. The depth camera is installed on the top edge of the charging cabinet, and the angle of view is inclined downward at a certain angle, for example, 45 degrees, relative to the horizontal plane. The mechanical arm is located at the middle position of the charging cabinet, so that the angle of view of the depth camera can capture the overall environment in which the mechanical arm works. The point cloud is a collection of points in three-dimensional space generated by the depth camera according to the depth map and the camera intrinsic parameters. Each point contains coordinate (x, y, z) information, and some structures also contain color and intensity information. The MDH parameter method of the mechanical arm is a modeling method for describing the kinematic relationship between the joints and links of the mechanical arm. By defining parameters such as joint angle and link length, the pose of each part of the mechanical arm is calculated. Connected component analysis is an image processing technique used to identify connected pixel regions in an image, commonly used for segmentation and counting target regions, such as obstacles.
[0040] In this document, including the claims, the conjunctions, such as "comprise", "include", "have", "with", "contain", "relate to", "accommodate" and the like are understood to be open, i.e. to mean "including but not limited to". Only the conjunctions "consisting of" and "consisting exclusively of" are closed conjunctions.
[0041] In order to better illustrate the present invention, numerous specific details are provided in the following specific examples. It should be understood by those skilled in the art that the present invention can be practiced without certain specific details. In the examples, some methods, means, instruments, and equipment well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present invention.
[0042] Under the premise of no conflict, the technical features disclosed in the embodiments of the present invention can be arbitrarily combined, and the resulting technical solutions belong to the contents disclosed in the embodiments of the present invention.
[0043] Traditional point cloud processing methods require the individual calculation and storage of massive 3D points. Frequent memory allocation, release, and data copying result in extremely low processing efficiency, making them unable to meet the demands of real-time detection. This is especially true when processing high-resolution images, where a single frame of point cloud data can contain hundreds of thousands of points. Processing delays can exceed 100 milliseconds, impacting system efficiency.
[0044] In the embodiment of the present invention, a multi-level optimization strategy is adopted to significantly improve the efficiency of point cloud processing.
[0045] In some embodiments, an adaptive image scaling mechanism is introduced to dynamically adjust the resolution of the input depth map through a configurable scaling factor, significantly reducing the number of point clouds to be processed while ensuring detection accuracy. Specifically, the original depth map is scaled from the original resolution W×H to W / scale_factor×H / scale_factor using OpenCV's nearest neighbor interpolation (INTER_NEAREST) method based on the scaling factor scale_factor parameter. Since the nearest point is used as the new insertion point, there will be no gradual transition area on the edge, and the depth map can be effectively and completely scaled. The camera intrinsic parameter matrix is synchronously scaled accordingly to ensure that the geometric accuracy of the 3D reconstruction is not affected, and ultimately the number of point clouds is reduced to the original 1 / scale_factor. 2 Generally, a scaling factor greater than 1 indicates that the depth map is reduced, and a scaling factor less than 1 indicates that the depth map is enlarged. Generally, the scaling factor can be configured to an optimized value based on experimental results to ensure a reasonable processing speed without losing important point cloud information. In some embodiments, the optimized value of the scaling factor is 8.
[0046] In some embodiments, a layered progressive filtering strategy is employed to further filter the point cloud. Typically, cuboid boundary filtering, vehicle pose filtering, and robotic arm shape filtering are applied sequentially, in ascending order of computational complexity. Each filtering step significantly reduces the number of point clouds that must be processed.
[0047] In some embodiments, the first step is to use rectangular boundary filtering, because it is only necessary to determine the obstacles within the working space of the robot arm, and it is not necessary to care about the point cloud on the ground or in the distance. Therefore, by setting the rectangular coordinate range of the working space of the robot arm, 70-80% of irrelevant point clouds can be filtered out. The second step is to filter the vehicle posture. When the vehicle is parked correctly, the position of the charging port on the vehicle body will be within the working space of the robot arm. The vehicle posture (x, y, z, r x ,r y ,r z ) to filter out vehicle-related point clouds; the third step is to filter the robotic arm point cloud. Usually, the robotic arm will be exposed to the camera when it is in working state. If the information of the robotic arm is not filtered out, it is easy to cause misjudgment, so robotic arm point cloud filtering is required.
[0048] In some embodiments, the robotic arm is modeled according to the improved MDH algorithm, and the point clouds within the modeling range are filtered out in the point cloud coordinate system. The three-step point cloud filtering strategy removes all point clouds of objects that are fixed during the operation of the charging pile, and the remaining point clouds can be used to determine obstacles. At the same time, the point cloud processing speed of this method is nearly 10 times faster than that of the traditional original point cloud processing method, and the point cloud processing time of the original resolution of 1280×720 is reduced by 1 / 8 from 300ms. 2 Then it dropped to less than 30ms.
[0049] Typically, during a robot arm's operation, its linkages, joints, and end effectors appear within the depth camera's field of view, and the point clouds generated by these structures can be mistakenly identified as obstacles. Traditional methods typically use static occlusion regions, but these cannot adapt to the robot arm's dynamic posture changes. Some methods use complex machine learning algorithms for self-identification, but these methods are computationally complex and difficult to guarantee accuracy.
[0050] In some embodiments, a dynamic self-interference elimination method based on improved MDH kinematic modeling is adopted. First, an accurate mathematical model of a six-axis manipulator is built. According to the principle of forward kinematics, the position and posture of the end of the manipulator can be obtained by knowing the angles θ of each joint of the manipulator. The solution process is to multiply the base coordinate system of the manipulator by the transformation matrix to obtain the coordinate system representation of the next joint. After the right multiplication, the total transformation between the base coordinate system and the end is as follows:
[0051] R T H =A1A2A3A4A5A6A7A8
[0052] Among them A i The transformation matrix formula is as follows:
[0053]
[0054] This principle is implemented using the MDH parameterization method, defining eight sets of transformation matrix parameters. The corresponding robot arm structures are axis 1, axis 2, link 1, axis 3, link 2, axis 4, axis 5, and axis 6. The parameters are shown in the following table.
[0055] structure θ d a α Axis 1 <![CDATA[Θ1]]> <![CDATA[d1]]> 0 0 Axis 2 <![CDATA[Θ2]]> <![CDATA[d2]]> 0 -90 Connecting rod 1 0 <![CDATA[d3]]> 0 -90 Axis 3 <![CDATA[Θ3]]> [d4] 0 -90 Connecting rod 2 0 <![CDATA[d5]]> 0 -90 Axis 4 <![CDATA[Θ4]]> <![CDATA[d6]]> 0 -90 Axis 5 <![CDATA[Θ5]]> <![CDATA[d7]]> 0 -90 Axis 6 Θ6 [d8] 0 -90
[0056] θ represents the rotation angle of the axis joint; d is the joint length of each axis joint; a is the length of the connecting rod joint. Because the traditional MDH method only has the calculation results of six axis joints, and in order to accurately model the contour of the robot arm, we need to add the parameters of two more connecting rod joints, and regard them as non-rotating axis joints here for ease of calculation. Therefore, d3 and d5 are actually the lengths of the connecting rod joints; α represents the fixed torsion angle between adjacent joints.
[0057] Depend on R T H The calculation process can obtain the position coordinates of all joints based on the base coordinate system. A total of eight joints can obtain nine coordinate points, which can be connected in sequence using line segments to model the robotic arm. In addition, the current robotic arm MDH modeling parameters can be obtained 50 times per second from the interface provided by the robotic arm manufacturer, and the spatial status of the robotic arm can be updated dynamically in real time.
[0058] Since only the three axis joints and one connecting rod joint at the end of the robot arm are exposed to the camera's field of view when the robot arm is working, special extension processing is performed on these four axis segments to solve the problem that the MDH model can only calculate the joint center points but cannot cover the entire connecting rod shape. R T H The resulting joint coordinates are used to calculate the joint's orientation vectors in 3D space. The starting point of each joint is then extended backward by a fixed distance to ensure it fully encompasses the actual physical shape of the robotic arm. Furthermore, a fixed-length gun head is added to the end joint of the robotic arm to cover the geometric range of the end effector and charging gun.
[0059] In some embodiments, an accurate cylinder collision detection model is established. Specifically, a cylinder of a specific radius is constructed based on the direction vectors of the four joints mentioned above, and the height of the cylinder is the length of the extended joint. For any point in the point cloud, the distance from the point to the cylinder axis is calculated: first, the point is projected onto the cylinder axis to determine whether the projected point is within the height range of the cylinder; then the vertical distance from the point to the axis is calculated and compared with the cylinder radius. If the vertical distance is less than or equal to the cylinder radius and the projection is within the height range of the cylinder, the point is determined to be inside the robotic arm and is removed from the obstacle point cloud. Generally, 99% of the robotic arm's own point cloud can be accurately identified and removed, which significantly improves the reliability and practicality of obstacle detection. At the same time, it can adapt to any posture changes of the robotic arm in real time without the need for prior calibration or training.
[0060] Typically, in complex industrial environments, the point cloud data captured by depth sensors contains numerous noisy points, outliers, and incomplete areas. Obstacle detection based directly on raw point clouds is prone to false detections and missed detections. Traditional methods typically rely on simple point cloud density statistics or fixed thresholds, which are unable to effectively distinguish between real obstacles and ambient noise. Detection accuracy is generally low, making it difficult to meet safety requirements.
[0061] In this embodiment of the present invention, a robust obstacle recognition algorithm based on 3D to 2D projection is used for obstacle recognition. First, the filtered 3D point cloud is projected onto the 2D image plane using the camera intrinsic parameter matrix to generate a 2D mask of the obstacle distribution. The projection process uses a perspective transformation model. For a 3D point (x, y, z), its pixel coordinates (u, v) on the image plane are:
[0062]
[0063] where f x 、f y is the focal length of the camera internal parameter, C x 、C y is the optical center coordinate.
[0064] In some embodiments, morphological processing techniques are used to eliminate noise and holes in the projection mask. Specifically, a closing operation is used to process the binary mask by first dilating and then eroding. Using a 3×3 rectangular structuring element effectively connects adjacent discrete points, filling small holes while maintaining the overall shape of the obstacle. The closing operation reconnects fragmented areas caused by discontinuous depth data, forming a complete obstacle outline.
[0065] In some embodiments, an intelligent obstacle identification strategy based on connected domain analysis employs an eight-connected domain algorithm. This algorithm determines the connectivity of pixels in eight directions: up, down, left, right, upper left, lower left, upper right, and lower right. The processed binary mask is segmented, and the area of each connected domain is calculated. An area threshold is set to filter out noise regions with an area exceeding the threshold, retaining only connected domains with an area greater than the threshold as true obstacles. This method effectively distinguishes small scattered points caused by sensor noise from real, large obstacles.
[0066] In some embodiments, an obstacle measuring 5cm×5cm×5cm is placed at the farthest point in the x-direction of the robot's workspace. The measured obstacle area is 50 pixels, which serves as the threshold. Because smaller objects are eroded along with the discrete points by the closing operation, once the threshold is determined, any object larger than this object or closer to the trinocular camera will have a pixel area greater than the threshold and will be considered an obstacle.
[0067] In some embodiments, a deep learning segmentation model is used to segment the robotic arm from the RGB image captured by the camera and remove it from the obstacle mask. For example, the YOLOv11 model can be used for segmentation. At least tens of thousands of data points are collected, including data from the robotic arm in different motion states, environments, and lighting conditions. This data must be continuously updated during subsequent optimization to cover most scenarios. The trained segmentation model can then efficiently and accurately remove the robotic arm from obstacles.
[0068] In some embodiments, the presence of obstacles is directly determined by the number of remaining point clouds. First, a discrete point filtering operation is performed on the remaining point clouds to eliminate the error scattered points generated by the device. Then, a suitable threshold is set for the number of point clouds for judgment, or a clustering algorithm is used to determine the size and number of obstacles, so as to determine whether there are obstacles.
[0069] Some embodiments disclose an obstacle detection system for an automatic charging device, including:
[0070] a point cloud acquisition module configured to acquire a depth image of the automatic charging scene using a camera to form a point cloud;
[0071] A point cloud filtering module is configured to perform multi-level filtering on the generated point cloud to filter out the environmental point cloud; wherein the multi-level filtering includes: filtering the point cloud based on the rectangular range of the manipulator workspace; filtering the vehicle point cloud based on the vehicle posture of the charging port; and filtering the manipulator point cloud;
[0072] The point cloud analysis module is configured to analyze the filtered point cloud to determine whether there are valid obstacles.
[0073] Some embodiments disclose an electronic device including a processor and a memory; the memory stores code, and when the code is processed by the processor, the obstacle detection method for an automatic charging pile disclosed in an embodiment of the present invention is executed.
[0074] Some embodiments disclose a computer-readable storage medium having computer executable code stored thereon. When the computer executable code is read and processed, the obstacle detection method for an automatic charging pile disclosed in an embodiment of the present invention is executed.
[0075] Example 1
[0076] Figure 2 This is a flow chart of the obstacle detection method applied to automatic dry charging equipment disclosed in Example 1;
[0077] In Example 1, Figure 2 As shown, the obstacle detection method applied to the automatic dry charging equipment includes:
[0078] This test begins;
[0079] Obtain the depth map from the trinocular camera and scale it, then calculate and generate the point cloud based on the camera's intrinsic parameters;
[0080] Convert the point cloud in the camera coordinate system to the robot arm base coordinate system;
[0081] Perform the first level of filtering: filter the point cloud according to the cuboid range of the robot arm's workspace;
[0082] Determine whether the filtered point cloud is empty. If so, end the detection; if not, then:
[0083] Perform the second layer of filtering: filter the vehicle point cloud based on the vehicle posture based on the charging port;
[0084] Determine whether the filtered point cloud is empty. If so, end the detection; if not, then:
[0085] Perform the third layer of filtering to filter the robotic arm point cloud based on the robotic arm modeling;
[0086] The remaining point cloud after three-layer filtering is mapped to a two-dimensional mask map, and connected domain analysis is performed after closing operation;
[0087] Determine whether the area of a connected domain is greater than the set threshold. If not, end the detection. If so, return the detection result of the obstacle.
[0088] The obstacle detection method for automatic charging equipment disclosed in an embodiment of the present invention combines multi-level point cloud filtering with connected domain analysis. First, the depth image is scaled to generate a point cloud, significantly reducing the number of point clouds. Then, a three-layer filtering strategy is used: robotic arm workspace filtering, vehicle point cloud filtering, and robotic arm model filtering. The environmental point cloud in the scene is completely filtered. The remaining point cloud is the obstacle point. Finally, the remaining point cloud is mapped into a two-dimensional mask image. Using connected domain analysis technology, an area threshold is set to determine whether there are valid obstacles in the mask image. The embodiment of the present invention uses improved MDH parameters to accurately model the robotic arm and uses an extended cylinder model to represent the volume of each joint of the robotic arm, effectively eliminating the interference of the robotic arm itself in the point cloud. This method achieves high-reliability obstacle detection while ensuring real-time performance. It can provide detection feedback within 30 milliseconds, ensuring that the robotic arm does not encounter obstacles during movement and achieving the purpose of safe charging. It can accurately identify obstacles in complex environments without relying on feature extraction algorithms, saving a lot of computing power. It also has strong robustness, providing a strong guarantee for the safe operation of the automatic charging system.
[0089] The technical solutions disclosed in the embodiments of the present application and the technical details disclosed in the embodiments are only exemplary to illustrate the inventive concept of the present application, and do not constitute a limitation on the technical solutions of the embodiments of the present application, and any conventional changes, substitutions or combinations of the technical details disclosed in the embodiments of the present application are within the protection scope of the claims of the present application.
Claims
1. An obstacle detection method for automatic charging equipment, characterized in that: Including steps: S1. Use a depth camera to obtain a depth image of the automatic charging scene to form a three-dimensional point cloud; S2. Perform multi-level filtering on the formed three-dimensional point cloud to filter out the environmental point cloud; wherein the multi-level filtering includes: Filter the point cloud based on the cuboid range of the robot's workspace; Filtering vehicle point clouds based on vehicle pose at the charging port; Filter the robotic arm point cloud; S3. Analyze the filtered three-dimensional point cloud to determine whether there are effective obstacles.
2. The obstacle detection method for automatic charging equipment according to claim 1, characterized in that: In step S1, the resolution of the depth image is dynamically adjusted. The original depth image is scaled from the original resolution W×H to W / scale_factor×H / scale_factor using the nearest neighbor interpolation scaling method of OpenCV according to the scaling factor parameter; where scale_factor is the scaling factor.
3. The obstacle detection method for automatic charging equipment according to claim 1, characterized in that: In step S2, filtering the robotic arm point cloud includes: The robotic arm is modeled according to the improved MDH algorithm, and the point clouds within the modeling range of the robotic arm are filtered out in the point cloud coordinate system.
4. The obstacle detection method for automatic charging equipment according to claim 3, characterized in that: In step S2, filtering the robotic arm point cloud includes: First, a precise mathematical model of the six-axis robotic arm was established. Using an improved MDH parameterization method, eight sets of transformation matrix parameters were defined. Based on these eight sets of transformation matrix parameters, the six axes and two long links were modeled. By multiplying the continuous homogeneous transformation matrices, the real-time position coordinates of each joint of the robotic arm were accurately calculated, accurately filtering out the point cloud information belonging to the robotic arm. The three axes and one connecting rod at the end of the robotic arm are extended. By calculating the direction vectors between adjacent joints, the starting end of each axis segment is extended backward by a fixed distance to ensure that the actual physical shape of the robotic arm is fully enclosed. An additional fixed-length gun head is added to the end of the robotic arm to cover the geometric range of the end effector and charging gun. Then, an accurate cylinder collision detection model is established, and the three axes and one connecting rod at the end of the robotic arm are modeled as a cylinder with a certain radius. For any point in the point cloud, the distance from the point to the cylinder axis is calculated: first, the point is projected onto the cylinder axis to determine whether the projected point is within the height range of the cylinder; then the vertical distance from the point to the axis is calculated and compared with the cylinder radius. If the vertical distance is less than or equal to the cylinder radius and the projection is within the height range, the point is determined to be inside the robotic arm and is removed from the obstacle point cloud.
5. The obstacle detection method for automatic charging equipment according to claim 1, characterized in that: Step S3 specifically includes: The filtered 3D point cloud is projected onto the 2D image plane through the camera intrinsic parameter matrix to generate a 2D mask of the obstacle distribution. The projection process uses a perspective transformation model. For a 3D point (x, y, z), its pixel coordinates (u, v) on the image plane are: where f x 、f y is the focal length of the camera internal parameter, C x 、C y is the optical center coordinate; The binary mask is processed by closing operation, and the use of 3×3 rectangular structure elements can effectively connect adjacent discrete points and fill small holes while maintaining the overall shape characteristics of the obstacle; Finally, an intelligent obstacle identification strategy based on connected domain analysis is proposed. The eight-connected connected domain labeling algorithm is used to segment the processed binary mask. The area of each connected region is counted, and an area threshold is set to filter out noise areas with too small an area. Only connected domains with an area larger than the threshold are retained as real obstacles.
6. The obstacle detection method for an automatic charging device according to claim 1, characterized in that: In step S3, the filtered three-dimensional point cloud is subjected to discrete point filtering to eliminate the error scattered points generated by the device, and then an appropriate threshold is set for the number of point clouds for judgment.
7. The obstacle detection method for an automatic charging device according to claim 1, characterized in that: In step S2, filtering the robotic arm point cloud includes: Use a deep learning segmentation model to segment the robotic arm from the RGB image acquired by the camera and remove the robotic arm from the obstacle mask.
8. An obstacle detection system for an automatic charging device, characterized in that: include: a point cloud acquisition module configured to acquire a depth image of the automatic charging scene using a camera to form a three-dimensional point cloud; A point cloud filtering module is configured to perform multi-level filtering on the generated three-dimensional point cloud to filter out the environmental point cloud; wherein the multi-level filtering includes: filtering the point cloud based on the rectangular range of the manipulator workspace; filtering the vehicle point cloud based on the vehicle posture of the charging port; and filtering the manipulator point cloud; The point cloud analysis module is configured to analyze the filtered three-dimensional point cloud to determine whether there are valid obstacles.
9. An electronic device comprising a processor and a memory; characterized in that: The memory stores a code, and when the code is processed by the processor, the obstacle detection method for an automatic charging pile according to any one of claims 1 to 7 is executed.
10. A computer-readable storage medium, characterized in that The medium stores computer executable code, and when the computer executable code is read and processed, the obstacle detection method applied to the automatic charging pile according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
An obstacle detection method based on depth camera
CN109272481A
Anti-collision method and system for mechanical arm in complex three-dimensional environment
CN111958590A
Obstacle detection method, device, equipment, medium, chip and vehicle
CN114842455A
