Skip to content

Droid sysid: plant corrections, PD identification, and tracking analysis - #4

Draft
remostei wants to merge 1 commit into
franka-sysidfrom
remos/droid-sysid-plant-and-pd-id
Draft

remostei wants to merge 1 commit into
franka-sysidfrom
remos/droid-sysid-plant-and-pd-id

Conversation

@remostei

@remostei remostei commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Extends the FR3 sysid pipeline to the droid robot (Franka + Robotiq 2F-85, fabrics-sim droid_robotiq.usd) and uses it on real-robot chirp recordings from the dex/robot-control FrankaDriver.

Task family (contrib/sysid/config/droid):

  • Isaac-Sysid-Droid-v0: as-is training plant (PhysX-only), with a fr3_joint* -> panda_joint* dataset name map (new SysIdCfg field).
  • Isaac-Sysid-Droid-Corrected-v0: plant corrections via a USD sublayer - the URDF's massless fabric-control frames author physics:mass = 0 and PhysX substitutes a 1 kg runtime fallback per body (~7 kg phantom payload at the TCP); plus menagerie franka_fr3 armature and per-joint friction.
  • Isaac-Sysid-Droid-FR3-v0: adds FR3 link masses and joint limits (the USD carries Panda values; j6 window differs by ~32 deg).

Results (real recordings, no fitting): the corrected plant at the real controller gains tracks the real arm at 2-5 mrad RMSE per joint vs 7-73 mrad as-is. Per-joint PD identification on the corrected plant then converges to the real controller gains within 3-10% on the shoulder joints (independently on three gain presets) and identifies a consistent ~2x stiffer wrist, halving the remaining error. Full analysis in scripts/sysid/SIM2REAL_FINDINGS.md and ROBOT_CONTROLLER_TRACKING.md; figures in sysid_plots/ (git-lfs).

Pipeline fixes:

  • fit.py: joint-id tensors as int32 (the isaaclab_physx index-write warp kernels reject int64 - the physics=physx path never ran before).
  • fit.py: cma_es/tensorboard import deferred until after SimulationApp starts (grpc/protobuf C extensions intermittently segfault Kit boot).
  • plot/replay: asset-default gains captured before the first replay (a live read-back after run one returns the previous dataset's gains).
  • cma_es.py: per-generation best candidate + rollout saved to generations/ for evolution plots without re-simulation.
  • smoke_test.py: works for any sysid task (name map, no 7-joint assumption, PhysX presets without use_cuda_graph).
  • apps/isaaclab.python.kit: isaacsim.util.debug_draw optional (not shipped in pip isaacsim 6.0.1; the hard dependency aborted GUI runs).

New tooling: prepare_robot_control_dataset.py (contract-enriches robot-control collections), plot_droid_fit.py (before/after overlays, replay + cached modes), plot_asset_compare.py, plot_droid_generations.py, plot_controller_traj_compare.py, analyze_robot_tracking.py (real-robot command-tracking metrics per PD preset), batch drivers.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Extends the FR3 sysid pipeline to the droid robot (Franka + Robotiq 2F-85,
fabrics-sim droid_robotiq.usd) and uses it on real-robot chirp recordings
from the dex/robot-control FrankaDriver.

Task family (contrib/sysid/config/droid):
- Isaac-Sysid-Droid-v0: as-is training plant (PhysX-only), with a
  fr3_joint* -> panda_joint* dataset name map (new SysIdCfg field).
- Isaac-Sysid-Droid-Corrected-v0: plant corrections via a USD sublayer -
  the URDF's massless fabric-control frames author physics:mass = 0 and
  PhysX substitutes a 1 kg runtime fallback per body (~7 kg phantom payload
  at the TCP); plus menagerie franka_fr3 armature and per-joint friction.
- Isaac-Sysid-Droid-FR3-v0: adds FR3 link masses and joint limits (the
  USD carries Panda values; j6 window differs by ~32 deg).

Results (real recordings, no fitting): the corrected plant at the real
controller gains tracks the real arm at 2-5 mrad RMSE per joint vs
7-73 mrad as-is. Per-joint PD identification on the corrected plant then
converges to the real controller gains within 3-10% on the shoulder joints
(independently on three gain presets) and identifies a consistent ~2x
stiffer wrist, halving the remaining error. Full analysis in
scripts/sysid/SIM2REAL_FINDINGS.md and ROBOT_CONTROLLER_TRACKING.md;
figures in sysid_plots/ (git-lfs).

Pipeline fixes:
- fit.py: joint-id tensors as int32 (the isaaclab_physx index-write warp
  kernels reject int64 - the physics=physx path never ran before).
- fit.py: cma_es/tensorboard import deferred until after SimulationApp
  starts (grpc/protobuf C extensions intermittently segfault Kit boot).
- plot/replay: asset-default gains captured before the first replay (a
  live read-back after run one returns the previous dataset's gains).
- cma_es.py: per-generation best candidate + rollout saved to
  generations/ for evolution plots without re-simulation.
- smoke_test.py: works for any sysid task (name map, no 7-joint
  assumption, PhysX presets without use_cuda_graph).
- apps/isaaclab.python.kit: isaacsim.util.debug_draw optional (not
  shipped in pip isaacsim 6.0.1; the hard dependency aborted GUI runs).

New tooling: prepare_robot_control_dataset.py (contract-enriches
robot-control collections), plot_droid_fit.py (before/after overlays,
replay + cached modes), plot_asset_compare.py, plot_droid_generations.py,
plot_controller_traj_compare.py, analyze_robot_tracking.py (real-robot
command-tracking metrics per PD preset), batch drivers.

Co-Authored-By: Claude Fable 5 <[email protected]>
mmichelis pushed a commit that referenced this pull request Sep 23, 2026
…dential (isaac-sim#7741)

# Description

A job that pulls a public `nvcr.io/nvidia/*` base image fails with
`denied: Access Denied`. The runners carry an ambient docker credential
for a private NGC organization, and nvcr.io refuses that credential a
pull token for a public repository instead of downgrading the request to
anonymous. `_lib/setup-docker-config` now takes an optional
`base-image-ref`: when the configured credentials are denied that image
and anonymous access can read it, the stored nvcr.io credential is
dropped from the job's temp config so the pull proceeds anonymously.
`_lib/compute-deps-hash` stops swallowing an unreadable base image
manifest, which silently dropped the digest from the dependency-cache
key.

| Before | After |
| ------ | ----- |
| `load metadata for nvcr.io/nvidia/isaac-sim:6.1.0` fails with `failed
to fetch oauth token: denied: Access Denied`, and an unreadable manifest
degrades the deps-cache key to a bare tag string with only a `🟠` note |
The credential is dropped for nvcr.io only when it is provably the
obstacle, the pull proceeds anonymously, and an unreadable manifest
fails with a named `::error::` |

## Reproduction

1. Point `.github/workflows/config.yaml` at a public base image:
`isaacsim_image_name: nvcr.io/nvidia/isaac-sim` and `isaacsim_image_tag:
6.1.0`.
2. Open a pull request from a fork, so no `NGC_API_KEY` is available and
the runner's ambient credential is the only one present.
3. Observe any job that builds the base image, for example `Docker
Dependency Licenses Check`:

```
#3 [auth] nvidia/isaac-sim:pull token for nvcr.io
#4 [internal] load metadata for nvcr.io/nvidia/isaac-sim:6.1.0
#4 ERROR: failed to authorize: failed to fetch oauth token: denied: Access Denied
ERROR: failed to build: failed to solve: failed to fetch oauth token: denied: Access Denied
```

4. The same step also logs `🔵 Base image ID:
nvcr.io/nvidia/isaac-sim:6.1.0` with no `sha256:` suffix, which is the
silent digest fallback in `compute-deps-hash`.

## Scope

Every workflow on this branch pins the private
`nvcr.io/0947644777160149/internal/isaac-sim` image today, where the
configured credentials succeed and the fallback stays dormant. This
change is the prerequisite that lets a public base image be configured
without the failure above; it does not change which image any workflow
uses.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Screenshots

Not applicable; this changes CI action behavior only.

## Validation

The fallback only narrows credentials, never widens them, so each guard
was exercised against a stubbed `docker` and a realistic three-registry
config (nvcr.io, ECR, Docker Hub):

- Public nvcr.io image, credentials denied, anonymous readable: the
nvcr.io entry is dropped and the ECR and Docker Hub entries survive, so
pushes keep working.
- `ubuntu:24.04`, which `kitless-docker.yml` passes: the ref is not an
nvcr.io image, so the config is left untouched and the Docker Hub
credential keeps its pull-rate budget.
- Private internal image readable with credentials: no probe fallback,
no change.
- Registry 503 rather than an authorization refusal: retried, then a
warning, and the credential is kept, so a transient error cannot cost a
working credential.
- A docker config this action did not create: left unchanged, so a
runner-level `DOCKER_CONFIG` is never edited.
- `NVCR.IO/...` and `nvcr.io:443/...` resolve to the same registry as
`nvcr.io/...`; `nvcr.io.evil.com/...` does not match.
- `compute-deps-hash`: a digest-pinned tag such as
`latest-develop@sha256:...` is used directly with no network call, a
malformed digest pin fails with a named error, an authorization refusal
fails immediately, a transient failure is retried 5 times over about 50
seconds, and a warning on stderr during a successful read is no longer
concatenated into the digest.
- These are committed as
`.github/actions/_lib/test_registry_credential_fallback.py` (14 tests,
the co-located pattern of
`run-package-tests/test_cleanup_docker_storage.py`) and registered in
`tools-tests.yml` so they run in CI.
- Mutation checks: removing the nvcr.io scope, the exact-digest check,
the ownership guard, or the `credHelpers` handling each makes the
corresponding test fail, so the suite exercises the intended behavior
rather than only the happy path.
- `python -m py_compile` on the new helper, `bash -n` on every `run:`
block in the five changed files, YAML parse of each, and `codespell`
clean.

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format` — not run; this change touches only `.github/`,
validated with `bash -n`, `py_compile`, a YAML parse and `codespell`,
and the repository's own `pre-commit` check on this branch
- [x] I have made corresponding changes to the documentation — the
action's `description` and the new input document the fallback
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (do **not** edit
`CHANGELOG.rst` or bump `extension.toml` — CI handles that) — not
applicable; no package is touched
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant