Next Article in Journal
Binary Neural Networks in FPGAs: Architectures, Tool Flows and Hardware Comparisons
Previous Article in Journal
Unobstructive Heartbeat Monitoring of Sleeping Infants and Young Children Using Sheet-Type PVDF Sensors
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Application of Path Planning and Obstacle Avoidance for Riverbank Inspection

Department of Communications, Navigation and Control Engineering, National Taiwan Ocean University, Keelung 202301, Taiwan
*
Author to whom correspondence should be addressed.
Sensors 2023, 23(22), 9253; https://doi.org/10.3390/s23229253
Submission received: 6 October 2023 / Revised: 4 November 2023 / Accepted: 14 November 2023 / Published: 17 November 2023
(This article belongs to the Section Intelligent Sensors)

Abstract

:
Most coastal trash comes from land. To prevent and control ocean pollution, it should be handled using sources that can maintain a clean ocean and improve the marine ecological environment. The proposed system can be used to inspect riverbanks and identify garbage on riverbanks. This waste can then be cleaned up before flowing into the sea. In this study, we utilized an unmanned aerial vehicle (UAV) to inspect riverbanks and applied path planning and obstacle avoidance to enhance the efficiency of UAV performance and ensure good adaptability in a complicated environment. Since most rivers in the middle and upper sections of the study area are rough and meandering, path planning was first addressed so that the drone could use the shortest path and less energy to perform the inspection task. Branches frequently protrude from the riverbank on both sides. Therefore, an instant obstacle avoidance algorithm was added to avoid various obstacles. Path planning was based on an Improved Particle Swarm Optimization (IPSO). A fuzzy system was added to the IPSO to adjust the parameters that could shorten the planned path. The Artificial Potential Field (APF) was applied for real-time dynamic obstacle avoidance. The proposed UAV system could be used to perform riverbank inspection successfully.

1. Introduction

UAVs were first utilized primarily for military reconnaissance missions or attack operations. In recent years, drones have been mainly used in civilian applications, including aquaculture, material transportation, agricultural spraying, river inspection, rescue work, and live broadcasting. UAVs can now be used to address the shortage of human resources, improve work efficiency, and conduct field surveys in dangerous areas. Drones have brought great convenience to society in many aspects, but many problems must be solved, such as safety. In addition to safety, there are other issues that many researchers have attempted to decipher, including how to make drones arrive at their destination faster, complete work more efficiently, and avoid external threats, among others.
There are three types of UAVs: fixed-wing, helicopters, and multi-rotor. Each has its advantages and disadvantages. Fixed-wing UAVs have longer flight times and faster speeds and require more space for take-off and landing. Although helicopters can take off and land vertically, hover at the same altitude, and have exceptional flexibility, its complex structure makes operation difficult. Compared with the previous two, multi-rotor UAVs have slower flight speeds and lesser flexibility but can perform vertical take-off, landing, and hovering. Its structure is simple, making it convenient for users to set up sensors and to be used for riverbank inspection.
A six-axis UAV was used in this study. Compared with a four-axis UAV, a six-axis UAV is more stable and has a larger battery capacity, giving it longer endurance. The researchers of this study equipped the six-axis drone with a real-time kernel (RTK) four-galaxy positioning chip that is more precise than a global positioning system (GPS). An NVIDIA Jetson Xavier NX was used to calculate paths, avoid obstacles, and issue control commands to the flight control board, Pixhawk. A LiDAR scanner was employed to measure the surrounding objects’ distance and to obtain obstacle avoidance control. Since some rivers are located in relatively remote and isolated places, the environment will be impacted if wastes build up in the middle and upper reaches of the river because they will be challenging to find. Therefore, this study proposes a system to replace human labor for waste detection on river banks. By using the path planning method presented in this research, drones can fly to river locations that are difficult for people to access and conduct inspection activities.
With UAVs’ popularity, drone use is becoming more diverse, expanding its applications in many fields, such as bridge pier detection systems [1], solar panel maintenance [2], crop and weed detection [3], natural gas leakage estimation [4], fire detection [5], and many others. Therefore, this study explored finding the best route and avoiding dangerous conditions when encountering dynamic objects. There are many methods of planning path, such as Genetic Algorithm (GA) [6,7], Ant Colony Algorithm (ACA) [8,9], Rapidly Exploring Random Tree Algorithm (RRT) [10,11], Particle Swarm Optimization (PSO) [12,13], and Artificial Potential Field method (APF) [14,15]. These algorithms have their respective advantages and disadvantages, and numerous studies have been presented to optimize their ability to find paths better and faster [16,17,18,19,20,21]. In the following sections, the computational efficiency of various path planning algorithms will be discussed, and the courses will be compared to determine the most suitable path planning algorithm for this study. A path planning scheme was also proposed based on Improved Particle Swarm Optimization (IPSO) combined with a fuzzy system. The Artificial Potential Field was applied to obstacle avoidance control. The proposed Fuzzy IPSO (FIPSO) can generate smooth paths without sharp turns when the UAV encounters obstacles. FIPSO outperforms GA, ACO, RRT, PSO, and IPSO in the length of the planned path and time of computation. The UAV can fly along the path safely and automatically. The proposed system can be used to inspect riverbanks and identify garbage on riverbanks. The identified waste can then be cleaned up before flowing into the ocean, which can prevent and control marine pollution.

2. System Description

The hardware architecture is divided into two parts: the first part is the hexacopter system, and the second is the ground station. The hexacopter system comprises the flight control board, electrical transformer, RC receiver, RTK-F9P, motor, and onboard computer. The operator can control the ground station through a remote control or computer. Combined with the RTK base station, the UAV can obtain the coordinate positions more precisely. Figure 1 illustrates the UAV hardware architecture.
In response to this study, we investigated various UAVs on the market. Multi-rotor UAVs were selected due to their simple structure and small flight space requirement. Following a comparison between four-axis, six-axis, and eight-axis drones, the six-axis drone was more stable than the four-axis drone. In addition, it is lighter and easier to transport than an eight-axis drone. Figure 2 shows the chosen six-axis unmanned aerial vehicle.
The UAV system must determine the ideal path and communicate this information to the flight controller. Since the task requires extensive calculation in the control process and monitoring of various UAV information, an NVIDIA Jetson Xavier NX was chosen [22] as the onboard computer. An NVIDIA Jetson Xavier NX (NVIDIA, Santa Clara, CA, USA) has many desirable features, such as its small size, lightweight, and fast computing speed. It can also deliver up to 21 trillion operations, producing excellent path planning performance.
Drone automation can be achieved when used in conjunction with peripheral equipment. Most outdoor obstacle avoidance uses ultrasonic modules as sensors because sunlight often interferes with radar and LiDAR in the outdoor environment. However, the chosen RPLIDAR-S1 can function effectively even in an outdoor setting. The measurement distance can reach up to 40 m indoors and 30 m outdoors. A 360-degree detection can also be performed, which is highly appropriate for the task involved in this research.

3. Path Planning

The proposed system was designed to perform cruise tasks along the predetermined cruise points in response to river cruises. The first part of this study focuses on finding the best path, enabling the UAV cruise to use the shortest route, and improving the UAV’s work efficiency. The second part is more concerned with how the drone should respond if it encounters an unknown obstacle on the way to the cruise mission. The environment can generally be divided into two categories when the UAV performs path planning. The first category is the “known environment”. Regardless of whether the obstacle is stationary or dynamic, the path that can bypass obstacles can be estimated beforehand. The second category is the “unknown environment”. In this category, the UAV can generate a path through real-time estimation to bypass the obstacles it encounters. The Genetic Algorithm, Ant Colony Algorithm, Rapidly Exploring Random Tree Algorithm, Particle Swarm Optimization, and Artificial Potential Field method are some of the path planning methods available. This study compared these five algorithms to find the most suitable path planning algorithm that meets the research objectives.
(1)
Genetic Algorithm
A Genetic Algorithm is a heuristic search algorithm created using biological evolution. It imitates the organisms’ genetic evolution process to find the best solution. The three essential operations of the Genetic Algorithm are selection, crossover, and mutation. Selection is typically used to find the best individuals in the population. Conversely, crossover is the recombination of two individuals to produce the next generation of individuals who inherit their parents’ superior genes to produce offspring with higher fitness. There is a very slim possibility that the mutation will be triggered, keeping the genes diverse and preventing the population’s chromosomes from being too close and convergent to a locally optimal solution. At present, several methods have been proposed to improve the algorithm’s efficiency and convergence speed.
(2)
Ant Colony Algorithm
The Ant Colony Algorithm is often used to address the traveling salesman problem. It is a behavior that resembles the way ants navigate through paths to search for food. Initially, the ants randomly explore all directions, leaving gradually weakened pheromones along the road. When the ants cross the road with pheromones left, they decide whether to take this path. The pheromones will become stronger if they follow a particular path. The shorter the route, the less time the ants need to travel to and from their nest and foraging site, and the stronger the pheromones they leave behind, which all other ants will eventually follow to search for food. Although the Ant Colony Algorithm does not aimlessly search for foraging points like real ants do, it still has a high level of randomness, which also results in the possibility that the final path may not be the best.
(3)
Rapidly Exploring Random Tree Algorithm
Rapidly Exploring Random Tree Algorithm (RRT) is an algorithm for tree data storage architecture. It effectively explores high-dimensional nonconvex space and is often used to solve the path planning of robots in complex environments. RRT has the advantages of a simple architecture. It can perform large-scale spatial exploration without needing a pre-modeled space. Although RRT has numerous benefits, its randomness leads to some shortcomings in the algorithm, resulting from its failure to consider the spatial path cost when exploring.
(4)
Particle Swarm Optimization
Like the Genetic Algorithm, Particle Swarm Optimization (PSO) is an algorithm for solving optimization problems. PSO is updated with the cooperation of each particle, unlike the Genetic Algorithm, which uses genetics to produce the most adaptive offspring. PSO is an algorithm created by observing the bird flocks’ foraging behavior. Each particle represents a bird in the flock. The algorithm was updated primarily to adopt the two following points: decide where to fly based on one’s experience and determine the flight direction based on others’ experience. The behavior of the individual particles is unpredictable, but the groups’ behavior is predictable. Since the particles are focused on finding those that are better than them, they refer to and learn. Therefore, all particles will eventually move in a better direction. This study proposed an improved PSO with a fuzzy system that can modify the PSO’s parameters to adjust the obstacle’s avoidance distance and maximum step size.
(5)
Artificial Potential Fields
Artificial Potential Fields (APFs) are often used in robot path planning algorithms. The algorithm considers the target point and the obstacle objects that exert gravitational and repulsive forces on the device. The device will move along the resultant force of these gravitational and repulsive forces. To obtain the path, one needs to find the resultant force of the potential field, which is calculated using the two forces generated inside the potential field: repulsion and attraction.

4. Obstacle Avoidance

This study combined a fuzzy system with the Improved Particle Swarm Optimization (IPSO) algorithm to achieve path planning and obstacle avoidance. Since the LiDAR used for obstacle sensing in this study is two-dimensional, the path and obstacle avoidance did not consider the height factor. It only calculated for the path on the X-Y plane. The study referred to the modified and Improved Particle Swarm Optimization algorithm proposed by Zhang et al. [23]. They modified the algorithm in five ways:
  • The initialization of particle swarm;
  • Learning factors;
  • Inertia weight;
  • Updating the rule of the particle velocity;
  • The treatment of the particle crossing the boundary.
This study applied some concepts combining the benefits of IPSO and added a fuzzy system to modify the parameters.
(1)
Initialization of Particle Swarm
The initial particle distribution in PSO affects the algorithm’s efficiency. A uniform distribution is usually used in traditional methods to generate the initial position of the particle swarm. The uniform distribution has the advantage of being easy to implement, but it does not allow the particles to surround the optimal solution. To improve the initial distribution of particles, β function distribution was proposed.
β x = x a 1 ( 1 x ) b 1 0 1 t a 1 ( 1 t ) b 1 d t ,     0 < x < 1 .
In [23], set a = b < 1. The β(x) function will be a symmetrical U shape. The initial positions of the particles are distributed near the boundaries of the search space. A better initialization effect can be obtained when a = b = 0.8. The equation below demonstrates how to initialize the particle formula for each dimension, where M is defined as the number of particles, [ m i n j , m a x j ] is the range of the jth dimension, and X i is the candidate solution. A beta distribution can generate random numbers using the betarand function. In this formula, i = 1, 2, , M ,   j = 1, 2, , M , l is the lower bound, and u is the upper bound of the random value.
X i = m i n j + m a x j m i n j × b e t a r a n d l , u .
(2)
Learning Factors
Learning factors influence communication between particles. In the initial stages of this study, the researchers aimed the algorithm to focus on the ability to search globally. In the later stages, we wanted the algorithm to focus on local optimization so that it could converge to a globally optimal solution. Therefore, particles must have a strong self-learning ability at the beginning and will weaken as the operation progresses. The particles’ social learning ability slowly changes from the weakest to the strongest. The following formula is designed to dynamically change the state value to balance global search and local development:
c 1 = c 1 , i n i t i a l + c 1 , f i n a l c 1 , i n i t i a l max _ i t e r a t i o n × t .
c 2 = c 2 , i n i t i a l + c 2 , f i n a l c 2 , i n i t i a l max _ i t e r a t i o n × t .
Here, c 1 is a self-learning weight that allows the particles to remember their best position and compare the best position with the current position. c 2 is the social learning ability to record the best position of the particle swarm and compare the best position with the current position. c 1 , i n i t i a l and c 2 , i n i t i a l represent the initial values of c 1 and c 2 , respectively. c 1 , f i n a l and c 2 , f i n a l represent the final values of c 1 and c 2 , respectively. t is the current iteration number. max _ i t e r a t i o n represents the maximum iteration number.
(3)
Inertia Weight
Y. Shi and R. Eberhart introduced inertia weights into the Particle Swarm Optimizer [24]. The inertia weight is an important parameter for PSO. This parameter influences the PSO’s search capability. A larger inertia weight can improve the PSO’s global search ability, while a smaller inertia weight can enhance the PSO’s local optimization ability. A higher inertia weight is required in the beginning to focus on the global situation, and the inertia weight is gradually reduced as the operation is performed to enhance the local optimization ability.
w t = w m i n + w m a x w m i n λ γ λ , 1 t max i t e r a t i o n .
Here, t is the current number of iterations, and max _ i t e r a t i o n is the maximum iteration number. w m a x and w m i n are fixed values that are the maximum and minimum values of the inertia weight, respectively. Typically, the maximum value of inertia weight is set to 0.9, while the minimum value of inertia weight is set to 0.4 [20,21]. λ is a random variable greater than 0 and can also be set to a fixed value greater than 0. Combined with the inverse incomplete function γ to adjust the inertia weight, the formula is given as follows.
γ λ , a = 0 λ e t t 1 a d t
The maximum number of iterations is set to 1000; λ is set to 0.05, 0.1, and 0.3; and the change in inertia weight is shown in Figure 3. It can be seen that when λ is set to 0.05, the inertia weight is larger at the first half of the iteration, and the decreasing speed is faster than the other two. In the second half of the iteration, λ = 0.05 is close to the minimum value, strengthening the algorithm’s local optimization ability and effectively avoiding the phenomenon of early convergence.
In this study, two new dynamic change functions of inertia weight are added under the conditions that the maximum number of iterations is 1000, the maximum value of inertia weight is 0.9, and the minimum value is 0.4. First, the logarithm to generate a function for inertial weights was used with the following formula. Second, the first half of the iteration used a linear function to descend to the minimum value, while the second half had the inertia weight equal to the minimum value. Figure 4 [25] depicts the inertia weight changes.
w t = w m i n + l o g d 0.93 w m a x w m i n .
d is generated using the following formula:
d = 1 t max   i t e r a t i o n .
Figure 4 shows that the inertia weight generated by the logarithm can be kept at its maximum value at the start of the operation and then decrease at a faster rate. Compared with the other two, the linear function decreases the slowest in the early stages of the iteration, but the inertia weight in the later stages is equivalent to the minimum value, which can enhance the local optimization ability. In this study, we compared and added three inertia weight-changing functions to two different environments.
In the first environment, an obstacle with a radius of 45 and a center of (225, 225) was set up to test the algorithm’s performance when dealing with obstacles. As shown in Figure 5, the starting point is at (20, 20), while the ending point is at (350, 350). In the second environment, eight circular obstacles with a radius of 40 were set to test whether the algorithm would fall into a local optimal solution, as shown in Figure 6. Table 1 shows the comparison results of the running speeds. As seen in Table 1, using a linear function to change the inertia weight dynamically outperforms the other two.
(4)
Updating the Rule of Particle’s Velocity
To achieve global search and local optimization, a delta function was added to improve the particle velocity update rule, as shown below:
v i t + 1 = w t v i t + c 1 r 1 P i L x i t + c 2 r 2 P g L x i t + δ i ( t ) .
The δ formula is as follows:
δ i t = 1 t max i t e r a t i o n k 1 N i = 1 N P i L X i × r a n d .
Here, rand is a random number in the interval (0, 1), k is a fixed value greater than 0, and δ i t has a strong relationship with k. At the beginning of the iteration, the value of 1 t max _ i t e r a t i o n k is large, and so is the value of δ i t , while the value of δ i t gradually decreases as the iteration increases. 1 N i = 1 N P i L is the average of the particles’ best positions. When δ i t is large, the ability of the global search can be enhanced, and when δ i t decreases in the later stage, the ability of local optimization can also be enhanced. This method can significantly improve the balance between global search and local optimization.
(5)
Treatment of the Particle Crosses the Boundary
In PSO, the out-of-bounds processing of the particle position is typically performed by adopting a method wherein the particle position crosses and is equal to the boundary. Although this method is simple and straightforward, there are other better solutions than the boundary position. Therefore, an approach based on symmetric boundary mapping was used, as shown in Figure 7. [ m i n j ,   m a x j ] is the interval of the j dimension; if the particle position X i j crosses the boundary, it will be treated using the following formula. The particle outside the interval [ m i n j ,   m a x j ] can be transferred into the interval using Equation (11). If the particle position X i j is greater than m a x j , this X i j is guaranteed to be transferred into the interval, and the value is no smaller than m i n j . On the contrary, if X i j is less than m i n j , X i j is guaranteed to be transferred into the interval, and the value is no more than m a x j .
X i j = min   ( m a x j , 2 m i n j X i j ) ,   X i j < m i n j max m i n j , 2 m a x j X i j ,   X i j > m a x j .
(6)
Judgment of the Obstacles
Take its own position as the center of the circle, and take ρ as the search radius. If an obstacle between the current position and the next waypoint and the travel route is affected, call the path planning algorithm. Otherwise, go to the next waypoint. The formula for judging obstacles is as follows:
ρ > ( P 1 o b s 1 ) 2 + ( P 2 o b s 2 ) 2 .
( P 1 W 2 ) 2 + ( P 2 W 2 ) 2 = ( P 1 o b s 1 ) 2 + ( P 2 o b s 2 ) 2 + ( W 1 o b s 1 ) 2 + ( W 2 o b s 2 ) 2 .
Assume the UAV’s current position is ( P 1 , P 2 ), the position of the obstacle is ( o b s 1 , o b s 2 ), and the position of the next waypoint is ( W 1 , W 2 ). Equation (12) is used to judge whether obstacles exist within the search radius ρ, whereas Equation (13) is used to determine whether obstacles exist between the current position and the next waypoint position.
The LiDAR used in this study can detect obstacles at a longer distance, and we used path planning to find the shortest path in a known obstacle environment. Since the obstacles are known, the study calculated whether the obstacles would hinder the UAV from its starting position and set two criteria to judge.
  • The angle between the obstacle and the target point is smaller than the angle between the obstacle and the tangent.
θ o b s , t a r g e t < θ o b s , t a n g e n t .
2.
The distance between the starting point and the target point is greater than the distance between the starting point and the center of the obstacle.
d s t a r t , t a r g e t > d s t a r t , o b s .
If both conditions are met, the tangent can be used to calculate a new route, allowing the algorithm to generate a shorter path to avoid obstacles. Figure 8 shows that if the two conditions are met, the distance from the starting point to the target point is also greater than the distance from the starting point to the center of the obstacle when the angle between the obstacle and the target point (a1) is smaller than the angle between the obstacle and the tangent (a2). Obstacles were represented along the way so the researchers could use the tangents to help calculate the paths that generate shorter paths [25].
As shown in Figure 9, the angle between the obstacle and the target point is greater than the angle between the obstacle and the tangent, indicating that the condition was not satisfied and that there is no obstacle on the path to the target.
(7)
Fitness Function
Using the methods described in the previous sections, a new particle swarm x will be generated, and its fitness value will be calculated, as shown in the following formula:
m i n f x i = g 1 x 1 2 + g 2 x 2 2 + 1000 o b s 1 x 1 2 + o b s 2 x 2 2 .
Here, x i is the i-th particle of particle swarm x, ( g 1 , g 2 ) is the coordinate of the target point, ( x 1 , x 2 ) is the particle’s current position, and ( o b s 1 , o b s 2 ) is the coordinate of the nearest obstacle to the UAV. The smallest particle fitness value must be obtained, and the iteration must continue until the maximum number of iterations is reached.
(8)
Fuzzy IPSO
Due to the small number of obstacles encountered in this study, we used a fuzzy system to adjust the avoidance distance to obstacles and the maximum step size. Figure 10 shows the fuzzy sets, and the fuzzy rules are given as follows:
  • R 1 : if x is near and y is small, then S is short and T is near.
  • R 2 : if x is near and y is medium, then S is short and T is medium.
  • R 3 : if x is near and y is big, then S is medium and T is far.
  • R 4 : if x is medium and y is small, then S is medium and T is near.
  • R 5 : if x is medium and y is medium, then S is medium and T is medium.
  • R 6 : if x is medium and y is big, then S is long and T is far.
  • R 7 : if x is far and y is small, then S is long and T is near.
  • R 8 : if x is far and y is medium, then S is long and T is medium.
  • R 9 : if x is far and y is big, then S is long and T is far.
x is the distance from the current position to the tangent point, and y is the size of the detected obstacle. S is the distance from the current path node to the next node; it is the UAV moving distance from the current location to the following location in each computing iteration. T is the influence of the obstacle on the UAV; it is the safety distance between the UAV and the obstacle. The values of the distance are the defuzzified results obtained from the fuzzy computation. The equation of the defuzzification is shown in Equation (17).
Figure 10. Fuzzy sets.
Figure 10. Fuzzy sets.
Sensors 23 09253 g010
The defuzzification formula is as follows:
y * = j = 1 J y j μ c i ( y i ) j = 1 J μ c i ( y i ) .
Here, y j is the center of y of the j-th fuzzy rule, where y is the value that makes μ c i ( y ) maxima. J is the number of fuzzy rules. The y* is the defuzzification value of y.
When the UAV approaches an obstacle that must be avoided, the UAV can start correcting the path earlier. As the UAV travels around the side and back of the obstacle, it gradually shortens the distance to the obstacle to a safe distance. The Fuzzy IPSO adjusts the length of the step based on the size and distance of the obstacle, avoiding extra path distance caused by the excessive step length (as shown in Figure 11), where the starting point is at (0, 0), and the ending point is at (100, 100).
(9)
Dynamic Obstacle Avoidance
There are several methods for obstacle avoidance. Chengfu Jiang et al. improved the Artificial Potential Field method in 2021 [26]. In this study, the Artificial Potential Field method was applied to the real-time dynamic obstacle avoidance of UAVs so that UAVs could respond better when encountering unknown obstacles while performing tasks on a planned path [27].
  • Attractive Field
In the Artificial Potential Field (APF) method, attraction is the parameter used to find the target point. The attraction is typically proportional to the distance from the target point; the greater the attraction, the farther the distance from the target. To avoid too much attraction, the attraction gain is often used to adjust the attraction, as shown in the following formula:
F a t t = K a t t × g o a l x p o s x , g o a l y p o s y .
Here, K a t t is the attraction gain and is usually a constant, g o a l x , y is the target location, and p o s x , y is the current position. The amount of movement in the X and Y directions can be obtained by subtracting the current position from the target position and multiplying it by the attraction gain.
2.
Repulsion Field
The device will be repelled by the obstacle once it enters the obstacle’s influence range. The repulsive force is inversely proportional to the distance from the obstacle, suggesting that the closer it is to the obstacle, the greater the repulsive force. To avoid the algorithm falling into the local optimal solution when calculating the repulsion force, this study added a formula for calculating the minimum repulsion force. The formula is given as follows:
F r e p 1 = K r e p × 1 r o u 1 e f f × 1 r o u 2 × d i s t f a c t o r × ( o b s x p o s x , o b s y p o s y ) r o u F r e p 2 = K r e p × 1 r o u 1 e f f 2 × d i s t f a c t o r × d i f f d i s t   .
F r e p = F r e p 1 + F r e p 2 .
Here, F r e p 1 is a small repulsive force that allows the algorithm to avoid a localized optimal solution. F r e p 2 is the repulsion force of the obstacles, which allows the device to smoothly avoid obstacles. K r e p is the repulsion gain, which is a constant and is used to adjust the size of the repulsion. rou is the horizontal distance between the device and the obstacle, eff is the influence range of the obstacle, o b s x , y is the obstacle position, p o s x , y is the current position, and g o a l x , y is the target location. d i s t f a c t o r and d i f f d i s t are given as follows:
d i s t f a c t o r = g o a l x p o s x + g o a l y p o s y .
d i f f d i s t = g o a l x p o s x g o a l y p o s y .
3.
Total Potential Field
The total potential field is the resultant force of all obstacle’s attractive and repulsive potential fields. In the formula below, we quantified the displacement as 1 and added the V parameter to adjust the UAV’s flight speed:
F = V × ( F a t t + F r e p ) / | ( F a t t x + F r e p x ) , ( F a t t y + F r e p y ) | .
4.
Artificial Potential Field Problem
Aside from the issue of falling into the local optimal solution, the artificial potential field may encounter a situation in which obstacles appear at the target point, preventing the device from approaching the target point, as shown in Figure 12. When this happens, the drone will move to a new target point closest to the target point but not within the obstacle’s sphere of influence and land.

5. Results

When the UAV performs the task, known and unknown obstacles must be considered, and the obstacles are classified as static and dynamic. This study classified dynamic obstacles as unknown obstacles and used APF for obstacle avoidance calculations. Static and known obstacle path planning was obtained using Fuzzy IPSO. We assume the detected obstacles are circular. LiDAR can detect an obstacle’s size (width). From a UAV point of view, the maximum size of the detected obstacle will be a circular shape; its diameter is the detected width. When the UAV encounters an unknown obstacle, the APF is used for obstacle avoidance, and the drone is commanded to follow the new calculated path. The APF calculates the avoidance direction and movement speed in real time. When obstacle avoidance is completed, the UAV will decide whether or not to continue path tracking. If there is an obstacle between the current position and the next waypoint, path tracking is continued, and the UAV will fly back to the original planned route. If there is no obstacle between the current position and the next waypoint, the UAV does not need to perform path tracking. Instead, the UAV can fly directly to the next waypoint. Several situations were simulated, and after ten operations, computational efficiency and path optimization of various algorithms in the following environments were compared.
(1)
Large Static Obstacle
An obstacle with a radius of 60 was applied to test each algorithm’s path length and computing time when dealing with large obstacles. The operation is successful when the proposed system successfully guides the UAV to the end point. The process fails if it becomes trapped in a local optimum.
Initially, the Genetic Algorithm was applied to the simulation environment. Although the Genetic Algorithm is an algorithm for finding the optimal solution, it is ineffective in use due to the need to adjust various parameters and adaptation functions in the algorithm based on the environment. Figure 13 shows the result, where the starting point is at (0, 0), and the goal point is at (350, 350).
The Ant Colony Algorithm was then applied in the simulation environment. The Ant Colony Algorithm is often used to solve the TSP problem, but it can also achieve good results for path planning. However, if the area of the environment is too large, the operation time is too long. Figure 14 illustrates the result.
Next, the Rapidly Exploring Random Tree Algorithm was applied to the simulation environment. Since the Rapidly Exploring Random Tree Algorithm, Ant Colony Algorithm, and Genetic Algorithm are heuristic algorithms, path planning fails. The success rate of the Rapidly Exploring Random Tree Algorithm is related to the execution time and the number of nodes. Figure 15 illustrates the result.
Artificial Potential Field was then employed in the simulation environment. The result is shown in Figure 16.
Lastly, the proposed Fuzzy-Improved Particle Swarm Optimization (FIPSO) was applied to the simulation environment. Since an obstacle has two tangent points, the algorithm will first determine which path is better and keep it, as shown in Figure 17 and Figure 18.
Since the path generated by the first tangent is better, this study used the path improved by the first tangent. Table 2 illustrates the comparison results.
As seen in Table 3, each algorithm has undergone ten operations. Among them, the results of FIPSO and APF are the most consistent, with nearly identical values and paths each time. Although GA requires less operation time, the path’s instability makes GA a poor choice for path planning algorithms. The paths generated by ACO and RRT are also unstable, making the operation time too long.
(2)
Multiple Waypoints
Multiple waypoints were given in this case, and the UAV must go through all the waypoints to the end. There will be obstacles in the cruise mission. Figure 19 shows the simulated environment.
In simulation Environment 2, each algorithm ran ten times, as shown in Figure 20, Figure 21, Figure 22 and Figure 23.
As shown in Figure 24 and Figure 25, FIPSO calculates suitable tangent points for path planning and compares the path quality.
As can be seen from Table 4, the second tangent is better. Figure 25 illustrates the path.
Table 5 shows the performance of each algorithm in simulation Environment 2. It is apparent that in the simulated inspection environment, Fuzzy IPSO and APF perform well, but the APF performs slightly worse than Fuzzy IPSO. The other three have extremely unstable paths due to the randomness in Environment 2, resulting in poor performance.
(3)
Dynamic and Static Environments
FIPSO performs well compared to various path planning algorithms in the previous section, though the algorithm can also perform well when dealing with slow dynamic obstacles. However, obstacles the UAV encounters in the air are often faster, causing the path planning algorithm to fail in calculating the avoidance route, as illustrated in Figure 26. Therefore, the APF was used for dynamic obstacle avoidance, and the drone was commanded to follow the calculated path. When it encounters a moving obstacle, the APF calculates the avoidance direction and movement speed in real time, as shown in Figure 27, Figure 28, Figure 29, Figure 30 and Figure 31.
Initially, the FIPSO was used to plan the path with obstacles and find the best path, as shown in Figure 27.
Then, the APF was used for obstacle avoidance. When the UAV encounters unknown dynamic obstacles, it immediately avoids the obstacles, as shown in Figure 28.
When the obstacle avoidance is completed, the UAV will decide whether or not to continue the path tracking. If there is an obstacle from the current position to the end point, the path tracking is continued. As shown in Figure 29, the dotted line is the path generated using APF combined with path tracking, the dashed line is the optimal path for static obstacles generated by the FIPSO, and the arrow line is the moving direction of the dynamic obstacle.
Figure 30 and Figure 31 show no obstacle between the current position and the end point after avoiding an unknown dynamic obstacle, indicating that the UAV does not continue to perform path tracking. Instead, the UAV can fly directly to the end point.
(4)
Campus Test
The field test was first conducted on campus. The tasks include path planning and obstacle avoidance. A river-side test was also performed. The UAV system first detected the obstacles in the air and planned a path. Then, the UAV performed path tracking. When the UAV encounters dynamic obstacles during flight, it can avoid them immediately. A target point was set, and the UAV encountered dynamic obstacles on the way to the target point, as shown in Figure 32, Figure 33, Figure 34, Figure 35, Figure 36 and Figure 37.
In the second test, two waypoints and a destination were set. There were no obstructions on the way to the first waypoint. A static obstacle was present on the way to the second obstacle. Figure 38, Figure 39, Figure 40 and Figure 41 show a dynamic obstacle on the way to the end point.
(5)
Riverbank Test
First, the waypoints were planned according to Google Maps. Waypoints are the turning points of the river. Then, static obstacles were marked on the map manually. Finally, the path planning method was applied to obtain the optimal path. Then, the optimal path was embedded in the onboard computer with path coordinates. The Tienliao River (Keelung City, Taiwan) was the test field, as shown in Figure 42. During the riverbank inspection, garbage on the riverside was detected using an onboard image recognition system [28], as shown in Figure 43 and Figure 44. The flight path, waypoints, and garbage information were sent back to the ground base control center via WiFi, as shown in Figure 45. According to the results of the field tests, the proposed UAV system can perform riverbank inspection successfully.

6. Conclusions

This study focused on path planning and obstacle avoidance involved in automated riverbank inspection. The results suggested that the shorter the planned path, the less energy is required, making the inspection more efficient with a longer operating distance. In this study, the Improved Particle Swarm Optimization combined with a fuzzy system and system equations was proposed to handle UAV cruise tasks for fixed-point rivers. An effective avoidance action could be taken if an obstacle was detected on a flight path. The comparison results of the different path planning algorithms revealed that the proposed Fuzzy IPSO was more efficient for path planning than conventional methods, such as GA, ACO, RRT, and PSO. Fuzzy IPSO also outperformed the recently issued IPSO in path length and computation time. The proposed system was applied to inspect several rivers in Taiwan, which were the Tienliao River, Sieding River, and Keelung River. The UAV flew along the planned paths and avoid obstacles automatically. Most trash on the riverbank was identified, and the UAV system transmitted garbage information to the control center in real time. The proposed system could relieve the workforce in riverbank inspection and significantly reduce costs.
The UAV would sometimes shake up and down due to the strong wind during the field test on the river. However, if obstacles are above or below the UAV, the UAV is prone to crashing. More sensors can be added in the future so that the sensors can not only sense obstacles in the 2D plane but also detect obstacles in all 3D directions to increase the UAVs’ safety. In this study, it was assumed that the obstacles are mainly circular, although they often have different shapes in reality. Future research is suggested to consider more shapes when running simulations. This improvement allows the algorithm’s plan to be reduced even further. The most serious problem encountered in this study was the abnormal compass caused by magnetic field interference. When the UAV flies along a river, it will usually encounter bridges. Most bridges are reinforced concrete bridges; under certain conditions, the magnetic field generated by the steel bars may cause the UAV’s compass to malfunction, putting the UAV in danger of crashing. It is possible to prevent magnetic field interference by using a three-axis geomagnetic sensor in future works.

Author Contributions

Conceptualization, J.-G.J.; Methodology, J.-W.J.; Software, J.-W.J.; Validation, J.-W.J.; Formal analysis, J.-G.J.; Investigation, J.-G.J.; Resources, J.-G.J.; Data curation, J.-W.J.; Writing—original draft, J.-W.J.; Writing—review & editing, J.-G.J.; Visualization, J.-W.J.; Supervision, J.-G.J.; Project administration, J.-G.J.; Funding acquisition, J.-G.J. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Science and Technology Council, Taiwan (MOST 110-2221-E-019-075-MY2) and Rongcheng Circular Economy and Environmental Protection Foundation, Taiwan (Grand 110A29004).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Lee, R.C.; Chen, Y.H. Bridge Pier Inspection System Using UAV. In Proceedings of the 2020 IEEE Eurasia Conference on IOT, Communication and Engineering, Yunlin, Taiwan, 23–25 October 2020; pp. 32–35. [Google Scholar]
  2. Higuchi, Y.; Babasaki, T. Failure Detection of Solar Panels Using Thermographic Images Captured by Drone. In Proceedings of the 2018 7th International Conference on Renewable Energy Research and Applications, Paris, France, 14–18 October 2018; pp. 391–396. [Google Scholar]
  3. Pignatti, S.; Casa, R.; Harfouche, A.; Huang, W.; Palombo, A.; Pascucci, S. Maize Crop and Weeds Species Detection by Using Uav Vnir Hyperpectral Data. In Proceedings of the 2019 IEEE International Geoscience and Remote Sensing Symposium, Yokohama, Japan, 28 July–2 August 2019; pp. 7235–7238. [Google Scholar]
  4. Sonkar, S.K.; Kumar, P.; George, R.C.; Philip, D.; Ghosh, A.K. Detection and Estimation of Natural Gas Leakage Using UAV by Machine Learning Algorithms. IEEE Sens. J. 2022, 22, 8041–8049. [Google Scholar] [CrossRef]
  5. Hanh, D.N.; Hieu, N.T. Aerial Forest Fire Surveillance—Evaluation of Forest Fire Detection Model using Aerial Videos. In Proceedings of the 2019 International Conference on Advanced Technologies for Communications, Hanoi, Vietnam, 17–19 October 2019; pp. 142–148. [Google Scholar]
  6. Huang, F.; Fu, H.; Chen, J.; Wang, X. Mobile Robot Path Planning Based on Improved Genetic Algorithm. In Proceedings of the 2021 4th World Conference on Mechanical Engineering and Intelligent Manufacturing, Shanghai, China, 12–14 November 2021; pp. 378–383. [Google Scholar]
  7. Luo, J.Q.; Wei, C. Obstacle Avoidance Path Planning Based on Target Heuristic and Repair Genetic Algorithms. In Proceedings of the 2019 IEEE International Conference of Intelligent Applied Systems on Engineering, Fuzhou, China, 26–29 April 2019; pp. 44–46. [Google Scholar]
  8. Wang, L.; Li, Y.; Xie, H.; Wang, Y.; Xu, X. Autonomous Path Planning Method of UUV in Complex Environment Based on Improved Ant Colony Optimization Algorithm. In Proceedings of the 2021 China Automation Congress, Beijing, China, 22–24 October 2021; pp. 3486–3490. [Google Scholar]
  9. Yang, X.; Xiong, N.; Xiang, Y.; Du, M.; Zhou, X.; Liu, Y. Path Planning of Mobile Robot Based on Adaptive Ant Colony Optimization. In Proceedings of the 2021 47th Annual Conference of the IEEE Industrial Electronics Society, Toronto, ON, Canada, 13–16 October 2021; pp. 1–4. [Google Scholar]
  10. Sun, Q.; Li, M.; Wang, T.; Zhao, C. UAV Path Planning Based on Improved Rapidly-Exploring Random Tree. In Proceedings of the 2018 Chinese Control and Decision Conference, Shenyang, China, 9–11 June 2018; pp. 6420–6424. [Google Scholar]
  11. Hirakawa, T.; Yamashita, T.; Fujiyoshi, H. Scene Context-aware Rapidly-exploring Random Trees for Global Path Planning. In Proceedings of the 2019 IEEE International Conference on Pervasive Computing and Communications Workshops, Kyoto, Japan, 11–15 March 2019; pp. 608–613. [Google Scholar]
  12. Yu, X.; Yan, J. AGV Path Planning Based on Optimized Particle Swarm Optimization. In Proceedings of the 2019 3rd International Conference on Electronic Information Technology and Computer Engineering, Sanya, China, 30–31 October 2019; pp. 676–679. [Google Scholar]
  13. Li, X.; Wang, J.; Li, J.; Zhao, Z.; Luo, X. Path Planning for Multi-Vehicle Formation with Obstacles via Joint Grid Network and Improve Particle Swarm Optimization. In Proceedings of the 2018 37th Chinese Control Conference, Wuhan, China, 25–27 July 2018; pp. 6429–6434. [Google Scholar]
  14. Chen, Z.; Xu, B. AGV Path Planning Based on Improved Artificial Potential Field Method. In Proceedings of the 2021 IEEE International Conference on Power Electronics, Computer Applications, Shenyang, China, 22–24 January 2021; pp. 32–37. [Google Scholar]
  15. He, N.; Su, Y.; Guo, J.; Fan, X.; Liu, Z.; Wang, B. Dynamic Path Planning of Mobile Robot Based on Artificial Potential Field. In Proceedings of the 2020 International Conference on Intelligent Computing and Human-Computer Interaction, Sanya, China, 4–6 December 2020; pp. 259–264. [Google Scholar]
  16. Zhuang, M.; Li, G.; Ding, K. Obstacle Avoidance Path Planning for Apple Picking Robotic Arm Incorporating Artificial Potential Field and A* Algorithm. IEEE Access 2023, 11, 100070–100082. [Google Scholar] [CrossRef]
  17. Jiang, L.; Liu, S.; Cui, Y.; Jiang, H. Path Planning for Robotic Manipulator in Complex Multi-Obstacle Environment Based on Improved_RRT. IEEE/ASME Trans. Mechatron. 2022, 27, 4774–4785. [Google Scholar] [CrossRef]
  18. Jin, Q.; Tang, C.; Cai, W. Research on Dynamic Path Planning Based on the Fusion Algorithm of Improved Ant Colony Optimization and Rolling Window Method. IEEE Access 2022, 10, 28322–28332. [Google Scholar] [CrossRef]
  19. Ji, Y.; Ni, L.; Zhao, C.; Lei, C.; Du, Y.; Wang, W. TriPField: A 3D Potential Field Model and Its Applications to Local Path Planning of Autonomous Vehicles. IEEE Trans. Intell. Transp. Syst. 2023, 24, 3541–3554. [Google Scholar] [CrossRef]
  20. Gu, L.; Liu, Y.; Zhen, J. Optimization of PSO Algorithm Based on Adaptive Inertia Weight and Escape Strategy. J. Phys. Conf. Ser. 2020, 1486, 032033. [Google Scholar] [CrossRef]
  21. Luo, J.; Wang, Z.; Pan, K. Reliable Path Planning Algorithm Based on Improved Artificial Potential Field Method. IEEE Access 2022, 10, 108276–108284. [Google Scholar] [CrossRef]
  22. NVIDIA Jetson XAVIER NX Developer Kit. Available online: https://developer.nvidia.com/embedded/jetson-xavier-nx-devkit (accessed on 22 November 2021).
  23. Zhang, J.; Chen, X.; Hu, H.; Zhang, J.; Wang, L. Global Path Planning Algorithm Based on the IPSO Algorithm for USVs. In Proceedings of the Chinese Control and Decision Conference, Shenyang, China, 9–11 June 2018. [Google Scholar]
  24. Shi, Y.; Eberhart, R. A Modified Particle Swarm Optimizer. In Proceedings of the 1998 IEEE International Conference on Evolutionary Computation Proceedings, Anchorage, AK, USA, 4–9 May 1988; pp. 69–73. [Google Scholar]
  25. Cai, Y.E.; Juang, J.G. Path Planning and Obstacle Avoidance of UAV for Cage Culture Inspection. J. Mar. Sci. Technol. 2020, 28, 444–455. [Google Scholar]
  26. Jiang, C.; Gao, Y.; Yang, P. Mobile Robot Obstacle Avoidance Based on Improved Artificial Potential Field Method. In Proceedings of the 2021 3rd International Conference on Robotics and Computer Vision, Beijing, China, 6–8 August 2021; pp. 18–23. [Google Scholar]
  27. surya9teja. 3D-Artificial-Potential-Fiel. Available online: https://github.com/surya9teja/3D-Artificial-Potential-Field (accessed on 2 May 2022).
  28. Liao, Y.H.; Juang, J.G. Real-Time UAV Trash Monitoring System. Appl. Sci. 2022, 12, 1838. [Google Scholar] [CrossRef]
Figure 1. UAV hardware architecture.
Figure 1. UAV hardware architecture.
Sensors 23 09253 g001
Figure 2. Hexacopter body.
Figure 2. Hexacopter body.
Sensors 23 09253 g002
Figure 3. Dynamically declining inertia weights.
Figure 3. Dynamically declining inertia weights.
Sensors 23 09253 g003
Figure 4. Inertia weights were generated using three different methods.
Figure 4. Inertia weights were generated using three different methods.
Sensors 23 09253 g004
Figure 5. Environment 1: the red circle is the obstacle, the red star is the end point, the blue line is the actual path, and the red dots are the moving steps.
Figure 5. Environment 1: the red circle is the obstacle, the red star is the end point, the blue line is the actual path, and the red dots are the moving steps.
Sensors 23 09253 g005
Figure 6. Environment 2: the red circles are the obstacles, the red star is the end point, the blue line is the actual path, and the red dots are the moving steps.
Figure 6. Environment 2: the red circles are the obstacles, the red star is the end point, the blue line is the actual path, and the red dots are the moving steps.
Sensors 23 09253 g006
Figure 7. Transboundary treatment method using symmetric mapping.
Figure 7. Transboundary treatment method using symmetric mapping.
Sensors 23 09253 g007
Figure 8. When the conditions are met.
Figure 8. When the conditions are met.
Sensors 23 09253 g008
Figure 9. When the condition is not met.
Figure 9. When the condition is not met.
Sensors 23 09253 g009
Figure 11. The flight path of obstacle avoidance. The red circle is the obstacle and the red star is the goal point. (a) IPSO combined with a fuzzy system to adjust the path; (b) comparison of IPSO (blue line) and Fuzzy IPSO (red line).
Figure 11. The flight path of obstacle avoidance. The red circle is the obstacle and the red star is the goal point. (a) IPSO combined with a fuzzy system to adjust the path; (b) comparison of IPSO (blue line) and Fuzzy IPSO (red line).
Sensors 23 09253 g011
Figure 12. The target point being within the obstacle’s influence range.
Figure 12. The target point being within the obstacle’s influence range.
Sensors 23 09253 g012
Figure 13. Genetic Algorithm for one obstacle.
Figure 13. Genetic Algorithm for one obstacle.
Sensors 23 09253 g013
Figure 14. Ant Colony Algorithm for one obstacle.
Figure 14. Ant Colony Algorithm for one obstacle.
Sensors 23 09253 g014
Figure 15. Rapidly Exploring Random Tree Algorithm for one obstacle.
Figure 15. Rapidly Exploring Random Tree Algorithm for one obstacle.
Sensors 23 09253 g015
Figure 16. Artificial Potential Field for one obstacle.
Figure 16. Artificial Potential Field for one obstacle.
Sensors 23 09253 g016
Figure 17. Improving the path using the first tangent.
Figure 17. Improving the path using the first tangent.
Sensors 23 09253 g017
Figure 18. Improving the path using the second tangent.
Figure 18. Improving the path using the second tangent.
Sensors 23 09253 g018
Figure 19. Environment 2, the red circles are the obstacles and the red x are the waypoints.
Figure 19. Environment 2, the red circles are the obstacles and the red x are the waypoints.
Sensors 23 09253 g019
Figure 20. Genetic Algorithm for multiple obstacles.
Figure 20. Genetic Algorithm for multiple obstacles.
Sensors 23 09253 g020
Figure 21. Ant Colony Algorithm for multiple obstacles.
Figure 21. Ant Colony Algorithm for multiple obstacles.
Sensors 23 09253 g021
Figure 22. Rapidly Exploring Random Tree Algorithm for multiple obstacles.
Figure 22. Rapidly Exploring Random Tree Algorithm for multiple obstacles.
Sensors 23 09253 g022
Figure 23. Artificial Potential Field for multiple obstacles.
Figure 23. Artificial Potential Field for multiple obstacles.
Sensors 23 09253 g023
Figure 24. FIPSO first tangent.
Figure 24. FIPSO first tangent.
Sensors 23 09253 g024
Figure 25. FIPSO second tangent.
Figure 25. FIPSO second tangent.
Sensors 23 09253 g025
Figure 26. The blue circle is the moving obstacle, the blue arrow is the moving direction, the red circle is the static obstacle, and the red x is the goal point. The obstacle is moving too fast, causing the calculation to fail.
Figure 26. The blue circle is the moving obstacle, the blue arrow is the moving direction, the red circle is the static obstacle, and the red x is the goal point. The obstacle is moving too fast, causing the calculation to fail.
Sensors 23 09253 g026
Figure 27. Path planning for static obstacles first.
Figure 27. Path planning for static obstacles first.
Sensors 23 09253 g027
Figure 28. Obstacle avoidance using APF.
Figure 28. Obstacle avoidance using APF.
Sensors 23 09253 g028
Figure 29. Continuing the path tracing and completing the mission.
Figure 29. Continuing the path tracing and completing the mission.
Sensors 23 09253 g029
Figure 30. No contact with obstacles and no path tracing is performed.
Figure 30. No contact with obstacles and no path tracing is performed.
Sensors 23 09253 g030
Figure 31. Final path.
Figure 31. Final path.
Sensors 23 09253 g031
Figure 32. The UAV hovering in the air for path planning.
Figure 32. The UAV hovering in the air for path planning.
Sensors 23 09253 g032
Figure 33. The UAV avoids static obstacles, the UAV is marked by the red circle.
Figure 33. The UAV avoids static obstacles, the UAV is marked by the red circle.
Sensors 23 09253 g033
Figure 34. A dynamic obstacle moving to the left and interfering with the UAV.
Figure 34. A dynamic obstacle moving to the left and interfering with the UAV.
Sensors 23 09253 g034
Figure 35. Sensing the second dynamic obstacle.
Figure 35. Sensing the second dynamic obstacle.
Sensors 23 09253 g035
Figure 36. Reaching the destination.
Figure 36. Reaching the destination.
Sensors 23 09253 g036
Figure 37. The obstacle avoidance path (purple line): the red parts are the dynamic obstacle, the red arrow is the moving direction, and the blue part is the static obstacle.
Figure 37. The obstacle avoidance path (purple line): the red parts are the dynamic obstacle, the red arrow is the moving direction, and the blue part is the static obstacle.
Sensors 23 09253 g037
Figure 38. Flying to the first waypoint.
Figure 38. Flying to the first waypoint.
Sensors 23 09253 g038
Figure 39. Avoiding static obstacles when heading to the second waypoint.
Figure 39. Avoiding static obstacles when heading to the second waypoint.
Sensors 23 09253 g039
Figure 40. Dodging dynamic obstacles when heading to the end point.
Figure 40. Dodging dynamic obstacles when heading to the end point.
Sensors 23 09253 g040
Figure 41. The flight path: the red part is the static obstacle, the blue part is the dynamic obstacle, and the white points are the waypoint and the end point.
Figure 41. The flight path: the red part is the static obstacle, the blue part is the dynamic obstacle, and the white points are the waypoint and the end point.
Sensors 23 09253 g041
Figure 42. Side view of the UAV and the riverbank.
Figure 42. Side view of the UAV and the riverbank.
Sensors 23 09253 g042
Figure 43. Garbage was detected via the on-board image recognition system.
Figure 43. Garbage was detected via the on-board image recognition system.
Sensors 23 09253 g043
Figure 44. More garbage was detected.
Figure 44. More garbage was detected.
Sensors 23 09253 g044
Figure 45. The flight path, waypoints, and garbage information.
Figure 45. The flight path, waypoints, and garbage information.
Sensors 23 09253 g045
Table 1. Comparison of the operation speed of the three inertia weights.
Table 1. Comparison of the operation speed of the three inertia weights.
Execution Time (s)Set λ = 0.5Log GenerationLinear Generation
Environment one6.2749395.9256545.876535
Environment two18.91381818.62981318.357249
Table 2. Comparison of the first tangent with the second tangent for one obstacle.
Table 2. Comparison of the first tangent with the second tangent for one obstacle.
First TangentSecond Tangent
Path length507.4689528.4383
Table 3. Comparison of each path planned in Environment 1.
Table 3. Comparison of each path planned in Environment 1.
GAACORRTAPFFIPSO
Length593.5808608.3265656.0714509.5011507.4692
Time (s)0.5426338.0355648.6559478.6237066.132645
Table 4. Comparison of the first tangent with the second tangent for multiple obstacles.
Table 4. Comparison of the first tangent with the second tangent for multiple obstacles.
First TangentSecond Tangent
Path length399.5292389.7921
Table 5. Comparison of each path planned in Environment 2.
Table 5. Comparison of each path planned in Environment 2.
GAACORRTAPFFIPSO
Length935.8862503.2649558.0614396.2307389.7919
Time (s)6.1471315.4658016.3123115.3211533.454912
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Jhang, J.-W.; Juang, J.-G. Application of Path Planning and Obstacle Avoidance for Riverbank Inspection. Sensors 2023, 23, 9253. https://doi.org/10.3390/s23229253

AMA Style

Jhang J-W, Juang J-G. Application of Path Planning and Obstacle Avoidance for Riverbank Inspection. Sensors. 2023; 23(22):9253. https://doi.org/10.3390/s23229253

Chicago/Turabian Style

Jhang, Jhong-Wei, and Jih-Gau Juang. 2023. "Application of Path Planning and Obstacle Avoidance for Riverbank Inspection" Sensors 23, no. 22: 9253. https://doi.org/10.3390/s23229253

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop