Abstract
The following paper introduces a new way of presenting the results of engineering simulations. The object of consideration is the motion of the snake robot on a flat surface. The robot’s trajectory and control signals are calculated in MATLAB. Different approaches have been presented to show how the robot moves - from 2D plots and 3D animations observed from a computer screen to realistic visualisations displayed in the Virtual Reality headset. The proposed VR simulation will allow watching the simulation results and manipulating simulation parameters from inside of VR.
You have full access to this open access chapter, Download conference paper PDF
Keywords
1 Introduction
Biomimetic robots are a class of robots that resemble a living organism’s shape, appearance, or behaviour. They are designed to use biological principles in engineered systems to behave like a natural being, allowing them to solve specific problems, not possible for standard machines [1]. A snake robot is an example of a biomimetic, hyper-redundant robot with many degrees of freedom. Changes in the internal shape cause the snake robot’s motion, similar to the natural biological creatures. Each robot configuration is characterized as a series of angles in joints connecting a series of robot segments [2].
Virtual Reality (VR) provides a platform to visualize the immersive behaviour of objects in a three-dimensional environment. Nowadays, VR is widely used in entertainment to enhance immersive movements. However, VR is also popular among researchers to construct complex environments in simulation and observe the behaviour of objects.
A comprehensive review of virtual reality interfaces for controlling and interacting with robotics is presented in [3]. The authors describe that VR interfaces are not only used for visualization but also for robotic interaction, planning, usability and infrastructure for both expert and non-expert users. However, this review couldn’t include biomimetic robotics. In [4] motion of haptic snakes-serpentine shapes is investigated for multiple feedback, i.e. tapping and gesture feedback in virtual reality. However, literature related to snake robots in virtual reality is limited.
The main aim of this paper is to present a VR environment prototype to visualise the snake robot’s motion. The proposed system can be used to evaluate different robot control algorithms.
This article is organized as follows. The Introduction section describes the importance of virtual reality simulations in snake robot design. Section 2 describes the snake model used in this paper. Section 3 presented a snake robot simulation in MATLAB. Section 4 presents results and simulations in MATLAB and Unity software. Finally, the conclusions and future works are given
2 Snake Robot Model
The model used in the article is based on widely used equations of snake robot motion on a flat horizontal surface. The dynamical model of the snake robot can be derived based on the torque equilibrium equation. A detailed description of the model can be found in [5] and [6]:
where \(\textbf{S}_{\theta }=diag(sin(\theta )) \in \textbf{R}^{N \times N}\) and \(\textbf{C}_{\theta }=\text {diag}(cos(\theta )) \in \textbf{R}^{N \times N}\) are square matrices with trigonometric functions of link angles at the diagonal and zeros in the remaining elements, and link angles \(\boldsymbol{\theta }=\left[ \theta _{1}, \ldots , \theta _{N}\right] ^{T} \in \textbf{R}^{N}\) in global coordinate system. The vector \(\boldsymbol{u} \in \textbf{R}^{N-1}\) defines the controllable parameters - actuator torques exerted on successive links. The \(\textbf{f}_{R, x}\) and \(\textbf{f}_{R, y}\) vectors represent components of friction force on the links in global x and y direction.
The movement of the snake robot is possible due to anisotropic friction force. The friction coefficient in the longitudinal direction of each joint is much lower than the coefficient in the lateral direction. This property allows the robot joints to slide in the forward direction.
3 MATLAB Simulations
The robot’s equations of motion have been implemented in MATLAB software and solved using the ode solver. MATLAB implementation also included control algorithms that allowed the snake robot head to reach a designated position. It is also possible to track the position of the robot’s centre, but it is less useful in trajectory tracking problems.
A simple path-following method by the snake robot is called a Line-of-Sight (LoS) method [7]. According to this method, the robot is tracking a straight line. This approach requires the definition of the global coordinate system \(\{x, y\}\) in which the x axis is aligned along with the forward movement. The implementation of LoS algorithm is available at [11, 12]. Full description of the program and implemented snake robot model can be found in [9].
The MATLAB Model Predictive Control Toolbox allowed the implementation and testing MPC algorithm in trajectory tracking. Two MPC variations have been tested - when all joints of the robot could move independently and when all joints were coupled in sinusoidal function. In the first case, the MPC algorithm calculated nine independent variables for ten segment robot. In the second case, there where only three variables - parameters of the function \(a_1(sin(a_2+a_3\cdot i))\) where i is the segment’s number. Figure 1 shows the comparison of the resultant trajectory of the robot head for different control algorithms. During simulation the robot consisting 10 segments of length 0.2 m the robot had to achieve the following points one by one: (2.5 m, 0 m), (3 m, −1 m), (4 m, 0 m), (6 m, 1 m), (8 m, 1 m).
The resultant position and orientation of snake robot links at each moment have been saved to the txt file for each control strategy. Based on this information, visualisation programs can fully restore the snake robot’s motion
4 Visualisation of the Snake Robot Motion
4.1 Simulink 3D Animation
Visualization of robot movement is implemented using a MATLAB Simulink 3D Animation toolbox. The geometry of the robot segment is imported from the STL file created in SOLIDWORKS. The details of the segment design were described in [9]. The introduced framework allows simulating the robot’s motion for different geometry parameters (e.g., number of joints, weight, friction coefficients), target trajectories (position of points to follow), and control parameters (e.g., head/centre tracking, controller gains, joints’ disturbances). The ready-to-use code with comments, helping to run the software, is available in [11] and [12]. The main LiveScript file start.mlx contains a detailed description of the model and its implementation. The Simulink file VRmodel2.slx enables running 3D visualization of the snake motion shown in Fig. 2.
4.2 3D Simulations in Unity
The following work step was the implementation of the 3D visualisation of the snake robot using software dedicated to graphical animations. We used Unity Engine and Oculus Interaction SDKK [8]. The implemented program allows simulation in Oculus Quest 2 headset [10]. The user can interrupt the program execution using VR controllers. The visualisation program used the same CAD segments as the animation described in Sect. 4.1. The position and orientation of the robot segments in consecutive moments were interpolated using data read from a txt file generated by MATLAB. The virtual environment also displays the location of the reference point the snake is currently following (Fig. 3).
The main advantage of VR visualisation is that the user can observe the snake robot’s motion from any distance and perspective. The proposed solution allows users to catch any distortion of robot motion and get an idea of how would the real robot behave.
Aside from the segments position program can also visualise the velocity of each segment. For this purpose, an animation shows a point corresponding with the future segment’s position. The current and future coordinates line describes the robot’s velocity value and direction. Users can change the selected link at any time during the simulation (Fig. 4).
By manipulating the Oculus Quest 2 controllers, the user can change the speed of the simulation, stop it or rewind it. There is also a Graphical User Interface (GUI) shown in VR, which allows manipulating the simulation time, restarting it or running different simulations by changing the file with the positions of robot segments. The GUI provides for changing the selected link for velocity visualisation and includes sliders, push, toggle, and a drop-down list. The user interacts with GUI elements by “ray” going out from the controller.
5 Conclusions
Virtual Reality is a very innovative and quickly developing technology. It offers the possibility of not only observing but also experiencing the virtual environment. Above entertainment, education and socialization, it brings unique opportunities in engineering research. The article shows a novel way of using VR for visualization of the motion of the snake robot. This approach can significantly affect the development of control algorithms for robotic systems.
Future work should concentrate on observing the snake robot’s motion and interacting with it from VR. Visualisation in Unity and simulation in MATLAB will run parallel, and there will be established communication between both programs. The program will allow changing of the robot’s trajectory from the interior of VR, so the observer wearing a VR headset could analyze the robot’s motion and interact with it in real-time. The destination point that the robot should reach would be assigned by a user using the VR controller. The user will mark the desired position of the robot on the floor and click the trigger button to record it. Unity would send the coordinates of the chosen point to MATLAB. Unit-MATLAB communication will be based on TCP protocols. The control algorithm implemented in MATLAB would calculate the target trajectory based on the received reference point. The computed positions of segments will be sent back to Unity, and the output robot’s configuration will be displayed in VR. The new versions of the program GUI will include the algorithm selection and allow for parameter changes.
References
Siciliano, B., Khatib, O. (eds.): Springer Handbook of Robotics. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-32552-1
Hirose, S.: Biologically Inspired Robots, in Snake-Like Locomotors and Manipulators, p. 1993. Oxford University Press, Oxford (1993)
Wonsick, M., Padir, T.: A systematic review of virtual reality interfaces for controlling and interacting with robots. Appl. Sci. 10(24), 9051 (2020). https://doi.org/10.3390/app10249051
Al-Sada, M., Jiang, K., Ranade, S., Kalkattawi, M., Nakajima, T.: HapticSnakes: multi-haptic feedback wearable robots for immersive virtual reality. Virtual Reality 24(2), 191–209 (2019). https://doi.org/10.1007/s10055-019-00404-x
Liljebäck, P., Pettersen, K.Y., Stavdahl, Ø., Gravdahl, J.T.: Snake Robots: Modelling, Mechatronics, and Control, pp. 29–37. Springer, London (2013). https://doi.org/10.1007/978-1-4471-2996-7
Sato, M., Fukaya, M., Iwasaki, T.: Serpentine locomotion with robotic snakes. IEEE Control Syst. 22, 64–81 (2002). https://doi.org/10.1109/37.980248
Kelasidi, E., Liljeback, P., Pettersen, K.Y., Gravdahl, J.T.: Integral line-of-sight guidance for path following control of underwater snake robots: theory and experiments. IEEE Trans. Robot. 33, 610–628 (2017). https://doi.org/10.1109/TRO.2017.2651119
Oculus Integration at Unity Asset Store. https://assetstore.unity.com/packages/tools/integration/oculus-integration-82022. Accessed 3 Dec 2021
Sibilska-Mroziewicz, A., Możaryn, J., Hameed, A., Fernández, M.M., Ordys, A.: Framework for simulation-based control design evaluation for a snake robot as an example of a multibody robotic system. Multibody Syst. Dyn. 55(4), 375–397 (2022). https://doi.org/10.1007/s11044-022-09830-3
Meta Quest documentation. https://developer.oculus.com/documentation. Accessed 3 Dec 2021
GitHub repository. https://github.com/asibilska/Snake-Robot-Locomotion-MATLAB-. Accessed 3 Dec 2021
Sibilska-Mroziewicz, A.: Snake-robot-locomotion-MATLAB, MATLAB central file exchange (2021). https://uk.mathworks.com/matlabcentral/fileexchange/102910-snake-robot-locomotion-matlab. Accessed 3 Dec 2021
Acknowledgment
This work was supported from the grant financed by the Dean of Mechatronics Faculty of Warsaw University of Technology (grant number 504/04735/1143/44).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Copyright information
© 2023 The Author(s)
About this paper
Cite this paper
Sibilska-Mroziewicz, A., Hameed, A., Możaryn, J., Ordys, A. (2023). Virtual Reality Simulations of the Snake Robot. In: Biele, C., Kacprzyk, J., Kopeć, W., Owsiński, J.W., Romanowski, A., Sikorski, M. (eds) Digital Interaction and Machine Intelligence. MIDI 2022. Lecture Notes in Networks and Systems, vol 710. Springer, Cham. https://doi.org/10.1007/978-3-031-37649-8_31
Download citation
DOI: https://doi.org/10.1007/978-3-031-37649-8_31
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-37648-1
Online ISBN: 978-3-031-37649-8
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)