Abstract
The Functional Mock-up Interface (FMI) is a widely used industry standard for exchange and co-simulation of dynamic models as Functional Mock-up Units (FMU). It is supported by more than 100 modeling and simulation tools. In this chapter, we present two implementations of FMI that bridge the gap between these tools and the ROS and Gazebo community: First, the fmi_adapter package for running/simulating FMUs in ROS nodes, from https://github.com/boschresearch/fmi_adapter_ros2. Second, the gazebo-fmi package for integrating FMUs with Gazebo, from https://github.com/robotology/gazebo-fmi. After an introduction to the FMI standard, this chapter provides step-by-step, hands-on examples for both packages, followed by interface descriptions and selected implementation details. In addition to these tutorial-style sections, the chapter also provides comprehensive descriptions of two use-cases. First, it explains how the fmi_adapter enabled a convenient model-based control design workflow for a self-driving vehicle for industrial logistics. Second, it reports on the simulation of electrical actuators in Gazebo from a Modelica model.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
In versions before 1.14, navigate to the menu FMI and click Export FMU.
- 2.
The declare_parameter function was introduced in rclcpp in ROS 2 Dashing Diademata.
References
Modelica Association: Functional mock-up interface (FMI) website. https://fmi-standard.org/. Accessed 10 Aug 2019
C. Gomes, C. Thule, D. Broman, P.G. Larsen, H. Vangheluwe, Co-simulation: a survey. ACM Comput. Surv. 51(3), 49:1–49:33 (2018)
Robert Bosch GmbH: fmi\(\_\)adapter package for ROS. https://github.com/boschresearch/fmi_adapter. Accessed 10 Aug 2019
Robert Bosch GmbH: fmi\(\_\)adapter package for ROS 2. https://github.com/boschresearch/fmi_adapter_ros2. Accessed 10 Aug 2019
M. Neunert, T. Boaventura, J. Buchli, Why off-the-shelf physics simulators fail in evaluating feedback controller performance – a case study for quadrupedal robots, in Advances in Cooperative Robotics: Proceedings of the 19th International Conference on CLAWAR 2016 (World Scientific, 2016), pp. 464–472
J. Hwangbo, J. Lee, A. Dosovitskiy, D. Bellicoso, V. Tsounis, V. Koltun, M. Hutter, Learning agile and dynamic motor skills for legged robots. Sci. Robot. 4(26) (2019)
J. Tan, T. Zhang, E. Coumans, A. Iscen, Y. Bai, D. Hafner, S. Bohez, V. Vanhoucke, Sim-to-real: learning agile locomotion for quadruped robots, in Proceedings of Robotics: Science and Systems XIV (2018)
Italian Institute of Technology: gazebo-fmi plugins. https://github.com/robotology/gazebo-fmi/. Accessed 10 Aug 2019
G. Metta, L. Natale, F. Nori, G. Sandini, D. Vernon, L. Fadiga, C. von Hofsten, K. Rosander, M. Lopes, J. Santos-Victor, A. Bernardino, L. Montesano, The iCub humanoid robot: an open-systems platform for research in cognitive development. Neural Netw. 23(8), 1125–1134 (2010)
ITEA: Modelisar impact story. https://itea3.org/project/impact-stream/modelisar-impact-story.html. Accessed 21 Apr 2019
MathWorks, Inc.: What is an S-function? https://de.mathworks.com/help/simulink/sfg/what-is-an-s-function.html. Accessed 29 Apr 2019
T. Blochwitz, M. Otter, M. Arnold, C. Bausch, C. Clauß, H. Elmqvist, A. Junghanns, J. Mauss, M. Monteiro, T. Neidhold, D. Neumerkel, H. Olsson, J.-V. Peetz, S. Wolf, The functional mockup interface for tool independent exchange of simulation models, in Proceedings of the 8th International Modelica Conference, Dresden, Germany (Linköping University Electronic Press, Linköpings universitet, 2011)
Modelica Association: Functional mock-up interface for model exchange and co-simulation (Standard) (2014). https://svn.modelica.org/fmi/branches/public/specifications/v2.0/FMI_for_ModelExchange_and_CoSimulation_v2.0.pdf. Accessed 29 Apr 2019
T. Blochwitz, M. Otter, J. Akesson, M. Arnold, C. Clauß, H. Elmqvist, M. Friedrich, A. Junghanns, J. Mauss, D. Neumerkel, H. Olsson, A. Viel, Functional mockup Interface 2.0: the standard for tool independent exchange of simulation models, in Proceedings of the 9th International Modelica Conference, Munich, Germany (Linköping University Electronic Press, Linköpings universitet, 2012)
Modelica Association: Modelica website. https://www.modelica.org/. Accessed 10 Aug 2019
C. Bertsch, E. Ahle, U. Schulmeister, The functional mockup interface – seen from an industrial perspective, in Proceedings of the 10th International Modelica Conference, Lund, Sweden (2014), pp. 27–33
ITEA: 15016 EMPHYSIS embedded systems with physical models in the production code software. https://itea3.org/project/emphysis.html. Accessed 25 May 2019
PKWARE Inc.: ZIP specification. https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT. Accessed 21 Apr 2019
Modelon AB: FMI compliance checker (FMUChecker). https://github.com/modelica-tools/FMUComplianceChecker. Accessed 10 Aug 2019
Dassault Systèmes: FMPy. https://github.com/CATIA-Systems/FMPy. Accessed 10 Aug 2019
Modelica Association: FMI cross check rules. https://github.com/modelica/fmi-cross-check/. Accessed 26 May 2019
Dassault Systèmes: Test FMUs. https://github.com/CATIA-Systems/Test-FMUs. Accessed 10 Aug 2019
C. Bertsch, A. Mukbil, A. Junghanns, Improving interoperability of FMI-supporting tools with reference FMUs, in Proceedings of the 12th International Modelica Conference, Prague, Czech Republic (2017), pp. 533–540
J. Bastian, C. Clauss, S. Wolf, P. Schneider, Master for co-simulation using FMI, in Proceedings of the 8th International Modelica Conference, Dresden, Germany (2011), pp. 115–120
M. Benedikt, D. Watzenig, J. Zehetner, A. Hofer, EPCE – a nearly energy-preserving coupling element for weak-coupled problems and co-simulation, in Proceedings of the International Conference on Computational Methods for Coupled Problems in Science and Engineering (2013), pp. 1–12
C. Bertsch, J. Neudorfer, E.A.S.S. Arumugham, K. Ramachandran, A. Thuy, FMI for physical models on automotive embedded targets, in Proceedings of the 11th International Modelica Conference, Versailles, France (2015), pp. 43–50
O. Lenord, F. Jarmolowitz, W. Kiesenhofer, K. Rath, T. Obertopp, Towards an integrated tool chain from physical models to diagnosis functions, in Proceedings of the 12th MODPROD Workshop 2018 on Cyber-Physical Systems of Systems, Linköping, Sweden (2018)
JModelica.org: FMI library. https://jmodelica.org/. Accessed 10 Apr 2019
SFI Offshore Mechatronics Research Centre: FMI4cpp. https://github.com/NTNU-IHB/FMI4cpp/. Accessed 10 Apr 2019
Open Source Robotics Foundation: Catkin command line tools. https://catkin-tools.readthedocs.io/. Accessed 26 Apr 2019
Kitware, Inc. and Contributors: CMake documentation – modules: ExternalProject. https://cmake.org/cmake/help/latest/module/ExternalProject.html. Accessed 26 Apr 2019
D. Thomas, Colcon – collective construction. https://colcon.readthedocs.io/. Accessed 26 Apr 2019
Open Source Modelica Consortium: OpenModelica. https://openmodelica.org/download/download-linux. Accessed 10 Aug 2019
QTronic: FMU SDK. https://www.qtronic.de/en/fmu-sdk/. Accessed 10 Aug 2019
Open Robotics: Management of nodes with managed lifecycles. https://index.ros.org/doc/ros2/Tutorials/Managed-Nodes/. Accessed 28 May 2019
N. Koenig, A. Howard, Design and use paradigms for Gazebo, an open-source multi-robot simulator, in 2004 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), vol. 3 (2004), pp. 2149–2154
M.M.M. Manhães, S.A. Scherer, M. Voss, L.R. Douat, T. Rauschenbach, UUV simulator: a Gazebo-based package for underwater intervention and multi-robot simulation, in OCEANS 2016 MTS/IEEE Monterey (2016)
J. Meyer, A. Sendobry, S. Kohlbrecher, U. Klingauf, O. von Stryk, Comprehensive simulation of quadrotor UAVs using ROS and Gazebo, in Simulation, Modeling, and Programming for Autonomous Robots, ed. by I. Noda, N. Ando, D. Brugali, J.J. Kuffner (Springer, Berlin, 2012), pp. 400–411
D. Thomas, Contributors: a universal build tool. https://design.ros2.org/articles/build_tool.html. Accessed 27 Apr 2019
Open Source Robotics Foundation: Install Gazebo using Ubuntu packages. http://gazebosim.org/tutorials?tut=install_ubuntu. Accessed 27 Apr 2019
Kitware, Inc. and Contributors: CMake documentation – modules: FetchContent. https://cmake.org/cmake/help/v3.14/module/FetchContent.html. Accessed 27 Apr 2019
Open Source Robotics Foundation: Gazebo tutorials. http://gazebosim.org/tutorials. Accessed 10 Aug 2019
M.A. Sherman, A. Seth, S.L. Delp, Simbody: multibody dynamics for biomedical research. Procedia IUTAM 2, 241–261 (2011)
Bosch Rexroth: ActiveShuttle – setting your intralogistics in motion. https://www.boschrexroth.com/en/xc/products/product-groups/assembly-technology/topics/intralogistics/template-neuprodukt-seite-6. Accessed 30 May 2019
D. Zimmer, PlanarMechanics library 1.4.0 (2017-01-12). https://github.com/dzimmer/PlanarMechanics. Accessed 31 May 2019
D. Zimmer, M. Otter, Real-time models for wheels and tyres in an object-oriented modelling framework. Veh. Syst. Dyn. (2010)
N. Schröder, O. Lenord, R. Lange, Enhanced motion control of a self-driving vehicle using Modelica, FMI and ROS, in Proceedings of the 13th International Modelica Conference, Regensburg, Germany (Linköping University Electronic Press, Linköpings universitet, 2019)
EMPHYSIS Project: EMPHYSIS – functional mock-up interface for embedded systems. https://emphysis.github.io/. Accessed 25 May 2019
G. Nava, D. Pucci, F. Nori, Momentum control of humanoid robots with series elastic actuators, in 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) (2017), pp. 2185–2191
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Lange, R., Traversaro, S., Lenord, O., Bertsch, C. (2021). Integrating the Functional Mock-Up Interface with ROS and Gazebo. In: Koubaa, A. (eds) Robot Operating System (ROS). Studies in Computational Intelligence, vol 895. Springer, Cham. https://doi.org/10.1007/978-3-030-45956-7_7
Download citation
DOI: https://doi.org/10.1007/978-3-030-45956-7_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-45955-0
Online ISBN: 978-3-030-45956-7
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)