• 沒有找到結果。

Chapter 3 Proposed Fuzzy Guidance Techniques for Indoor Navigation

4.4 Automatic Path Map Creation Process of Learned Data

4.4.3 Identification of Nodes for Area Mode

Here, the proposed path map creation process for the area mode is described, which is designed to create a graph composed of four kinds of nodes, check node, turn node, room node, and initial node, from the learn data. The meanings of the check node in the two kinds of created graphs for two navigation modes are the same, but the property of the turn node is not the same exactly. The initial node is a node with a fixed location defined by the user in each manual learning process for the area mode.

And the room node is a node with user-defined data and location that can be used to represent a special place for the use of navigation. Therefore, the proposed navigation strategy in the area mode is different to the proposed navigation strategy in the single path mode. In the following, an algorithm is proposed for identifying two kinds of nodes in the area mode.

Algorithm 2. Automatic path map creation process for area mode.

Step 1. Attach a counter value to the initial node, and set the initial value of this counter to be ‘1’.

Step 2. Take the learned data as input, and identify check nodes and turn nodes by processing the commands sequentially in the following way. Let the currently processed command be denoted as C0, the previously processed one as C−1, and the next processed one as C+1.

Step 2.1. If C0 is ‘move forward’, then

if C+1 is executed at a spot farther than a meter from C0, then create check nodes at spots with distance intervals of one meter with C0 as the first created check node.

Step 2.2. If C0 is ‘stop’, then

if the C+1 is ‘turn leftward’ or ‘turn rightward’, then create a turn node at a spot visited by the vehicle at the action time of C0; otherwise, create a check node at C0.

Step 2.3. If C0 is ‘attach’, then create a room node at C0. Step 2.4. If C0 is ‘another trip’, then

increment the value of the counter of the initial node by one.

Step 3. Repeat Step 2 until all commands in the input are processed.

In the above algorithm, the threshold value of one meter may be varied to meet other application needs. And the counter value of the initial node is used to represent the number of times of one-way learning during a learning session for the area mode.

Besides, it can be seen from the algorithm that the resulting path map is a simple attributed undirected graph, in contrast to the created graph for the single path mode.

An example to illustrate this graph is shown in Figure 4.4.

Figure 4.4 An example to illustrate created graph for area mode.

Chapter 5

Vehicle Navigation in Indoor Environment

5.1 Introduction

In the navigation stage, the main task is to guide the vehicle to follow a selected path generated from a learned path map. The path consists of a set of connected nodes.

In this chapter, two vision-based navigation strategies based on fuzzy guidance are proposed to traverse among these nodes in two types of navigation modes.

Firstly, two navigation methods for the single path mode, namely line following and smooth curve following, are proposed for straight-line and turning-section navigations, respectively. The vehicle can use these navigation methods to traverse among the nodes within a created path map generated from the learning process for the single path mode. These topics will be described in Section 5.2.

Secondly, in order to navigate in the area mode, certain methods are proposed. A transformation method is proposed to convert high-level user commands into a data list with useful information for navigation, according to the learned data generated from the learning process for the area mode. After that, a dynamic path planning method using the Dijkstra algorithm is proposed to generate a navigation path dynamically. Finally, a navigation method is proposed for the vehicle to traverse along the generated path. These topics will be described in Section 5.3.

In addition, a strategy for navigation accuracy maintenance is proposed in Section 5.4. Since the proposed collision-avoiding guidance strategy is based on a computer vision technique, the proposed navigation method regards objects appearing along navigation routes as obstacles, which should be avoided. Then certain path deviations may occur after the vehicle avoids some obstacles in navigation sessions.

For this reason, a navigation accuracy maintenance method should be designed for correcting this kind of error, as is done in this study. More details about this method will be described later.

5.2 Navigation in Single Path Mode

After a single learned path is generated from a learning process, the remaining work is for the vehicle to navigate along the generated path by visiting each path node sequentially through the routes specified by the inter-node edges. Since a created path is composed of two kinds of nodes, check node and turn node, the vehicle will navigate along the path in four distinct cases, check node to check node, check node to turn node, turn node to check node, and turn node to turn node. Except the case of turn node to turn node, which is a turning section, the others are all straight-line sections. In the following, two navigation methods, line following and smooth curve following, are proposed for straight-line sections and turning sections, respectively.

Finally, the detail procedure for accomplishing a navigation task in single path mode will be described.

5.2.1 Navigation Strategy for Straight-Line Sections

The navigation strategy of line following is adopted when the vehicle passes a check node in its navigation path. The vehicle uses mainly the fuzzy guidance technique described in the Section 3 during the line following process. The details are described as an algorithm as follows.

Algorithm 3. Line-following navigation process.

Step 1. Turn the vehicle toward the checknode Nc to be reached.

Step 2. Calculate the distance from the current vehicle location Lv (recorded in the odometer) to the location of Nc (recorded in the learned data), and denote the distance by d1.

Step 3. Move the vehicle forward.

Step 4. Turn accordingly if the output steering angle of the fuzzy guidance algorithm is larger than zero.

Step 5. Read the odometer to get the current vehicle location Lv’ and compute how far the vehicle has moved as d2 = |Lv’ − Lv|.

Step 6. If the difference |d1 − d2| is smaller than 5 centimeters, then end this navigation session, and turn the vehicle to the original direction of Nc specified in the learned data; otherwise , repeat Step 3 through Step 5.

By this line following algorithm, the vehicle can accomplish a navigation process in a straight-line section. But in certain situations, an unexpected obstacle might appear only just in front of the vehicle and its size might be too big, leading to the result that the vehicle cannot avoid collision with this obstacle by the proposed

fuzzy guidance technique. Then the vehicle will stop right away to terminate the navigation task and return an error message to the system. On the contrary, as long as a steering angle can be acquired from the proposed fuzzy guidance technique, the vehicle will correct its direction according to this steering angle to find a suitable way to avoid the obstacle.

5.2.2 Navigation Strategy for Turning Sections

The navigation strategy of curve following is adopted when the vehicle passes a turn node (called initial turn node) and moves toward another turn node (called end turn node) in its navigation path. The proposed curve following method uses the information of the global coordinates of the two turn nodes as well as their direction angles to make a smooth turn. An illustration of the proposed curve following technique is shown in Fig. 4. The main concept behind is to move the vehicle along a well-planned curve joining the two turn nodes by setting different speeds for the two wheels individually. An algorithm for the method is described as follows

Algorithm 4. Smooth Curve following navigation process.

Step 1. When the vehicle arrives at the initial turn node denoted as Nt1

, get the global coordinates (X1,Y1) and the direction angle θ1 from the odometer, and convert θ1 into a vector Vv1

using the following equation:

Vv1

similar to that for computing Vv1 perpendicular to Vv2

.

Step 3. Compute the middle point (X ,CYC) between (X1,Y1) and (X2,Y2).

Step 4. According to geometry theory, compute a unique circle with center (X ,O YO) using the two points (X1,Y1) and (X2,Y2) by the following equation:

otherwise, turn the vehicle rightward for the angle of θ3.

Step 8. Set the speeds of the two wheels individually by the following equations:

w

respectively; R2 and R1 are the distances from the center of the circle to the left wheel and the right one, respectively; and w is the width of the vehicle.

(An illustration of the situation and the notations is shown in Fig. 5.1.) Step 9. Start the curve following action until the end turn node is reached.

Step 10. Turn the vehicle to the original direction specified in the learned data, and finish the turning session.

Figure 5.2 A figure illustrating curve following process.

Fig. 5.1 : An illustration of computing two wheel speeds for the case of turning rightward in curve following.

R2

R1 w

Center of circle

L R

Since the smooth curve following process uses no computer vision technique, the vehicle will lose the collision avoidance capability during a curve following process.

Therefore, we use an additional method to improve this process before entering a turning section.

An image will be captured before a curve following process is executed. We first define a rectangular window in a captured image, as shown in Fig. 5.2. Then the proportion of the route area in the window is defined to be an indicator, which is used to indicate whether the curve following process can be executed or not. If the value of the indicator is higher than 90%, it means that the curve following process can be executed; otherwise, cannot.

Figure 5.3 A figure illustrating the check process before curve following process (a) A case that the curve following process can be executed (b) A case that the curve following process can not be executed

5.2.3 Process of Proposed Navigation in Single Path Mode

With the methods proposed previously, including the line following method for straight-line sections and the smooth curve following method for turning sections, a navigation procedure for the single path mode can be designed for the purpose.

Several steps of the process proposed in this study are described as follows, and its corresponding figure is shown in Figure 5.3.

Algorithm 5. Proposed process of navigation in single path mode.

Step 1. Scan the node list of a created path from the starting point sequentially and read its associated data.

Step 2. If the currently processed node is a check node, then perform the line following process until the vehicle arrives at this node. And perform the corresponding navigation accuracy maintenance strategy to fix certain navigation errors.

Step 3. If the currently processed node is a turn node, then take the following action.

a. If the next processed node is a turn node also, perform the line following process until the vehicle arrives at this turn node. And perform the smooth curve following process until the vehicle arrives at the next turn point.

b. Otherwise, perform the navigation accuracy maintenance strategy for the smooth curve following process to fix certain navigation errors.

Step 4. If an ending point flag is found with the currently processed node, then end

this navigation trip.

Note that the navigation accuracy maintenance strategy performed in Step 3 and 4 will be described in Section 5.4.

5.3 Navigation in Area Mode

After a learning process for navigation in the area mode is completed, a generated path map is only composed of a set of connected nodes with undirected inter-node edges. Without a starting spot and an ending one, a navigation path cannot be generated for the vehicle to accomplish the navigation task. Therefore, a process is designed for this purpose, which generates essential data for later path planning, including a set of starting and ending spots and a set of weights of the inter-node edges. When these essentials data are acquired from the above transformation process, the Dijkstra algorithm is used to plan a shortest path for later navigation task. After that, the proposed navigation method can be employed to traverse the navigation path.

5.3.1 Generation of essential data for path planning

When users want to order the vehicle to carry out a navigation task in the area mode (e.g. from a bedroom to a living room), he/she only needs to press two buttons on the user interface designed in this study to choose a start room and an end room.

Afterward, before a navigation path is planned using the Dijkstra algorithm, a generation process is designed for computing a weight for each inter-node edge and identifying the connectivity between each node pair. If the weight of an inter-node

otherwise, the two nodes are connected. An algorithm designed for this purpose is described as follows.

Figure 5.4 A figure to illustrate a process of proposed navigation procedure in single path mode.

Learned path data

Scan it sequentially

If a check node If a turn node

Line following process If the next is

turn node

Line following process

Curve following process

Navigation accuracy maintenance strategy

If current is ending point

End this navigation trip Yes

Yes No

No

Algorithm 6. A process of essential data generation.

Step 1. Take a learned path map as input, and identify the weight and connectivity of each inter-node edge by processing all nodes within the learned path map sequentially. Let the currently processed node be denoted as N0, the previously processed one as N−1, and the next processed one as N+1.

Step 1.1. If N0 is a “check node”, then do the following.

a. If N−1 is an “initial node” or a “check node”, calculate the distance between N−1 and N0 and mark this distance as a weight of the edge between the two nodes. Otherwise, set the weight of the edge between N-1 and N0 to be 0.

b. If N1 is an “initial node” or a “check node”, calculate the distance between N1 and N0 and mark this distance as a weight of the edge between the two nodes. Otherwise, set the weight of edge between N1 and N0 to be 0.

Step 1.2. If N0 is a “turn node”, then

a. Calculate the distance between N-1 and N0, N1 and N0, and mark these two distances as the weights of the edges.

b. Calculate each distance between N0 and the other nodes in the path map, and if certain distance is within a predefined range, mark this distance as the weight of the edge between N0 and the node. Otherwise, set the weight of the edge to be 0.

Step 1.3. If N0 is a “room node”, then

a. Calculate the distance between N-1 and N0 only, and mark this distance as the weight of the edge between N-1 and N0.

Step 2. Repeat Step 1 until all input nodes are processed.

After the above algorithm is performed, the data of the learned path map is more

complete, including a set of nodes and the weights of the inter-node edges. An example of the resulting graphs is shown as follows to illustrate the result of performing this algorithm.

Figure 5.5 An example to illustrate result of performing the proposed algorithm.

5.3.2 Dynamic Path Planning using Dijkstra Algorithm

After the weight of each inter-node edge in a learned path map is created, regard each weight as a cost value. Then we can think the path planning problem as a minimal-cost graph search problem. The demand in our work is to search a shortest path with the minimal cost if a start point and an end point are given. For this purpose, the Dijkstra algorithm, which can solves a single source shortest path problem, is employed in our work. The Dijkstra algorithm solves the single-source shortest paths problem on a weighted directed graph, with the weights of all the edges being non-negative. Giving a desired start node, the Dijkstra algorithm searches the graph using a way similar to both the breadth-first search and the Prim algorithm for computing a minimum spanning tree, and plans a shortest path from the source to each other node.

A review of the principle of the Dijkstra algorithm is as follows. The Dijkstra algorithm maintains a set S of nodes, which have shortest paths from the source N to all the nodes which have already been found. Initially, the costs of a given start node, say N, to all the other nodes are set to infinity. At the beginning, S contains N only.

Then, the node C, which is not in S yet and has the minimum cost, is added into S at each search iteration. And for the nodes not in S, the costs of those incident nodes from C, which means those with emitting directed links to C, are updated if the following condition is satisfied:

Cost(N,C)+Cost(C,M)<Cost(N,M) (5.1)

where M is one of the nodes which is incident from C. and

Cost(N,C) = the cost of the path from N to C so far, Cost(C,M) = the cost of the directed link from C to M Cost(N,M) = the cost of the path from N to M so far.

If the inequality (5.1) is satisfied, update the cost of the current shortest path to M with Cost(N,C)+Cost(C,M). Besides, add the node M to the node sequence of the current shortest path from N to C. End the search process when the desired goal is added into S.

The desired shortest path is found in a form of a node sequence. More details about the Dijkstra algorithm can be found in Cormen [9].

5.3.3 Navigation Strategy among Room Nodes

After a navigation demand from one room to another is given , a path is planned dynamically using the above-mentioned methods, and the remaining task is to guide the vehicle to navigate along the planned path. And this work can be accomplished using two navigation strategies proposed in this study, which are the same as those in the single path mode, namely, the strategies of line following and smooth curve following.

But, a little bit difference still exists in the smooth curve following process between two kinds of navigation modes. In the previous section, it was mentioned that both directions of the initial turn node and the ending turn node are essential data for accomplishing the smooth curve following process. And these directions are recorded during a learning process in the single path mode. On the contrary, no direction data are retrieved from the odometer during the learning process in the area mode, and so no direction data are recorded with each node in the created path map consequently.

As a result, if we want to use the smooth curve following process during a navigation

task in the area mode, the direction data of each path node must be created manually.

A process of direction data creation is described as follows.

Algorithm 7. Process of direction data creation

Step 1. Scan each path node with its coordinate data orderly from a start node. Let the currently processed node be denoted as N0, the previously processed one as N−1, and the next processed one as N+1.

Step 1.1. Set the direction value of the start node to zero.

Step 1.2. If the difference in distance between the X coordinate value and the Y coordinate value of N0 and N-1 are both smaller than a predefined threshold value Thc, regard the direction of N0 to be equaled the direction to N-1.

Step 1.3. If the difference in distance between the X coordinate value or the Y coordinate value of N0 and N-1 is larger than a predefined threshold value Thc, regard N0 and N-1 as two “turn nodes” and that the direction value of N0 and the direction of N-1 are perpendicular to each other. An illustrative example is shown in Figure 5.6.

Step 2. Repeat Step 1 until all input nodes are processed.

After the type of each path node and its associated direction data are created by

After the type of each path node and its associated direction data are created by

相關文件