Skip to content

Development

This page covers the practical operations around BobDyn/BobSim: cloning, app launch, environment setup, make targets, local Python, cleanup, quality checks, and common failure paths.

Clone

For simulation workflows, clone BobSim with submodules. BobLib is included as a submodule.

bash
git clone --recurse-submodules https://github.com/BobDyn/BobSim.git
cd BobSim

If the repository is already cloned without submodules:

bash
make init

The BobLib submodule lives at:

text
_0_Utils/external/BobLib/

Clone BobLib directly only when you want to work on the low-level Modelica model layer without the BobSim workflow wrapper.

App Launch

The app is the normal local entry point for setup, simulation launch, and result review. For users, prefer the released BobSim desktop executable. For development, run the same app from a source checkout.

From the BobSim root:

bash
make app

Then open:

text
http://127.0.0.1:8765

BobSim app Setup view after launch, showing guided setup tabs and vehicle preview

The app runs in the Python environment that launched it. Install requirements.txt locally before using make app; install OpenModelica locally before building or running simulations from the app, or select a local OpenModelica install from the app's Simulation toolchain selector.

Released desktop builds store generated user data in the per-user runtime workspace:

PlatformDefault runtime root
Windows%LOCALAPPDATA%\BobDyn\BobSim
macOS~/Library/Application Support/BobDyn/BobSim
Linux${XDG_DATA_HOME:-~/.local/share}/BobDyn/BobSim

Set BOBSIM_HOME to override that location. BOBDYN_HOME remains supported for older local installs.

Desktop Release Builds

BobSim desktop artifacts are PyInstaller builds. They bundle the app frontend and Python backend, but intentionally do not bundle generated Modelica simulation executables, reports, app caches, or user workspaces.

Build the current platform's executable/app bundle:

bash
make deploy

Clean, build, and package a release artifact:

bash
make deploy-release DEPLOY_VERSION=2026.06.28

Release assets are platform-native. A Linux machine creates the Linux archive, a Windows machine creates the Windows zip, and macOS creates the macOS zip. The repository's Release Builds GitHub Actions workflow builds all three when a v* tag is pushed and uploads them to the GitHub Release with --clobber.

Deploy outputs are written under:

text
_0_Utils/deploy/dist/BobSim/
_0_Utils/deploy/dist/releases/

Docker Environment

BobSim ships with a Docker image based on:

text
openmodelica/openmodelica:v1.26.3-ompython

The Dockerfile installs:

  • OpenModelica runtime
  • Modelica Standard Library 4.1.0
  • VehicleInterfaces 2.0.2
  • Python virtual environment under /opt/venv
  • BobSim Python requirements
  • plotting, reporting, PyVista, and video dependencies

Build the image:

bash
make docker-build

Rebuild from scratch:

bash
make docker-rebuild

Open shells:

bash
make shell
make shell-standard
make shell-envelope
make shell-opt

The compose services mount the repository into /workspace and set PYTHONPATH=/workspace.

Local Python

The container is the most repeatable path, but local development is possible if OpenModelica and Python dependencies are installed.

BobSim commonly uses the repository-local virtual environment:

bash
source .venv/bin/activate
python -m pip install -r requirements.txt

To create it from scratch:

bash
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

Verify the basics:

bash
python --version
omc --version
python -c "import yaml, scipy, pandas, matplotlib; print('ok')"

VisualSim also needs the PyVista/Qt/VTK stack and FFmpeg support through ImageIO.

Make Target Reference

Setup and shell targets:

TargetAction
make initInitialize/update git submodules
make appLaunch the local BobSim browser app
make deployBuild the native desktop artifact for the current OS
make deploy-packagePackage the current deploy artifact for release
make deploy-releaseClean, build, and package a release artifact
make deploy-cleanRemove deploy outputs
make docker-buildBuild the Docker image
make docker-rebuildRebuild the Docker image without cache
make shellOpen the main BobSim shell
make shell-standardOpen a StandardSim shell
make shell-envelopeOpen an EnvelopeSim shell
make shell-optOpen an OptSim shell

StandardSim targets:

TargetAction
make standard-buildBuild the integrated VehicleSim entry point
make standard-build-four-postBuild the integrated FourPostSim entry point
make standard-eval-ramp-steerRun RampSteerEval
make standard-eval-steady-stateRun SteadyStateEval
make standard-eval-transientRun TransientEval
make standard-eval-four-postRun FourPostEval
make standard-eval-allRun all standard evaluations

Envelope and OptSim targets:

TargetAction
make envelope-ggvRun GGV envelope generation
make envelope-ymdRun YMD envelope generation
make envelope-allRun all envelope outputs
make opt-standardRun StandardSens pre-screen sensitivities
make opt-envelopeRun EnvelopeSens sensitivities
make opt-refinedRun StandardSens refined response surfaces

Quality and cleanup targets:

TargetAction
make lintRun Ruff checks
make typecheckRun MyPy checks
make testRun pytest regression checks
make ciRun lint, typecheck, and tests
make cleanRemove Python and tool caches
make clean-standardRemove StandardSim build/result artifacts
make clean-envelopeRemove EnvelopeSim build/result artifacts
make clean-optRemove OptSim build/result artifacts
make clean-allRun all cleanup targets

Quality Checks

Run the release gate:

bash
make ci

That expands to:

bash
make lint
make typecheck
make test

GitHub Actions runs the same targets with the BobLib submodule checked out recursively. The pytest suite includes release-polish checks that assert the public make target language stays coherent.

For normal browser-based work:

bash
make app

Then use Setup, Simulation, and Archive.

BobSim app Simulation catalog used for normal browser-based workflow runs

For standard maneuver work:

bash
make standard-build
make standard-eval-ramp-steer
make standard-eval-steady-state
make standard-eval-transient

For suspension/K&C work:

bash
make standard-build-four-post
make standard-eval-four-post

For envelope work:

bash
make standard-eval-four-post
make envelope-all

For sensitivity work:

bash
make clean-opt
make opt-standard
make opt-envelope

For a public-release check:

bash
make standard-eval-all
make ci

Add make envelope-all when you intentionally want the optional envelope artifacts as part of the release package.

Troubleshooting

Executable not found

The workflow build directory does not contain the compiled OpenModelica executable. Run make standard-build or make standard-build-four-post.

Init XML not found

The OpenModelica build did not complete cleanly. Clean the matching build directory and rebuild.

BobLib not found

The submodule is missing or the path in a config is wrong. Run:

bash
make init

Modelica package cannot load

Use the Docker path first. For local installs, confirm OpenModelica can find Modelica Standard Library 4.1.0 and VehicleInterfaces 2.0.2.

yaml import fails

Install BobSim requirements in the Python environment that is running the app or workflow:

bash
python -m pip install -r requirements.txt

omc is missing from the app run log

Open the app's OpenModelica toolchain selector and choose the omc executable plus the OpenModelica library directory. If auto-detection fails, common library defaults are %APPDATA%\.openmodelica\libraries on Windows and ~/.openmodelica/libraries on macOS/Linux. For source-checkout CLI work, use the Docker-backed workflow targets when local OpenModelica is not available.

Simulation fails but no run directory remains

Set execution.cleanup: false in the workflow config and rerun. Then inspect the retained run directory under the build tree.

OptSim population mismatch

Sample count or variable dimensions changed while old variants remained on disk. Run:

bash
make clean-opt

then rerun the relevant make opt-* target.

Visual render fails on import

Install the visualization dependencies from requirements.txt, and prefer the Docker shell if local Qt/VTK/PyVista packages are difficult to align.

Released as open-source vehicle simulation tooling.