Command line¶
All mechatronics commands live under embeddyn mechatronics (or python -m embeddyn mechatronics). This page is generated from the command definitions by tools/docs/make_cli_reference.py; --help on any command shows the same.
| Command | Purpose |
|---|---|
compile |
Compile a project into a run directory with its manifest and lock file, without running it. |
run |
Run a co-simulation; write telemetry, a manifest and optionally a CSV, and print final values and metrics. |
metrics |
Compute the project's declared metrics from an exported run CSV. |
tune |
Tune project parameters by repeated co-simulation (bounded Nelder-Mead or CMA-ES). |
verify |
Verify a model: energy balance, step-size convergence, golden waveforms, scenario matrix. Exits with status 1 when a check fails. |
estimate |
Estimate physical parameters from bench measurements (Levenberg-Marquardt, 95 % confidence intervals). |
tolerance |
Monte Carlo yield and Sobol sensitivity over component tolerances. |
validate |
Parse and validate a project file without starting any simulator. |
runs-list |
List recorded runs from the metadata database. |
runs-inspect |
Show one recorded run: manifest, parameters, artifacts. |
runs-export |
Export a recorded run's signals. |
artifacts-verify |
Verify the content hashes of every artifact in the content-addressed store. |
replay |
Check that a recorded run directory replays consistently. |
gui |
Embeddyn Lab: schematic editor, virtual instruments and 3-D view in the browser. |
fmu-export |
Export a python plant as an FMI 3.0 co-simulation FMU (PythonFMU3), with state save/restore. |
fmu-check |
Validate an FMU (FMPy model-description checks) and run a short co-simulation. |
bindings-from-pinplan |
Generate Renode GPIO/PWM/ADC bindings from a CodeLayer Forge pin plan. |
curtain-run |
Run a light-curtain scan algorithm against a scene (no Webots needed). |
curtain-sweep |
Sweep LED angle, intensity, algorithm, ... and tabulate the bench metrics. |
curtain-webots |
Write a Webots world (IrLightCurtain PROTOs + light_curtain supervisor) for a bench file. |
doctor |
Report which external tools (Renode, ngspice, Webots, KiCad, LTspice) are found. |
kicad-export |
Export a KiCad schematic to a SPICE netlist with kicad-cli. |
kicad-plugin |
Create a KiCad IPC plugin skeleton that talks to the local Studio API. |
integration-validate |
Check a project's integrations: model files, bindings, FMU variables, tool availability. |
catalog-list |
List the component definitions found under a catalog root. |
kicad-inspect |
Summarise a SPICE netlist (sources, models, subcircuits) without KiCad. |
worker-register |
Register a worker with the distributed coordinator. |
workers-list |
List registered workers. |
job-submit |
Submit a simulation job to the distributed queue. |
jobs-list |
List queued and finished jobs. |
job-cancel |
Cancel a queued job. |
experiment-expand |
Expand an experiment file into its individual runs (sweeps, matrices). |
experiment-submit |
Submit every run of an experiment to the queue. |
experiment-status |
Show the progress of a submitted experiment. |
hil-validate |
Validate a hardware-in-the-loop safety policy (watchdog, emergency stop, outputs, deadline trips). |
worker-run |
Run a worker agent that executes queued jobs. |
twin-state |
Create a digital-twin state snapshot. |
twin-compare |
Compare simulated and measured signal files. |
twin-calibrate |
Fit digital-twin parameters to measured data. |
uncertainty-run |
Run an uncertainty propagation from a specification file. |
requirements-verify |
Check requirements against computed metrics. |
evidence-report |
Render a Markdown evidence report from verification results. |
compile¶
Compile a project into a run directory with its manifest and lock file, without running it.
| Option | Default | Description |
|---|---|---|
--output-root |
.embeddyn/runs |
run¶
Run a co-simulation; write telemetry, a manifest and optionally a CSV, and print final values and metrics.
| Option | Default | Description |
|---|---|---|
--output, -o |
Optional CSV export path. | |
--output-root |
.embeddyn/runs |
|
--mock, --no-mock |
False |
Use deterministic built-in simulators for all domains. |
--isolate-adapters |
False |
Run supported adapters in supervised child processes. |
--checkpoint-interval |
Checkpoint interval in seconds. | |
--resume-from |
||
--parameter-overrides |
JSON object of resolved parameter overrides. | |
--fault |
Inject a fault, as in the project's faults: list, written as a YAML/JSON mapping, e.g. '{signal: servo.feedback_voltage, type: stuck, start: 1.2 s}'. Repeatable. |
metrics¶
Compute the project's declared metrics from an exported run CSV.
tune¶
Tune project parameters by repeated co-simulation (bounded Nelder-Mead or CMA-ES).
| Option | Default | Description |
|---|---|---|
--output, -o |
.embeddyn/tuning/result.json |
|
--max-evaluations |
||
--workers |
Parallel evaluations (overrides the spec). | |
--method |
nelder-mead or cmaes (overrides the spec). |
verify¶
Verify a model: energy balance, step-size convergence, golden waveforms, scenario matrix. Exits with status 1 when a check fails.
| Option | Default | Description |
|---|---|---|
--check |
Run only these checks: energy, convergence, golden, scenarios. | |
--mock, --no-mock |
False |
Use the built-in simulators for the core domains. |
--update-golden |
False |
Rewrite the golden waveform file. |
--output, -o |
Write the JSON report here. |
estimate¶
Estimate physical parameters from bench measurements (Levenberg-Marquardt, 95 % confidence intervals).
| Option | Default | Description |
|---|---|---|
--output, -o |
.embeddyn/estimation/result.json |
tolerance¶
Monte Carlo yield and Sobol sensitivity over component tolerances.
| Option | Default | Description |
|---|---|---|
--output, -o |
.embeddyn/tolerance/result.json |
|
--workers |
Parallel processes (overrides the spec). | |
--samples |
Monte Carlo samples (overrides the spec). |
validate¶
Parse and validate a project file without starting any simulator.
runs-list¶
List recorded runs from the metadata database.
| Option | Default | Description |
|---|---|---|
--database |
.embeddyn/database/metadata.sqlite3 |
|
--limit |
50 |
runs-inspect¶
Show one recorded run: manifest, parameters, artifacts.
| Option | Default | Description |
|---|---|---|
--database |
.embeddyn/database/metadata.sqlite3 |
runs-export¶
Export a recorded run's signals.
| Option | Default | Description |
|---|---|---|
--output, -o |
||
--database |
.embeddyn/database/metadata.sqlite3 |
artifacts-verify¶
Verify the content hashes of every artifact in the content-addressed store.
| Option | Default | Description |
|---|---|---|
--root |
.embeddyn/artifacts |
replay¶
Check that a recorded run directory replays consistently.
gui¶
Embeddyn Lab: schematic editor, virtual instruments and 3-D view in the browser.
| Option | Default | Description |
|---|---|---|
--host |
127.0.0.1 |
Interface to bind (keep it local: the API runs simulators). |
--port |
8710 |
|
--open |
False |
Open the Lab in the default browser. |
fmu-export¶
Export a python plant as an FMI 3.0 co-simulation FMU (PythonFMU3), with state save/restore.
| Option | Default | Description |
|---|---|---|
--output, -o |
. |
Directory for |
--name |
Model name (default: the class name). | |
--param, -p |
Parameter default, name=value (repeat). | |
--input-start |
Input start value, name=value. | |
--max-step |
0.0001 |
RK4 sub-step inside each doStep [s]. |
--check, --no-check |
True |
Validate and simulate the result with FMPy. |
fmu-check¶
Validate an FMU (FMPy model-description checks) and run a short co-simulation.
| Option | Default | Description |
|---|---|---|
--stop-time |
0.01 |
bindings-from-pinplan¶
Generate Renode GPIO/PWM/ADC bindings from a CodeLayer Forge pin plan.
| Option | Default | Description |
|---|---|---|
--device |
Device with renode pin data. | |
--output, -o |
Bindings YAML to write (default: stdout). | |
--merge |
Existing bindings whose non-pin entries (sysbus...) are kept. | |
--machine |
curtain-run¶
Run a light-curtain scan algorithm against a scene (no Webots needed).
| Option | Default | Description |
|---|---|---|
--scenario |
static, approach, rod or orbit | |
--algorithm |
sequential, crossed, group or module:Class | |
--set, -p |
dotted.key=value, e.g. emitter.half_angle='20 deg' | |
--output, -o |
CSV of per-frame rows |
curtain-sweep¶
Sweep LED angle, intensity, algorithm, ... and tabulate the bench metrics.
| Option | Default | Description |
|---|---|---|
--grid, -g |
key=v1,v2,... (replaces the file's sweep) | |
--workers, -j |
1 |
|
--output, -o |
CSV with one row per variant |
curtain-webots¶
Write a Webots world (IrLightCurtain PROTOs + light_curtain supervisor) for a bench file.
| Option | Default | Description |
|---|---|---|
--output, -o |
World file, in a Webots project's worlds/ folder | |
--arg |
extra controller argument |
doctor¶
Report which external tools (Renode, ngspice, Webots, KiCad, LTspice) are found.
import¶
embeddyn mechatronics import SOURCE [-o OUT] [--title T] [--gcc DIR] [--no-build] [--firmware NAME]...
[--substitute REF=PART_ID]... [--parts FILE]... [--renode-root DIR]
Turn a board project (folder or .zip: KiCad netlist or schematic, STM32CubeMX .ioc, STM32CubeIDE or Makefile
firmware) into a Renode board, the built firmware, a mechatronic project per firmware and an import report. See
Import a board project.
kicad-export¶
Export a KiCad schematic to a SPICE netlist with kicad-cli.
| Option | Default | Description |
|---|---|---|
--output, -o |
artifacts/kicad/circuit.cir |
|
--executable |
kicad-plugin¶
Create a KiCad IPC plugin skeleton that talks to the local Studio API.
integration-validate¶
Check a project's integrations: model files, bindings, FMU variables, tool availability.
catalog-list¶
List the component definitions found under a catalog root.
| Option | Default | Description |
|---|---|---|
--root |
components/mechatronics |
kicad-inspect¶
Summarise a SPICE netlist (sources, models, subcircuits) without KiCad.
worker-register¶
Register a worker with the distributed coordinator.
| Option | Default | Description |
|---|---|---|
--name |
||
--endpoint |
local://worker |
|
--worker-id |
||
--simulators |
`` | Comma-separated simulator names. |
--hardware |
`` | Comma-separated hardware capabilities. |
--labels |
`` | Comma-separated scheduling labels. |
--max-parallel-jobs |
1 |
|
--real-time |
False |
|
--database |
.embeddyn/database/metadata.sqlite3 |
workers-list¶
List registered workers.
| Option | Default | Description |
|---|---|---|
--database |
.embeddyn/database/metadata.sqlite3 |
|
--stale-after |
job-submit¶
Submit a simulation job to the distributed queue.
| Option | Default | Description |
|---|---|---|
--requirements |
||
--priority |
0 |
|
--database |
.embeddyn/database/metadata.sqlite3 |
jobs-list¶
List queued and finished jobs.
| Option | Default | Description |
|---|---|---|
--status |
||
--limit |
100 |
|
--database |
.embeddyn/database/metadata.sqlite3 |
job-cancel¶
Cancel a queued job.
| Option | Default | Description |
|---|---|---|
--database |
.embeddyn/database/metadata.sqlite3 |
experiment-expand¶
Expand an experiment file into its individual runs (sweeps, matrices).
experiment-submit¶
Submit every run of an experiment to the queue.
| Option | Default | Description |
|---|---|---|
--database |
.embeddyn/database/metadata.sqlite3 |
experiment-status¶
Show the progress of a submitted experiment.
| Option | Default | Description |
|---|---|---|
--database |
.embeddyn/database/metadata.sqlite3 |
hil-validate¶
Validate a hardware-in-the-loop safety policy (watchdog, emergency stop, outputs, deadline trips).
worker-run¶
Run a worker agent that executes queued jobs.
| Option | Default | Description |
|---|---|---|
--once |
False |
|
--poll-interval |
1.0 |
|
--output-root |
.embeddyn/worker-runs |
|
--database |
.embeddyn/database/metadata.sqlite3 |
twin-state¶
Create a digital-twin state snapshot.
| Option | Default | Description |
|---|---|---|
--output, -o |
.embeddyn/digital-twin/state.json |
twin-compare¶
Compare simulated and measured signal files.
| Option | Default | Description |
|---|---|---|
--mapping |
||
--output, -o |
.embeddyn/digital-twin/comparison.json |
|
--aligned-output |
twin-calibrate¶
Fit digital-twin parameters to measured data.
| Option | Default | Description |
|---|---|---|
--mapping |
||
--output, -o |
.embeddyn/digital-twin/calibration.yaml |
|
--database |
.embeddyn/database/metadata.sqlite3 |
uncertainty-run¶
Run an uncertainty propagation from a specification file.
| Option | Default | Description |
|---|---|---|
--samples |
1000 |
|
--seed |
1 |
|
--output, -o |
.embeddyn/digital-twin/uncertainty.json |
requirements-verify¶
Check requirements against computed metrics.
| Option | Default | Description |
|---|---|---|
--output, -o |
.embeddyn/evidence/traceability.json |
evidence-report¶
Render a Markdown evidence report from verification results.
| Option | Default | Description |
|---|---|---|
--comparison |
||
--output, -o |
.embeddyn/evidence/report.md |
|
--run-id |
||
--database |
.embeddyn/database/metadata.sqlite3 |
|
--artifact-root |
.embeddyn/artifacts |