Phoenix Sensorium SDK (phx-sensorium)
Deterministic, High-Frequency Multi-Modal Sensor Ingestion, Normalization, and Time-Alignment Framework for Autonomous Ground, Aerial, and Naval Defense Systems.
1. Overview
Phoenix Sensorium bridges physical hardware sensors (4K Optical/IR Vision, FMCW Radars, LiDARs, and 9-DoF IMUs) with modern Python AI/ML inference pipelines (PyTorch, TensorRT, NumPy) with zero CPU memory copying and sub-millisecond deterministic time alignment.
Key Highlights
- Zero-Copy Ingestion: Exposes raw video and point cloud buffers directly to NumPy arrays via
__array_interface__, eliminating memory copies and maximizing bandwidth. - Deterministic Time-Alignment: Uses continuous Linear Interpolation (LERP) and anchor-driven grouping to eliminate phase errors between high-rate IMUs (400Hz) and lower-rate cameras (30Hz).
- Multi-Threaded Rust Core: All hardware polling, CRC32 checks, and ring buffer management execute outside the Python Global Interpreter Lock (GIL).
- Automated Hardware Introspection: Scans native Linux buses (V4L2, USB-Serial, SocketCAN) and discovers peripheral microcontrollers over serial interfaces.
2. Quickstart & Installation
Option A: For Python Users (From PyPI - Zero Rust Required)
End users do not need Rust, Cargo, or any C/C++ compiler installed. Pre-compiled binary wheels (.whl) are distributed directly via PyPI:
pip install sensorium
Option B: Building from Source (For Developers)
To compile the core engine and native bindings from source:
# 1. Clone the repository
git clone https://github.com/Phoenix-ADT/phx-sensorium.git
cd phx-sensorium-sdk
# 2. Automated setup script
chmod +x install.sh
./install.sh
3. Python Quickstart & Examples
3.1 Hardware & Controller Introspection
Inspect the host platform architecture, native character buses, and connected microcontrollers:
import sensorium
hub = sensorium.SensorHub()
# 1. Inspect host platform architecture & native buses
host = hub.inspect_host()
print(f"Board: {host.board_model} | Arch: {host.arch} | DMA Engine: {host.dma_type}")
print(f"I2C Buses: {host.i2c_buses}")
print(f"GPIO Chips: {host.gpio_chips}")
# 2. Automatically sweep hardware buses (V4L2, USB-Serial, SocketCAN)
devices = hub.scan_hardware(timeout_ms=150)
for dev in devices:
print(f"Discovered Device: {dev.endpoint} [{dev.bus_type}] -> {dev.model_guess}")
# 3. Discover connected microcontrollers (ESP32, STM32, Arduino)
controllers = hub.discover_controllers(timeout_ms=250)
for mcu in controllers:
print(f"MCU: {mcu.mcu_model} [ID: {mcu.chip_id}] @ {mcu.clock_freq_mhz} MHz")
print(f"Attached Sub-Sensors: {mcu.sub_sensors}")
3.2 Time-Synchronized Fusion & Zero-Copy NumPy
Create a multi-modal perception group anchored to an optical camera:
import numpy as np
import sensorium
hub = sensorium.SensorHub()
# Define a synchronized group anchored on the 30 FPS camera
group = hub.create_sync_group(
name="cockpit_perception",
anchor_sensor="eo_camera",
sensors=["imu_chassis", "radar_front"],
max_slop_ms=25.0,
interpolate_scalars=True,
)
# Start background ingestion workers outside the Python GIL
hub.start()
try:
for frame in group:
if frame.is_degraded:
continue
# Zero-copy view into camera frame (Shape: H, W, C)
image = np.asarray(frame.tensor("eo_camera"), copy=False)
# 9-DoF IMU telemetry mathematically interpolated to exact shutter time
imu_state = frame.scalar("imu_chassis")
# 3D Radar target tracks
tracks = frame.tracks("radar_front")
print(f"Snapshot @ T={frame.timestamp_ns} ns | Image: {image.shape} | IMU: {imu_state[:3]}")
break
finally:
hub.stop()
3.3 Asynchronous Pipeline (asyncio)
Stream aligned snapshots asynchronously into event-driven or networked workflows:
import asyncio
import numpy as np
import sensorium
async def stream_pipeline():
hub = sensorium.SensorHub()
group = hub.create_sync_group(
name="async_feed",
anchor_sensor="eo_camera",
sensors=["imu_chassis"],
max_slop_ms=30.0,
)
hub.start()
try:
async for frame in group.stream_async(poll_interval_ms=2):
img = np.asarray(frame.tensor("eo_camera"), copy=False)
print(f"Async Frame T={frame.timestamp_ns} | Image Shape: {img.shape}")
break
finally:
hub.stop()
if __name__ == "__main__":
asyncio.run(stream_pipeline())
4. Edge Microcontroller Integration (SensoriumBridge.h)
To connect an edge microcontroller (STM32, ESP32, Arduino, Pixhawk) to Sensorium, use the zero-allocation single-header C++ firmware bridge in firmware/SensoriumBridge.h:
#include <Arduino.h>
#include "SensoriumBridge.h"
SensoriumNode node("turret_mcu");
SensorSlot imu_slot;
void setup() {
node.begin_serial(921600);
imu_slot = node.register_scalar("turret_imu", 6, 200); // 6 channels at 200 Hz
}
void loop() {
node.spin(); // Process active discovery pings and time calibration
static uint32_t last_time = 0;
if (micros() - last_time >= 5000) { // 200 Hz
last_time = micros();
float imu_data[6] = {ax, ay, az, gx, gy, gz};
node.publish_scalar(imu_slot, micros(), imu_data, 6);
}
}
5. Complete Documentation & Guides
For deep architectural explanations, full API references, and advanced integration tutorials, explore the comprehensive guides in the DOCS/ folder:
| Guide | Description |
|---|---|
| Documentation Index | Master sitemap, architectural diagram, and component breakdown. |
| 01. Getting Started | Step-by-step installation, fundamental concepts, and first working pipeline. |
| 02. SensorHub & Ingestion Engine | Channel registration, ring buffer overflow policies, and lifecycle management. |
| 03. Multi-Modal Time Synchronization | Anchor-driven grouping, LERP interpolation mathematics, and streaming modes. |
| 04. Zero-Copy Tensors & NumPy Integration | DenseTensor internals, __array_interface__, PyTorch CUDA streaming, and TensorRT. |
| 05. Hardware Introspection & MCU Multiplexing | Linux character bus scanning, microcontroller discovery, and SensoriumBridge.h. |
| 06. Sanity Filters & Production Best Practices | Real-time IEEE-754 sanity checks, register freeze detection, and RTOS configuration. |
Metadata
Release files for sensorium 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sensorium-0.1.0.tar.gz | 51.1 kB | With provenance | Details for sensorium-0.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| sensorium-0.1.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for sensorium-0.1.0-cp310-abi3-win_amd64.whl |
| sensorium-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for sensorium-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| sensorium-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details for sensorium-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| sensorium-0.1.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for sensorium-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
| sensorium-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details for sensorium-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
Total release size: 2.8 MB
Release files / sensorium-0.1.0.tar.gz
| Download URL | sensorium-0.1.0.tar.gz |
|---|---|
| Size | 51.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
633a1c085bed9101f2fb9f078b2c0fd9925c2b9aa970969ad4fc2e7cf588ae5e
|
|
BLAKE2b-256 checksum How to use checksums |
d55fce1184664a8d2a7ee42b3a0aae32ef86cb925f1f2b300f17a64c2d01ae77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / sensorium-0.1.0-cp310-abi3-win_amd64.whl
| Download URL | sensorium-0.1.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 430.2 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
77d4c390e739188a79cd3098d82d3a745ae1cb3ce62d72adee484105918f8df7
|
|
BLAKE2b-256 checksum How to use checksums |
d03cb24a7a406e82a4abfd351746ff2752e3e8ddbd111b91457e69fb83f5ae7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / sensorium-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | sensorium-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 625.3 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9be2be2b8e56223a5728a6423501283934d75b846b4dc87d4e54162e76f48a0e
|
|
BLAKE2b-256 checksum How to use checksums |
3d46a52468ab9f03f4e85cb86dc607e5e208a5c6ffed18e2f53e7a65a12741aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / sensorium-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | sensorium-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 623.4 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
598c61f963f9575e6150b707b773d53283590964fd264f3be0997069a697bb99
|
|
BLAKE2b-256 checksum How to use checksums |
0e501bb8658c263a22e6f2ac4804f83c13ab8474f4ebff538bc5ec03b5a35854
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / sensorium-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | sensorium-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 549.2 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
767e6bfe556b7c39dcd9ca60a0fe6cca7d25a32d444a97d2e16ce3512c9dcabf
|
|
BLAKE2b-256 checksum How to use checksums |
9f7fb35543014106afc857c04603b5bf8f048b7bc7fd70f153c51cc9fb479bed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / sensorium-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | sensorium-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 550.2 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
3f25e2740a3010609fd4f0bd47bf87a6ef1936a3d6c4d9a86ffbc30c9b3fe51c
|
|
BLAKE2b-256 checksum How to use checksums |
bd8a2c71531ba6b20d4bab09a74d1ce7f53facd72df62dc2cc27c5791edb46dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logSecurity for sensorium 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for sensorium-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.