r/robotics • • 2d ago

News I built Dense-Armor, a Python library for safer robots and AI systems.

It provides online learning, anomaly and drift detection, uncertainty estimation, and runtime protection against unsafe inputs and outputs.

I'd love to get feedback and hear about potential real-world use cases.

GitHub: https://github.com/tatopenn-cell/Dense-Armor

Install: pip install dense-armor

1 Upvotes

11 comments sorted by

14

u/thicket 2d ago

I'm all in on agentic programming, and I think a standardized QC level on AI sytems is a great idea. There's comprehensive documentation on the repo, but it's quite a deep dive. I'm wondering if you could put together a SHORT document about who this project is for, what patterns they'd have to conform to in order to use it, and what improved behavior they should see. Extra points if you, a person, write it.

I suspect all that information is in your README, but I sure wasn't going to read 7500 words to figure it out, and I suspect you haven't read those words either. A little bit of human-to-human communication will go a long way to adoption, and then the agents can all talk to each other in as much depth as they want.

3

u/Elated7079 2d ago

I'm usually the first to jump at this stuff but the readme was pretty readable and didnt set off my LLM alarm (which is pretty twitchy)

It looks like a toolkit for anomaly detection. IMO most of the interesting tasks in robotics are more nonlinear than this would help with, but it could still be useful

1

u/Creative-Feature-264 2d ago edited 2d ago

Thanks. On "kit for anomaly detection": that's one family, not the only one. The library has four layers online estimators (classifiers, trees, clustering, regression), streaming statistics, drift, and a runtime shield.

.

4

u/Elated7079 2d ago

ok nevermind it's AI slop

1

u/Creative-Feature-264 2d ago

It's for people working on data streams, robots, and agents.

8

u/reallifearcade 2d ago

if you need feedback about potential real-world use cases and this software is not built around your own real world user cases, then, what is this for? A solution to an imaginary problem?

0

u/Creative-Feature-264 2d ago edited 2d ago

It started as a personal toolbox for online learning primitives

a set of reusable building blocks for systems that learn one sample at a time. It grew into a library with four families and a shielding layer. Real use cases came after (robot joint streams, vision frames, drift on time series), but the origin was the toolbox, not one specific deployment.

3

u/partyorca Industry 2d ago

Neat, but let’s be clear that this does nothing for safety.

1

u/staid_melvin 2d ago

Interesting project, anomaly detection is one of those things that sounds simple until you try it on real robot data with weird sensor noise and actuator lag. Does the online learning part handle sudden changes in dynamics, like a robot picking up a heavy payload mid-task, or does it need a settling period? I do some abstract art stuff on the side and it's wild how similar drift detection feels to noticing when my brush strokes start going off-model. Real-world use case that jumps out: cobots near humans where the environment keeps changing, you can't just retrain a static model every shift.

-2

u/V2Rworld 2d ago

Runtime protection against unsafe inputs/outputs is the unsexy part everyone skips until something breaks. How does Dense-Armor handle the latency budget — does the anomaly detection run in the control loop or as a separate watchdog? Curious what happens on a false positive mid-task.

-1

u/Creative-Feature-264 2d ago

Fair question. Two parts. Latency

Every estimator declares `budget_s = 1e-3 s` (p99 of `learn_one`), and `RealtimePipeline(steps, period_s, require_budget=True)` refuses to build if the measured p99 doesn't fit the control period. Measured on CPU, 1D signal:

`CUSUMDriftDetector` — 153 µs p99

`OnlineRobustMahalanobis` — 108 µs p99

- `Orca` input shield only — 6.1 ms p99

- `Orca` input+output — 9.1 ms p99

So the detectors run in-loop comfortably. `Orca` does not — 6–9 ms per sample on one scalar. On a 50 Hz loop that's a third to half the budget. I'd run `Orca` on the input path only, or as a slower watchdog, and keep the cheap detectors in the fast loop. False positive mid-task. The library never silently swallows. `Armatura` has a `livello_ia` knob — at 0.0 it filters, at 1.0 it only marks and passes the sample through untouched, and the marking is never clipped: the anomaly may be the signal. Every correction also returns an error margin. `Arbiter` then classifies each point as `clean`, `spike` or `regime`.

What you do on a false positive is your policy, not the library's: pass-through-with-flag, fallback to the last clean value, or abort. The library gives you the margin and the flag. `Protected` is the conservative default

skip the learning update, return a fallback.