Repository navigation
[Warp] Part 3a/9: Resolve Warp selections on SceneEntityCfg and hold the env origins in a Warp array - #8856
[Warp] Part 3a/9: Resolve Warp selections on SceneEntityCfg and hold the env origins in a Warp array#8856hujc7 wants to merge 13 commits into
Conversation
|
run-ci |
[High impact] The PR appears safe to merge; no new actionable issues remain. SummaryMoves Warp joint and body selections into the stable
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[SceneEntityCfg] --> B[resolve]
B --> C[resolve_warp_ids]
C --> D[Warp terms]
E[Scene or terrain origins] --> F[ProxyArray]
F --> G[.torch]
F --> H[.warp]
Reviews (2) · Last reviewed commit: "Resolve Warp selections on the stable Sc..." · Reviewed by Greptile |
| env_ids: Env indices to reset. If ``None``, resets all envs. | ||
| env_mask: Env mask. Shape is (num_envs,). Defaults to None. | ||
| """ | ||
| if env_ids is None and env_mask is not None: |
There was a problem hiding this comment.
Unselected thrusters reset too
Calling Multirotor.reset(env_mask=mask) resets every thruster. Its parent, Articulation.reset, replaces the omitted env_ids with slice(None) before forwarding both arguments through _ThrusterCollection. This condition then ignores the mask because env_ids is no longer None.
Continuing environments have their motor parameters sampled again and their current thrust reset. Treat slice(None) like None when a mask is supplied, as resolve_ids does.
| if env_ids is None and env_mask is not None: | |
| if env_mask is not None and (env_ids is None or (isinstance(env_ids, slice) and env_ids == slice(None))): |
…ks (#8824) ## Review Map - A number is one feature and its letters are that feature's PRs, in merge order; an arrow points from a PR to the PRs that build on it. - A stacked PR's page shows the cumulative diff of its dependency chain; the "Exact changes" link opens that PR's Files changed page on its own changes (parent head to PR head). - #8783 and #6607 are no longer part of the series. | PR | Status | Depends on | Exact changes | |---|---|---|---| | #8821 Part 1a/8: shared id and mask helpers, mask writers without host sync |  | — | — | | 📌 #8824 Part 1b/8: PhysX tendon mask setters through the masks |  | 1a | — | | #8997 Part 2b/8: actuator networks reset by mask |  | 1a | — | | #8856 Part 3a/8: env origins as a ProxyArray, `SceneEntityCfg` Warp selections |  | 2b | [link](https://github.com/isaac-sim/IsaacLab/pull/8856/changes/1a3ef00daac107596034140a6a36633fec2a5f65..401b0191f04f6480c1ed03deffdd966f9f469009) | | #8228 Part 3b/8: ray caster camera frames as a ProxyArray, Rough velocity tasks (re-cut not pushed yet) |  | 3a | — | | #8998 Part 4a/8: recording utilities, lazy buffers correct under recording |  | 3a | [link](https://github.com/isaac-sim/IsaacLab/pull/8998/changes/9d74ad2de08a152312833dbe3ad9260b02f683b0..0e2a77d842051fb3946feb988f2e14d010aac3fb) | | Parts 4b-4h/8: the Warp frontend on the stable managers (not opened) | — | 4a | — | | Part 5/8: OVPhysX on the Warp frontend (not opened) | — | 4h | — | | Part 6/8: Warp noise model with an additive bias (not opened) | — | 4h | — | | #7012 Part 7/8: `--video` on the Warp frontend (re-cut not pushed yet) |  | 4h | — | | Part 8a/8: Direct Warp environment step (not opened) | — | 5, 7 | — | | #6582 Part 8b/8: Shadow Hand Warp twin, Allegro twin fix (re-cut not pushed yet) |  | 8a | — | | #8861 [DO-NOT-MERGE] all parts combined for review |  | ALL | — | ```mermaid --- config: look: neo flowchart: curve: basis --- flowchart TD A1("<b>#8821</b> · 1a<br/>id/mask helpers") B1("📌 <b>#8824</b> · 1b<br/>PhysX tendon masks") B2("<b>#8997</b> · 2b<br/>actuator net reset") A3("<b>#8856</b> · 3a<br/>env origins, Warp selections") B3("<b>#8228</b> · 3b<br/>Rough velocity") A4("<b>#8998</b> · 4a<br/>recording utilities") P4("4b-4h<br/>Warp frontend on the stable managers") P5("5<br/>OVPhysX") P6("6<br/>noise model") P7("<b>#7012</b> · 7<br/>--video") A8("8a<br/>Direct env step") B8("<b>#6582</b> · 8b<br/>Shadow twin") A1 --> B1 A1 --> B2 B2 --> A3 A3 --> B3 A3 --> A4 A4 --> P4 P4 --> P5 P4 --> P6 P4 --> P7 P5 --> A8 P7 --> A8 A8 --> B8 style B1 stroke-width:3px ``` ## Summary The 11 PhysX tendon `set_*_mask` setters no longer turn their masks into ids with a GPU→host wait: they fill the tendon buffers through the masks, 83-91 → 18.5 µs per call (5x) with half the environments selected. # Description The setters only fill Isaac Lab's tendon buffers; the push to PhysX stays index based in `write_*_tendon_properties_to_sim_*`. Each setter now resolves its masks, checks the shape and launches a masked kernel, as the Newton setters do. - MEASURED (desk RTX PRO 6000, PhysX, 4096 envs, half selected): 5x for stiffness, damping, limit stiffness, rest length and offset; 4.5x for position limit and target; unchanged with all environments selected. - No task calls these setters per step, so task FPS does not change. ## Type of change - New feature (non-breaking change which adds functionality) ## Screenshots Not applicable. ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/HEAD/skills/developer/test-audit/SKILL.md) to any test changes - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump package versions — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
|
run-ci |
|
run-ci |
|
run-ci |
The import came from Part 2b's scene test, which no longer changes this file.
… selection A selection resolved with preserve_order=True keeps the configured joint order; the Warp gather must produce the same columns as the torch term.
Camera._as_device_tensor already converts a ProxyArray through its array interface, with the same values and the same one-time deprecation warning, and no caller passes the scene's env origins to a camera pose setter. Remove the branch and its test.
The header still announced four steps and repeated the noise step that the list now names as its third item.
Only the line that takes the Warp view of the env origins had to change.
Fold the copy-sharing test into the subclass deep-copy test: copy, clone and replace share one configclass path that test_configclass covers, so one clone line proves the field metadata and the deep-copy assertions prove __deepcopy__. Drop the finalize tail of the Warp id resolution test, which repeats test_finalize_moves_resolved_selections_to_device.
…figuration The joint-subset observation parity cases built their selection with a mock that wrote the Warp ids straight from the list, so a resolve_warp_ids that sorted the ids would not fail them. They now resolve a SceneEntityCfg by joint name with preserve_order=True, then resolve_warp_ids, on the mock articulation; the mock scene gains the keys() and device that resolution reads.
Its only use, building a joint mask, went with the mask.
…, pickled without them
a4c37aa to
97665ad
Compare
|
run-ci |
Summary
Warp terms select joints and bodies through the stable
SceneEntityCfg, which now carries theirint32Warp ids, and read the environment origins from a Warp array thatenv_originsviews, so Warp code needs no conversion while torch code keeps main's types. The experimentalSceneEntityCfgsubclass and the frontend's config promotion are removed.Description
Update (2026-11-17): re-cut on
mainwithout Part 2b's commits (2b, 3a and 4a now each branch frommain).env_originsis no longer aProxyArray: it stays main'storch.Tensor, now a view of thewp.vec3farray that holds the origins (env_origins_wp), so existing torch code pays nothing extra per operation. Typingjoint_ids/body_idsorenv_originsas aProxyArraywas tried and dropped: torch takes a Python dispatch for every non-native index or operand, MEASURED per op on an L40 host:x[:, slice(None)]2.42 us vs 9.97 us with aProxyArray-typed selection,pos - env_origins6.12 us vs 11.08 us. A finalizedSceneEntityCfgnow serializes:to_dictstores the Warp ids as lists and a pickled configuration leaves them out untilresolve_warp_idsruns again.Update (2026-11-15):
a4c37aa9471adds a reordered joint subset ([8, 0, 5, 2], whatpreserve_order=Trueresolves) to the Warp-vs-torch joint observation parity tests; the reordered cases fail when the Warp ids are sorted.Update (2026-11-10):
SceneEntityCfg.resolve()is main's; the Warp managers fill the Warp ids through the newresolve_warp_ids(scene), so torch terms do no Warp work.SceneEntityCfgWarp selections (isaaclab):resolve_warp_ids(scene)fillsjoint_ids_wpandbody_ids_wp,int32Warp arrays in the order ofjoint_idsandbody_ids(a slice expands over the entity's joints or bodies, the sensors of a contact sensor; a negative index wraps; repeats are kept).joint_ids,body_idsandresolve()are main's. Copies share the Warp ids (copy(),copy.copy,copy.deepcopy,replace);to_dictwrites them as lists,validateaccepts them, and a pickled configuration drops them.isaaclab):InteractiveSceneandTerrainImporterhold the origins in awp.vec3fWarp array,env_origins_wp;env_originsis its zero-copytorch.Tensorview, as on main by type.TerrainImporter.env_originsis a property whose setter writes into the same array, so an earlier view of either stays current;InteractiveScenewrites each new clone plan's positions into its array.isaaclab_experimental,isaaclab_tasks_experimental): theSceneEntityCfgsubclass withjoint_maskandfrom_stable, and the frontend's promotion to it, are removed. The Warp joint penalties,joint_pos_out_of_manual_limitand the Cartpolejoint_pos_target_l2loop overjoint_ids_wp, so a joint selected twice counts twice, as in the torch terms. The Warp environments readscene.env_origins_wp.Breaking changes
isaaclab_experimental.managers.SceneEntityCfgnow resolves toisaaclab.managers.SceneEntityCfg;joint_maskandfrom_stableare removed.Evidence
MEASURED on a 4-GPU L40 host (
isaac-lab:latest-main, kitless Newton MJWarp, Kit for the scene, terrain and camera tests), one pytest process per file, at384b7318540and, for the two test files97665adb2e5changes, at97665adb2e5:test_scene_entity_cfg.py7,test_interactive_scene.py8,test_terrain_importer.py6,test_camera_image_obs_manager.py1, the manager tests (event 20, manager base 8, observation 46, recorder 8 + 1, reward 7, termination 2), experimentaltest_frontend.py25,test_frontend_cfg_conversion.py8 (1 skipped),test_manager_call_switch.py29,test_warp_graph_cache.py6, and the Warp parity and capture tests (actions 4, events 5, observations 11, rewards 20, terminations 10, capture safety 11) passed.pre-commitpasses over the PR's commits.Type of change
Release backport
mainScreenshots
Not applicable.
Checklist
Docker and GPU tests run on demand. Push the commits you want tested, then
comment
run-cion the pull request.pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bump package versions — CI handles that)CONTRIBUTORS.mdor my name already exists there