^{*}Algorithm for Automatic Charging Robot Obstacle Avoidance Path Planning in Complex Environments

^{*}Algorithm for Automatic Charging Robot Obstacle Avoidance Path Planning in Complex Environments

^{*}Algorithm for Automatic Charging Robot Obstacle Avoidance Path Planning in Complex Environments

A new and improved RRT^{*} algorithm has been developed to address the low efficiency of obstacle avoidance planning and long path distances in the electric vehicle automatic charging robot arm. This algorithm enables the robot to avoid obstacles, find the optimal path, and complete automatic charging docking. It maintains the global completeness and path optimality of the RRT algorithm while also improving the iteration speed and quality of generated paths in both 2D and 3D path planning. After finding the optimal path, the B-sample curve is used to optimize the rough path to create a smoother and more optimal path. In comparison experiments, the new algorithm yielded reductions of 35.5%, 29.2%, and 11.7% in search time and 22.8%, 19.2%, and 9% in path length for the 3D environment. Finally, experimental validation of the automatic charging of electric vehicles was conducted to further verify the effectiveness of the algorithm. The simulation experimental validation was carried out by kinematic modeling and building an experimental platform. The error between the experimental results and the simulation results is within 10%. The experimental results show the effectiveness and practicality of the algorithm.

^{*}

With the rapid development of driverless and electric vehicles, electric vehicles have become a significant research hit in automatic charging [

Contemporary scholars have done a great deal of research on the methods and strategies of robotic arm path planning [^{*} algorithm [^{*} algorithm. These methods are more suitable for the path planning of mobile robots in two-dimensional maps, and the operation is complicated and time-consuming in the high-dimensional space of robotic arms. To solve path plans in high-dimensional space, LaValle [^{*} algorithm to address the problem of slow convergence of the RRT^{*} algorithm. It is shown experimentally that the algorithm can further improve performance by combining it with other sampling strategies. However, it has not been verified in the high dimensional environment, which cannot guarantee the good practicability of the manipulator. Wang et al. [^{*} algorithm. The method retains the advantage of bi-directional search, resulting in shorter paths. Simulation experiments show that KB-RRT^{*} performs better in path length, achieving comparative performance in terms of the number of iterations and nodes compared to K-RRT. But the failure rate is higher in high dimensional environment. Yuan et al. [

Current research on trajectory obstacle avoidance for automatic charging robots leaves much to be desired, such as the long movement time and the extended movement distance of some improved RRT^{*} during trajectory obstacle avoidance. An improved RRT^{*} algorithm is proposed in this paper to improve the efficiency of the RRT^{*} algorithm in path planning. The main improvements are in the algorithm’s efficiency, the search time, and the path distance. And it can effectively solve the problems of many planning branches and low success rates in the complex environment of high-dimensional space. In addition, the proposed random tree node expansion control strategy improves the blindness of spontaneous tree node expansion; the proposed random tree node expansion capability detection strategy improves the convergence efficiency of the algorithm by reducing invalid nodes.

In this paper, we apply machine vision algorithms [

Firstly, the charging port is roughly localized based on the automatic charging device by the homemade dataset, self-trained YOLOv4 target detection deep learning algorithm. Then the traditional image processing methods such as Hoff circle transform feature point extraction, KM feature matching algorithm, and single response matrix solution are used to precisely locate the charging port. The spatial position coordinates are obtained to provide the target position for the movement of the charging robot arm.

Secondly, the RRT^{*} algorithm is improved to enable better obstacle avoidance for complex environments. The convergence times and path distances of the improved RRT^{*} and RRT^{*} and RRT in two and three dimensions are compared. The outcomes demonstrate that an improved RRT^{*} algorithm may converge more quickly and precisely. Target points can be located rapidly.

Finally, the motion path of the charging robotic arm is planned based on the obtained vehicle charging port position. Forward and reverse kinematics analysis of the automatic charging device based on the D-H parameter method. Determine the transformation relationship between the end of the robotic arm and each joint variable of the robotic arm. D-H kinematic modeling of the automatic charging robotic arm based on the Matlab Robotics Toolbox and verification of its workspace accuracy. Finally, experimental verification was conducted to finally achieve accurate docking of the automatic charging.

Electric vehicles are to be charged automatically. The position of the vehicle charging port must first be determined. The identification and positioning of the vehicle charging port is part of a precise positioning process. The sensor used in the process is a local camera, and the calibrated camera captures the image of the vehicle’s charging port to be charged. The YOLO identification and ROI extraction, Hoff circle detection, and other image processing processes are completed to obtain the location information of the vehicle charging port and guide the charging gun to complete the docking with the charging port [

The YOLOv4 algorithm [

The composition and meaning of the basic components in the figure are:

CBM [

CBL: Convolution block consists of Conv + Bn + Leaky_relu activation function.

Res unit: Residual block consists of two convolutional blocks and an add layer, which can build a deeper network by drawing lessons from the residual structure in Resnet network.

SPP: Spatial Pyramid Pooling. The multi-scale fusion was carried out with the maximum pooling of 1 × 1, 5 × 5, 9 × 9, 13 × 13.

In this paper, the YOLOv4 algorithm is adopted based on its performance comparison with other commonly used target detection algorithms, as shown in

To obtain location information, image recognition and target detection algorithms need to be applied to the camera images, requiring real-time computing capability for the automatic charging system. The Jetson Nano addresses this need by running multiple neural networks simultaneously for various AI applications like object detection, speech processing, and image classification. Equipped with a quad-core CORTEX-A57 processor, a 128-core Maxwell GPU, and 4 GB of LPDDR RAM, the Jetson Nano delivers a powerful computing performance of 472GFLOPS and supports popular AI frameworks and algorithms.

The coordinates captured through the camera on the auto-charge are a rough value whose main function is to provide information on the general location of the charging port, which is used to guide the robotic arm joint to drive the charging gun to the nearby area. Since the camera used lacks depth information, it cannot obtain the distance between the charging gun and the plane where the charging port is located, so the coordinates cannot be determined directly, but the location of the charging port can be determined by the transformation relationship between the two pictures. The specific approach is to first human control the automatic charging device to achieve docking, and then control the charging robotic arm to exit along the direction of the central axis of the charging port to a certain distance

After capturing the image, the image needs to be processed, firstly extracting the location of the charging port in the image and segmenting its area to remove the interference of the background part. The YOLO algorithm is used in the step of determining whether the charging port exists or not. Based on the YOLOv4 network model, images of charging ports are collected, a dataset is created, and a model weight file specifically for identifying charging ports is trained by itself.

The step of segmenting the charge port region is called ROI extraction [

In this study, the rectangular box drawn by YOLOv4 in identifying the charging port is used. to locate the charging port, as shown in

To identify vehicles and charging ports, the YOLOv4 algorithm is employed, and approximately 1000 parking images are collected for each. This results in a total of 2000 images that comprise the dataset, as depicted in

The purpose of feature point detection is to obtain distinctive feature points of the charging port in the picture to be detected for matching localization, as shown in

A YOLOv4 convolutional neural network is trained using a sample set until the loss curves and evaluation indicators reach a stable state, and 100 iterations are performed. The training process is monitored by plotting the training set loss and learning rate curves in

Method | AP^{val} |
AP^{test} |
Speed_{GPU} |
FPS |
---|---|---|---|---|

YOLOv3 | 33 | 33 | 6.7 | 170 |

YOLOv4 | 44 | 44 | 7.0 | 220 |

In this paper, the complexity of the target detection algorithm is calculated by the time complexity. To calculate the complexity of the YOLOv4 algorithm, it depends on the size of the input image, the depth of the network, and the hardware device. It takes about 14 s to process 2000 datasets.

In addition to deep learning to determine the specific location of the charge port coordinates, camera calibration is also required. Camera calibration refers to the relationship between the location of the camera image pixel points and the corresponding real environment point location. The calibration parameters mainly include internal and external parameters, where the internal parameter is the characteristic parameter of the camera itself. In contrast, the external parameter is the camera’s pose in the world coordinate system. The derivation of the formula leads to:
_{x} _{y}_{0}, v_{0}

From the Homography Matrix [_{1} (u_{1}, v_{1})_{2} (u_{2}, v_{2})_{1 }= _{2}_{2 }= _{1}

^{T} is a point in space, the picture taken by the camera at the initial position is image1, i.e., the positioning reference picture, at which point the movement of the camera has no rotation and no translation. is the unit matrix, is 0. _{1} (u_{1}, v_{1}, 1)

After the camera has moved with the rotation matrix _{2}_{2}, v_{2}, 1

The point

By combining

Because of the scale invariance of homogeneous coordinates _{1}_{2}_{1}_{2}

In the charging port identification and positioning process, the shooting position of the positioning reference picture image1 is located directly in front of the vehicle charging port, as shown in _{cam1}

The position of the picture to be detected varies depending on the result of the rough positioning, note that the local camera position at this point is _{cam2}

The Homography Matrix formed by rotation matrix

The relationship among the three is as follows:

The transformation of the coordinates of the same point _{cam1}_{cam2}

However, it should be noted that _{cam1}_{cam1}

A diagram of the RRT expansion process is shown in

The RRT algorithm is based on the following pseudo-code. The pseudo-code of the RRT algorithm is shown below:

The effectiveness and completeness of the RRT algorithm have been well verified, but the algorithm still suffers from low search efficiency, non-optimal paths, and excessive memory consumption.

Therefore, some scholars have proposed the RRT^{*} algorithm, which adds two new optimization-seeking processes, selecting the parent nodes and reconnecting them, when performing random tree expansion. In addition to adding the new node obtained by sampling to the tree, the algorithm also re-searches for the existence of a new parent node among the tree nodes contained within a circular neighborhood at a certain distance from the new node. If the new node is connected to that parent node to obtain a less costly path, the new node is reconnected to the parent node. The RRT^{*} algorithm process is shown in ^{*} algorithm is shown below.

The traditional RRT^{*} algorithm is asymptotically optimal, and its memory consumption and computational effort to prune the random tree

An improved RRT^{*} path planning algorithm for complex environments with multiple obstacles is proposed for the RRT algorithm memory consumption problem. The algorithm can improve the efficiency of the RRT^{*} search and speed up the convergence speed, reducing memory consumption. The improved RRT^{*} algorithm first simplifies the global raster map, based on which it finds the optimal set of path points from the starting point to the target point. The path is then used as a guide path for the algorithm. Then the guide path is expanded by an intelligent sampling factor to obtain an intelligent sampling region. And combine the un-simplified global raster map and the smart sampling area, and continuously iterate the search in the intelligent sampling area. A cost-effective, collision-free path from the starting point to the target point is obtained. Finally, combining the rotation radius of the automatic charging device and the B-sample curve-based path optimization, an optimized path with a smooth path and continuous curvature is generated. Thus, the mobile robot reaches the target point quickly, smoothly and safely along this globally optimized path.

For path optimization, the basic requirements must be met: continuity of the two-point trajectory, trajectory passing through a fixed point, and trajectory without collision. Each straight line is divided into small paths according to the nodes, and the time t for the robot arm to pass is assigned by the path length and the average speed, for which purpose, let

^{*} algorithm flow.

Two experiments are designed to verify the improved RRT algorithm’s effectiveness. The first set of experiments does not consider the collision detection of the robotic arm, treats the robotic arm as a mass point in space, and conducts path planning simulation experiments on standard RRT, RRT^{*} and improved RRT^{*} in two-dimensional and three-dimensional space, respectively. In contrast, the second set of experiments builds an electric vehicle automatic charging model and completes the automatic charging of the vehicle through the algorithm.

Set the simulation field (simulation field size 200 * 200), the geometry inside the box represents the obstacle, the area outside the geometry is the reachable area, and set the step size to 20. The maximum number of iterations is 3000. the MATLAB experimental platform is 2018b and 50 simulations are performed and the average value is taken. The thin short lines indicate the random tree branches, and the thick lines connecting the start and target points indicate the final generated paths. The simulation experiments ignore the robot’s own size and consider the environment after puffing. The same start point, end point and obstacles are designed when the environment is known. The comparison results of RRT, RRT^{*}, other improved RRT^{*} algorithms, and the improved RRT^{*} algorithm in this paper are shown in the simulation experiments comparing the four algorithms in

According to the experimental results in ^{*} algorithm, and other improved RRT^{*} algorithms, our improved RRT^{*} algorithm consumes 24.2%, 26.0%, and 6.9% less time, and the path cost is the length of the whole path from the beginning to the end of the path, and the path cost is reduced by 22.9%, 15.9%, and 7.5%, respectively. In Environment B, our improved RRT^{*} algorithm in this paper takes 10.1%, 24.8%, and 5.7% less time and the path cost is 20.9%, 15.7%, and 6.2% less, respectively.

Type of algorithm | Time spent in Environment A (s) | Path length in Environment A | Time spent in Environment B (s) | Path length in Environment B |
---|---|---|---|---|

RRT | 3.72 | 467 | 5.47 | 633 |

RRT^{*} |
3.81 | 428 | 6.56 | 594 |

Other improved RRT^{*} |
3.03 | 387 | 5.23 | 534 |

Our improved RRT^{*} |
2.82 | 360 | 4.93 | 501 |

The size of the simulation map is 250 * 250 * 250; the starting point is (10, 10, 10), and the ending point is (200, 200, 200). And other parameters are kept the same as in the two-dimensional space experiment. The three-dimensional comparison results of RRT algorithm, RRT^{*} algorithm, other improved RRT^{*} algorithm and our improved RRT^{*} algorithm are shown in ^{*} algorithm in this paper reduces the invalid expansion of the random tree and the obtained paths are smoother. According to the experimental results in ^{*}, and other improved RRT^{*} algorithms, our improved RRT algorithm takes 35.5%, 29.2%, and 11.7% less time, and the path length is reduced by 22.8%, 19.2%, and 9%, respectively. It shows that the improved RRT^{*} algorithm in this paper has a good improvement in time and path length to meet the requirements.

Type of algorithm | Time spent (s) | Path length |
---|---|---|

RRT | 5.83 | 469 |

RRT^{*} |
6.1 | 448 |

Other improved RRT^{*} |
4.89 | 398 |

Our improved RRT^{*} |
4.32 | 362 |

The overall structure of the electric vehicle automatic charging robot arm is shown in

Based on the principle of establishing the D-H coordinate system, the truss charging robot arm is modeled with the modified DH coordinate system shown in

The standard D-H modeling of the truss auto-charging robot was carried out to obtain the D-H parameters of the kinematic model, θ,

Joint | _{i} |
_{i−1} |
_{i} |
||
---|---|---|---|---|---|

Joint 1 | 90° | 0 | 0 | 90° | _{1} |

Joint 2 | 90° | 0 | 0 | 90° | _{2} |

Joint 3 | 90° | 0 | 0 | 90° | _{3} |

Joint 4 | 0 | 0.03 | 0 | 0 | _{4} |

Joint 5 | 0 | 0.1 | 0 | 90° | _{5} |

The joint angle is known, and the process of finding the spatial attitude and position of the end of the truss charging robot is the positive kinematic solution. The chi-square transformation matrix of two adjacent links is:

The transformation matrix of two adjacent connecting rods can be derived from the above equation as follows:

The total flush transformation matrix at the actuating end of the truss charging robot can be introduced from the second transformation matrix of the two adjacent connecting rods with respect to the total flush transformation matrix based on the following:

Based on the spatial location of the target position point, solve for the distance travelled by joint 1, joint 2 and joint 3:

By simplifying the above equation, we get:

From the above equation, we can see that:

Solve for the rotation angle of joint 4 and joint 5:

The working space of a truss charging robot arm is the spatial range that the device can reach during normal operation, i.e., the maximum range in which the origin of the end joint coordinate system is active in space. The working space of the truss charging manipulator’s arm is denoted as

Build an automatic charging robotic arm obstacle avoidance experimental platform, which consists of an automatic charging robotic arm, control box, electric vehicle, and PC side (CPU: Intel(R) Core(TM) i7-12700K @5.0 Ghz, GPU: NVIDIA GeForce GTX 2080Ti), etc. This paper uses the motion planning platform MoveIt! and the physical simulation platform Gazebo, two plug-in modules in ROS, to model and simulate the automatic charging device. The modeling and simulation environment used in this paper is Ubuntu 18.04, ROS melodic, MoveIt!

According to the built-in experimental platform, a virtual working platform is developed, as illustrated in ^{*} with RRT^{*} and the optimization data of the RRT algorithm in real and virtual experimental situations.

To verify the realism of the simulation results, the experimental verification is carried out by the experimental platform of the automatic charging robotic arm trajectory obstacle avoidance in ^{*} algorithm were measured separately for 20 times. By comparing the motion times obtained experimentally with those optimized by the simulation, it can be seen. The range does not exceed 10%, as shown in ^{*} algorithm to the automatic charging robot arm for obstacle avoidance.

The current research on the automatic charging of electric vehicles mainly focuses on industrial robotics, with little research on charging port identification and path planning. Therefore, it is crucial to study the recognition of charging ports for electric vehicles and the ability to achieve automatic charging robots that can avoid obstacles in complex environments after recognition. This paper presents an improved RRT^{*} path planning algorithm based on a complex multi-obstacle environment. The algorithm can achieve fast search in the global range and search for optimal paths in complex environments. Then, through continuous iterative search, an asymptotically optimal and collision-free path is obtained from the starting point to the target point. Finally, the path optimization based on the B-sample curve generates a smooth and continuous curvature-optimized path so that the automatic charging robot arm can reach the endpoint smoothly and safely. Finally, the effectiveness and superiority of the algorithm in this paper are verified by comparing the simulation experiments of the improved RRT^{*} algorithm with the RRT^{*} algorithm and the RRT algorithm. In future research, we should further improve the accuracy of target detection and the speed and accuracy of the automatic charging robot in docking the charging port. The optimal path is found, and the arithmetic power is effectively reduced. In future research, algorithms that enable fast recognition, reconstruction and transformation of obstacles in dynamic environments are explored to reduce the time overhead of the process and combine the two in an attempt to better implement robotic arm obstacle avoidance planning for dynamic environments.

This work was supported by National Natural Science Foundation of China (52175236).

The authors declare that they have no conflicts of interest to report regarding the present study.

^{*}: Triangular inequality-based implementation of RRT

^{*}with improved initial solution and convergence rate