Six Legged Walking Robot Simulation and Control

Autonomous mobile robots have become more and more important during last years. They are able to solve problems to dangerous for human beings. Special types of mobile robots are walking robots. This includes robots that locomote without wheels, or use walking wheels [9]. Their ability to cope with rough terrain makes them the best choice for many applications where standard wheeled vehicles are useless. Many different constructions were created. Most popular are biped [13], quadruped [2] and six legged constructions. Robots are often inspired by various life forms [11].


Introduction
Autonomous mobile robots have become more and more important during last years. They are able to solve problems to dangerous for human beings. Special types of mobile robots are walking robots. This includes robots that locomote without wheels, or use walking wheels [9]. Their ability to cope with rough terrain makes them the best choice for many applications where standard wheeled vehicles are useless. Many different constructions were created. Most popular are biped [13], quadruped [2] and six legged constructions. Robots are often inspired by various life forms [11].
Two main approaches can be used to control walking robot. First one is based on precise joint angle control. This approach is based on direct control of every DOF of the robot. The second is based on passive dynamics of the robot construction. In this case,

SIX LEGGED WALKING ROBOT SIMULATION AND CONTROL SIX LEGGED WALKING ROBOT SIMULATION AND CONTROL Tomáš Michulek -Vojtech Šimák -Ján Capák *
The authors present the first results of their scientific work related to design and development of the walking robot control systems in virtual reality. Six-legged walking robot was created along with its virtual counterpart simulated in virtual environment. A control system was created and tested on virtual model. This control system was then directly used to control real robotic construction. Differences between real and virtual robot behavior were analyzed.
part of the walk control problem is solved by robot construction. A precise joint control approach was used to control our robot.
Many software solutions were created to simulate walking robots. Examples can by found in [3] [6] [8] [10]. Simulation is being used to speed up the development of the robot construction and to optimize its control system. The evolution of computing hardware has enabled more p1recise simulation of complicated robotic construction during last few years.
In this paper, we present the results of our development of a six legged walking robot, along with its virtual counterpart. A control system developed to control these robots is also described.

Simulation software
Since no existing software package was able to fulfill all our current and future requirements, our own software development environment was created. The basic interface is shown in Fig. 1. The program has been created in C++ and GLSL programming languages and it uses OpenGL and SDL libraries. It works under Linux operating system (Fedora Core 6 distribution).
Simulation of a robot body is based on rigid body dynamics. The model consists of rigid segments connected together via flexible joints. Segments are defined by their geometric shape, mass and inertia matrix. Every rigid part is affected by various forces. These forces are generated in joints in order to preserve the model's geometric configuration. Another group of forces is generated as a result of a robot versus environment interaction. All these forces are then applied to a corresponding segment.
After transformation displayed in Fig. 2. every force F i is transformed to F t i , F d1 i and F d2 i parts. F t i affects movement of the segment.
Resulting force is given by an expression: Acceleration a , speed v and position c of segments centre of gravity are then given by: where T is actual time of simulation, c 0 is position and v 0 speed of the segment at the moment of a simulation start.
F d1 i with F d2 i forces affect rotation of the segment (Fig. 3.).
The resulting torque M i is given by an expression: The torque M affecting the segment is then computed by: Angular speed of the segment can be computed from the torque M .
Control system commands are not directly affecting forces generated in joints. Various preprocessing algorithms are used to simulate real world motors. The model of six legged robot contains virtual servo motors. Only an expected angle of the joint supplied to this servos and simple regulator generates appropriate forces. This way the behaviour of the simulated model can be externally affected. Simulation is being used for development and testing of control systems. Therefore, flawless behaviour from the physics point of view is not required. Only a decent degree of similarity between reactions of real and virtual model is needed.
Peripheral devices communication interface is a fundamental element of the application. It allows image acquiring from exter- Real robot models can be controlled via RS232 protocol. When a lower bit-rate is acceptable, the wireless data-transfer modules can be used. If necessary, the software can communicate via Internet using TCP/IP protocol too.

Created robots
For the purpose of practical tests we have constructed the real 6-legged walking robot. It is built from komatex plastic. We used six Hitec HS805BB and twelve Hitec HS645MG servos in the robot. Each leg is being moved by 3 of them. Whole construction has 18 DOF. The micro-controller AT Mega 16 which is placed inside the robot body receives information about a desired position of each servo via RS232 interface. Then it encodes information to PWM for the servos.
Every servo motor contains integrated analog regulator, which rotates joint to angle encoded in the PWM signal. This regulator is acting similarly to its virtual counterpart integrated in virtual servo motors.
Current supply of the robot is provided by PC-ATX power supply. Servos and micro-controller are operating with voltage +5 V. The current consumption is up to 20 A. The real robot is shown in Fig. 4.
When construction of the real robot had been finished, its virtual copy was created. Geometric parameters of real and virtual robot are nearly identical. Parameters of virtual servo motors can be changed in order to improve its performance and speed up work. The virtual model is shown in Fig. 1.

Control system
In order to test the behaviour of robots, a control system was developed (Fig. 5.). It allows the robot to walk in any direction, rotate and change distance between its body and a surface. The control system is divided into three cooperating blocks: • Central control • 6 individual leg controllers • Inverse kinematics solver The central control block coordinates steps of legs and its primary duty is to keep the robot balanced. At least three legs must be on the ground to ensure stability during walking. The individual leg controller must request permission from the central control before it can lift the leg from the ground. If the request of the leg controller is rejected, movement of the robot body is stopped until sufficient number of other legs is placed on the ground.
The individual leg controller generates vector w i , that defines direction in which the leg sole is supposed to move, relatively to the robot body. For example, if an expected movement of the robot body is m and the leg is on the ground, then w i is given by an expression: The actual position of the sole s i is then given by: Leg controller acts as a simple state machine. Its states are UP, LAYING, DOWN and LIFTING. The state DOWN is the only one of the four that grants support for the robot body. Leg controller must request permission from central control block, to leave the DOWN state.
The size of the leg movement vector w varies, depending on the current state of the leg . Lifting of the leg is faster than laying and the leg on the ground moves slower than lifted one.
Each leg has its own boundaries were its tip can be moved. These boundaries depend on geometric configuration of the leg. When the leg lying on the ground is about to leave its boundaries, it is lifted and moved in opposite direction. Initially, cylindrical boundaries were chosen in order to simplify control system creation. More complex shape will increase future algorithm performance. Inverse kinematics block transforms expected positions of the leg tips to expected angles of the joints. A simple algebraic solution is used for this purpose. This prevents any unwanted oscillations. Expected angles are used to control the motors directly. This approach allows us to change geometric configuration of the robot without the need to change any part the control system except inverse kinematics solver.

Experimental results
The initial tests and optimizations of the control system were made exclusively on the virtual model. Then, without further changes, the control system was connected to the real robot. During this test, the response of the real robot was very similar to the response previously observed in virtual reality. Only minor differences in specific situations were observed. This fact made doing changes of the control unit very easy, because no intensive testing on the real model was needed. When both robots were simultaneously connected to the same control system, difference between positions of their bodies became visually recognizable after 20-25 seconds. Simultaneous control was used to find hardware and software errors. For example, when power supply of one servo was partially unplugged, the behaviour of the real robot changed, but the virtual model behaviour remained the same. This directed us to a possible hardware problem, rather than a control system inconsistency. When the behaviour of both robots changed in a wrong way, the control system was checked first.
Resulting speed of the robot walking is given by expression: v ϭ Where is speed of the robot body movement, l s is length of each step, t u is time needed to lift leg from the ground, t d is time needed to lay leg on the ground, v f is speed of body supporting leg tip, v b is speed of the lifted leg tip, t s is additional time depending on current leg synchronization state. When the robot is walking straight in one direction, synchronized walking is possible and three legs move simultaneously. But when robot is moving and rotating at the same time, synchronization is lost and resulting movement is slower. This issue will be hopefully fixed during further control system optimization. Maximum walking speed achieved during our experiments was 1 m/s.

Conclusions
In this paper we demonstrated possibilities of using virtual reality for walking robot control system development and a simple walk control solution. Our results can be used for further research in the field of walking robot control system development. In our further work a combination of recently achieved results with artificial intelligence methods looks promising.