Skip to main content

URML

A small, opinionated, human-readable language for describing robot intent.

urml.dev


urml-chrono-runtime

High-fidelity validation reference runtime for URML — ChronoAdapter for Project Chrono multibody / multi-physics, via pychrono.

Project Chrono is an open high-fidelity multibody engine (Chrono::Vehicle ground dynamics, terramechanics for deformable terrain, Chrono::Sensor) from the University of Wisconsin-Madison and the University of Parma. This adapter mirrors MujocoAdapter / PX4Adapter: lazy pychrono, no ROS 2 dependency, a lazily-built cached ChSystem, failures returned not raised. Built against the frozen substrate Protocol per RFC-0014.

Chrono's distinctive role for URML is high-fidelity pre-deployment validation (RFC-0328): URML checks a program statically against the declared capability manifest and active safety envelope first, then drives the same validated intent through a short Chrono simulation segment so the dynamics come back as evidence. URML composes above Chrono; it never embeds it. The differentiator is the static capability-and-envelope check before the expensive multibody solver ever spins, so the high-fidelity run only ever exercises admissible programs.

The primitive → driver-input altitude follows Project Chrono lead Dan Negrut's feedback on issue #746: align each manifest entry to a concrete ChSystem configuration at the level of Chrono's motion primitives and driver inputs.

Method coverage

URML primitive v0.1
move_to / hover apply the configured driver segment, advance the ChSystem steps_per_command steps, return the dynamics evidence (sim time, contacts, commanded driver inputs)
wait step the engine
measure return the accumulated dynamics evidence (value=contacts, sim_time, driver, backend)
wait_for step-then-check (a sim has no external event bus)
report structured record to a local sink (no cloud)
scan documented stub success (mirrors PX4Adapter.run_scan)

grasp/release, dock, detect, capture, speak, listen return not_supported_in_base_sim (a Chrono::Sensor or articulated-model companion supplies them under the unchanged program, manifest, and validator). The drone trio returns not_applicable_sim.

Install / use

PyChrono ships via conda-forge, not as a PyPI wheel. The [chrono] extra is intentionally empty (it documents the boundary); pychrono is imported lazily, so this module loads on every host without it.

conda install -c conda-forge pychrono            # the engine
pip install -e reference/chrono-runtime[chrono]   # the adapter
from urml_chrono_runtime import ChronoAdapter, ChronoConfig
from urml_chrono_runtime.adapter import DriverSegment
cfg = ChronoConfig(steps_per_command=200,
                   location_to_segment={"ridge_waypoint": DriverSegment(driver=[0.8, 0.1, 0.0])})
with ChronoAdapter(cfg) as sim:
    r = sim.send_navigation_goal(location="ridge_waypoint")
    assert r.success and r.final_pose["sim_time"] > 0.0

Without pychrono installed, ChronoAdapter() raises a clear error pointing at conda-forge.

Status

v0.1 (this release):

  • ChronoAdapter + ChronoConfig (PyChrono, no ROS). chrono_vehicle_cell manifest + conformance/fixtures/home/21_chrono_vehicle_terrain_positive.yaml verified through the runner (hermetic against MockROSAdapter; adapter-agnostic against ChronoAdapter).
  • Terramechanics scene (scene: terramechanics): a rig on Chrono SCM deformable terrain, selected by the manifest's validation.terrain_fidelity: deformable hint (RFC-0381). The validation-evidence payload gains sinkage, peak contact force, and a tip-stability margin alongside the base dynamics — the richer evidence Project Chrono lead Dan Negrut pointed at on #746. See terramechanics.py and chrono_adapter.terramechanics.yaml.
  • Hermetic unit tests: navigation (configured + unmapped), the NSC/SMC system-type switch, measure (validation-evidence payload), scan-stub, lifecycle, the not-supported / not-applicable-sim sentinels, the missing-pychrono (conda-pointing) error, the conformance hook, and the terramechanics scene (sinkage / contact-force / tip-margin evidence, driver-force application, bare-path regression) — no pychrono install required (a fake pychrono, with a vehicle/SCM surface, is injected into sys.modules).
  • Gated .github/workflows/chrono-integration.yml: chrono-smoke (real pychrono from conda-forge + the hermetic suite + the live smoke) and chrono-sitl-e2e against a real Chrono::Vehicle scene (first run is a calibration run by design — the established px4 / mujoco / opcua convention). The live SCM scene is that calibration target: its physics reads are version-sensitive, so each degrades to an honest unavailable note rather than crashing.
  • SPEC-GAPS.md: the two manifest gaps the mapping surfaced (terrain-fidelity + simulator-target-class hints) shipped as RFC-0381; the terramechanics scene now reads the terrain-fidelity hint.

Follow-ups (not yet): a true sentence→motion validation video; a Chrono::Sensor companion for detect / capture; a full Chrono::Vehicle (HMMWV-class) model under the rig, pinned in CI.

Core Commitment

This runtime is Apache 2.0. It is outside the Core Commitment boundary (only ROS 2 + PX4 reference runtimes are named there) but carries the same no-vendor-coupling, no-cloud, no-enterprise-edition posture. PyChrono / Project Chrono is BSD-3-Clause (confirmed by the maintainers on #746); a validated-intent mapping carries no license entanglement.

Metadata

Release files for urml-chrono-runtime 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for urml-chrono-runtime 0.4.0
File Interpreter ABI Platform
urml_chrono_runtime-0.4.0-py3-none-any.whl Python 3 none any Details

Release files / urml_chrono_runtime-0.4.0-py3-none-any.whl

Download URL urml_chrono_runtime-0.4.0-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d8e3c95362b5a51e4f32e565d833e04a053be1c5513bb6509da4085c8c1a200
BLAKE2b-256 checksum
How to use checksums
d11de708f0905a3c27c042c9f69e379a89eeef56d55d421a8248c2b4e60ac3b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.4.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page