Skip to main content

Python utilities for reading and writing ASAM OSI trace files (MCAP, binary .osi, text .txth)

Project description

osi-utilities (Python)

Python utilities for reading and writing ASAM OSI (Open Simulation Interface) trace files.

Supported Formats

  • MCAP (.mcap) — Multi-channel container format with metadata
  • Binary (.osi) — Single-channel binary format with length-prefixed protobuf messages
  • Text (.txth) — Human-readable protobuf TextFormat

Installation

From PyPI:

pip install asam-osi-utilities

For development (uses a virtual environment):

make setup    # creates .venv and installs in editable mode

Quick Start

Reading

from osi_utilities.tracefile import open_trace_file

# Read any supported format (auto-detected from extension)
with open_trace_file("trace.mcap") as reader:
    for result in reader:
        print(result.message_type, result.message)

Writing

from pathlib import Path
from osi3.osi_sensorview_pb2 import SensorView
from osi_utilities.tracefile import BinaryTraceFileWriter

sensor_view = SensorView()
sensor_view.version.version_major = 3
sensor_view.timestamp.seconds = 123
sensor_view.timestamp.nanos = 456

with BinaryTraceFileWriter() as writer:
    writer.open(Path("output.osi"))
    writer.write_message(sensor_view)

Development

make setup      # Create venv and install dependencies
make test       # Run tests
make lint       # Run linter
make format     # Format code
make typecheck  # Run type checker

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

asam_osi_utilities-0.3.1.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

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

asam_osi_utilities-0.3.1-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file asam_osi_utilities-0.3.1.tar.gz.

File metadata

  • Download URL: asam_osi_utilities-0.3.1.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for asam_osi_utilities-0.3.1.tar.gz
Algorithm Hash digest
SHA256 d9dd5515c8f73f1168800ebc5d618cd1194d0a95f3f24ffb07ba1538340c71b4
MD5 650619a73820672207a88cb99cb574bf
BLAKE2b-256 e9e75d7f08e0b1fac30c2252a86a3104baa2c8db5b24d686d330fd2b2937b51f

See more details on using hashes here.

Provenance

The following attestation bundles were made for asam_osi_utilities-0.3.1.tar.gz:

Publisher: cd_release.yml on lichtblick-suite/asam-osi-utilities

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file asam_osi_utilities-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for asam_osi_utilities-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30463ef662a85e0492c9c475bcf1366ad6aa69f4f0f252756f13170aef9e174a
MD5 1eebec69045ca80ca38bb8e6b0e43d64
BLAKE2b-256 1fa91b2296bc38138e57f16c5145e74432233d9bfcc4821019da3db828901f69

See more details on using hashes here.

Provenance

The following attestation bundles were made for asam_osi_utilities-0.3.1-py3-none-any.whl:

Publisher: cd_release.yml on lichtblick-suite/asam-osi-utilities

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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