The solution of 3D indoor simulation of mobile robots ...

5 downloads 240 Views 84KB Size Report
test different algorithms, e.g. walking gait generation algorithms or methods for autonomous ... Python code and also includes a parser of XODE (extensible markup language for ... nical University, Institute of Automation and Computer Science.
The solution of 3D indoor simulation of mobile robots using ODE V. Ondroušek Brno University of Technology, Faculty of Mechanical Engineering, Institute of Automation and Computer Science, Technická 2896/2, Brno, Czech Republic, email: [email protected]

Abstract This contribution deals with the development of the complex solution of various mobile robots simulations in 3D indoor spaces. Proposed solution enables to create miscellaneous complex inner spaces with furniture of office visual appearance. Furthermore, it allows including different mobile robots and saving the state of simulation using standard XODE format. It is also possible to include and test different algorithms, e.g. walking gait generation algorithms or methods for autonomous robots localization, path planning and many others. The designed project is based on open source libraries, like Open Dynamic Engine or OpenGL.

Introduction Our mechatronic team is focused on autonomous mobile robots development, wheeled robots as well as legged robots. There are many problems, which have to be solved in development of hierarchical control architecture, which our team uses for mobile robots design. The lowest layer is represented by hardware, i.e. construction of a robot with driving gears. The higher (second) layer consists of lowlevel control units for driving gears and motors. The third layer ensures basic movements of the robot, in the case of legged robot the walking gait generation. The highest layer usually involves suitable algorithm of global localization. For more details about such architecture see [1]. The main goal of this issue is to describe the designed solution, which can be used to verify abilities of various algorithms of the two highest layers. Thus, in our case, it is used mainly for testing the walking gait generation algorithms based on state space search methods, see [2], and also for global localization algorithms [3]. However, the submitted solution can be also used for path planning algorithms, investigation of dynamic influences in mobile robot control, testing algorithms for unknown spaces mapping, see [4], and many others.

2

Used approach One of the main aims was to find suitable tools that meet our requirements, e.g. high accuracy, incorporation of existing programming code of walking gait generation algorithms, 3D graphical representation of simulation, involving static and dynamic effects from acting forces, etc. We can choose from many various readymade solutions for robot modeling and walking gait simulations. There are at least two different approaches to creating model of mobile robots. First approach uses commercial modeling software, e.g. Adams or Inventor. These simulation packages represent very powerful and sophisticated tools, which can be used to very precisely modeling. But even these very expensive programs have limitations. The main disadvantage in our case is inability of integration of our own programming code, used for walking gait generation or robot localization. Another approach is based on special 3D engines, e.g. Irlicht or ODE. These engines are able to represent dynamic world with colliding rigid bodies, joints, surface or body forces and torques. However, they do not usually provide graphical interface for 3D representation of simulating world. Most of them are provided for free using dll libraries and detailed API description. We have decided to build our own solution based on combination of Open Dynamics engine (ODE) and OpenGL. The engine is used to create virtual world with colliding bodies and acting forces. The OpenGL library is used for 3D graphical representation of simulation. The Python is used as the main programming language for implementing whole solution. The point at issue is the design of architecture that enables incorporating these tools into one project and also enables simple integration of program code for robot manipulation. Furthermore, another problem is choosing an appropriate format of data, which could be used for storing, holding and loading the state of simulation at any time, for details see next chapter.

Implementation The designed solution represents stand alone application, which was designed for the purpose of different mobile robots acting in different inner spaces. This application software is based on Open Dynamics Engine. Using the ODE in a programming code of python language is enabled through PyODE. The PyODE project is a set of open-source libraries, which are used to call ODE functions from Python code and also includes a parser of XODE (extensible markup language for open dynamics engine) format. Thus, the Xml ODE format can be used to describe simulated world with all its bodies, geometries, joints, acting forces and many others. The designed application uses XODE format to save, store and load states of simulation.

3

Fig. 1 Simplified scheme of proposed solution

Simplified scheme of the inputs and outputs of whole application is shown on Fig. 1. The proposed application enables to load any inner spaces with the model of mobile robot from XODE format file. The application contains preprepared blank subroutines for including the code to manipulate the robots, e.g. inner space mapping. The application enables to run simulation with numerical output, graphical output is optional. It is possible to save the state of simulation at defined time steps into XODE format file. The application has no graphical user interface, thus all mentioned settings has to be accomplished using handwriting of the python program code. The generator has been developed for the purpose of creating miscellaneous complex inner spaces with furniture of office visual appearance, as you can see on Fig. 2. This generator enables to create various inner spaces in an easy way using predefined set of parameters and save these spaces in XODE format. It is possible to specify built-up area and number of rooms, with or without furniture, number of pieces of furniture in any room, and many others. Rooms can be of square shape or polyhedral shape. The overall arrangement of rooms can be alternatively generated using Lindenmayer system, see [5] for more information. Such created indoor spaces can be used as the inputs of the application mentioned above.

Obtained results Several tests with the real robot and the designed models were performed to judge the accuracy of proposed simulation and suitability of used software instruments. At first, several various inner spaces was created using the generator mentioned above, see Fig. 2. Thereafter the selected models of the robots were incorporated into these indoor environments and stored as XODE files. Such files were used as

4

the inputs of the proposed application. The walking gait task, see Fig. 3a, and the balancing task, see Fig. 3b, were used for testing whole solution.

Fig. 2 Inner spaces samples generated automatically by the generator, various rooms shapes

The robot of interest is the walking robot Qasimodo, developed on Brno Technical University, Institute of Automation and Computer Science. This four legged robot has two degrees of freedom on each leg. Movements of each leg are realized using 2 servomotors HS 300. The Qasimodo weights about 1000 grams (190g for each leg). Working space of each leg is 190 degrees in horizontal plane and 80 degrees in vertical plane. Whole model of this robot is composed of 21 rigid bodies and 24 joints, see [6] for more details. Resulting model is shown on Fig. 3. The walking gait used by the robot can be considered as a pseudo-dynamic cyclic forward gait composed of two cycling types of long steps. As soon as the first long step is finished, the second type of long step starts, for details see [2]. The walking gait simulation is realized by placing torques into the hinge joints of the ODE model. These torques are set as inputs of the model in requested time steps. Consequently, appropriate positions, velocities and accelerations in the next time step of all bodies, the model is composed from, are calculated by the model.

Fig. 3 Resulting dynamic simulation of a) walking robot task, b) balancing wheeled robot task

None of accomplished simulation tests froze or ended with the “simulation explosion”. Some details about walking gait simulation tests follow. The visual comparison based on 3D graphical representation of simulating walking gait with

5

the real walking gait showed approximate consistency. It means the walking gait diagram of both gaits correspond to each other. The sequence of foot steps as well as covered distance are practically equal. The measured data showed admissible consistency between the simulated walking gait and the real one. The difference is not cumulative, because there is no dependency on the number of steps. However, existing differences between measured and calculated data can be explained using special parameters of the ODE simulation. There are two parameters, error correction parameter (ERP) and constraint force mixing (CFM), which have to be set for each simulation. The ERP value controls how much error correction is performed in each time step of simulation, typically from 0.1 to 0.8. The CFM value can reduce numerical errors in the simulation, whenever the system is near singularity, typically from 10E-9 to 1. These non-dimensional parameters do not have any physical basement and must be set experimentally, which can be difficult and time-consuming.

Conclusion and discussion This contribution introduces the designed application, which can be used for dynamic simulations of various mobile robots in 3D indoor spaces. The designed solution is represented by the stand alone application based on Open Dynamics Engine, which is able to represent dynamic world with colliding rigid bodies, joints, surface or body forces and torques. The OpenGL libraries are used for 3D graphical representation of simulation. The XODE format of data has been chosen for storing, holding and loading the state of simulation. The proposed application enables to load any inner spaces with the models of mobile robots from XODE file and contains prepared blank subroutines for incorporating code to manipulate the robots. The application enables to run simulations with numerical output, graphical output is optional. The automatic generator of inner spaces was design too. This application is able to create various inner spaces and store these models in XODE format. Such files can be used as the inputs of the main application. Several tests with the real robot and the designed models were performed to judge the accuracy of proposed simulation and suitability of used software instruments, mainly the test of walking gait generation of four legged robot. None of accomplished simulation tests froze or ended with the “simulation explosion”. The measured data showed admissible consistency between the simulated walking gait and the real one. Thus proposed solution can be used to verify abilities of various algorithms from indoor mobile robots domain, especially for testing walking gait generation algorithms, methods for autonomous robots localization, path planning, unknown spaces mapping and many others.

6

References [1] D. Vlachy, P. Zezula, R. Grepl, “Control unit architecture for biped robot”, Recent Advances in Mechatronics, Berlin, Springer, p. 6 – 10, 2007. [2] V. Ondroušek, “Using the Open Dynamics Engine for Walking Robot Simulation”, Modelling of Mechatronic Systems IV, Brno University of Technology, pp.121-128, 2008. [3] S. Věchet, J. Krejsa, P. Houška, “The Enhancement of PCSM Method by Motion History Analysis”, Recent Advances in Mechatronics, Berlin, Springer, p. 107 – 110, 2007. [4] J. Krejsa, S. Věchet, “Dealing with Sensor Errors in Scan Matching for Simultaneous Localization and Mapping”, Engineering Mechanics, vol. 15, pp. 337-344, May, 2008. [5] P. Schreiber, “Automatic Environment Generator Design for Mobile Robot”, bachelor's thesis, Brno University of Technology, Faculty of Mechanical Engineering, Brno, 2008. [6] R. Seriš, “Using ODE for Design of Dynamic Model of a Four-legged Robot,” bachelor's thesis, Brno University of Technology, Faculty of Mechanical Engineering, Brno, 2008. Acknowledgement

Published results were acquired using the subsidization of the Ministry of Education, Youth and Sports of the Czech Republic, research plan MSM 0021630518 "Simulation modelling of mechatronic systems".

Suggest Documents