Chapter 6 Collision Avoidance between Vehicles
6.3 Proposed Collision Avoidance Techniques
6.3.1 Collision avoidance on intersecting paths
In the state of path-intersecting, we let the two vehicles keeping a fixed distance.
Assume that the first vehicle is at position V11 = (x11, y11) and the other is at position V21 = (x21, y21). Additionally, assume that they are moving to the goals G1 = (gx1, gy1) and G2 = (gx2, gy2), respectively. At first, we calculate the intersection I in the two paths by the parametric forms. Each parametric form with respect to the path from the current position to the goal is shown in Eq. (6.1) below:
83
The point I can be obtained by solving the simultaneous equations of “x1 = x2” and “y1
= y2”. Then, assume that the distance between V11 and I is smaller than the distance between V21 and I, as shown in Figure 6.1, and so the path of the second vehicle must be changed.
Figure 6.1 An intersection I on the paths of two vehicles.
Because the first vehicle moves along the original path, we can forecast the position V12 = (x12, y12) at the next moment. If the velocity of the vehicle is vel and the time interval of calculating the distance between vehicles is t, then V12 can be calculated by Eq. (6.2) below:
12 11 1 11
Because the vehicles must keep a distance Dis to each other, we can say that the passing point V22 of the second vehicle is on a circle C whose center is V12 and whose
84
radius is Dis. To calculate V22, we must acquire the projection point V21’ of V21 on the circle C, at first. The reason is that the distance between V21 and V22 is desired to be not too long. So we utilize an included angle θ between V21’ and V22 on C to acquire
Therefore, the projection point V21’ can be calculated by Eq. (6.4) as follows:
2 2 2
21 2 21 12 21 2 21 12
(x +(gx x s x- ) - ) +(y +(gx x s y- ) - ) =Dis . (6.4)
As long as the value s is solved, V21’ is obtained. Then, we calculate the angle θ21’ of V21’ from the positive direction of the x-axis. Because C can also be represented as Eq.
(6.5) below, we can calculate θ21’ by Eq. (6.6) below: points a or b as shown in Eq. (6.7), called candidate passing points:
12 21'
Furthermore, it is desired that the distance between V22 and G1 is bigger. The reason is that the distance between the two vehicles can be drawn apart. Therefore, if
85
point a is closer to G1 than point b, V22 will be exactly the point b. As the passing point V22 is obtained, the patrolling path of the second vehicle is changed from V21 Æ G2 to V21 Æ V22 Æ G2.
It is possible that the alternative path may exceed the walkable range. If this is the case, then the path must be changed again. In general, there are three unallowable states:
(1) the passing point P is in the outer region as shown in Figure 6.2;
V G
Walkable Region R P
P1 P2
Figure 6.2Passing point P is in the outer region.
(2) the path from the current position V to the passing point P exceeds the walkable range as shown in Figure 6.3; and
Walkable Region
V G
Walkable Region R P
P1 P2
Figure 6.3 The alternative path is not feasible.
(3) the path from the passing point P to the goal G exceeds the walkable range as shown in Figure 6.4.
86 Walkable Region
V G
Walkable Region R P
P1 P2
Figure 6.4 The alternative path is not feasible.
For these states, the rectangular region which the passing point P belongs to is not equal to the one R which both V and G belong to. Therefore, we calculate the intersections of the region R and the alternative path V Æ P Æ G. Finally, the patrolling path is taken to be V Æ P1 Æ P2 Æ G. The algorithm of checking and finding a feasible alternative patrolling path is shown in the following.
Algorithm 6.1 Checking and finding a feasible alternative patrolling path.
Input: All rectangular regions Re, the passing point P, the front point F (the current position V or another passing point) of P, and the goal G.
Output: A feasible alternative patrolling path.
Steps:
Step 1. Find the rectangular region R, which both F and G belong to, from Re.
Step 2. Check whether the rectangular region, which the passing point belongs to, is identical to R.
If yes, the alternative patrolling path is F Æ P Æ G.
Else, go to Step 3.
Step 3. Calculate the intersections, P1 and P2, of the region R and the alternative path F Æ P Æ G.
87
Then, the alternative patrolling path is F Æ P1 Æ P2 Æ G.
Additionally, after the time interval t, the system must check whether an intersection is still on the paths of the two vehicles again. If yes, the patrolling path of the second vehicle will be changed again. The entire process is described as Algorithm 6.2.
Algorithm 6.2 Computing an alternative path for an intersecting state.
Input: The current position V11 = (x11, y11) and the goal G1 = (gx1, gy1) of the first vehicle, the current position V21 = (x21, y21) and the goal G2 = (gx2, gy2) of the second vehicle, a fixed length Dis between the two vehicles, the velocity vel of the vehicles, the time interval t of calculating the distance between the vehicles, and the included angle θ between the current position and the passing point.
Output: A alternative patrolling path for one vehicle.
Steps:
Step 1. Calculate the intersection I in the two paths V11 Æ G1 and V21 Æ G2. Step 2. Judge which vehicle should change its path.
If d(V11, I) < d(V21, I), the path of the second vehicle must be changed.
Else, the path of the first vehicle must be changed.
Assume that the path of the second vehicle must be changed in the following steps.
88
V12 and whose radius is Dis by the following equation:
The above equations lead to
(x21+(gx x s x2- 21) - 12)2+(y21+(gy2-y s y21) - 12)2 =Dis2.
The above equations lead to:
' '
Step 6. Calculate candidate passing points a and b in the following way, in which the included angle between V21’ and the candidate passing points is θ:
Step 7. Determine the passing point in the following way:
if (a, G1) < (b, G1), point b is the passing point.
Then the path of the second vehicle is taken to be V21 Æ b Æ G2. Step 8. Check whether the alternative path is feasible by Algorithm 6.1.
If not, the new alternative path will be obtained from Algorithm 6.1.
89