Skip to main content

High-fidelity OpenTelemetry (OTel) bridge for MuJoCo. Industrial-grade observability for agentic robotics.

Project description

utrompulse (v0.2.0)

A high-performance, asynchronous telemetry framework for MuJoCo simulations. utrompulse decouples physics computation from observability I/O, providing semantically labeled telemetry via OpenTelemetry (OTLP) and local binary logging (MCAP).

Key Features

  • Zero-Blocking Architecture: High-frequency state extraction (<50μs) to preserve physics determinism.
  • Semantic Instrumentation: Automatically maps raw mjData indices to human-readable XML joint and actuator names.
  • Multiplexed Transports: Simultaneously stream to live OTLP backends (Jaeger) and local disk (MCAP/Foxglove).
  • Real-Time Safety: Implements a Head-Dropping Circular Buffer to ensure telemetry freshness without memory overflows.

Architecture

utrompulse utilizes an air-gapped dispatcher model to isolate the simulation thread:

  1. ModelInstrument: Inspects the mjModel at runtime to create a semantic name-to-index map.
  2. ZeroBlockingHook: Captures state snapshots and pushes them into a thread-safe circular queue.
  3. PulseExporter: A background daemon that broadcasts snapshots to all registered BaseTransport backends.

Installation

Ensure you have Python 3.11+ and uv installed.

git clone [https://github.com/mustafa-5493/UtromPulse.git](https://github.com/mustafa-5493/UtromPulse.git)
cd UtromPulse
uv sync

Usage

Modern usage involving semantic mapping and multiple transport outputs:

import mujoco
from utrompulse.bridge.mujoco_hook import ZeroBlockingHook
from utrompulse.bridge.instrumentation import ModelInstrument
from utrompulse.telemetry.otel_exporter import PulseExporter
from utrompulse.transports.otlp import OTLPTransport
from utrompulse.transports.mcap import MCAPTransport

# 1. Load Model
model = mujoco.MjModel.from_xml_path("robot.xml")
data = mujoco.MjData(model)

# 2. Initialize Instrumentation & Hook
instrument = ModelInstrument(model)
hook = ZeroBlockingHook(max_queue_size=5000)

# 3. Configure Transports (Live + Local)
transports = [
    OTLPTransport(endpoint="http://localhost:4317"),
    MCAPTransport(output_path="recording.mcap")
]

# 4. Start Exporter
exporter = PulseExporter(telemetry_queue=hook.telemetry_queue, transports=transports)
exporter.start()

try:
    while True:
        mujoco.mj_step(model, data)
        # Capture state with semantic labels
        hook.capture_state(step=data.time, data=data, instrument=instrument)
finally:
    exporter.stop()

Observability Backends

Live Tracing (Jaeger)

Run Jaeger with OTLP support:

docker run -d --name jaeger -p 16686:16686 -p 4317:4317 jaegertracing/all-in-one:latest

Access the UI at http://localhost:16686 to view semantically labeled spans (e.g., joint.left_hip_pitch).

Offline Analysis (Foxglove)

The MCAPTransport generates a .mcap file. Drag and drop this file into Foxglove Studio to visualize high-frequency joint data, control signals, and system jitter offline.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

utrompulse-0.2.1.tar.gz (70.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

utrompulse-0.2.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file utrompulse-0.2.1.tar.gz.

File metadata

  • Download URL: utrompulse-0.2.1.tar.gz
  • Upload date:
  • Size: 70.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for utrompulse-0.2.1.tar.gz
Algorithm Hash digest
SHA256 eb91ca6e17e34814c871c73886dfd26bdba0a71e90e5aad465734eeee2d0eb9d
MD5 c80727f1bf3c5dff58fe1cd44f445668
BLAKE2b-256 ca8208bd44a73faf1f715e52be69d26f25475c25370675c56fc6a3965bba17bf

See more details on using hashes here.

File details

Details for the file utrompulse-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: utrompulse-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for utrompulse-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a7caec651ffd274fe82c603862e3b8da339784b7cdb2550ae4f2936a14a592f
MD5 2ad5f8d9685add2f658aa7b7a9af1e8c
BLAKE2b-256 22839675ced4172f82f42fe3a9f32fa59a0fd329f208fdbc6aa5f546e66d478d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page