You are on page 1of 4

3D Simulation System of Guiding Mobile Robot based on OpenGL Library

Houcine ZERFA (1), Wahid NOUIBAT (2) (1)(2) Laboratory of Power Electronics and Solar Energy and Automatic (LEPESA) Department of Electronics, Faculty of Electrical Engineering, University of Science and Technology of Oran Mohamed BOUDIAF USTO, BP 1505 El M'naouer Oran, Algeria. [(1) arpzerfah@gmail.com, (2) wnouibat@yahoo.fr]

Abstract This paper presents the 3D simulation system of guiding mobile robot, which allows us to visualize and to simulate the movements of mobile robot in exploration phase of environment. For that, we have used the OpenGL library. The robot simulated is differential, and it is controlled by human operator by joystick or keyboard. Keywords OpenGL; Robot Simulation; Robotics; Virtual Environment; Guiding Mobile Robot.

Quite a number of mobile robot simulators have been developed in recent years [1], like EyeSim proposed in [2], and WebotsTM proposed in [3]. In this paper, we have developed a 3D simulation system; the goal is to create an artificial robot environment - as close to reality as possible, the real robot is called RoboNet shown in (Fig. 1). The robot is intended to be remotely operated. So the goal is to simulate a guidance of RoboNet by using a joystick or keyboard. For building of our 3D simulation system we have used the OpenGL (Open Graphics Library) and C++ programming language.

I. INTRODUCTION The mobile robot is a physical agent achieving some tasks in its environment. It is capable to extract information from its environment and use this knowledge to decide how to act or/and send it to human operator. Generally the mobile robots are autonomous; this means that they can do programmed tasks without human intervention. A large proportion of the mobile robots are remotely operated platforms. The intelligent mobile robots are widely used in applications such as general indoor and outdoor operations, emergency rescue operations, underwater and space exploration, pipe- and duct inspection in nuclear power plants, construction environments and so on. The interactive human control of these telerobots needs advanced 3D visualization using graphics techniques. Simulation is an essential part of mobile robotics; although the final objective is real robotics, it is often very useful to perform simulations prior to deal with real robots. This is because simulations are easier to setup, less expensive, faster and more convenient to use. Thus allowing a better design exploration. A simulated robotics setup allows researchers to perform exhaustive experiments without the worry of damaging the actual robot; it allows control algorithms to be tested and configurations to be experimented before they are deployed to real robots. The simulation results are transferable onto the real robots.

Fig. 1. In left: the real RoboNet, in Right: the simulated RoboNet. II. 3D MODELING WITH OPENGL LIBRARY The OpenGL [4-7] which is high performance image processing system, is also a software interface of graphic hardware, provides about 250 functions. Several functions would draw some basic 3D elements. OpenGL can embed in a few programming languages such as C, C++, C#. The OpenGL have many functions that we can use, like the control of the camera (the Zoom, seen of over, under, lateral...); 3D rotation of the objects (according to X, Y, and Z axis.); color and textures; Light Modeling technique based on OpenGL includes simple geometry modeling based on some instructions like GL_POINTS draws each vertex as a single point; GL_LINES draws each pair of vertices as an independent line segment; GL_POLYGON draws a single, convex polygon; or GL_QUAD_STRIP, GL_TRIANGLE_FAN draws a connected group of quadrilaterals or triangles. As shown in (Fig 2). 1

1 0

4 3 2

III. PRESENTATION OF THE REALIZED 3D SIMULATION


SYSTEM

2 GL_LINES 3 1

GL_POINTS 1 4 0 0 3 2

5 7 6 2 4

We have achieved a 3D simulation system allowing visualizing and simulating the behavior of the robot. We have tried to reproduce conditions close to the real environment (robot architecture, gravity ...). In general, the environment is a maze, with checkerboard terrain and walls obstacles. The 3D simulation system that we have developed has two main zones: The 3D visualization of the world containing the robot, objects and environment (Fig. 5) and the control interface (Fig. 6), showing results of analyzes of data concerning the position of mobile robot and control panel of the camera which offers the possibility to make zoom-in or zoom-out and change view according to the X and Z axes. 4 The text editor in the control panel shown in (Fig. 6) displays the movement of the Robot if it advances or it moves back, left, and right according to the displacement.

GL_POLYGON

GL_QUAD_STRIP 1 0

GL_TRIANGLE_FAN Fig. 2. Topology of vertex, line, polygon, quad and triangle. So we can create complicated 3D models through the combination of the basic geometry such as point, line and polygon. Programming objects using the C++ language is as simple as shown in Fig. 3 and 4.
GlClearColor (0.0f, 0.0f, 0.0f, 0.0f); //clear of colors GlClear (GL_COLOR_BUFFER_BIT); //clear of screen GlPushMatrix (); GlRotatef (theta, 0.0f, 0.0f, 1.0f); GlBegin (GL_TRIANGLES); //begin to draw triangle /* set colors and coordinates*/ glColor3f (1.0f, 0.0f, 0.0f); glVertex2f (0.0f, 1.0f); glColor3f (0.0f, 1.0f, 0.0f); glVertex2f (0.87f, -0.5f); glColor3f (0.0f, 0.0f, 1.0f); glVertex2f (-0.87f, -0.5f); GlEnd (); // end triangle GlPopMatrix (); GlFlush (); // display

Fig. 5. The 3D visualization zone of the 3D simulation system of RoboNet.

Fig. 3. Programming Triangle OpenGL with the C++.

Fig. 6. The control interface of the 3D simulation system of RoboNet. We also achieved a program that permits to move the robot according to the X and Y axes, and its rotation around the Z axis; we have choice to select joystick or keyboard guiding (Fig. 7). 2

Fig. 4. Result of previous Triangle OpenGL C++ program.

The test was successful and we can guide the robot in its environment and avoiding the virtual obstacles. The use of 3D simulation system of RoboNet effectively highlighted different causes of damage to the real robot in our experiments, particularly collisions with virtual close walls passage, which the human operator must be clever. In the close walls passage, the use of joystick was easy and better than the keyboard. Although, in the reality we take into account different factors, like variation of wheeled motors. In the (Fig. 9.) we can see how the RoboNet can move and rotate easily.

Fig. 7. Panel of selection Joystick or keyboard guiding of the 3D simulation system of RoboNet. IV. SIMULATION RESULTS After building the 3D simulation system of RoboNet, we did some tests. For example, if we select joystick guiding, while we bend the joystick according to Y axe, the robot advance, and while pushing on the buttons 1 or 2 of the joystick, the Robot will do a left rotation if (1) and right if (2). Y X

V. CONCLUSION In this paper, a 3D simulator system of RoboNet is presented. The goal of this simulation system is to provide a platform for development. This system can provide us a flexible, safe, and cheap to test different experiments. We have also discussed the possibilities of using OpenGL library for building a virtual environment and using three dimensional animations. Our 3D virtual simulation system can guarantee the successful exploration and it is more close to that in real world. Currently, our 3D simulator system of RoboNet is just a prototype. We will continuously improve the system to make it more effective, flexible, and friendly. Our ultimate goal is to let the system accommodate as many OpenGL commands as possible so that simulator will be as close to reality as possible, this is one of our future works. And after realizing the 3D simulator system of RoboNet, we have to deploy our work to real RoboNet which will be remotely operated by using Internet .

Fig. 8. Joystick axes.

2
[1]

REFERENCES
Y. Yusof, M. F. Abu Hassan, N. J. Mohd. Saroni and W. M. F. Che Wan Azizan. Development of an Educational Virtual Mobile Robot Simulation. Proceedings of the World Congress on Engineering 2012 Vol II WCE 2012, July 4 - 6, 2012, London, U.K. Andreas Koestler, Thomas Brunl. Mobile Robot Simulation with Realistic Error Models. 2nd International Conference on Autonomous Robots and Agents December 13-15, 2004 Palmerston North, New Zealand Michel, O. Cyberbotics Ltd - WebotsTM: Professional Mobile Robot Simulation, pp. 39-42, International Journal of Advanced Robotic Systems, Volume 1 Number 1 (2004), ISSN 1729-8806 Tangyun Dai. Zemin Wang, Shouheng Xu. Research of Creating and Fetching 3D Models of Virtual Reality Based on OpenGL. Proceedings of the 2006 IEEE International Conference on Mechatronics and Automation June 25 - 28, 2006, Luoyang, China. Hwanyong Lee. Nakhoon Baek. Implementing OpenGL ES on OpenGL. The 13th IEEE International Symposium on Consumer Electronics (ISCE 2009). Shuang Zhang. Huan Liu. Shixiong Zhang. Researching on Simulation of Traffic Accidents Scene by OpenGL. 2010 10th IEEE International Conference on Computer and Information Technology (CIT 2010).

[2]

[3]

4
[4]

Z Y
[5]

X 5 Fig. 9. Simulation test of guiding RoboNet.

[6]

[7]

Chin-Hung Teng. Jr-Yi Chen. An Augmented Reality Environment for Learning OpenGL Programming. 2012 9th International Conference on Ubiquitous Intelligence and Computing and 9th International Conference on Autonomic and Trusted Computing. [8] T. Brunl, H. Stolz. Mobile Robot Simulation with Sonar Sensors and Cameras, Simulation, vol. 69, no. 5, Nov. 1997, pp. 277-282 (6) [9] T. Brunl, "Research Relevance of Mobile Robot Competitions", IEEE Robotics and Automation Magazine, Dec. 1999, pp. (10) [10] T. Brunl, "Multi-Robot Simulation with 3D Image Generation", IROS 2001, Maui, pp. (6) [11] T. Brunl Embedded Robotics - Mobile Robot Design and Applications with Embedded Systems, Springer 2003.

You might also like