Implementation of a Mobile Robot Platform Navigating in Dynamic Environment

Currently, problems of autonomous wheeled mobile robots in unknown environments are great challenge. Obstacle avoidance and path planning are the back bone of autonomous control as it makes robot able to reach its destination without collision. Dodging obstacles in dynamic and uncertain environment is the most complex part of obstacle avoidance and path planning tasks. This work deals with the implementation of an easy approach of static and dynamic obstacles avoidance. The robot starts by executing a free optimal path loaded into its controller; then, it uses its sensors to avoid the unexpected obstacles which may occur in that path during navigation.


Introduction
Robotics helps human in difficult, repetitive or tedious tasks.Moreover, it is the dream of substituting the machine to man in these tasks.Currently, the faculties of robots perception and reasoning are progressing every day and more in the future, they will play an increasingly important role in our lives.
Navigation of mobile robots in dynamic environments still represents a challenge for real world applications.The robot should be able to gain its goal position navigating safely among moving people or vehicles, facing the implicit uncertainty of the surrounding world and the limits of its perception system.
The problem of autonomous navigation has been deeply studied in literature and several techniques have been developed.These techniques use probabilistic and complex algorithms which are hard to implement and requires specific sets of hardware and software [1], [2].
In this paper a technique that is easy to be implemented using low cost materials is introduced.First, the robot is supposed to follow a predefined optimal free path, generated using the method given by [3], to navigate safely in static environment.Then, a strategy enabling the robot to navigate in dynamic environment considering the uncertain obstacles is proposed.Thus sonar sensors are used for this purpose.

Path generation and obstacle avoidance in static environment
First, and prior to spraying the case of dynamic environment, the robot needs to generate a navigation path in a static environment.After that, this trajectory will be saved in the internal memory of a robot and run repeatedly; and at the same time avoiding unexpected obstacles (and dynamic ones).

Path planning approach
A path planning and obstacle avoidance approach using parametric curves was used for the generation of the predetermined path that the robot should follow [4].It is assumed that the current position coordinates of the robot and of the target are known using exteroceptive sensors.The robot can measure the distance to nearby obstacles that are in the range of sensors and avoid them to achieve the goal by following an optimal smoothed path by running the algorithm proposed in [4], [5].

Figure 1. Path planning using parametric curves and control points insertion
In [5], a linear parametric curve is used for path planning, and then this curve is smoothed around the control point.The linear path connecting the initial CMME 2016 I position (S) to the target (T) is considered first.If the trajectory hits an obstacle, a control point is introduced between the initial position and the target and an intermediate connection point is created as shown in Fig. 1.Then, the collision between the line (QT), connecting the control point Q to the target T, and the obstacle is tested.In case of collision, another control point must be added, and so on (see Fig. 1).
Non-uniform rational B-spline (NURBS) curves were used to smooth the path, as they preserve the C 2 continuity of the trajectory which is very important for the robot dynamic.Furthermore, the addition of control points to avoid obstacles does not affect the whole trajectory.The smoothed curve is shown in green in Fig. 1.

Static trajectory data extraction
There are several ways to generate a path to follow for a robot such as: Arc trajectory [4], which is easy to be generated; but the combination of obstacles avoidance with other factor changes in a dynamic environment is difficult because of the circular arc.Thus, the trajectory generation using Bezier curves is introduced [6], which is characterized by defining the orientation and direction of the robot.However, the major drawback of this method is the mathematical complexity of Bezier curves, which makes it difficult to create paths a robot can follow with high speed and the same result is presented in straight line guide where the robot must stop walking to turn.
To reduce these problems, in our work, the robot must follow the trajectory generated using NURBS.First, the following parameters must be extracted from the NURBS curve generated using Visual Basic instruction [5]: The tangent from the initial position, which defines the initial orientation of the robot.
The distance (di) between each two control point which defines the distance that the robot has to move and which can be calculated using the following formula: The tangent at each control point Qi to define the orientation α i of the robot (see Fig. 2(a)).The speed of the robot is defined by the derivative of the NURBS curve at each control point.Between the control points, the robot has to move with a constant speed.Initially, NURBS is presented as a database containing the coordinates (x i , y i ) of each control point Q i .Next, the distances d i and the orientations α i are computed as explained above and as shown in Fig. 2(b).After extracting these data, they will be recorded as an Excel database (* .xls) to send them to the platform of the robot via USB (universal serial bus) port, which allows series data transfers from the PC to the robot microcontroller.This free path data will be executed by the robot platform.If the robot encounters an unexpected obstacle so it sends an error message to the microcontroller to notify the existence of an obstacle not point in the map of the environment.

Obstacles avoidance in dynamic environment
A function called "dynamic" is created to support the dynamic obstacle avoidance.This function helps the robot to navigate in an uncertain environment with four (04) ultrasonic sensors that will collect the environmental information, locate the obstacles and avoid them.The principle of this function is as follows: • Read the data of the front sensor; • If there is an obstacle, the robot moves backward for a distance that allows it to avoid the obstacle without collision by a test of the rear sensor; • Read the data of the right sensor; • If there is no obstacle the robot turns right and reads the right sensor data until it exceeds the obstacle then it recovers the initial trajectory by the inverse performance of data travelled; • If there is an obstacle the robot tests the left sensor, otherwise it avoids the obstacle from the left.• If both sensors indicate that the path is not free an error message will be sent to the controller to assign that "the way is occupied"; • If a moving obstacle moves toward the robot, the robot will move backward with sending a message that contains the value # DANGER#.The flowchart in Fig. 3 summarizes the proposed approach.

Experimental results
To validate our approach, it has been tested in several scenarios.
In the scenario shown in Fig. 6, the robot follows its path planned previously, and loaded into its controller; once an unexpected obstacle appears, the robot stops, go back (for a small distance which permits it to avoid the obstacle) then turns right and avoids the obstacle.If no other obstacle occurs, the robot turns left and come back to its initial path.Hence, the robot avoids the obstacle by the side free of obstacles, and it will not come back to its initial path until the sensor face of the obstacle be free.
One important case to notice is when the robot avoids the obstacles to a specific side and detects another obstacle in that way.The robot automatically goes back and tries the other side.If the two sides are blocked, the robot backs off in a straight line and avoids it again.
When the robot is driven out of its path by many obstacles, it always tries to rejoin its path.

Results and discussion
This robot is equipped by ultrasonic sensors which make it able to detect transparent objects, and navigate in an indoor environment.So this robot can be used in our dignified house, offices, supermarkets etc ....For example the robot can detect glass sliding doors.
In addition, the robot can navigate in outdoor environments where the surface can be rough, because of its chassis with suspension (see Fig. 5) and the approach that allow it to navigate in uncertain environments.
However, there are some critical cases that this robot can encounter and which are not taken into consideration in our work.The following section discusses some of these cases.

Some critical cases
Our robot encounters great difficulties to detect circular objects and obstacles with a width lower than 5cm due to the characteristics of ultrasonic sensors when sending sound waves.These waves will hit the obstacle and change direction and they do not return to the sensor, so the obstacle avoidance is not very accurate in this case.
In the case 1 of Fig. 7, the distance measurement is accurate because the obstacle is perpendicular and in front of the sensor, however in case 2 it will generate an inaccurate measurement since the inclined position sensor.Among the critical cases also, the positions which generate a measuring antagonism as shown in Fig. 7 case  3.

Case 1
Case 2 Case 3 Figure 7.Some critical cases which cannot be avoided accurately by the robot Apparently, the robot will not detect objects that have a vacuum of more than 10cm high and in the case where the object has a substantial length.This length may be a function of speed.This situation can create a robot damage (crushing) Fig. 8. Another drawback to notice is that high-speed obstacles cannot be avoided.The obstacle velocity should be less or equal to the robot's velocity.

Conclusion
In this work, the design, simulation and real time testing of an autonomous mobile robot in an unknown environment have been successfully carried out.We were able to come up with a strategy of navigation and try its effectiveness in a real time changing indoor environment.Though some defects, the results were satisfying and the robot was able to navigate safely in dynamic environment.
Hence, in the future work, the robot's performance can be enhanced by installing a GPS module to localize the robot at any given moment.This will simplify the program and drive the robot to any goal with high precision.
Moreover, the ultrasonic sensors can be replaced by laser sensors which have a wider range to recognize the exact shape and position of obstacles.We can go further in customizing with adding up a Radar sensor to work in outdoor environment (rough environment) since the ultrasonic sensors performance is limited.

Figure 2 .
AutoCAD simulation results.(a) Path planning in static environment.(b) Static trajectory data extraction

Figure 3 .
Figure 3. Flowchart simurizing the approach of obstacles aviodance in dynamic environment.

Figure 4 .Figure 5 .
Figure 4.The robot circuit Platform.1: Arduino MEGA2560 card, it contains the program that allows the robot to navigate in its environment; 2: Ultrasonic sensors used to calculate the distance between the robot and the obstacles; 3: 6V battery energy source; 4: DC-motors; 5: On / off switch; 6: L293D used to drive the DC motors

Figure 6 .
Figure 6.Obstacle avoidance scenario Before turning, the robot tests the two side sensors.Hence, the robot avoids the obstacle by the side free of obstacles, and it will not come back to its initial path until the sensor face of the obstacle be free.One important case to notice is when the robot avoids the obstacles to a specific side and detects another obstacle in that way.The robot automatically goes back and tries the other side.If the two sides are blocked, the robot backs off in a straight line and avoids it again.When the robot is driven out of its path by many obstacles, it always tries to rejoin its path.

Figure 8 .
Figure 8. Objects having a vacuum of more than 10cm high.

Table 1
is an illustration of database containing the coordinates (x i , y i ) of control points Q i constituting the free path, and Table2illustrates the database that contains the translation of these data to distances and orientations.

Table 1 .
Illustration of database extraction from static free path (the control points (x, y) coordinates).

Table 2 .
Translation of Q i coordinates to distances and orientations.