Skip to main content

FMU models

Topology graph of FMU modelsTopology graph of FMU models

Simulate · RemotiveCar v0.9.0

  • CAN
  • Lighting

Run it​

git clone https://github.com/remotivelabs/remotivelabs-remotive-car.git
cd remotivelabs-remotive-car

remotive topology build \
-f instances/fmu/main.instance.yaml \
-f settings/can_over_udp.settings.instance.yaml \
build

docker compose -f build/remotive_car_fmu/docker-compose.yml up --build

Using Functional Mock-up Units (FMUs) allows you to integrate standardized simulation models as ECU behavior. This is useful when the model of an ECU already exists as an FMU, for instance exported from a modelling tool, and you want to run it against the real communication of the rest of the platform.

RemotiveTopology maps network signals onto the input variables of the FMU, steps the FMU, and publishes its output variables back onto the bus. The model itself needs no knowledge of the platform.

The BCM of the RemotiveCar example has two interchangeable implementations, a python behavioral model and an FMU. Both are driven by the same signals and verified by the same tests, so the two instances are a direct comparison of the two approaches.

Notice:

  • FMU support is an optional dependency of the library, install it as remotivelabs-topology[fmu].
  • The FMU declares its own step size, and RemotiveTopology steps it at that rate. The BCM FMU uses 50 ms.
  • Which signal feeds which FMU variable is declared as data, in the INPUT_MAPPING of the model. Only the outputs need a few lines of code, to publish them on the restbus.