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.1.0.tar.gz (70.5 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.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utrompulse-0.1.0.tar.gz
  • Upload date:
  • Size: 70.5 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.1.0.tar.gz
Algorithm Hash digest
SHA256 e33c6eddfbbe48a4745379d85edf616a8420af8dda64babd5ed5e164522fbe98
MD5 bfd089086398ecb522be61bd7a2b940d
BLAKE2b-256 5ae4f74ad0a98ee6f121a4901807d3a36bbc544ca704b5f6c72855b416762f5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: utrompulse-0.1.0-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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 942b979f87f3c2bf86ab2cb763d9fce1b4b77937ab2cc32e78a5bd2aafe2447f
MD5 818aaf8e066ebeead4ec82aeea4905d3
BLAKE2b-256 8512d6a2d5a62139f69ddd3a69a555de6ca7c6b7af80cdb2f22e874eea87e47c

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