Audience

Verification level

COMPILE-ONLY PASS. The program reads the public Registry selection and compiled plan, then verifies all three configuration layers. It does not start PyBullet or claim native physics behavior.

Files

  • run.yaml creates a tunable box and overrides its size and density.
  • main.py compares the Manifest defaults, selected PyBullet variant defaults, and final Run instance.
  • ../catalog/tunable_box.yaml defines defaults, one variant, a resource, and the parameter schema.

The merge order

For one entity, FastSim applies values in this order:

  1. manifest.defaults supplies portable base values (density=500, label, scale).
  2. variants.pybullet.defaults replaces only its specified fields (density=750).
  3. The entity in run.yaml wins last (density=900, instance scale).

Deep merge keeps fields that a later layer does not mention, so the final label is still default-box. Variant selection happens from the effective Run backend.

Manifest and Run

The Manifest validates only params:

yaml
config_schema:
  type: object
  properties:
    density_kg_m3: {type: number, minimum: 1.0}
    label: {type: string}
  required: [density_kg_m3, label]
  additionalProperties: false

config_schema does not validate standard instance fields such as pose, scale, enabled, or initial_state; FastSim's Run schema validates those. The Run overrides only the values specific to this occurrence:

yaml
box:
  use: object://fastsim/component-demo-tunable-box
  scale: [0.3, 0.2, 0.1]
  params:
    density_kg_m3: 900.0

Run it

bash
fastsim config validate run.yaml --json
fastsim config expand run.yaml
fastsim config explain run.yaml scenario.scene.objects.box.params.label
python main.py

Expected Python output shows densities 500.0 → 750.0 → 900.0 and inherited label default-box.

Common errors

  • Putting scale inside params: scale is a standard entity field.
  • Expecting config_schema to validate an entire Run: it governs this component's params mapping only.
  • Setting an unknown parameter: additionalProperties: false rejects spelling mistakes instead of silently accepting them.
  • Duplicating every default in every Run: override only values that differ.

Previous: 08 — Scenario component · Next: 10 — Versions and stable