Repository navigation
More Visualizer Fixes and other General Fixes - #5977
Conversation
1cd7582 to
c9ac944
Compare
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot
Summary
This PR fixes several livestream-related bugs and improves the visualizer infrastructure:
-
Experience file validation (
app_launcher.py): Raises an error whenisaacsim.exp.full.streaming.kitis used with livestreaming enabled (modes 1/2), preventing a known hang/PhysX tensor invalidation. -
Implicit Kit visualizer for livestream (
sim_launcher.py): Ensures the Kit visualizer is always active when livestreaming is enabled, since livestreaming requires a Kit viewport to produce video. Raises a clear error if the user explicitly disables all visualizers while livestreaming. -
PhysX rigid-body view name collision fix (
physx_manager.py): When building the global rigid body view, non-rigid prims with the same basename as rigid bodies no longer cause wildcard pattern misresolution. Exact paths are used for colliding names. -
Visualization markers first-call fix (
visualization_markers.py): Adds_has_visualizedflag so the firstvisualize()call correctly allocatesmarker_indiceseven whennum_markers == self._count(which previously was a no-op). -
Camera view error messages (
camera_view.py): Improved error messages whentiled_cam_prim_pathis set but no Camera sensors exist in the scene. -
Video recorder warning (
video_recorder.py): Warns when multiple video-capable visualizers (Kit + Newton) are active, clarifying that only one stream is captured. -
Newton contact visualization (
newton_visualizer.py): Logs native Newton contacts when available; falls back to synthesized arrows from Isaac Lab contact sensors for PhysX-backed scenes. -
Infinite plane rendering (
newton_adapter.py,rerun_visualizer.py,viser_visualizer.py): Expands non-positive plane extents to a large finite size (1000m) for web viewers (Rerun/Viser) matching Newton GL behavior. -
Viser plane grid caching (
viser_visualizer.py): Avoids removing/re-adding unchanged plane grid line segments every frame to prevent flickering. -
Scene data contact sensor accessor (
scene_data_provider.py): Addsget_contact_sensors()so visualizers can discover contact sensors without coupling to internals. -
Dependency/packaging fixes: Adds
typing-extensions>=4.15.0for Newton, pinspyarrow==22.0.0for Rerun, removes legacysetup.pyin favor ofpyproject.toml. -
Documentation fixes: RST formatting corrections (
:ref:→:doc:, broken table link,:py:keyword:→ backticks), link exclusions in CI, and improved visualization docs.
Findings
-
Minor:
_ensure_livestream_kit_visualizerlogic gap — Whenvisualizer_explicit=Trueandvisualizersis a non-None list that does not contain"none", the function will append"kit"to the list. This is correct behavior. However, whenvisualizer_explicit=Trueandvisualizersis an empty list[], the conditionvisualizers is None or "none" in ...is False (empty list is not None, and"none"is not in it), so it falls through to append Kit. This seems intentional and correct. -
PhysX rigid-body view logic — The new disambiguation logic in
get_rigid_body_view()correctly identifies when a body name collides with a non-rigid prim name and keeps exact paths. However,exact_pathswill include ALL environment instances for the same body (e.g.,/World/envs/env_0/Robot/base,/World/envs/env_1/Robot/base, etc.) rather than using a wildcard pattern. This is intentional since using a wildcard for a colliding name could match the wrong prim, but it may result in a larger view specification for scenes with many environments and name collisions. This is acceptable as a correctness-over-performance tradeoff. -
Contact sensor fallback — The
_contact_sensor_arrow_tensorsmethod has good defensive coding with try/except blocks around attribute access. Theforce_thresholdfallback to0.0is appropriate. The code correctly handles the precedence: per-contact-point positions (contact_pos_w+force_matrix_w) take priority over aggregate net-force arrows. -
expand_infinite_plane_scale— Correctly handles negative values as infinite indicators (width ≤ 0 → expand). The function preserves the tail of the scale tuple, which is correct. -
Test coverage — All key behavioral changes have corresponding unit tests, including the experience file rejection, livestream Kit injection, video recorder warning, contact sensor fallback, plane scale expansion, and marker first-call fix.
No issues found with correctness. The fixes are well-scoped and defensive.
Verdict
No issues found — The bug fixes are correct, well-tested, and the changes are appropriately scoped for a bug-fix PR.
Update (7150ef7): Reviewed 3 cleanup commits since initial review:
app_launcher.py: Added explanatory comment for the experience file validation check — good documentation.- Test consolidation: Merged tests from
test_sim_launcher.pyintotest_kwarg_launch.pyand removed the separate file. The duplicatetest_rejects_isaacsim_full_streaming_experience_relativetest was merged with the absolute path test. Error message match pattern updated to align with implementation. Some env-var-based tests were removed (likely covered by other test paths or deemed redundant).
These are housekeeping changes — no functional code changes. No new issues found.
Update (0117a9f): Reviewed 1 commit adding new tutorial:
- New tutorial script:
scripts/tutorials/07_visualizers/run_tiled_camera_visualizer.py— A demonstration script for the Kit and Newton tiled camera visualizer panels. The script is well-structured with:- Good documentation with example command lines
- Proper error handling for unsupported visualizers
- Sensible defaults (Kit visualizer for Kit tasks, Newton for Galbot)
- Clean separation between visualizer configuration functions
The tutorial correctly uses the newer launch_simulation() context manager pattern and resolve_task_config() for Hydra-based configuration. No issues found with this addition.
Update (b58b605): Reviewed incremental changes (10 new/modified files). Major additions:
- Lift task consolidation: Merged
lift_franka_softintolift/config/franka_soft, dropped-v0suffixes from gym IDs, fixednewton_mjwarp_vdb→newton_mjwarp_vbdtypo, extracted shared solver config into reusablecoupled_mjwarp_vbd_solver_cfg()factory. - AutoMate SoftDTW rewrite: Replaced Numba/CUDA dependency with pure Torch implementation supporting autograd, anti-diagonal batching (no-grad path), and variable-length Y sequences. Removed
numbafrom package dependencies. - Environment destructor safety:
__del__now checksself._is_closedandsys.meta_path is not Noneto suppress tracebacks during Python import shutdown._is_closedstartsTrueand flips after successful init. - MDL relative import parsing: New regex-based discovery of sibling MDL module imports (
.::Module,..::Package::Module) for correct local asset retrieval. - Kit experience fix: Wheeled robot extensions marked optional.
- Newton camera pose fix: Strips instance suffix before resolving source prim pose.
- skrl JAX fix: Preloads
jax.experimental.multihost_utilsfor recent JAX compatibility. - COMPASS NuRec tutorial: Condensed to a pointer to the COMPASS repo's handbook.
All changes are well-tested with new unit tests for destructors, MDL imports, and SoftDTW. No issues found.
Update (77f7b0e): Reviewed incremental changes (26 modified/new files) since b58b605. Key changes:
build_simulation_contextdevice override fix (simulation_context.py): Thedevicekwarg now properly overridessim_cfg.devicewhen both are provided, fixing warp kernel device-mismatch errors on non-default GPUs. Default changed from"cuda:0"toNoneto avoid silently overriding sim_cfg.- Sensor base ancestor resolution (
sensor_base.py): Fixed_resolve_rigid_body_ancestor_exprto useendswith+ slice instead ofstr.replace, preventing incorrect trimming when the terminal child path segment appears earlier in the prim path. - Fabric notices kitless fix (
_fabric_notices.py):disabled_fabric_change_notifiesnow gracefully no-ops whenusdrtis unavailable in kitless runtimes. - Newton rigid object state writers (
rigid_object.py): Fixed deprecatedwrite_root_*_state_to_simmethods to pass keyword-only arguments (root_pose=,root_velocity=) to underlying helpers. - OVPhysX redundant replication removed:
queue_usd_replicationcalls removed from OVPhysX asset constructors (parent class handles this). - CI device-split infrastructure (
tools/_device_split.py,tools/conftest.py): Newdevice_splitpytest marker and CI driver refactoring to invoke marked test files once per device (CPU/GPU) in separate subprocesses, working around ovphysx ≤0.3.7 process-global device lock. - Newton visualizer particles: Added
show_particlesandparticle_colorconfiguration options with proper caching and selective override (only/model/particlesbatch is recolored). - Docker/CloudXR docs: Added attention blocks about non-root container permission errors.
All changes include appropriate unit tests. No issues found.
Update (55ed34f): Reviewed incremental changes (14 modified/new files) since 77f7b0e. Key changes:
-
Newton Fabric body binding fix (
replicate.py,newton_manager.py): Major refactor of how Newton body prims are initialized in Fabric._rename_builder_labelsnow returns per-body Fabric binding records (path + index) derived from the clone-plan source rows.start_simulationdelegates to a new static_initialize_fabric_body_prims()that creates/initializes each body individually using these bindings, and callsfabric_hierarchy.update_world_xforms(). For non-replicated stages, a fallback identity binding is generated. This avoids invalid Fabric attribute writes without cloning USD specs per environment. Comprehensive unit test added (test_newton_fabric_body_sync.py). -
Newton visualizer
set_camera_viewfix (newton_visualizer.py): Removed early-return guard that blocked camera updates before initialization. Now unconditionally storeseye/lookatintocfgand calls_apply_camera_pose, with explicit float casts. Unit tests added for both uninitialized and active viewer cases. -
Reach task teleop device fix (
reach_env_cfg.py,ik_rel_env_cfg.py): Moved native delta teleoperation device configs (keyboard, gamepad, spacemouse) from the sharedReachEnvCfgbase to the relative-IK variant only (FrankaReachEnvCfg). These devices emit 6D SE(3) delta commands matching relative IK but incompatible with the 7D absolute-IK action space. RemovedIsaac-Reach-Franka-IK-Abs-v0from teleop docs table. -
Rendering tutorial remote USD helper (
set_rendering_mode.py): Addedadd_remote_usd_reference()helper that directly adds a USD reference without localizing through temp asset cache. Default rendering mode changed from"performance"to"balanced". -
Rerun recording docs (
visualization.rst): Added documentation forrecord_to_rrd,keep_historical_data, andkeep_scalar_historysettings for replay recording. -
Changelog fragments: Added changelog entries for all three fixes (fabric body binding, reach teleop, tiled camera visualizer tutorial, Newton camera view).
No issues found. The Fabric body binding refactor is well-structured with proper fallback for non-replicated stages and good test coverage.
Greptile SummaryThis PR fixes several livestreaming-related bugs: it raises an error when the known-incompatible
Confidence Score: 3/5The two new streaming-experience rejection tests will fail immediately because the match= regex does not appear anywhere in the raised ValueError message, which would break CI for this PR. The underlying runtime changes are well-structured and correct, but two new tests use a match pattern that does not exist in the actual error string, causing guaranteed test failures. source/isaaclab/test/app/test_kwarg_launch.py — the two streaming-experience rejection tests carry a broken match string and need to be updated before CI will pass. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[launch_simulation called] --> B[_ensure_livestream_kit_visualizer]
B --> C{livestream mode > 0?}
C -- No --> D[no-op, proceed]
C -- Yes --> E{visualizer_explicit AND viz=none?}
E -- Yes --> F[raise ValueError 'Kit visualizer required']
E -- No --> G{'kit' already in visualizer list?}
G -- Yes --> H[proceed as-is]
G -- No --> I[append 'kit' to visualizer list]
I --> H
H --> J[_resolve_experience_file]
J --> K{experience == isaacsim.exp.full.streaming.kit AND livestream 1 or 2?}
K -- Yes --> L[raise ValueError 'incompatible experience file']
K -- No --> M[launch Kit app]
|
| launcher._livestream = 2 | ||
|
|
||
| with pytest.raises(ValueError, match="full streaming experience"): | ||
| launcher._resolve_experience_file({"experience": str(experience)}) |
There was a problem hiding this comment.
Test regex pattern won't match the actual error message
Both test_rejects_isaacsim_full_streaming_experience_absolute and test_rejects_isaacsim_full_streaming_experience_relative use match="full streaming experience", but the actual ValueError raised in app_launcher.py reads: "The experience 'isaacsim.exp.full.streaming.kit' is known to hang or invalidate PhysX tensor views…". The words "full" and "streaming" appear only inside the kit filename (exp.full.streaming.kit), separated by dots, never by spaces, so re.search("full streaming experience", msg) will find no match and both tests will fail with AssertionError.
| with pytest.raises(ValueError, match="full streaming experience"): | ||
| launcher._resolve_experience_file({"experience": str(experience)}) | ||
|
|
||
|
|
||
| def test_allows_isaacsim_full_streaming_experience_when_livestream_disabled(tmp_path, monkeypatch: pytest.MonkeyPatch): | ||
| experience = tmp_path / "isaacsim.exp.full.streaming.kit" | ||
| experience.touch() | ||
| monkeypatch.setenv("EXP_PATH", str(tmp_path)) | ||
| launcher = _new_launcher_for_experience_check() | ||
| launcher._livestream = 0 | ||
|
|
||
| launcher._resolve_experience_file({"experience": str(experience)}) | ||
|
|
There was a problem hiding this comment.
The regex
"full streaming experience" won't match the actual error message. Use a substring that is literally present in the ValueError text, such as "isaacsim.exp.full.streaming.kit" or "known to hang". Apply the same fix to the second test.
| with pytest.raises(ValueError, match="full streaming experience"): | |
| launcher._resolve_experience_file({"experience": str(experience)}) | |
| def test_allows_isaacsim_full_streaming_experience_when_livestream_disabled(tmp_path, monkeypatch: pytest.MonkeyPatch): | |
| experience = tmp_path / "isaacsim.exp.full.streaming.kit" | |
| experience.touch() | |
| monkeypatch.setenv("EXP_PATH", str(tmp_path)) | |
| launcher = _new_launcher_for_experience_check() | |
| launcher._livestream = 0 | |
| launcher._resolve_experience_file({"experience": str(experience)}) | |
| with pytest.raises(ValueError, match="isaacsim.exp.full.streaming.kit"): | |
| launcher._resolve_experience_file({"experience": str(experience)}) | |
| def test_rejects_isaacsim_full_streaming_experience_relative(tmp_path, monkeypatch: pytest.MonkeyPatch): | |
| experience = tmp_path / "isaacsim.exp.full.streaming.kit" | |
| experience.touch() | |
| monkeypatch.setenv("EXP_PATH", str(tmp_path)) | |
| launcher = _new_launcher_for_experience_check() | |
| launcher._livestream = 2 | |
| with pytest.raises(ValueError, match="isaacsim.exp.full.streaming.kit"): | |
| launcher._resolve_experience_file({"experience": "isaacsim.exp.full.streaming.kit"}) |
|
Update on new commits (b58b605) — reviewed incremental changes since 7acde19: Summary of new changes:
Assessment:These changes are well-structured. The task consolidation is breaking but well-documented in changelogs. The SoftDTW rewrite is a significant improvement for portability. No new issues identified in this increment. Previous inline comments about regex patterns in test_kwarg_launch.py addressed code not present in this incremental diff. |
🔄 Incremental Review Update (2379e81)Reviewed new commits since b58b605 (previous review). Changes in this push:
Verdict:✅ No new issues found in the incremental changes. The RSL-RL 5.x adaptation is clean and well-tested.
|
…e branch] (#6066) # Description <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html 💡 Please try to keep PRs small and focused. Large PRs are harder to review and merge. --> - Add an experience file line error raise when selecting a known incompatible isaac sim extension - Make sure livestream mode implicitly launches a kit visualizer - Adds Tiled Viz Camera tutorial script support for mix&matching the visualizers in the example cmds - Adds default kit visualizers to the remaining showcase scripts - Add a note to the rerun visualizer in the Visualization docs Linked PR: #5977 <!-- As a practice, it is recommended to open an issue to have discussions on the proposed pull request. This makes it easier for the community to keep track of what is being developed or added, and if a given feature is demanded by more than one party. --> ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) - Documentation update ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist - [ ] 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` - [ ] 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 <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task -->
Description
Type of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there