feat(planner): integrate NVIDIA cuRobo V2#377
Open
yuecideng wants to merge 12 commits into
Open
Conversation
Add BasePlanner.preinterpolate_targets / preserve_plan_samples / default_plan_options / with_motion_context so MotionGenerator is capability-driven rather than special-casing NeuralPlanner. Neural and TOPPRA migrate to the new hooks; behavior is preserved. Co-Authored-By: Claude <noreply@anthropic.com>
Add CuroboRobotProfileCfg/CuroboWorldCfg/CuroboPlannerCfg/CuroboPlanOptions and pure helpers (_reorder_by_names, _matrix_to_position_quaternion, _validate_dynamic_obstacles, _require_curobo). The package exports the configs without importing curobo; construction triggers the lazy V2 import. Co-Authored-By: Claude <noreply@anthropic.com>
Implement CuroboPlanner.plan (pose + cspace), backend cache keyed by (control_part, batch_size, multi_env), segment chaining without resampling, failure/over-budget hold, dynamic obstacle updates, and close(). Add fake-binding unit tests (require CUDA) and an optional real V2 integration test skipped without cuRobo/CUDA. Includes the shared cuboid world asset. Co-Authored-By: Claude <noreply@anthropic.com>
ActionCfg validates motion_source/planner_type. TrajectoryBuilder dispatches by capability (preinterpolate_targets / preserve_plan_samples) with strict planner-type matching, result validation, and a new plan_joint_motion path. MoveJoints, PickUp, Place, Press allocate from returned phase lengths; Press returns via plan_joint_motion; PickUp skips the IK prefilter for cuRobo. Coordinated dual-arm primitives reject the cuRobo backend. Co-Authored-By: Claude <noreply@anthropic.com>
Harden batched V2 collision worlds and add the documented atomic-action demo with tests.
Co-authored-by: matafela <chenjian@dexforce.com>
yuecideng
marked this pull request as ready for review
July 23, 2026 08:58
Comment on lines
+405
to
+411
| raise ImportError( | ||
| "cuRobo V2 is required for the 'curobo' planner but was not found. " | ||
| "Install it using NVIDIA's CUDA-matched extras, e.g. " | ||
| "`pip install .[cu12]` or `pip install .[cu13]` " | ||
| "(also `.[cu12-torch]` / `.[cu13-torch]`). " | ||
| f"See {_CUROBO_INSTALL_URL} for details." | ||
| ) from exc |
| import torch | ||
|
|
||
| from embodichain.lab.sim.planners import MotionGenOptions, PlanState | ||
| from embodichain.lab.sim.planners.curobo_planner import CuroboPlanOptions |
Comment on lines
+208
to
+210
| returned full-DoF trajectory. It disables cuRobo CUDA graph capture by default because graph | ||
| capture can conflict with DexSim GPU physics; pass `--cuda-graph` only after | ||
| validating that the local simulator stream setup supports it. Headless runs |
Comment on lines
+286
to
+289
| sim: SimulationManager | None = None | ||
| # try: | ||
| sim, robot, demo_block = _build_scene(args.headless) | ||
| if not args.headless: |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 36 out of 37 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (3)
docs/source/overview/sim/planners/curobo_planner.md:210
- The docs mention passing a
--cuda-graphCLI flag, but the example script’s argument parser does not define it. This makes the demo instructions inaccurate; either add the flag or describe enabling CUDA graphs viaCuroboPlannerCfg.use_cuda_graph(or similar) instead.
returned full-DoF trajectory. It disables cuRobo CUDA graph capture by default because graph
capture can conflict with DexSim GPU physics; pass `--cuda-graph` only after
validating that the local simulator stream setup supports it. Headless runs
examples/sim/planners/curobo_planner.py:288
- There is a stray commented-out
# try:line, but the function body is not actually wrapped in a try/finally. This looks like leftover editing and is confusing in an example script.
sim: SimulationManager | None = None
# try:
sim, robot, demo_block = _build_scene(args.headless)
examples/sim/planners/curobo_planner.py:376
- If any exception is raised after the simulation is created (e.g., planning failure),
sim.destroy()andSimulationManager.flush_cleanup_queue()won’t run because cleanup is not in afinallyblock. In CI or batch runs this can leave DexSim resources and recordings open; please wrap the main body intry/finallyso recording is stopped and the simulation is always destroyed.
if sim.is_window_recording():
sim.stop_window_record()
sim.wait_window_record_saves()
sim.destroy()
SimulationManager.flush_cleanup_queue()
Comment on lines
+307
to
+313
| def _is_motion_gen_curobo(self) -> bool: | ||
| """Whether this action is configured to plan through the cuRobo backend.""" | ||
| return ( | ||
| getattr(self.cfg, "motion_source", None) == "motion_gen" | ||
| and getattr(self.cfg, "planner_type", None) == "curobo" | ||
| ) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This draft PR adds NVIDIA cuRobo V2 as an optional CUDA collision-aware motion-planning backend for EmbodiChain.
It adds:
Motivation: expose GPU-accelerated collision-aware planning through the existing robot, planner, motion-generator, and atomic-action abstractions.
Dependencies: NVIDIA cuRobo V2 is optional and must be installed in a CUDA/PyTorch-compatible environment. This PR adds no mandatory EmbodiChain dependency.
Type of change
Screenshots
The headless Panda demo can generate an MP4 recording when requested.
Draft note
The initial offscreen recorder samples wall time. Because simulation playback is very fast, a recording can appear nearly static even though trajectory generation and simulation execution are verified. Simulation-time recording is a follow-up before the PR is marked ready for review.
Checklist
black .command to format the code base.