Skip to content

Upgrade the cuRobo IK reachability check from cuRobo v1 to v2 - #1550

Merged
xyao-nv merged 14 commits into
mainfrom
xyao/feature/curobo_v2_ik_reachability
Oct 29, 2026
Merged

xyao-nv merged 14 commits into
mainfrom
xyao/feature/curobo_v2_ik_reachability

Conversation

@xyao-nv

@xyao-nv xyao-nv commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Upgrade the cuRobo IK reachability check from cuRobo v1 to v2, and install cuRobo from the uv lock so native uv and a single Docker image both include it. Make the ik_reachable placement check opt-in, and run CI in a prebuilt image.

Why this change?

The ik_reachable check (ReachabilityValidator in isaaclab_arena_curobo) was pinned to a cuRobo v1 commit. That needed a warp-lang compatibility shim (#1543) and a separate dev-curobo image that compiled cuRobo with nvcc. cuRobo was missing from native uv installs, so the check only worked in that image.

cuRobo v2 has a new API, a new robot config format, and compiles its kernels at runtime, so no nvcc build is needed. A direct port with v1's settings does not give v1's results, though. On the same recorded IK queries it found fewer reachable layouts than v1 (banana on plate: 6/44 vs 8/44). The v1 and v2 verdicts differ for three reasons, covered below.

What changes?

Port to the v2 API. CuroboIKSolver builds InverseKinematics from InverseKinematicsCfg.create, solves GoalToolPose goals with solve_pose, and loads obstacles as a Scene. The debug view's collision spheres now come from v2's compute_kinematics. The warp.torch shim and the CUROBO_TORCH_CUDA_GRAPH_RESET env var are removed; v2 needs neither. CUDA graphs are now on.

Native v2 robot config. DROID now loads droid_fixed_mimic_joint/franka_robotiq_2f_85_zero_curobo_v2.yaml from Nucleus. The new file is the v1 file in v2 format: ee_link becomes tool_frames, and retract_config becomes default_joint_position. The collision spheres and locked joints are unchanged.

Settings changed so v2 verdicts match or beat v1. Root causes are in Validation below.

  • ReachabilityConfig.ik_rotation_threshold_rad: 0.1 → 0.2. v2 reports the true geodesic angle, while v1 reported about half of it. The new value keeps v1's verdicts, and the "rad" in the docstring is now accurate.
  • CuroboIKSolver collision activation distance: 0.01 → 0.0. The 1 cm margin made the optimizer stop about 1 cm short of grasps near a support surface. Those grasps were then rejected even though collision-free solutions exist.

Reachability is now opt-in. ReachabilityConfig.enabled defaults to False. While it is off, ik_reachable is skipped and no cuRobo solver is built. Listing ik_reachable in enabled_checks or required_checks while it is off is an error. The two specs that list it now set enabled: true.

cuRobo from the uv lock, one Docker image.

  • Docker: the curobo-builder and dev-curobo stages and their scripts are removed.

CI. Image will be switched to main once this is merged.

Docs and skill. The four agentic env-gen workflow pages, the installation page, the validation concept page and the setup-arena skill now describe cuRobo as part of every install, with reachability as opt-in. The workflow pages show the v2 placement output.

Usage example

Before:

./docker/run_docker.sh -c   # separate cuRobo image; ik_reachable ran for every DROID env

After:

./docker/run_docker.sh      # or a native `uv sync`; both include cuRobo
placer_params:
  reachability_config:
    enabled: true           # ik_reachable is off by default

Validation

Method. I recorded every IK query (grasp poses, obstacle cuboids, robot base pose) from v1 end-to-end builds of the four agentic env-gen examples (--placement_seed 0). I then replayed the same queries through both versions. Where the two disagreed, I checked the joint solution with the other version's own collision and joint-limit check. That separates "the solver didn't find a solution" from "the two versions judge the same solution differently".

v1 vs v2 differences found:

  • Rotation metric. On identical joint configurations, v2's rotation_error is 2.0× v1's (e.g. 0.031 vs 0.015, 0.062 vs 0.031). Measured against the true geodesic angle, v1 reports about half (median ratio 2.04). So with the same 0.1 threshold, v2 is twice as strict.
  • Collision margin. At activation distance 0.01, all 12 seeds of a rejected plate grasp converged to the same point: 10.5 mm off, zero rotation error. That point is collision-free but just past the 10 mm cutoff. Seeded with v1's 5.5 mm solution, v2 keeps it and accepts it as collision-free. So the gap was search, not the collision model. With v1's settings, v2 lost 4–5 v1 positives per example.
  • v1 first-query bug. In every example, v1's first IK query of a build reported reachable although the arm collides. v1's own sim-free replay and v2 both say it collides. Apart from that query, v1 agreed with itself on every target (87/88, 72/72, 101/102, 1189/1190).

After the fixes (replaying v1's recorded queries through v2):

  • v2-only reachable grasps: 68 (banana 35, kitchen 1, cans 13, fruit 19). Every one passes v1's own collision and joint-limit check, at about 1 mm position error. So v1 was missing them, mostly grasps close to the table.
  • Remaining v2 misses: 4 of 1,452 targets.
    • Three are borderline: v1 reached 8.2–9.6 mm against the 10 mm cutoff, tilting up to about 0.19 rad.
    • One is a clear miss: fruit layout 240, bowl, where v1 reached 2.7 mm and v2 14.4 mm.
    • Raising the seed count only slightly reduced these.

Rerun
Uploading Screencast from 10-28-2026 04:53:27 PM.webm…

End to end, with reachability enabled, through the Nucleus YAML, in the new image:

Example v1 ik_reachable v2 ik_reachable v1 IK time v2 IK time
Banana on plate 8/44 39/44 31.1 s 6.7 s
Kitchen pick and place 23/36 24/36 23.4 s 5.6 s
Cans + hammer (composite) 6/34 15/34 34.8 s 6.9 s
Fruit into bowl (12 envs) 460/595 477/595 370 s 22.9 s
  • Speed: a warm IK solve takes 12–28 ms with v2, against about 250 ms with v1. The first solve in a new process is slower, 3.8 s vs 1.4 s, because v2 compiles its kernels then; they are cached in ~/.cache/curobo afterwards.

Tests. All of these pass in both the new image and a native uv environment synced from the lock:

@xyao-nv
xyao-nv marked this pull request as ready for review October 28, 2026 23:51
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect placement generation and the install paths used by Arena developers.

Update the existing settled-placement test before merging; the new assertion currently rejects its setup.

Findings

  1. P1 Settled-placement test now fails ▶

Summary

Moves reachability checks to cuRobo v2 and installs cuRobo through the shared lockfile.

  • Droid grasp checks now use cuRobo v2's pose and scene solver.
  • Placement checks run IK reachability only when a spec turns it on.
  • Native installs and one Docker image now include cuRobo.

Acknowledged intentional changes:

  • xyao-nv explicitly describes using a prebuilt CI image and switching it after merge; this was not reported as an unintended change.
  • xyao-nv documents four remaining v2 IK misses in the replay comparison; these known solver differences were not reported.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Placement settings] --> B{Reachability enabled?}
    B -->|No| C[Skip IK validator]
    B -->|Yes| D{Robot has cuRobo config?}
    D -->|No| C
    D -->|Yes| E[Build cuRobo v2 solver]
    E --> F[Load obstacles for each target]
    F --> G[Solve target pose]
    G --> H[Check pose error and collisions]
Loading

Reviews (1) · Last reviewed commit: "Update the cuRobo setup scenario for cuR..." · Reviewed by Greptile

Comment thread .github/workflows/ci.yml Resolved
Comment thread pyproject.toml Resolved
@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR ports the ik_reachable check to cuRobo v2 and makes it opt-in through reachability_config.enabled. It also installs cuRobo from uv.lock and removes the separate cuRobo image and its CI jobs. I checked the port against the pinned cuRobo source and found no problems in the new API calls, and the replay validation in the description is thorough. The main concerns are CI, which no longer tests the image it publishes, and the new opt-in flag, which can still be silently ignored.

Design, Boundaries & Scope

  • cuRobo is now required for every install, but the check is off by default (pyproject.toml:43). This adds a package built from git plus 18 new transitive packages to every install, and downgrades rich from 15.0.0 to 14.3.4. Could cuRobo be an extra or a dependency group that Docker and CI install? That would keep the single image.
  • The opt-in can silently do nothing (ik_reachability_validator.py:106). The new validate() assertion catches a check that is listed while disabled, but not the reverse. With enabled: true and a robot that has no cuRobo config, the check is dropped and layouts are accepted without it.

Findings

🟡 Warning: .github/workflows/ci.yml:237 (also lines 329 and 376): the test jobs run on a fixed staging image. The checkout is installed with --no-deps, so the tests never use this commit's image. After merge, :latest is published from an image no test ran on.
🟡 Warning: isaaclab_arena_curobo/ik_reachability_validator.py:106: enabled: true is skipped without any message when the robot has no cuRobo config, or when the cuRobo import fails.
🟡 Warning: pyproject.toml:43: should cuRobo be an optional dependency? See above.
🟡 Warning: isaaclab_arena_curobo/tests/test_ik_solver_build.py:58: no test runs the real solver with obstacles loaded or with require_collision_free=True.
🔵 Improvement: isaaclab_arena/relations/reachability_config.py:24: two docstrings are now out of date.

Already raised: Greptile's comment still applies at this head. test_recording_filters_layouts in isaaclab_arena/tests/test_settled_placement.py is unchanged, and its replace(..., reachability_config=ReachabilityConfig()) now fails the new ObjectPlacerParams.validate assertion. Fixing it with ReachabilityConfig(enabled=True) and no embodiment would depend on the silent skip described at ik_reachability_validator.py:106, so it is worth deciding that question first.

Test Coverage and CI Cost

  • The three GPU solver tests use an empty world and require_collision_free=False. The collision path this PR rewrote is covered only by fakes in test_ik_solver_utils.py: v2 Scene loading, activation distance 0.0, CUDA graphs now on, and in-place hand-sphere muting. One more test on the existing module-scoped droid_solver fixture would cover it for a few extra solves (inline comment).
  • Limitation: the test jobs for this commit had not run when I reviewed (pre-commit was still in progress), so I could not confirm results.

Verdict

Minor fixes needed

@qianl-nv qianl-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the careful validation to make sure the migration works, great job!

I feel we can do a more thorough clean up in doc now that curobo is no longer a special dependency handling. In general our user should not need to care too much about how we manage the curobo dependency if there's no required action on their side. The doc should instead focusing on the ik-reachability usage which is the user-facing part.

I would also prefer if we don't have a special enable config flag for the ik reachability validation, on top of the already existing opt-in list for validators. I don't see a big concern having it on by default for our Droid based envs. If our user really want to disable it, we mention in doc how to do it through the validator opt-in list is sufficient.

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread docker/Dockerfile.isaaclab_arena Resolved
Comment thread docker/run_docker.sh Resolved
Comment thread docs/pages/quickstart/installation.rst Resolved
Comment thread docs/pages/quickstart/installation.rst Resolved
Comment thread docs/pages/quickstart/installation.rst Resolved

@qianl-nv qianl-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

Port the sim-free IK reachability oracle from cuRobo v1 (ebb7170) to
cuRobo v2 main (78fd485): InverseKinematics/Scene/DeviceCfg APIs,
GoalToolPose goals, v2 kinematics for the debug-view spheres, and a
native v2 Droid robot yaml (franka_robotiq_2f_85_zero_curobo_v2.yaml).

Behavior changes, validated by replaying every IK query recorded from
v1 runs of the four agentic env-gen examples:
- v2 reports rotation error as the geodesic angle (v1 reported about
  half), so ik_rotation_threshold_rad doubles 0.1 -> 0.2 to keep v1's
  verdicts.
- The optimizer collision activation distance drops 0.01 -> 0.0. The
  1 cm margin stalled grasps near support surfaces ~10 mm off the goal;
  every grasp v2 now additionally accepts passes v1's own collision and
  joint-limit check.

Docker: v2 compiles kernels at runtime (cuda.core/NVRTC), so the
builder no longer installs the CUDA toolkit; the runtime install now
includes the wheel's cuda-major extra. Drops the warp.torch shim and
the CUDA-graph-reset env var, which v2 does not need.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
Make cuRobo v2 a locked Arena dependency (nvidia-curobo[cu13], pinned to
NVlabs/curobo@78fd485 through tool.uv.sources). Native uv and the Docker
image now install the same cuRobo from uv.lock, under the existing
torch/numpy/warp overrides. The lock adds cuRobo and its runtime deps;
the only version change is rich 15.0.0 -> 14.3.4, required by cuRobo's
viser dependency.

With cuRobo in every install there is a single Docker image: drop the
cuRobo builder and dev-curobo stages and their scripts, and run the
cuRobo tests in the regular CI test job instead of a separate image.
The launcher scripts still accept -c, now only warning that it is no
longer needed.

Because cuRobo is always importable, the ik_reachable check becomes
opt-in through ReachabilityConfig.enabled (default False) instead of
running for every DROID environment. Naming ik_reachable in
enabled_checks/required_checks while it is off is an error, so specs
that list it now also set reachability_config.enabled.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
Pin the CI test jobs to the image built from 523f4c8 and pushed as
isaaclab_arena:curobov2-523f4c83c5 (pinned by digest), instead of
building an image per run. The image job now only checks that the
pinned image exists and hands its reference to the test jobs; the
header comment gives the refresh command.

Also run the cuRobo tests in the native uv workflow, which now installs
cuRobo from the lock.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
cuRobo is part of the single Arena image, so run_docker.sh and
push_to_ngc.sh no longer accept -c; passing it is now an invalid-option
error instead of a no-op warning.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
Signed-off-by: Xinjie Yao <xyao@nvidia.com>
Only the test jobs run in the pinned cuRobo v2 image. The image is still
built on every run and published as latest after merge, as before. The
cuRobo image publish job is removed with the cuRobo image it published.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
The test jobs fetch the pinned cuRobo v2 image directly; the image build
and post-merge publish stay as on main. The separate cuRobo image build,
test and publish jobs are removed. Also drop the cuRobo note from the
run_docker.sh -t help.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
load_patched_robot_yaml goes back to loading the robot yaml and splicing
in the original URDF path; the Droid config already points at the v2
yaml, so the format-version assertion and its tests are dropped.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
Docker also includes cuRobo, so choosing it is no longer a failure. The
scenario now flags the removed -c flag, a separate cuRobo image, and
reporting ready without importing curobo.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
test_recording_filters_layouts names ik_reachable in both check sets,
which now requires reachability_config.enabled. Enable it while leaving
the embodiment unset, so the check stays unavailable as the test needs.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
…un image

Drop the reachability_config.enabled opt-in so ik_reachable runs for every
embodiment with a cuRobo config, as on main; skipping it goes through
enabled_checks. Stop swallowing the cuRobo import error now that cuRobo is a
locked dependency. Run the CI test jobs on the image built in the same run,
drop run_docker.sh -t, and add a real-solver test with an obstacle loaded.
Move the reachability usage from the workflow pages to the validation
concept page and drop the per-route install table and cuRobo notes.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
Signed-off-by: Xinjie Yao <xyao@nvidia.com>
Signed-off-by: Xinjie Yao <xyao@nvidia.com>
Signed-off-by: Xinjie Yao <xyao@nvidia.com>
@xyao-nv
xyao-nv force-pushed the xyao/feature/curobo_v2_ik_reachability branch from d92c08b to 6e40bd0 Compare October 29, 2026 21:13
@xyao-nv
xyao-nv enabled auto-merge (squash) October 29, 2026 21:17
@xyao-nv
xyao-nv merged commit eaa1d6b into main Oct 29, 2026
10 checks passed
zhx06 added a commit that referenced this pull request Nov 4, 2026
Write each Run's placement diagnostics to its output directory, and add
RoboLab and KitchenBench Experiments that measure placement success with
the normal experiment runner. This replaces the standalone benchmark
runner from the first revision of this PR.

## Why this change?

A placement change can help one scene and hurt another, and a few
hand-picked scenes don't show that. #1556 made each environment build
record per-check validation counts, but the experiment runner dropped
them after the build. This PR keeps them, so placement success can be
measured across all the maintained specs.

## What changes?

- `_build_environment_from_cfg()` in `run_execution.py` writes
`placement_diagnostics_rebuild<i>.json` to the Run directory for every
rebuild that solves relation placement. This applies to every
Experiment, including policy evaluations.
- `PlacementDiagnostics` gets `num_envs` and `save()` / `load()`.
- `robolab_placement_experiment.yaml` and
`kitchen_bench_placement_experiment.yaml` in
`isaaclab_arena_benchmarking/experiment_configs/` have one Run per spec,
each with 30 environments, a zero-action policy and one step.
- Each Run has its own placement seed, 100000 apart, so tasks that share
a scene solve different candidates.
- Tests check that each experiment lists every spec in its folder and
that no two Runs share candidate seeds.
- `placement_success.py` reads an Experiment output directory into one
`RunPlacementRecord` per Run and a `PlacementSuccessSummary`. It
reports:
- `valid_candidate_rate_first_batch`: the share of the first batch that
passes every required check.
- `valid_env_rate_after_retries`: the share of environments that need no
best-loss fallback.
  - `batches_per_build`.
- The docs page explains what is measured and how to run it.
- `ci.yml` runs
`isaaclab_arena_benchmarking/tests/test_placement_success.py`.

Each Run builds its spec once. On `main`, the rebuilds of a Run get the
same placement seed, so more rebuilds would repeat the same candidates.
Once rebuilds get their own seeds (after #1523), the Experiments can use
more rebuilds.

The experiments are not in `tracked_benchmarks.yaml` yet. They can be
added together with placement KPI fields, which David plans to wire up.

## Validation

- The new tests, `test_placement_diagnostics.py`,
`test_run_execution.py`, `test_experiment_runner.py` and
`test_arena_experiment_result.py` pass locally, with the camera test run
in its own process as in CI. That includes one test that runs a one-Run
placement Experiment and reads its diagnostics back.
- Three real Runs (`banana_on_plate` and two KitchenBench specs, 30
environments) took 81 s through `experiment_runner.py` on one GPU, from
app start to the result file. The KitchenBench pick spec took the
longest, about 50 s.
- My local image has no cuRobo v2, so these ran on the core from before
#1550 with this PR's changes applied. CI covers the current image.
- The full 80-spec Experiments have not been run yet.

---------

Signed-off-by: zhx06 <zihaox@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants