Abstract
We show the advantages of using Swift as the programming language for behaviours on the Pepper and Nao robots as used with the RoboCup Standard Platform League and the RoboCup@Home - Social Standard Platform. We show that Swift is not only incorporating modern features of object-oriented programming and functional programming, but is also now a stable systems programming language that enables both high-level development as well as fine hardware control. Deterministic memory management makes Swift suitable for real-time, embedded systems, and thus for robotic applications. Moreover, we show in this paper we can apply model-driven software-development by deploying behaviours coded as executable arrangements of logic-labelled finite-state machines (LLFSMs). We also show LLFSMs are not only suitable for reactive architectures, but also for deliberative architectures.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
This formally means that it should be as expressive as a Turing machine, including sequencing, conditionals, and iteration found in most imperative languages [17].
References
The computer language benchmarks game, April 2018. https://benchmarksgame-team.pages.debian.net/benchmarksgame/compare/swift-gcc.html
Beekmans, G., Burgess, M., Dubbs, B.: Linux from scratch, April 2021. http://www.linuxfromscratch.org/lfs/
Bouyssounouse, B., Sifakis, J.: Programming languages for real-time systems. In: Bouyssounouse, B., Sifakis, J. (eds.) Embedded Systems Design. LNCS, vol. 3436, pp. 338–351. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-31973-3_25
Brooks, R.: A robust layered control system for a mobile robot. IEEE J. Robot. Autom. 2(1), 14–23 (1986)
Carrillo, M., Estivill-Castro, V., Rosenblueth, D.A.: Verification and simulation of time-domain properties for models of behaviour. In: Hammoudi, S., Pires, L.F., Selić, B. (eds.) MODELSWARD 2020. CCIS, vol. 1361, pp. 225–249. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-67445-8_10
Diaz, D., Codognet, P.: The GNU prolog system and its implementation. In: ACM Symposium on Applied Computing, SAC 2000, NY, USA, vol. 2, pp. 728–732 (2000). https://doi.org/10.1145/338407.338553
Drusinsky, D.: Modeling and Verification Using UML Statecharts: A Working Guide to Reactive System Design, Runtime Monitoring and Execution-Based Model Checking. Newnes (2006)
Eidhof, C., Kugler, F., Swierstra, W.: Functional Programming in Swift. Florian Kugler (2014)
Estivill-Castro, V., Ferrer-Mestres, J.: Path-finding in dynamic environments with PDDL-planners. In: 16th International Conference on Advanced Robotics, ICAR, pp. 1–7. IEEE (2013)
Estivill-Castro, V., Hexel, R.: Arrangements of finite-state machines-semantics, simulation, and model checking. In: International Conference on Model-Driven Engineering and Software Development, pp. 182–189. SCITEPRESS (2013)
Estivill-Castro, V., Hexel, R., Ramirez Regalado, A.: Architecture for logic programing with arrangements of finite-state machines. In: 1st CPS Week Workshop on Declarative Cyber-Physical Systems, DCPS, pp. 1–8. IEEE (2016)
Estivill-Castro, V., Hexel, R., Lusty, C.: High performance relaying of C++11 objects across processes and logic-labeled finite-state machines. In: Brugali, D., Broenink, J.F., Kroeger, T., MacDonald, B.A. (eds.) SIMPAR 2014. LNCS (LNAI), vol. 8810, pp. 182–194. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-11900-7_16
Fuller, K.: swiftenv documentation – release 1.4.0, 10 September 2018. http://buildmedia.readthedocs.org/media/pdf/swiftenv/latest/swiftenv.pdf
GNU Project: GCC, the GNU Compiler Collection. https://gcc.gnu.org/
GNU Project: GNU Binutils. https://www.gnu.org/software/binutils/
GNU Project: GNU C Library (glibc). https://www.gnu.org/software/libc/
Harel, D.: On folk theorems. Commun. ACM 23(7), 379–389 (1980)
Harel, D., Politi, M.: Modeling Reactive Systems with Statecharts: The Statemate Approach. McGraw-Hill, New York (1998)
Javaid, M., Estivill-Castro, V.: Explanations from a robotic partner build trust on the robot’s decisions for collaborative human-humanoid interaction. Robotics 10(1), 51 (2021)
The LLVM Project: The LLVM Compiler Infrastructure. https://llvm.org/
Lötzsch, M., Bach, J., Burkhard, H.-D., Jüngel, M.: Designing agent behavior with the extensible agent behavior specification language XABSL. In: Polani, D., Browning, B., Bonarini, A., Yoshida, K. (eds.) RoboCup 2003. LNCS (LNAI), vol. 3020, pp. 114–124. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-25940-4_10
Mataric, M.J.: Behavior-based control: examples from navigation, learning, and group behavior. J. Exp. Theor. Artif. Intell. 9, 323–336 (1997)
Mataric, M.J.: The Robotics Primer. MIT Press, Cambridge (2007)
Mataric, M.: Integration of representation into goal-driven behavior-based robots. IEEE Trans. Robot. Autom. 8(3), 304–312 (1992)
McColl, C., Estivill-Castro, V. Hexel, R.: An OO and functional framework for versatile semantics of logic-labelled finite state machines. In: The 12th International Conference on Software Engineering Advances, ICSEA, pp. 238–243 (2017)
McColl, C.: SwiftFSM - a finite state machines scheduler. Honours thesis (2016)
McColl, C., Gilmore, E.: Swift on Pepper. https://github.com/mipalgu/SwiftOnPepper
McColl, C., Estivill-Castro, V., Hexel, R.: Versatile but precise semantics for logic-labelled finite state machines. Int. J. Adv. Softw. 11(3 & 4), 227–238 (2018)
Nicolescu, M.: Lecture 6: Lecture notes autonomous mobile robots CPE 470/670 (2016). http://slideplayer.com/slide/5382727/
Nicolescu, M.N., Mataric, M.J.: Deriving and using abstract representation in behavior-based systems. In: The 17th National Conference on Artificial Intelligence and 12th Conference on on Innovative Applications of Artificial Intelligence, p. 1087. AAAI Press (2000)
Owen-Hill, A.: What is the best programming language for robotics? (2016). https://blog.robotiq.com/what-is-the-best-programming-language-for-robotics-0
Pilone, D., Pitman, N.: UML 2.0 in a Nutshell. O’Reilly Media, Inc. (2005)
Rebouças, M., Pinto, G., Ebert, F., Torres, W., Serebrenik, A., Castor, F.: An empirical study on the usage of the swift programming language. In: 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), vol. 1, pp. 634–638 (2016)
Risler, M., von Stryk, O.: Formal behavior specification of multi-robot systems using hierarchical state machines in XABSL. In: AAMAS08-Workshop on Formal Models and Methods for Multi-Robot Systems, Estoril, Portugal (2008)
Rumbaugh, J., Blaha, M.R., Lorensen, W., Eddy, F., Premerlani, W.: Object-Oriented Modelling and Design. Prentice-Hall, Englewood Cliffs (1991)
Samek, M.: Practical UML Statecharts in C/C++: Event-Driven Programming for Embedded Systems, 2nd edn. Newnes, Newton (2008)
Scheepers, T.: Virtualization and containerization of application infrastructure: a comparison. In: 21st Twente Student Conference on IT (2014)
Sheu, P.C.Y., Xue, Q.: Intelligent Robotic Planning Systems. World Scientific Publishing, River Edge (1993)
Singh, H.: Speed performance between swift and objective-C. Int. J. Eng. Appl. Sci. Technol. 1(10), 185–189 (2016). http://www.ijeast.com
Solt, P.: Swift vs. Objective-C: 10 reasons the future favors Swift. InfoWorld (2015). https://www.infoworld.com/article/2920333/mobile-development/swift-vs-objective-c-10-reasons-the-future-favors-swift.html
Taylor, I.L.: A new elf linker. In: Proceedings of the GCC Developers’ Summit, pp. 29–36 (2008). http://ols.fedoraproject.org/GCC/Reprints-2008/taylor-reprint.pdf
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
McColl, C., Estivill-Castro, V., Gilmore, E., McColl, M., Hexel, R. (2022). Enabling Modern Application Development with Swift on the Nao/Pepper Robots. In: Alami, R., Biswas, J., Cakmak, M., Obst, O. (eds) RoboCup 2021: Robot World Cup XXIV. RoboCup 2021. Lecture Notes in Computer Science(), vol 13132. Springer, Cham. https://doi.org/10.1007/978-3-030-98682-7_2
Download citation
DOI: https://doi.org/10.1007/978-3-030-98682-7_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-98681-0
Online ISBN: 978-3-030-98682-7
eBook Packages: Computer ScienceComputer Science (R0)