Spaces:
Paused
Paused
Download src/embodiment/sensor.py from ThomasHeisig/Brain-5D-Space: direct link, hf CLI and curl.
- Browser
- Download file 763 Bytes
-
https://huggingface.co/spaces/ThomasHeisig/Brain-5D-Space/resolve/main/src/embodiment/sensor.py
- Command line
-
hf download hf://spaces/ThomasHeisig/Brain-5D-Space/src/embodiment/sensor.py
-
curl -L -o sensor.py https://huggingface.co/spaces/ThomasHeisig/Brain-5D-Space/resolve/main/src/embodiment/sensor.py
763 Bytes
| """Sensor adapter contracts for simulated, digital, and physical inputs.""" | |
| from __future__ import annotations | |
| from typing import Protocol, runtime_checkable | |
| from .models import SensorFrame | |
| class SensorAdapter(Protocol): | |
| """Minimal sensor interface consumed by the embodiment layer.""" | |
| def sensor_id(self) -> str: | |
| """Return the stable adapter identifier.""" | |
| ... | |
| def modality(self) -> str: | |
| """Return the sensor modality name.""" | |
| ... | |
| def active(self) -> bool: | |
| """Return whether the sensor is currently available.""" | |
| ... | |
| def sample(self, tick: int) -> SensorFrame: | |
| """Capture one sensor frame for *tick*.""" | |
| ... | |