Repository navigation
Fix environment browser preview assets - #7814
kellyguo11 wants to merge 1 commit into
Conversation
|
There was a problem hiding this comment.
Isaac Lab Review Bot
The asset paths now target the published _static/tasks locations and video failures fall back to the still image, but dynamic still-image selection remains broken because the lookup receives a task object rather than the task name.
- Design and architecture: The module-scoped failed-video URL set and image fallback fit the existing browser state flow. The remaining issue is localized to the preview image lookup rather than the overall design.
- API: The RST and JavaScript agree on the
_static/tasksasset layout, so the DOM and asset-path contract is preserved. No public API compatibility concerns were identified. - Implementation: At line 468,
previewImageFor(selectedTask())passes the selected task object to regexes expecting a task-name string. It therefore falls through totasks/classic/cartpole.jpgfor every task. Passstate.taskso each selected task resolves to its intended still image.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
| const videoUrl = videoName | ||
| ? new URL(`../../_static/tasks/previews/${videoName}`, window.location.href).href | ||
| : undefined; | ||
| previewImage.src = new URL(`../../_static/${previewImageFor(selectedTask())}`, window.location.href).href; |
There was a problem hiding this comment.
🟡 Warning · Implementation — Preview image lookup receives task object
previewImageFor matches via pattern.test(taskName), but selectedTask() returns a task object (used as task.rl, task.physics, task.defaultAlgorithms nearby). The regex coerces it to "[object Object]", so no rule matches and every task falls back to tasks/classic/cartpole.jpg. The corrected _static path therefore still renders the cartpole image for all tasks, so the intended per-task preview fix does not take effect. Pass state.task, as previewVideos[state.task] already does.
There was a problem hiding this comment.
previewImageFor accepts a task object by design: it first reads task.previewImage, then derives taskName as task.task before applying the regex rules. selectedTask() returns that object, so the current call is correct. Passing state.task would instead make task.task undefined and cause the Cartpole fallback.
|
run-ci |
|
closing for #7822 |
## Description The environment browser currently requests preview images from flattened documentation paths that do not exist. Its MP4 previews are also Git LFS objects, so multi-version documentation deployments can serve pointer text instead of decodable video. This change: - serves task preview images from the Isaac Sim S3-backed download host while preserving their `tasks/...` paths; - removes the 93 task preview JPEGs from the repository; - resolves the four existing MP4 previews from their actual `_static/tasks/previews` directory; - falls back to the task image when a preview video cannot be loaded or decoded; and - remembers failed video URLs so later control changes do not expose the broken video again. For example, the Cartpole fallback now loads from: `https://download.isaacsim.omniverse.nvidia.com/isaaclab/images/tasks/classic/cartpole.jpg` The S3 objects must be uploaded under `isaaclab/images/tasks/` before this PR is ready to merge. Supersedes #7814. ## Type of change - Bug fix (non-breaking change which fixes an issue) - Documentation update ## Validation - `node --check docs/source/_static/css/environment-browser.js` - `uv run --extra test python -m pytest --noconftest tools/test/test_environ_docs.py` (35 passed) - `uv run --isolated --extra dev -- make -C docs current-docs` (succeeded without warnings) - `uv run isaaclab -f` (all hooks passed) - Verified the upload archive contains all 93 task preview JPEGs and all 65 unique browser image paths ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] Existing environment documentation tests pass - [x] No source package was touched, so no changelog fragment is required - [x] My name already exists in `CONTRIBUTORS.md` --------- Co-authored-by: Kelly Guo <[email protected]>
Description
Fix the environment browser task preview panel so it loads images and videos from their published
_static/taskslocations instead of nonexistent flattened paths.When an LFS-backed preview video cannot be decoded in a multi-version docs deployment, fall back to the task image and remember the failed URL so subsequent control updates do not reveal a broken video again.
No new dependencies.
Type of change
Release backport
release/3.0.0Screenshots
Not attached. The current published preview requests return 404s; the corrected image paths match the paths already used successfully by the task cards.
Validation
node --check docs/source/_static/css/environment-browser.jsgit diff --checkChecklist
CONTRIBUTORS.md