Metadata-Version: 2.4
Name: eddy-isaaclab
Version: 0.1.0
Summary: Eddy's engineering truth beside Isaac Lab: the peak contact force per body over an episode, audited in one batch at reset against a finite-element solve, each answer keyed.
Author: Eddy
License-Expression: Apache-2.0
Project-URL: Documentation, https://eddy-ac74d702.mintlify.site/sdks/python
Project-URL: Source, https://github.com/cierra-labs/eddy-isaac
Keywords: isaac-lab,isaac-sim,physx,robotics,reinforcement-learning,validation,fea,contact
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: eddy-solve>=0.1.0
Provides-Extra: selftest
Requires-Dist: numpy; extra == "selftest"
Dynamic: license-file

# eddy-isaaclab

Engineering truth beside Isaac Lab. During an episode the hook keeps the peak
contact force per body per environment; at reset it posts every environment's
peaks to an Eddy engine as **one** `POST /v1/interop.audit` batch. The engine
rounds each peak up to the bucket you declare and runs one finite-element
stress solve per distinct (body, bucket), so 4096 environments with the same
gripper cost a handful of solves, and every answer carries the result key of
the solve that produced it.

```bash
pip install eddy-isaaclab
```

```python
from eddy_isaaclab import ForceAudit, contact_yield_check, steel

audit = ForceAudit(
    bodies=["finger"],
    checks=[contact_yield_check("finger", 25.0, 0.06, 0.02, 0.02, "x_max", "x_min", steel())],
    base_url="http://127.0.0.1:8080",   # your Eddy engine
)

# every step (a ContactSensor's net forces, [num_envs, num_bodies, 3])
audit.observe(sensor.data.net_forces_w)

# at reset: one batch for the environments that ended
report = audit.audit(env_ids)
```

- `audit(env_ids, dedupe=True)` rounds the peaks up to the bucket on the client
  and sends one item per distinct bucket (`report["env_to_audit"]` maps each
  environment to its item). The grades are the same; the request is smaller.
- `observe_poses(root_pos_w, root_quat_w, t)` records trajectories too, so the
  free-fall, energy and rest checks run in the same batch.
- Nothing calls the engine inside the step, and importing the package never
  imports Isaac Lab, torch or numpy.

Self-test without Isaac (needs numpy and a reachable engine):

```bash
pip install "eddy-isaaclab[selftest]"
python -m eddy_isaaclab --url http://127.0.0.1:8080
```

The in-Isaac check (`isaaclab_check.py`) lives in the source repository and
runs with Isaac's own Python: `isaaclab.sh -p isaaclab_check.py --url <engine>
--num_envs 8 --hook-source installed`.

Licence: Apache-2.0.
