Skip to main content

Enabling Modern Application Development with Swift on the Nao/Pepper Robots

  • Conference paper
  • First Online:
RoboCup 2021: Robot World Cup XXIV (RoboCup 2021)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 13132))

Included in the following conference series:

  • 851 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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

  1. The computer language benchmarks game, April 2018. https://benchmarksgame-team.pages.debian.net/benchmarksgame/compare/swift-gcc.html

  2. Beekmans, G., Burgess, M., Dubbs, B.: Linux from scratch, April 2021. http://www.linuxfromscratch.org/lfs/

  3. 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

    Chapter  Google Scholar 

  4. Brooks, R.: A robust layered control system for a mobile robot. IEEE J. Robot. Autom. 2(1), 14–23 (1986)

    Article  Google Scholar 

  5. 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

    Chapter  Google Scholar 

  6. 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

  7. Drusinsky, D.: Modeling and Verification Using UML Statecharts: A Working Guide to Reactive System Design, Runtime Monitoring and Execution-Based Model Checking. Newnes (2006)

    Google Scholar 

  8. Eidhof, C., Kugler, F., Swierstra, W.: Functional Programming in Swift. Florian Kugler (2014)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. 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)

    Google Scholar 

  12. 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

    Chapter  Google Scholar 

  13. Fuller, K.: swiftenv documentation – release 1.4.0, 10 September 2018. http://buildmedia.readthedocs.org/media/pdf/swiftenv/latest/swiftenv.pdf

  14. GNU Project: GCC, the GNU Compiler Collection. https://gcc.gnu.org/

  15. GNU Project: GNU Binutils. https://www.gnu.org/software/binutils/

  16. GNU Project: GNU C Library (glibc). https://www.gnu.org/software/libc/

  17. Harel, D.: On folk theorems. Commun. ACM 23(7), 379–389 (1980)

    Article  Google Scholar 

  18. Harel, D., Politi, M.: Modeling Reactive Systems with Statecharts: The Statemate Approach. McGraw-Hill, New York (1998)

    Google Scholar 

  19. 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)

    Article  Google Scholar 

  20. The LLVM Project: The LLVM Compiler Infrastructure. https://llvm.org/

  21. 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

    Chapter  Google Scholar 

  22. Mataric, M.J.: Behavior-based control: examples from navigation, learning, and group behavior. J. Exp. Theor. Artif. Intell. 9, 323–336 (1997)

    Article  Google Scholar 

  23. Mataric, M.J.: The Robotics Primer. MIT Press, Cambridge (2007)

    Google Scholar 

  24. Mataric, M.: Integration of representation into goal-driven behavior-based robots. IEEE Trans. Robot. Autom. 8(3), 304–312 (1992)

    Article  Google Scholar 

  25. 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)

    Google Scholar 

  26. McColl, C.: SwiftFSM - a finite state machines scheduler. Honours thesis (2016)

    Google Scholar 

  27. McColl, C., Gilmore, E.: Swift on Pepper. https://github.com/mipalgu/SwiftOnPepper

  28. 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)

    Google Scholar 

  29. Nicolescu, M.: Lecture 6: Lecture notes autonomous mobile robots CPE 470/670 (2016). http://slideplayer.com/slide/5382727/

  30. 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)

    Google Scholar 

  31. 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

  32. Pilone, D., Pitman, N.: UML 2.0 in a Nutshell. O’Reilly Media, Inc. (2005)

    Google Scholar 

  33. 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)

    Google Scholar 

  34. 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)

    Google Scholar 

  35. Rumbaugh, J., Blaha, M.R., Lorensen, W., Eddy, F., Premerlani, W.: Object-Oriented Modelling and Design. Prentice-Hall, Englewood Cliffs (1991)

    MATH  Google Scholar 

  36. Samek, M.: Practical UML Statecharts in C/C++: Event-Driven Programming for Embedded Systems, 2nd edn. Newnes, Newton (2008)

    Book  Google Scholar 

  37. Scheepers, T.: Virtualization and containerization of application infrastructure: a comparison. In: 21st Twente Student Conference on IT (2014)

    Google Scholar 

  38. Sheu, P.C.Y., Xue, Q.: Intelligent Robotic Planning Systems. World Scientific Publishing, River Edge (1993)

    Book  Google Scholar 

  39. Singh, H.: Speed performance between swift and objective-C. Int. J. Eng. Appl. Sci. Technol. 1(10), 185–189 (2016). http://www.ijeast.com

  40. 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

  41. 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

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Callum McColl .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics