Full text
OPTIMIZATION OF SNAKE-LIKE ROBOT LOCOMOTION USING GA: SERPENOID DESIGN Tom´aˇs H˚ulka1, Radomil Matouˇsek1, , Ladislav Dobrovsk´y1, Monika Dosoudilov´a1, Lars Nolle2 1Institute of Automation and Computer Science, Brno University of Technology, Czech Republic 2Department of Engineering Science, Jade University of Applied Sciences, Germany [email protected]r.cz Abstract This work investigates the locomotion efficiency of snake-like robots through evolutionary optimization using the simulation framework PhysX (NVIDIA). The Genetic Algorithm (GA) is used to find the optimal forward head serpentine gait parameters, and the snake speed is taken into consideration in the optimization. A fitness function covering robot speed is based on a complex physics simulation in PhysX. A general serpenoid form is applied to each joint. Optimal gait parameters are calculated for a virtual model in a simulation environment. The fitness function evaluation uses the Simulation In the Loop (SIL) technique, where the virtual model is an approximation of a real snake-like robot. Experiments were performed using an 8-link snake robot with a given mass and a different body friction. The aim of the optimization was speed and length of the trace. Keywords: Snake-like robot, serpenoid curve, genetic algorithm, physical simulation, PhysX. Received: 05 January 2020 Accepted: 25 February 2020 Published: 24 August 2020 1 Introduction Robotics has been rapidly developing for the past several decades and a variety of robots have been created. Many kinds of robots are inspired by animals and nature which is why bionics has become a trend lately. The development of undulatory robotic mechanisms, namely serially connected, multi-link articulated robots, has attracted significant interest from the point of view of existing and emerging applications related to site inspection, search-and-rescue missions, and even health or industrial endoscopy, or even ocean exploration [5], [22]. Snake-like robots, also named snake-bots or simply snake robots are popular thanks to their high adaptability in different environments and terrains. They have flexible mobility and high stability with low center of mass. The study of snake robots was started by Hirose [7] and Umetani in 1976. Hirose and Umetani found that the movement of natural snakes on constant-friction surfaces is very close to the so called the serpenoid curve. Dynamics, kinematics, modelling and the optimization of snake-robots is based on serpentine locomotion. Most of them successfully use serpenoid curves. Kinematics of snake motion and mechanical designs of snake-like robots have been developed in [8]. Robotic mechanisms have also been designed with snake locomotion in unstructured environments as a focus from Liljeb¨ack [23]. A model of a snake robot without wheels is described in [20]. This model is based on the directional friction coefficients and an optimally efficient serpentine locomotion was investigated. Snake locomotion from the perspective of geometric mechanics and a particular model based on Hirose’s active cord mechanism was analyzed in [18], [16], and [19]. Another approach was followed by Chirikjian and Burdick [3]. They describe robots with a very large number of degrees of freedom and coined the term hyper-redundant [4]. We should also mention the research of Petterson and her colleagues from the last decade. They present a new mathematical model for wheel-less snake robots and solve obstacle-aided locomotion [23]. The modelling of snake robots, physical development of these mechanisms and control design efforts for snake locomotion are demonstrated in [15]. We can divide snake robots by type of contact force of body [14]. The robots with contact force given by wheels are frequently used. This robots can be divided to two types: with passive wheels (Fig. 1), which was used in our study, and without passive wheels. The robots with passive wheels utilize the force which actuated the joints (joints connect the links). In biology, snake movements are classified into four main classes: serpentine, rectilinear, concertina, and side-winding. For our purpose we will study serpentine locomotion, which is known as lateral undulation and can be described as a wavy motion. In serpentine locomotion, when a snake starts to move, the entire body moves, and all parts follow the same path as the head. When the snake stops moving, the entire body stops simultaneously. Propulsion is not by contraction waves undulating the body but by a simultaneous lat-
eral thrust in all segments of the body in contract with solid projections. The most important part in snake robot design is to select the number of elements. A real snake has almost 200. Typically, a robot consists of 6-20 chains. For our experiments, we have selected a mechanism with 8 links. The features of real snake skin was approximated by passive wheels and the joints were realized using active actuators (Fig. 1). Figure 1: Physical model of Snake-like robot (8 links, 7 DOF). There are three main methods of control of serpentine locomotion for a snake-like robot: serpenoid, CPG, and CGA. The first one is a mathematical approach using the modelling of snake motion by serpenoid curve [20]. This method was used for the robot control in our case. Serpenoid curve design influences the robot speed; this is the aim of our optimization. Of course, the physical features of the robot as friction or mass influences the speed of the robot, too. Because serpenoid is a function of several parameters, it can be optimized, for example, using evolutionary computational methods [12], [2]. Let us emphasize that the optimization is strongly influenced by the physical properties of the robot, its dynamics, and thus, it is a very complex task to optimize and control the mechanism of the robotic snake [21]. Another frequently used control method is CPG. The CPG method is based on the Central Pattern Generator (CPG), which is a rhythmical motion generator existing in most animals. This kind of control method for simulating a snake’s rhythmic movement in recent years has been widely used in the realization of the locomotive function of snake-like robots [6] and [1]. CPG is a neural network that exists in the spinal cords of living forms which is utilized as an activation signal for muscle contractions, i.e. mechanical joints in the robot [24]. The latest and relatively new method of robotic snake control is based on conformal geometric algebra (CGA) [9]. This method is computationally highly effective [17]. The drawback is the assumption that the wheels only roll, and the shear force is endless [11]. This property disadvantages the direct physical implementation because it computationally leads to singularities. For example, a straightened snake cannot cross over to serpenoid locomotion [10]. The real model is implemented in the PhysX environment as a virtual model for the Software In the Loop (SIL) simulation. The SIL is an input for fitness function evaluation Fig. 2. Figure 2: Main components of evolutionary optimization loop. The GA engine sets the parameters for serpenoid curve, this parameters drive the actuators in SIL simulation. Finally, the response from SIL simulation is use for fitness evaluation. 2 Serpenoid Curve It is very popular to follow and imitate different features of animals. For our purposes, we are interested in snake-like locomotion. Hirose [7] proved that the most economic gait is the serpentine for two-dimensional motion and discovered that a close approximation to the shape of a biological snake during lateral undulation is given by a planar curve whose curvature varies sinusoidally. He described it and named it the serpenoid curve. Many modifications of the equation of serpenoid curve exist [20], [13]. According to [8], the continuous serpenoid curve can be described x(s) = Zs 0 cos(acos(bσ) + cσ)dσ y(s) = Zs 0 sin(acos(bσ) + cσ)dσ, (1) where a,b,care considered as serpenoid parameters as fundamental properties of snake robot locomotion. The parameters define the wave shape and can be changed. Parameter arepresents undulation, bthe periods, and cinfluences the curl of the curve (Fig. 3). With the same specification of a,band c, we can use discrete approximation of serpenoid curve (Fig. 4) xi= i X k=1 L ncos acos kLb n+kLc n yi= i X k=1 L nsin acos kLb n+kLc n, (2) where points [xi, yi] for i= 1, . . . , n −1 we can take as joints of our snake robot.
Figure 3: Influence of parameters a,b,con the shape of the serpenoid curve. We will consider [x0, y0] as the start - tail and [xn, yn] as the end - head of our snake robot. According to (2), [x0, y0] is the origin of the coordinate system. We will suppose to have nlinks of the same length L n. Figure 4: Simplified model of snake-like robot with n segments. We can derive the angle θibetween the i-th link and the x-axis tan θi=∆yi ∆xi =yi−yi−1 xi−xi−1 = =sin acos iLb n+iLc n cos acos iLb n+iLc n= =tan acos iLb n+iLc n, i = 1, . . . , n. From here it is evident θi=acos iLb n+iLc n.(3) For our purpose we need relative angles for i= 1, . . . , n −1 φi=θi−θi+1 = 2asin iLb n+Lb 2nsin Lb 2n−Lc n. Using denotation α= 2asin β 2,β=Lb n,γ=−Lc n, we receive more elegant expression for relative angles φi=αsin iβ +β 2+γ. (4) Without loss of generality we can suppose the phase difference as a function of time in this form φi(t) = αsin (ωt + (i−1) β) + γfor i= 1, . . . , n −1, (5) where ωis the angular frequency. 3 Physical Simulation Many complex simulation environments have been created over the course of last few years. The usual simulation environment provides physical object simulation with their interactions including collisions, friction, and gravity. Several open-source tools are available, such as Gazebo, V-REP, ARGoS and many commercial solutions such as Matlab/Simulink or MSC Nastran can be used. All these environments use physical engines, or physical simulators, which are different in many features. To accurately simulate the complex dynamics of a snake-like robot, an appropriate software tool was needed. Available environments were evaluated and, for the simulation purposes of this paper, PhysX was chosen. PhysX is a physics-based framework originally developed by Ageia, which was acquired by NVIDIA. Subsequently, NVIDIA added their GPU support in the PhysX framework to harness the capability of their general-purpose computation framework CUDA. In general, the PhysX framework supports the realtime simulation of various physical entities, such as rigid bodies as well as collision detection and response algorithms, with a focus on applications in the gaming industry. During the standard optimization process, the objective function can usually be described by a set of mathematical formulas. More complex cases sometimes also need some kind of state logic. In the most complex cases, like a snake-like robot locomotion optimization, where the description of the whole model is too difficult, even these methods are not enough. In these cases, it is especially useful to use a proper simulation environment – such as a physics engine like in our case. The physics engine considers internal connections, force interactions with the environment like friction, rolling resistance, and model and environment properties, etc. A special approach was used, where the fitness function considers the speed of the snake and the distance the snake travelled, respectively. For evaluation an SIL technique based on complex physics simulation was used. The full physics simulation allows for an easy definition of bounding conditions, e.g. when the snake needs to navigate through a constrained environment with obstacles. It also allows for simple analysis of the influence of physical parameters on the objective function i.e. verification of mathematical model.
Genetic algorithm uses SIL for transparent evaluation of the population, which in this case means finding the values of forces and inertia in the joints of the model, which represent the control parameters of the actuator. From the point of visualization, the individuals of the GA population are interpreted directly as snake robots, which allows for good comparison of snake-like movement with the biological idea of this kind of locomotion. Figure 5: Simulation model of Snake-like robot. The serial snake robot (Fig. 5) was designed under the assumption that lateral undulation is a locomotion movement confined to a planar surface. The robot consists of modules combined together sequentially using revolute joints with 1 DOF, exhibiting multiple DOF for the robot. Each robotic module (link with wheels) is a uniform solid cuboid with mass and friction. The simulation model of the snake-like robot was designed similarly to the physical model (Fig. 1) with a length of 1 [m] and weight of 1 [kg]. Serpenoid parameters were optimized with a genetic algorithm. A design of a specific GA implementation was not the main focus of this paper, therefore a MATLAB version of GA was used and some of its settings can be seen in (Tab. 1). A standalone GA implementation is currently being developed for future research. Table 1: Genetic algorithm settings parameter value Population Size 100 Selection Type tournament Tournament Size 4 Crossover Type single-point Crossover Fraction 80% Mutation Type flip bit Mutation Fraction 5% Elite Count 5% Max Generations 300 Termination fixed number of generations The key component of the genetic algorithm – the fitness function – was calculated in a physics simulation in the PhysX environment. The center of mass of the snake’s head segment was considered as a reference point and the value of of the fitness function was calculated as a total distance that this point travelled over 30 seconds. It can be expressed as p|xs−xe|2+|ys−ye|2, where [xs, ys] are coordinates of the reference point at the start of the simulation (t= 0 s) and [xe, ye] are coordinates of the reference point at the end of the simulation (t= 30 s). This works as a SIL (Fig. 2) where the GA continually evaluates the population of snake robots through simulation, which returns certain parameters back to the GA. An example of a population can be seen in Fig. 6, in detail in Fig. 7. Figure 6: Visualisation of GA population. The individuals of the population can be displayed directly as the snake-like robots. Of course, GA optimization and fitness evaluation does not need the visualisation, but it is very proper tool for verification of the progress. The parameters for optimization were those variables which had a direct positive effect on the velocity of the snake, which were a,band ω. Parameter cwas not optimized due to the fact it has only negative effect on the results, and because it makes the snake turn, which is counter-productive when the snake is trying to move as fast as possible in a straight line. Each parameter was optimised in a particular search interval. Parameter awas optimised in an interval [7π 8,9π 8], parameter bin [3π 2,5π 2] and parameter ωin [1, 3]. Figure 7: The detail of a snake robot during GA optimization process visualized by SIL simulation. Notice the serpenoid shape of the robot. Three testing environments were created to introduce different conditions for snake movement. The first environment has lower friction between the snake and the ground which means less traction and more difficult movement. The second environment has average friction which does not significantly hinder nor enhance the movement abilities of snake robots. The third environment introduces higher friction between the snake and the ground, which means that the snake does not slide around and can focus on moving forward. In each of these environments, the GA tried to find the optimal settings for movement under these conditions. Each generation had 100 individuals which had 30 seconds to get as far as possible. Then the distances they travelled were given to the fitness function of the GA, the current population was evaluated, and a new population was generated. Each population iterated over 300 generations and each environment was tested 150 times. The parameters of the best individual of each run are shown in Fig. 8. for a lower friction environment, Fig. 9. for a normal friction environment, and Fig. 10. for a higher friction environment.
Figure 8: Influence of a,band ωparameters on the maximal distance travelled over 30 seconds in a lower friction environment. Horizontal lines display ranges of given parameters. It is obvious that this environment was the most difficult one to traverse out of the 3 available and that is the reason why the travelled distance is much lower compared to the other 2 environments. Figure 9: Influence of a,band ωparameters on the maximal distance travelled over 30 seconds in an environment with normal friction. Horizontal lines display range of given parameters. Figure 10: Influence of a,band ωparameters on the maximal distance travelled over 30 seconds in a higher friction environment. Horizontal lines display ranges of given parameters. This was clearly the easiest environment to traverse. Snake robots performed much better there than in the previous 2 cases and also travelled farther. Notice the friction environment means dry friction as a force that opposes the relative lateral motion of two solid surfaces in contact. The shapes of the trajectories these snake robots take are closely related to the parameters of the control, robot design, and the environment. The examples of trajectories made by the fastest snake robots with mentioned settings can be seen in Fig. 11 and Fig. 12. Figure 11: Lower friction experiment. Still frame from an animation, created with the results of the 30 second simulation of the robot locomotion; orange represents a snake head link trajectory and blue represents the last link trajectory. The trajectories clearly show that the friction was low enough for the snake to begin sliding, which explains the exaggerated swinging and inefficient movement. Figure 12: Higher friction experiment. Still frame from an animation, created with the results of the 30 second simulation of the robot locomotion; orange represents a snake head link trajectory and blue represents the last link trajectory. The trajectories clearly show that the friction was high enough to prevent the snake from sliding and created enough traction for the snake to move forward efficiently. 4 Conclusions In this paper, we utilized GA to optimize the serpenoid parameters of the snake robot in order to achieve maximum robot speed. We have presented a general method for estimating the serpenoid motion of an 8-link snakelike robot on flat ground. The effects of the parameter settings on the performance of a snake robot in serpentine locomotion are investigated. Complex dynamics and kinematics of snake robot are included in the SIL simulation which is performed by PhysX. Using a realtime GAs engine for serpenoid parameter tuning the speed optimal locomotion of the robot was obtained for different friction bases. This work can provide a foundation for the future snake-like robot research using GA optimization and SIL simulation. Acknowledgement: This work was supported by The Ministry of Education, Youth and Sports of the Czech Republic, project INTER-COST project LTC18053 and European COST Action CA15140, ImAppNIO and project of Grant Agency of the Czech republic 17-21360S: Advanced robotic snakes control.
References [1] Billah, M. M., and Khan, M. R. Bio-inspired snake robot locomotion: A cpg-based control approach. In 2015 5th National Symposium on Information Technology: Towards New Smart World (NSITNSW) (2015), pp. 1–6. [2] Bujok, P., Tvrdik, J., and Polakova, R. Nature-inspired algorithms in real-world optimization problems. Mendel 23 (2017), 7–14. [3] Chirikjian, G. S., and Burdick, J. W. An obstacle avoidance algorithm for hyper-redundant manipulators. In Proceedings., IEEE International Conference on Robotics and Automation (1990), vol. 1, pp. 625–631. [4] Chirikjian, G. S., and Burdick, J. W. The kinematics of hyper-redundant robot locomotion. IEEE Transactions on Robotics and Automation 11, 6 (1995), 781–793. [5] Hannigan, E., Song, B., Khandate, G., Haas-Heger, M., Yin, J., and Ciocarlie, M. Automatic snake gait generation using model predictive control, 2019. [6] Hasanzadeh, S., and Tootoonchi, A. A. Adaptive optimal locomotion of snake robot based on cpg-network using fuzzy logic tuner. In 2008 IEEE Conference on Robotics, Automation and Mechatronics (2008), pp. 187–192. [7] Hirose, S., Cave, P., and Goulden, C. Biologically Inspired Robots: Snake-like Locomotors and Manipulators. Oxford science publications. Oxford University Press, 1993. [8] Hirose, S., and Yamada, H. Snake-like robots [tutorial]. IEEE Robotics Automation Magazine 16, 1 (2009), 88–98. [9] Hrdina, J., , N´ avrat, A., Vasik, P., and Matouˇ sek, R. Local control of (4,5,7,8-10)-filtration snake robot via cga. Mendel 23 (2017), 157–162. [10] Hrdina, J., N´ avrat, A., Vaˇ s´ ık, P., and Matouˇ sek, R. Cga-based robotic snake control. Adv. Appl. Clifford Algebras 27 (2017), 621–632. [11] Hrdina, J., N´ avrat, A., Vaˇ s´ ık, P., and Matouˇ sek, R. Geometric control of the trident snake robot based on cga. Adv. Appl. Clifford Algebras 27 (2017), 633–645. [12] Jinguo Liu, Yuechao Wang, Bin Ii, and Ma, S. Path planning of a snake-like robot based on serpenoid curve and genetic algorithms. In Fifth World Congress on Intelligent Control and Automation (IEEE Cat. No.04EX788) (2004), vol. 6, pp. 4860–4864. [13] Kalani, H., and Akbarzadeh, A. Parameter optimization of a snake robot using taguchi method. In Mechanical and Aerospace Engineering, ICMAE2011 (1 2012), vol. 110 of Applied Mechanics and Materials, Trans Tech Publications Ltd, pp. 4220–4226. [14] Liljeb¨ ack, P., Pettersen, K., Stavdahl, Ø., and Gravdahl, J. Snake Robots: Modelling, Mechatronics, and Control. Advances in Industrial Control. Springer London, 2012. [15] Liljeb¨ ack, P., Pettersen, K., Stavdahl, , and Gravdahl, J. A review on modelling, implementation, and control of snake robots. Robotics and Autonomous Systems 60, 1 (2012), 29 – 40. [16] Lim, J., Yang, W., Shen, Y., and Yi, J. Analysis and validation of serpentine locomotion dynamics of a wheeled snake robot moving on varied sloped environments. In 2020 IEEE/ASME International Conference on Advanced Intelligent Mechatronics (AIM) (2020), pp. 1069–1074. [17] Matouˇ sek, R., and N´ avrat, A. Trident snake control based on cga. Mendel 2015, Advances in Intelligent Systems and Computing 378 (2015), 375–385. [18] Ostrowski, J., and Burdick, J. Gait kinematics for a serpentine robot. In Proceedings of IEEE International Conference on Robotics and Automation (1996), vol. 2, pp. 1294–1299. [19] Ouyang, W., Liang, W., Li, C., Zheng, H., Ren, Q., and Li, P. Steering motion control of a snake robot via a biomimetic approach. Frontiers of Information Technology Electronic Engineering 20 (2019), 32–44. [20] Prautsch, P., Mita, T., and Iwasaki, T. Analysis and control of a gait of snake robot. IEEJ Transactions on Industry Applications 120, 3 (2000), 372–381. [21] Saito, M., Fukaya, M., and Iwasaki, T. Modeling, analysis, and synthesis of serpentine locomotion with a multilink robotic snake. IEEE Control Systems Magazine 22, 1 (2002), 64–81. [22] Sekaj, I., Cifersky, L., and Hvozdik, M. Neuro-evolution of mobile robot controller. Mendel 25 (2019), 39–42. [23] Transeth, A. A., Leine, R. I., Glocker, C., Pettersen, K. Y., and Liljeb¨ ack, P. Snake robot obstacle-aided locomotion: Modeling, simulations, and experiments. IEEE Transactions on Robotics 24, 1 (2008), 88–104. [24] Wen, P., Linsen, X., Baolin, F., and Zhong, W. Cpg control model of snake-like robot parameters of optimization based on ga. In 2015 IEEE International Conference on Robotics and Biomimetics (ROBIO) (2015), pp. 1944–1949.