[go: up one dir, main page]

Skip to content

FMI import plugins for the Gazebo Simulator.

License

LGPL-3.0, LGPL-2.1 licenses found

Licenses found

LGPL-3.0
LICENSE
LGPL-2.1
LICENSE.LGPL2
Notifications You must be signed in to change notification settings

robotology/gazebo-fmi

Repository files navigation

gazebo-fmi

Functional Mock-up Interface (FMI) import plugins for the Gazebo Simulator.

Overview

About versioning

The project is undergoing heavy development: APIs may still be subject to changes, and some functionalities may be broken.

Background

This repository contains plugins for the Gazebo robotic simulator to enable co-simulation between the physics simulation of Gazebo and simulation tools that support the Functional Mock-up Interface (FMI) standard. At the moment, the report just contains a plugin that import Functional Mock-up Units (FMUs) for simulation of the actuator dynamics.

A good introductory paper to the co-simulation concept is available at https://arxiv.org/abs/1702.00686 .

Dependencies

gazebo-fmi depends on

We recommend to install Gazebo as described in official documentation. For FMILibrary, one option is to compile it as any CMake project and then add its installation prefix to CMAKE_PREFIX_PATH. See CGold guide if you need some details on how to build a CMake project.

An easier option is provided by the gazebo-fmi repository which downloads and compiles the FMILibrary internally within its build folder using CMake's FetchContent module. This is performed when FMILibrary package is not already existing in the system or if the FMILibrary related environment variable (FMILibrary_ROOT) is not set, making gazebo-fmi unable to find FMILibrary package. To use this option, the CMake option USE_SYSTEM_FMILIBRARY should be set to OFF.

Build the plugins

Use the following commands to build and install the plugin.

Build

With make facilities:

$ git clone https://github.com/robotology-playground/gazebo-fmi
$ cd gazebo-fmi
$ mkdir build && cd build
$ cmake ..
$ make
$ [sudo] make install

With IDE build tool facilities:

$ git clone https://github.com/robotology-playground/gazebo-fmi
$ cd gazebo-fmi
$ mkdir build && cd build
$ cmake ..
$ cmake --build . --target ALL_BUILD --config Release
$ cmake --build . --target INSTALL --config Release

See CGold guide if you need more details on how to build a CMake project.

Use the plugins

See plugin-specific documentation on how to use each plugin:

Test the plugins

For running the automatic tests of the plugins contained in this repo, you need the additional dependency of the OpenModelica compiler. The OpenModelica compiler is used to generate test FMUs from Modelica models. We recommend to use OpenModelica at least version 1.13 as OpenModelica 1.12 has several bugs related to FMU generation (see #5 and https://trac.openmodelica.org/OpenModelica/ticket/4135 ).

Once you installed OpenModelica on your system, you can regenerated the project with the BUILD_TESTING CMake option set to ON to compile the tests. Once test are compiled, you can run them using ctest, for example run:

$ ctest [-VV]

to run all the tests.

About

FMI import plugins for the Gazebo Simulator.

Resources

License

LGPL-3.0, LGPL-2.1 licenses found

Licenses found

LGPL-3.0
LICENSE
LGPL-2.1
LICENSE.LGPL2

Stars

Watchers

Forks

Packages

No packages published