Skip to content

Environment variables

Peter Corke edited this page Aug 19, 2026 · 1 revision

Environment variables

bdsim reads a handful of environment variables at start-up. All of them are optional.

BDSIM

Sets default values for runtime options, as a comma- or semicolon-separated list of key=value pairs — the same option names used in code (BDSim(key=value, ...)), not command-line flag syntax. To disable graphics by default:

export BDSIM=graphics=False

not export BDSIM=--no-graphics — that will silently do nothing, since BDSIM only parses key=value option assignments, never CLI flags. Multiple options can be combined: BDSIM=graphics=True,hold=True. Precedence, highest first: command line > code options passed to BDSim() > BDSIM > code defaults.

BDSIM_NO_GRAPHICS

An unconditional override that forces graphics off, taking precedence over everything else — code (BDSim(graphics=True)), the BDSIM variable, and CLI flags alike. Accepts 1, true, yes, or on (case-insensitive). Intended for CI/headless runs of example scripts that hard-code graphics=True.

BDSIMPATH

A colon-separated list of extra paths/packages to search for block definitions, appended to the built-in search list (bdsim, and roboticstoolbox/machinevisiontoolbox when toolboxes are enabled). See Block path.

BDSIM_NO_TOOLBOXES

Set to 1, true, yes, or on to skip loading the optional roboticstoolbox/machinevisiontoolbox block packages, equivalent to passing toolboxes=False to BDSim().

BDSIM_DEBUG_LAZY_LOAD

Set to any value to trace lazy block-class resolution. bdsim defers importing a block's actual module until that block type is first instantiated in a diagram; this prints when that resolution happens.

BDSIM_DEBUG_DISCOVERY

Set to any value to trace block-package discovery. bdsim finds block classes by parsing blocks/*.py files with ast.parse rather than importing them (see Block path); this prints what it finds during that scan.

Clone this wiki locally