Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 7, No. 3, 2023 158 Path Planning for Unmanned Delivery Vehicles Based on Machine Vision Shuheng Gong1, a 1Automation Colleg3, Hangzhou University of Electronics& Science, Hangzhou, 310018, China agongshuheng4239@outlook.com Abstract: With the continuous development of e-commerce, the demand for express delivery services is constantly increasing. The emergence of unmanned express vehicles has perfectly solved the problem of end logistics. This article takes the living area of Hangzhou University of Electronic Science and Technology as an example. Based on the existing unmanned vehicle parking nodes, the greedy algorithm is first used to solve the optimal original path between the starting point and each node of the unmanned vehicle delivery route. Then, combined with machine vision theory, the real-time road conditions are measured through Hough transform and object detection, and the path planning is re carried out. Finally, based on Flexsim, an unmanned express vehicle delivery model for the living area of Hangzhou University of Electronic Science and Technology is established, Compare the efficiency of express delivery before and after machine vision path optimization to determine the degree of optimization in path planning. Keywords: Machine vision; Express unmanned vehicle; Path Planning; Target recognition. 1. Introduction With the vigorous development of the internet e-commerce industry, express delivery companies are springing up like mushrooms after a rain, and the path planning of unmanned express vehicles is receiving more and more attention from experts, scholars, and enterprises[1]. Against the backdrop of the booming development of the big data era, the mature development of 5G, artificial intelligence, and the Internet of Things technology is the prerequisite and foundation for building unmanned delivery[2]. By combining camera, infrared sensing, ultrasound, GPS, radar, and other technologies to control the movement of express delivery vehicles. In addition, in unmanned delivery technology, people can use a series of technologies such as video recognition and pattern recognition to achieve real-time scanning and reading of courier information for merchants and users, saving a lot of time and improving transportation efficiency[3]. The express delivery route problem is an important application field for unmanned vehicle path optimization. With the increasing popularity of online shopping consumption, the delivery volume of express delivery within university campuses has also increased, and express delivery operations are facing many problems[4]. In order to better meet the daily needs of teachers and students, improve the quality of campus express delivery services, optimize the terminal express delivery process using more intelligent methods, and make campus express delivery more reasonable, standardized, and convenient, it is necessary to solve the problem[5]. Based on the rapid development of 5G and other related technologies, autonomous driving technology is becoming increasingly mature, and the application scenarios of autonomous vehicles are constantly expanding, providing important development opportunities and technical support for end logistics distribution. The demand for express delivery on campus is concentrated, with fixed locations and good road conditions, making it the most suitable for unmanned vehicle delivery. However, due to significant differences in road facilities and conditions within each park, the path setting of unmanned vehicles lacks detailed optimization, resulting in reduced efficiency[6]. 2. Road Condition Detection 2.1. Hough Transform The Hough transform mainly transforms image space problems into parameter space problems. For an image, there is a one-to-one correspondence between the points in its space and the points in its parameter space. In Figure a, there is a straight line L in the Cartesian coordinate system, and the vertical distance from the origin o to the straight line is ρ . The angle between the perpendicular and the x-axis is θ. As shown in Figure 2.1, each coordinate point (x, y) on the line corresponds to a parameter coordinate system, and a curve can be obtained. To determine the parameters of a certain line, you can select two points with different coordinates, so that you can find two intersecting curves, and the intersection point of the curves is the parameter. As shown in Figure a. Therefore, the coordinates of the intersection points that the most curves pass through in the parametric coordinate system are the parameters possessed by the straight line[7]. The method to obtain this point is to use an accumulator to combine different (θ,ρ) By using an accumulator for statistics, the final result will be the largest statistic ( θ,ρ) As a straight line parameter. 2.2. Greedy algorithm Greedy algorithms refer to the process of always making the best choice when solving problems from the current perspective. That is to say, without considering overall optimization, the algorithm achieves a local optimal solution in a sense. The greedy algorithm cannot obtain the overall optimal solution of all problems, and the key is the selection of greedy strategies. Greedy algorithm is a simpler and faster design technique for solving some optimal solution problems. The characteristic of greedy algorithms is gradual progress, always making the optimal choice based on the current 159 situation and certain optimization measures[8], without considering various possible global situations, saving a lot of necessary time and exhausting all possibilities to find the optimal solution. The greedy algorithm adopts a top-down iterative method for continuous greedy selection. Greedy selection simplifies the problem into a small sub problem. For each greedy selection step, the optimal solution of the problem can be obtained. Greedy algorithms should not be traced back, as local optima must be obtained at each step, but the resulting global solution may not necessarily be optimal. Greedy algorithms typically follow the following steps: (1). Establish a mathematical model to describe the problem. (2). Divide the problem to be solved into several sub problems. (3). Solve each subproblem to obtain the local optimal solution of the subproblem. (4). Merge the local optimal solutions of the subproblems into the solutions of the original solution problem. The main problem addressed in this article is the unmanned vehicle delivery path planning problem, which is a classic travel salesman problem. The route selection of unmanned vehicles from one node to another is considered as a sub problem, with the shortest distance as the greedy strategy[9]. The unmanned vehicles depart from the source node, each time taking the node with the shortest distance as the next destination, ultimately passing through all nodes and returning to the source node, to obtain an approximately optimal path. 3. Route Planning for Express Delivery Unmanned Vehicles Due to the fact that Hangzhou University of Electronic Science and Technology is equipped with two unmanned vehicles, it is considered to divide the 10 nodes into two parts based on north and south (nodes 1-5 are north and nodes 6-10 are south), and the two unmanned vehicles will be responsible for distribution. Therefore, this article will plan the paths of the living areas on both north and south sides. 3.1. Road model drawing In order to facilitate the measurement of the distance between each node, it is necessary to first draw a road model diagram between each node. The following figure is a road model diagram based on AutoCAD, Figure 4-6 is the north road model of the living area, Figure 4-7 is the south road model of the living area, 0 is the location of Cainiao Station, 1-10 represents the location of each node, and the connecting line represents the road situation between nodes. 3.2. Drawing distance weight map Based on the road model diagram, calculate the distance between nodes, and then use Visio to draw an undirected distance weight map for solving the TSP problem, as shown in the following figure. Figure 1 shows the north of the living area, and Figure 2 shows the south of the living area The distance weight graph represents the connected roads and their lengths between each node and establish the distance matrix diagram between each node as follows: Distance matrix of nodes in the living area: ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ 0 90 210 370 340 300 90 0 160 320 290 210 210 160 0 160 130 90 370 320 160 0 120 250 340 290 130 130 0 120 300 210 90 250 120 0 ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ Figure 1. ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ 0 250 360 430 460 530 250 0 110 180 210 400 360 110 0 70 200 370 430 180 70 0 130 300 460 210 200 130 0 90 530 400 370 300 90 0 ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ Figure 2. 3.3. Optimal Path Solution for Unmanned Express Vehicles Based on Greedy Algorithm Based on the mathematical model of TSP problem, with the shortest distance as the greedy strategy, starting from the source node[10], each step selects the node with the shortest distance as the target, until passing through all nodes and returning to the origin, finally obtaining an approximately optimal path. Solution results: 0-1-2-5-4-3-0 Import the second distance matrix: 0-6-7-8-9-10-0 Based on the above method, the optimal delivery route for unmanned express vehicles in living areas is determined: Delivery route to the north of the living area: Cainiao Station - Node 1- Node 2- Node 5- Node 4- Node 3- Cainiao Station Delivery route to the south of the living area: Cainiao Station - Node 6- Node 7- Node 8- Node 9- Node 10- Cainiao Station 4. Simulation of Unmanned Express Vehicle Delivery Routes Based on Flexsim 4.1. Mathematical Model Conditional Assumptions The assumptions for establishing a mathematical model are: (1). Packages on campus can be mixed together for delivery; (2). The driving speed of unmanned vehicles remains constant; (3). Unmanned vehicles have a constant waiting time at the stopping point; (4). Do not consider the time required for students to pick up items; (5). If the degree of congestion on the road surface is greater than 50%, the driving speed will be reduced by 50%;4.1.1 ofo shared bicycle enterprises development business model 4.2. Establishment of simulation system According to the actual road model in the living area, a two-way network node is used to set the path for unmanned vehicles. The network node is connected to the temporary storage area using A, and to the forklift using S. As shown in the figure, the forklift connected to the network node will only 160 drive on the set path. 4.2.1. Entity parameter settings Forklifts are used to simulate unmanned express trucks, with parameter settings: average driving speed of 2m/s, and waiting time of 3 minutes at the stop. Due to the inability of forklifts to fully simulate the functions of unmanned express trucks, the unloading time is used to approximate the waiting time of unmanned express trucks at the docking point. The generator is used to simulate the function of starting an unmanned express truck at Cainiao Station, and is set to start once an hour based on the Arrival Schedule. The temporary storage area is used to simulate the delivery nodes of unmanned express vehicles. In addition to the coordinates corresponding to the coordinates calculated above, only transportation tools need to be set up for transportation. 4.3. Simulation process and data analysis The simulation of the unmanned express delivery vehicle delivery system in the living area simulated above shows that the unmanned vehicle completes a delivery task in the northern part of the living area over a distance of 960 meters, taking 1402 seconds, about 23 minutes. However, before optimization, it takes an average of 31 minutes, which improves delivery efficiency by about 25%[11]. The unmanned vehicle completed the delivery task in the southern part of the living area of Path 2, with a distance of 1180 meters and a time of 1521 seconds, which is about 25 minutes. Before optimization, it took an average of 38 minutes, an increase of about 34%. 5. Conclusion The main text is divided into two parts: the first part is based on machine vision to identify targets on the road and evaluate the road conditions; The second part is to model and calculate the optimal path of unmanned express vehicles in living areas using greedy algorithms with road length as the weight. Finally, modeling and simulation were conducted using Flexsim. The main conclusions drawn are as follows: (1). Obtain relevant data on the current unmanned express vehicle delivery system through investigation: unmanned express vehicle parameters, running time, path, and express traffic. (2). After optimization, the delivery distance of unmanned express vehicles has been reduced, the number of stopping points has been reduced, the delivery time has been reduced, and the delivery efficiency has been significantly improved. Applying unmanned express vehicle technology to campuses not only improves delivery efficiency and effectively solves the "last mile" problem of campus delivery, but also has important significance in ensuring campus epidemic prevention and safety. Machinery replaces manpower, and automation is the theme of the times[12]. At present, the size of unmanned express vehicles determines that they are still in a niche field. Studying and optimizing the path of unmanned vehicles can help the development of the unmanned vehicle industry, and also enhance the public's understanding of unmanned express vehicles, enabling them to integrate into the express industry more quickly and providing convenience for the public References [1] Song, W. (2022) A novel solution for smart unmanned minibus based on intelligent fusion sensing technology. Journal of Physics: Conference Series, 3. [2] Huda, A., Rabeb, M., Hadi, O., et al. (2023) A matching game- based crowdsourcing framework for last-mile delivery: Ground-vehicles and unmanned-aerial vehicles. Journal of Network and Computer Applications, 3. [3] Wu, Z., Dong, S., Yuan, M., et al. (2023) Rotate artificial potential field algorithm toward 3D real-time path planning for unmanned aerial vehicle. Journal of Aerospace Engineering, 4. [4] Zhang, S., Shen, A., Luo, X. (2023) The path following of intelligent unmanned vehicle scheme based on adaptive sliding mode-model predictive control. Journal of the Franklin Institute, 4. [5] Chen, J., Li, M., Su, Y., et al. (2023) Direction constraints adaptive extended bidirectional A* algorithm based on random two-dimensional map environments. Robotics and Autonomous Systems, 5. [6] Hu, Y. (2022) Analysis of the development prospects of intelligent logistics terminal distribution. China Logistics and Procurement, 650 (13): 57-58. [7] Lin, Z. (2022) Technology empowerment, upgrading of express terminal technology. Logistics Technology and Application, 27 (06): 6. [8] Tang, T., Chen, Y., Liang, Z., et al. (2022) Application and analysis of unmanned delivery vehicles in community fresh delivery: Taking Longcheng Pangu Community, Sucheng District, Suqian City as an example. Inner Mongolia Science and Technology and Economy, 508 (18): 6. [9] Liu, X. (2022) Contactless delivery is on the rise. China Logistics and Procurement, 649 (12): 34-35. [10] Chen, S., Xu, C., Liang, P. (2022) Research on innovation of end logistics delivery models in universities in the era of big data. Market Weekly, 35 (12): 7. [11] Ma, D., Chen, M. (2012) Logistics cost analysis of distribution centers based on K-Means clustering algorithm. Logistics Technology, 35 (10): 2. [12] Wang, Y., Wang, W., Li, X. (2018) Location selection of distribution centers based on K-Means clustering algorithm and analytic hierarchy process. Economist, 11: 2.