Skip to content

Re-expose warp.torch for cuRobo IK reachability - #1543

Merged
xyao-nv merged 2 commits into
mainfrom
xyao/fix/curobo_warp_torch_shim
Oct 27, 2026
Merged

xyao-nv merged 2 commits into
mainfrom
xyao/fix/curobo_warp_torch_shim

Conversation

@xyao-nv

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

Copy link
Copy Markdown
Collaborator

Fix the cuRobo reachability check, which crashes with warp-lang 1.17. Add a test that builds the real cuRobo solver, so CI catches this.

Why this change?

The Isaac Lab 3.0 update (#1481) pinned warp-lang==1.17.0. Since then, building CuroboIKSolver fails:

    AttributeError: module 'warp' has no attribute 'torch'

Warp removed warp.torch in 1.13, but cuRobo still calls wp.torch.device_from_torch. So every run with cuRobo reachability validation fails during placement. Isaac Lab has a shim for this in isaaclab_mimic. CI missed it because it does not include a test involving starting Curobo IK solver.

What changes?

  • Add add_warp_torch_warp.torch the same way Isaac Lab Mimic's init__ calls it
  • Add TODO for removal once Curobo bumps.
  • Add test_ik_solver_eal Droid solver on GPU and checks one reachabIt runs in the existing curobo_deps`

Validation

Ran in the cuRobo image (./docker/run_docker.sh -c) rebuilt from main at f8c3e78, with the OpenPI pi05 DROID server for our example workflow cmds.

warp-lang 1.13 dropped the warp.torch submodule, but the pinned cuRobo
commit still calls wp.torch.device_from_torch when building its mesh
collision checker. With warp-lang 1.17.0, CuroboIKSolver construction
fails with "module 'warp' has no attribute 'torch'", which breaks the
ik_reachable placement check in the cuRobo image.

Add add_warp_torch_namespace(), mirroring Isaac Lab Mimic's shim, and
call it before cuRobo builds the IK solver config. Arena does not import
isaaclab_mimic, so it cannot rely on Lab's shim.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
@xyao-nv
xyao-nv marked this pull request as ready for review October 27, 2026 18:23
Every existing cuRobo test mocks the solver or bypasses its __init__, so
breakage inside cuRobo's own solver build (such as the warp.torch
removal) went unnoticed by the curobo_deps CI job. Build the real Droid
solver sim-free, as ReachabilityValidator does, and check that it
reaches its retract pose and rejects an out-of-reach pose.

Signed-off-by: Xinjie Yao <xyao@nvidia.com>
@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR reaches cuRobo-backed placement validation, not all Arena workflows.

The PR appears safe to merge, with a non-blocking gap in tests for the compatibility helper.

Findings

  1. P2 Compatibility helper remains untested ▶

Summary

Restore warp.torch for cuRobo before CuroboIKSolver builds its configuration.

  • IK solver setup restores Warp’s Torch namespace before cuRobo builds the solver.

Reviews (1) · Last reviewed commit: "Re-expose warp.torch for cuRobo IK reach..." · Reviewed by Greptile

@arena-review-bot

Copy link
Copy Markdown
Contributor

The PR changed while this review was running. Please run /review to retry.

@zhx06 zhx06 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!

@xyao-nv
xyao-nv merged commit 8ac3ae3 into main Oct 27, 2026
13 checks passed
xyao-nv added a commit that referenced this pull request Oct 29, 2026
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:

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

After:

```bash
./docker/run_docker.sh      # or a native `uv sync`; both include cuRobo
```

```yaml
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:

---------

Signed-off-by: Xinjie Yao <xyao@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