Skip to content

[Core] Draw debug markers in on-demand video captures - #8337

Merged
kellyguo11 merged 1 commit into
isaac-sim:developfrom
AntoineRichard:antoiner/fix-video-capture-markers
Oct 6, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:developfrom
AntoineRichard:antoiner/fix-video-capture-markers

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Headless video recordings (--video with no interactive visualizer) captured frames through render_rgb_array() without SimulationContext.render(), so visualization-marker callbacks never ran. Command arrows, goal frames and other debug markers were missing from every recorded clip.

  • VideoRecorder now dispatches marker callbacks before capturing from a marker-capable visualizer when the simulation is not rendering continuously, matching what update_visualizers() does on the continuous path.

Migration: none. Dependencies: none.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Validation

  • uv run python -m pytest source/isaaclab/test/envs/test_video_recorder.py: 47 passed. The extended on-demand capture test fails without the fix.
  • Recorded Isaac-Reach-Franka and Isaac-Velocity-Flat-AnymalD with isaaclab play --video newton_rtx: goal frames and velocity arrows are visible, and absent before the fix.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab -f
  • I have made corresponding changes to the documentation (no documented behavior changes)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment for every touched source package
  • My name already exists in CONTRIBUTORS.md

🤖 Generated with Claude Code

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Headless recordings capture through render_rgb_array() without
SimulationContext.render(), so marker callbacks never ran and command,
goal and sensor markers were missing from clips. Dispatch them before
capturing from a marker-capable visualizer, as update_visualizers() does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Oct 6, 2026
@AntoineRichard
AntoineRichard marked this pull request as ready for review October 6, 2026 17:30
@AntoineRichard
AntoineRichard requested a review from a team October 6, 2026 17:30

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

All reviewed code categories look good.

  • PR description: The body matches the diff and gives focused automated and manual validation; remove the prohibited Claude attribution line, while retaining the useful problem, behavior, and validation sections.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: Implementation looks good.
  • Style consistency: Style consistency looks good.
  • Test quality: Test quality looks good.

No blocking issues. No inline findings.

Automated review; human maintainers own approval decisions.

@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adds debug marker rendering to video capture.

The PR appears safe to merge; strengthening the sequencing test is a non-blocking improvement.

Findings

  1. P2 Update order goes untested ▶

Summary

The recorder now dispatches debug-marker callbacks after forwarding physics for on-demand visualizer captures. The updated test checks that both operations occur before capture, but does not check their order.

Reviews (1) · Last reviewed commit: "Draw debug markers in on-demand video ca..."

synchronized = False
def test_visualizer_source_refreshes_physics_and_markers_before_on_demand_capture():
"""On-demand capture reads a frame after physics transforms and debug markers are updated."""
updated = set()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Update order goes untested. This set only checks that physics and marker updates both happened; the test would still pass if marker callbacks ran before sim.forward(). Because callbacks need the forwarded physics state, asserting their order would protect against stale markers in captured frames.

@kellyguo11

Copy link
Copy Markdown
Contributor

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 6, 2026
@kellyguo11
kellyguo11 enabled auto-merge (squash) October 6, 2026 23:42
@kellyguo11
kellyguo11 merged commit f5383e7 into isaac-sim:develop Oct 6, 2026
60 checks passed
kellyguo11 pushed a commit that referenced this pull request Oct 7, 2026
Backports #8337 to `release/3.0.0`.

The original cherry-pick conflicted. An NVIDIA inference model proposed
this resolution, and deterministic validation confirmed that it changes
no paths outside the original PR. Because conflict resolution cannot be
certified as an exact patch replay, this PR is intentionally a draft and
requires release-maintainer review.

| Field | Commit |
|---|---|
| Original merged change | `f5383e7feb4c433372caf0d4d537e1e6c03ef0f2` |
| Release base used | `71673503edb4d60597d3cf5b6cb95d0c459a03e5` |
| Proposed backport | `bea7ba38a0a618d7006b0a55faf91486cd931dda` |

Co-authored-by: Antoine RICHARD <[email protected]>
kellyguo11 pushed a commit that referenced this pull request Oct 9, 2026
…itch (#8338)

# Description

Newton-family marker rendering logged only the markers selected for each
prototype and hid prototypes with no markers. When a multi-prototype
marker switched prototype mid-run (for example the Lift pose markers
moving from `position_far` to `position_near`), a batch that had only
been logged as hidden gained its first instances after rendering
started. OVRTX rejects that with `WRITE_FLOOR_VIOLATION`, so `--video
newton_rtx` recordings of the Lift tasks stopped after 9 to 37 frames.

- Log every marker in every prototype batch and zero-scale the markers
that use another prototype, so each batch keeps a fixed instance count
from the first frame.
- Frame-marker line width uses the largest marker scale, so zero-scaled
markers do not thin visible lines.

Migration: none. Dependencies: none.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Validation

- `uv run python -m pytest
source/isaaclab_visualizers/test/test_newton_adapter.py`: 74 passed. The
new prototype-switch test fails before the fix, where the unused
prototype is logged hidden with no instances.
- `isaaclab play --checkpoint pretrained --video newton_rtx` for
`Isaac-Lift-Franka`, `Isaac-Lift-KukaAllegro`,
`Isaac-Lift-Cable-Franka`, `Isaac-Lift-Cloth-Franka` and
`Isaac-Lift-Soft-Franka`: 300 of 300 frames each with no
`WRITE_FLOOR_VIOLATION` (9 to 37 frames before). `Isaac-Lift-Franka`
with `--video newton_gl` renders the same markers.
- Requires #8337 for markers to be dispatched in headless captures;
without it the recordings complete but show no markers.

## Follow-ups

Zero scaling is a temporary workaround: Newton's `log_instances` has no
per-instance visibility, and changing a batch's count rebuilds it in
`ViewerRTX`. newton-physics/newton#4539 requests PointInstancer-backed
batches that resize and hide instances in place; the code is marked
`TODO(newton-physics/newton#4539)` and logs only the shown markers once
it lands. The `WRITE_FLOOR_VIOLATION` itself is fixed upstream by
newton-physics/newton#4393.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with `uv run isaaclab -f`
- [ ] I have made corresponding changes to the documentation (no
documented behavior changes)
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment for every touched source package
- [x] My name already exists in `CONTRIBUTORS.md`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
isaaclab-bot Bot pushed a commit that referenced this pull request Oct 9, 2026
…itch (#8338)

# Description

Newton-family marker rendering logged only the markers selected for each
prototype and hid prototypes with no markers. When a multi-prototype
marker switched prototype mid-run (for example the Lift pose markers
moving from `position_far` to `position_near`), a batch that had only
been logged as hidden gained its first instances after rendering
started. OVRTX rejects that with `WRITE_FLOOR_VIOLATION`, so `--video
newton_rtx` recordings of the Lift tasks stopped after 9 to 37 frames.

- Log every marker in every prototype batch and zero-scale the markers
that use another prototype, so each batch keeps a fixed instance count
from the first frame.
- Frame-marker line width uses the largest marker scale, so zero-scaled
markers do not thin visible lines.

Migration: none. Dependencies: none.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Validation

- `uv run python -m pytest
source/isaaclab_visualizers/test/test_newton_adapter.py`: 74 passed. The
new prototype-switch test fails before the fix, where the unused
prototype is logged hidden with no instances.
- `isaaclab play --checkpoint pretrained --video newton_rtx` for
`Isaac-Lift-Franka`, `Isaac-Lift-KukaAllegro`,
`Isaac-Lift-Cable-Franka`, `Isaac-Lift-Cloth-Franka` and
`Isaac-Lift-Soft-Franka`: 300 of 300 frames each with no
`WRITE_FLOOR_VIOLATION` (9 to 37 frames before). `Isaac-Lift-Franka`
with `--video newton_gl` renders the same markers.
- Requires #8337 for markers to be dispatched in headless captures;
without it the recordings complete but show no markers.

## Follow-ups

Zero scaling is a temporary workaround: Newton's `log_instances` has no
per-instance visibility, and changing a batch's count rebuilds it in
`ViewerRTX`. newton-physics/newton#4539 requests PointInstancer-backed
batches that resize and hide instances in place; the code is marked
`TODO(newton-physics/newton#4539)` and logs only the shown markers once
it lands. The `WRITE_FLOOR_VIOLATION` itself is fixed upstream by
newton-physics/newton#4393.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with `uv run isaaclab -f`
- [ ] I have made corresponding changes to the documentation (no
documented behavior changes)
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment for every touched source package
- [x] My name already exists in `CONTRIBUTORS.md`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

(cherry picked from commit b30e5bd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants