Repository navigation
[Fix] Frame the hand and goal cube in reorientation task play videos - #8474
Conversation
The direct Shadow Hand, Allegro Hand and OpenAI Shadow Hand configs set no visualizer camera, so recordings fell back to the default view 4 m from the origin, where each hand is a few pixels tall. Move the manager-based view into a shared VISUALIZER_CFG and use it for every reorientation task.
|
run-ci |
|
| VISUALIZER_CFG = VisualizerCfg(eye=(0.995, -0.80, 0.85), lookat=(0.375, -0.28, 0.53), focal_length=35.0) | ||
| """Recording view of an environment in the 50-environment play grid.""" | ||
|
|
||
| CAMERA_VISUALIZER_CFG = VisualizerCfg(eye=(1.62, -1.80, 0.85), lookat=(1.0, -1.28, 0.53), focal_length=35.0) |
There was a problem hiding this comment.
Single-hand videos miss the hand
CAMERA_VISUALIZER_CFG aims at the environment at (1, -1) in the 64-environment grid. With --num_envs 1, the command-line override places the only environment at the origin, but the camera keeps this fixed view and misses the hand. This leaves single-environment recordings of either camera task without the intended view. Compute the view from the final grid rather than assuming 64 environments.
| super().play_mode() | ||
| # the tiled camera needs more environments than the shared play default | ||
| self.scene.num_envs = 64 | ||
| self.sim.default_visualizer_cfg = CAMERA_VISUALIZER_CFG |
There was a problem hiding this comment.
Camera settings leak between tasks
Both camera tasks assign the same mutable CAMERA_VISUALIZER_CFG object in play_mode(). A later scalar override or Python assignment to env.sim.default_visualizer_cfg.eye also changes that shared default. Another camera task created in the same process then inherits the custom view, so its recording depends on which task was configured first. Assign CAMERA_VISUALIZER_CFG.copy() in both camera tasks.
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Design and architecture (1), Compatibility and deprecation (1). Other reviewed categories look good.
- PR description: The body matches the diff and provides reproducible visualizer comparisons, but should remove the duplicate task table and clearly state the training-size framing regression and tiled-camera compatibility impact.
- Design and architecture: The 50-environment camera is assigned as the global simulation default, so non-play layouts inherit a grid-specific view; move the assignment to existing
play_mode()hooks. - Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: Breaking changes: removing both camera-task marker overrides changes the documented tiled-camera scene consumed by shipped pretrained feature extractors without preserving the old image contract; restore the overrides or provide compatible checkpoints and migration.
- Implementation: Implementation looks good.
- Style consistency: Style consistency looks good.
- Test quality: Test quality looks good.
Significant concerns. Posted 2 inline findings.
Automated review; human maintainers own approval decisions.
|
|
||
| def __post_init__(self): | ||
| super().__post_init__() | ||
| # the goal cube must sit inside the tiled camera's frustum |
There was a problem hiding this comment.
🟡 Warning · Compatibility — Camera goal-marker frustum invariant removed
The deleted override documented that the goal cube must sit inside the tiled camera frustum. Both camera tasks now place it beside the hand, altering input to shipped pretrained feature extractors. Restore or correct the…
| self.sim.default_visualizer_cfg = VisualizerCfg( | ||
| eye=(0.62, -0.80, 0.85), lookat=(0.0, -0.28, 0.53), focal_length=35.0 | ||
| ) | ||
| self.sim.default_visualizer_cfg = VISUALIZER_CFG |
There was a problem hiding this comment.
🟡 Warning · Design Architecture — Play-grid view applied in all modes
VISUALIZER_CFG targets the 50-env play grid but is installed as the default everywhere; at 8192 envs x=0.375 falls between columns, so training-size videos frame empty space. Assign it in play_mode() instead.
|
run-ci |
…8474) ## Summary Reorientation task videos in play mode now show a close view of one hand and its cube, with the goal cube beside it. Before, the five direct and contrib tasks recorded from the distant default camera, the three manager tasks aimed at the world origin, where the play-mode grid has no environment, and the goal cube was drawn behind the hand, outside the view. # Description The visualizer camera is world-framed. `play_mode()` caps the scene at 50 environments (64 for the camera tasks), and neither grid places an environment at the origin. `core/reorient/utils.py` now holds: - `VISUALIZER_CFG` — the manager tasks' existing view, shifted onto the environment at x = 0.375 m of the 50-environment grid; used by every reorientation task. - `CAMERA_VISUALIZER_CFG` — the same view on the environment at (1, -1) m of the 64-environment grid; set by both camera tasks in `play_mode()`. - `GOAL_MARKER_OFFSET` — the goal cube's display offset from the in-hand position, so it sits beside the held cube; the Allegro Hand uses a wider offset to clear its larger hand. Manager tasks use the command's existing `marker_pos_offset`; direct tasks gain `goal_marker_offset`, used when `goal_marker_position` (now `None` by default) is unset. Setting `goal_marker_position` keeps the old fixed placement. The camera tasks drop their fixed override too: the goal cube was never in their tiled camera view and still is not (checked on the saved camera images), so the policy input is unchanged. The marker is display-only; the goal itself is unchanged. Once #7760 lands, the views can switch to `origin_type="env"` and drop the play-grid offsets. The contrib OpenAI config replaces `sim` wholesale, so it sets the view explicitly. Training-size recordings now aim between two environments. The hand-over view is handled in #8361. Related: #7760 | Task | Before | After | | --- | --- | --- | | `Isaac-Reorient-Cube-Shadow-Direct` | default camera | close view | | `Isaac-Reorient-Cube-Shadow-Camera-Direct` | default camera | close view | | `Isaac-Reorient-Cube-Allegro-Direct` | default camera | close view | | `IsaacContrib-Reorient-Cube-Shadow-OpenAI-FF-Direct` | default camera | close view | | `IsaacContrib-Reorient-Cube-Shadow-OpenAI-LSTM-Direct` | default camera | close view | | `Isaac-Reorient-Cube-Shadow` | between environments | close view | | `Isaac-Reorient-Cube-Shadow-Camera` | between environments | close view | | `Isaac-Reorient-Cube-Allegro` | between environments | close view | ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Last frame of a 60-step zero-action clip in play mode (`play_mode()` applied), kitless Newton GL: `isaaclab zero_agent --task <task> --video --video_length 60 --max_steps 62 physics=newton_mjwarp` with the environment configuration resolved with `play_mode=True`. Before is `develop` at fdade38; after is this branch. | Task | Before | After | | --- | --- | --- | | `Isaac-Reorient-Cube-Shadow-Direct` | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/177bcd7ee996c07ea7d87e5dfcd8a798703cbfca/pr-assets/reorient-play-views/before--Isaac-Reorient-Cube-Shadow-Direct.jpg" width="400"> | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/c883ac51fa687a2d84881e15df50fe20423bbbe7/pr-assets/reorient-play-views-final/after--Isaac-Reorient-Cube-Shadow-Direct.jpg" width="400"> | | `Isaac-Reorient-Cube-Shadow-Camera-Direct` | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/177bcd7ee996c07ea7d87e5dfcd8a798703cbfca/pr-assets/reorient-play-views/before--Isaac-Reorient-Cube-Shadow-Camera-Direct.jpg" width="400"> | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/c883ac51fa687a2d84881e15df50fe20423bbbe7/pr-assets/reorient-play-views-final/after--Isaac-Reorient-Cube-Shadow-Camera-Direct.jpg" width="400"> | | `Isaac-Reorient-Cube-Allegro-Direct` | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/177bcd7ee996c07ea7d87e5dfcd8a798703cbfca/pr-assets/reorient-play-views/before--Isaac-Reorient-Cube-Allegro-Direct.jpg" width="400"> | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/c883ac51fa687a2d84881e15df50fe20423bbbe7/pr-assets/reorient-play-views-final/after--Isaac-Reorient-Cube-Allegro-Direct.jpg" width="400"> | | `IsaacContrib-Reorient-Cube-Shadow-OpenAI-FF-Direct` | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/177bcd7ee996c07ea7d87e5dfcd8a798703cbfca/pr-assets/reorient-play-views/before--IsaacContrib-Reorient-Cube-Shadow-OpenAI-FF-Direct.jpg" width="400"> | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/c883ac51fa687a2d84881e15df50fe20423bbbe7/pr-assets/reorient-play-views-final/after--IsaacContrib-Reorient-Cube-Shadow-OpenAI-FF-Direct.jpg" width="400"> | | `IsaacContrib-Reorient-Cube-Shadow-OpenAI-LSTM-Direct` | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/177bcd7ee996c07ea7d87e5dfcd8a798703cbfca/pr-assets/reorient-play-views/before--IsaacContrib-Reorient-Cube-Shadow-OpenAI-LSTM-Direct.jpg" width="400"> | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/c883ac51fa687a2d84881e15df50fe20423bbbe7/pr-assets/reorient-play-views-final/after--IsaacContrib-Reorient-Cube-Shadow-OpenAI-LSTM-Direct.jpg" width="400"> | | `Isaac-Reorient-Cube-Shadow` | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/177bcd7ee996c07ea7d87e5dfcd8a798703cbfca/pr-assets/reorient-play-views/before--Isaac-Reorient-Cube-Shadow.jpg" width="400"> | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/c883ac51fa687a2d84881e15df50fe20423bbbe7/pr-assets/reorient-play-views-final/after--Isaac-Reorient-Cube-Shadow.jpg" width="400"> | | `Isaac-Reorient-Cube-Shadow-Camera` | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/177bcd7ee996c07ea7d87e5dfcd8a798703cbfca/pr-assets/reorient-play-views/before--Isaac-Reorient-Cube-Shadow-Camera.jpg" width="400"> | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/c883ac51fa687a2d84881e15df50fe20423bbbe7/pr-assets/reorient-play-views-final/after--Isaac-Reorient-Cube-Shadow-Camera.jpg" width="400"> | | `Isaac-Reorient-Cube-Allegro` | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/177bcd7ee996c07ea7d87e5dfcd8a798703cbfca/pr-assets/reorient-play-views/before--Isaac-Reorient-Cube-Allegro.jpg" width="400"> | <img src="https://raw.githubusercontent.com/hujc7/IsaacLab/c883ac51fa687a2d84881e15df50fe20423bbbe7/pr-assets/reorient-play-views-final/after--Isaac-Reorient-Cube-Allegro.jpg" width="400"> | ## 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/develop/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 --------- Co-authored-by: Kelly Guo <[email protected]> (cherry picked from commit 4f718b8)
|
Backported to |
Summary
Reorientation task videos in play mode now show a close view of one hand and its cube, with the goal cube beside it. Before, the five direct and contrib tasks recorded from the distant default camera, the three manager tasks aimed at the world origin, where the play-mode grid has no environment, and the goal cube was drawn behind the hand, outside the view.
Description
The visualizer camera is world-framed.
play_mode()caps the scene at 50 environments (64 for the camera tasks), and neither grid places an environment at the origin.core/reorient/utils.pynow holds:VISUALIZER_CFG— the manager tasks' existing view, shifted onto the environment at x = 0.375 m of the 50-environment grid; used by every reorientation task.CAMERA_VISUALIZER_CFG— the same view on the environment at (1, -1) m of the 64-environment grid; set by both camera tasks inplay_mode().GOAL_MARKER_OFFSET— the goal cube's display offset from the in-hand position, so it sits beside the held cube; the Allegro Hand uses a wider offset to clear its larger hand. Manager tasks use the command's existingmarker_pos_offset; direct tasks gaingoal_marker_offset, used whengoal_marker_position(nowNoneby default) is unset. Settinggoal_marker_positionkeeps the old fixed placement. The camera tasks drop their fixed override too: the goal cube was never in their tiled camera view and still is not (checked on the saved camera images), so the policy input is unchanged. The marker is display-only; the goal itself is unchanged.Once #7760 lands, the views can switch to
origin_type="env"and drop the play-grid offsets. The contrib OpenAI config replacessimwholesale, so it sets the view explicitly. Training-size recordings now aim between two environments. The hand-over view is handled in #8361.Related: #7760
Isaac-Reorient-Cube-Shadow-DirectIsaac-Reorient-Cube-Shadow-Camera-DirectIsaac-Reorient-Cube-Allegro-DirectIsaacContrib-Reorient-Cube-Shadow-OpenAI-FF-DirectIsaacContrib-Reorient-Cube-Shadow-OpenAI-LSTM-DirectIsaac-Reorient-Cube-ShadowIsaac-Reorient-Cube-Shadow-CameraIsaac-Reorient-Cube-AllegroType of change
Release backport
developScreenshots
Last frame of a 60-step zero-action clip in play mode (
play_mode()applied), kitless Newton GL:isaaclab zero_agent --task <task> --video --video_length 60 --max_steps 62 physics=newton_mjwarpwith the environment configuration resolved withplay_mode=True. Before isdevelopat fdade38; after is this branch.Isaac-Reorient-Cube-Shadow-DirectIsaac-Reorient-Cube-Shadow-Camera-DirectIsaac-Reorient-Cube-Allegro-DirectIsaacContrib-Reorient-Cube-Shadow-OpenAI-FF-DirectIsaacContrib-Reorient-Cube-Shadow-OpenAI-LSTM-DirectIsaac-Reorient-Cube-ShadowIsaac-Reorient-Cube-Shadow-CameraIsaac-Reorient-Cube-AllegroChecklist
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