Skip to content

Track camera origins in Newton visualizers - #7390

Open
diegoferigo-rai wants to merge 1 commit into
isaac-sim:release/3.0.0from
diegoferigo-rai:diegoferigo/newton-visualizer-camera-origin
Open

Track camera origins in Newton visualizers#7390
diegoferigo-rai wants to merge 1 commit into
isaac-sim:release/3.0.0from
diegoferigo-rai:diegoferigo/newton-visualizer-camera-origin

Conversation

@diegoferigo-rai

@diegoferigo-rai diegoferigo-rai commented Aug 27, 2026

Copy link
Copy Markdown

Description

The Newton visualizer interprets eye and lookat in world coordinates only, so in a multi-environment scene the camera ignores the environment and asset origins and frames the wrong place. This adds an origin_type to NewtonVisualizerCfg (world, env, asset) with origin_env_index and origin_track_path, mirroring how the Kit visualizer resolves its origin, and offsets the configured pose by the resolved origin. world keeps the current behavior, env frames a chosen environment, and asset tracks an asset root or body.

set_camera_view() stays an absolute setter, matching Kit and SimulationContext.set_camera_view(), so only the configured initial pose is origin-relative.

Type of change

  • New feature (non-breaking change which adds functionality)

Release backport

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

Screenshots

Before and after (camera framing env/asset origin instead of world) to be attached from a GPU run.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks 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 added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Previously, Newton visualizers interpreted eye and lookat as absolute world coordinates. The Kit visualizer already supported world, environment, and asset origins, so the same visualizer config produced different recordings when used with Newton.

Add the Kit origin selectors to the Newton visualizer config and apply the resolved origin before pushing the camera pose to GL or RTX. Asset origins are refreshed during normal steps and on RGB capture so recorded frames follow moving assets.
@github-actions github-actions Bot added documentation Improvements or additions to documentation asset New asset feature or request isaac-mimic Related to Isaac Mimic team infrastructure labels Aug 27, 2026
@diegoferigo-rai
diegoferigo-rai changed the base branch from develop to release/3.0.0 August 27, 2026 16:46
@diegoferigo-rai
diegoferigo-rai marked this pull request as ready for review August 27, 2026 16:51
@diegoferigo-rai
diegoferigo-rai requested a review from a team August 27, 2026 16:51
@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds world-, environment-, and asset-relative initial camera origins to the Newton visualizer, including dynamic asset tracking and configuration tests.

  • Adds origin selection and asset/body tracking configuration.
  • Resolves configured camera poses relative to the selected origin.
  • Updates tracked asset origins during visualizer steps and frame capture.
  • Adds a changelog fragment and unit coverage for origin offsets and absolute camera setting.

Confidence Score: 4/5

The absolute camera setter can be displaced by the next asset-tracking update and should be corrected before merging.

Asset tracking adds its world origin to cfg.eye and cfg.lookat even after set_camera_view has replaced those fields with absolute coordinates, causing the camera to jump after the next update.

Files Needing Attention: source/isaaclab_visualizers/isaaclab_visualizers/newton/newton_visualizer.py

Important Files Changed

Filename Overview
source/isaaclab_visualizers/isaaclab_visualizers/newton/newton_visualizer.py Implements origin resolution and asset tracking, but asset updates reinterpret poses previously supplied through the absolute camera setter.
source/isaaclab_visualizers/isaaclab_visualizers/newton/newton_visualizer_cfg.py Adds documented origin type, environment index, and asset/body tracking path configuration.
source/isaaclab_visualizers/test/test_newton_adapter.py Covers immediate offset and absolute-setter behavior but misses the setter followed by an asset-tracking update.
source/isaaclab_visualizers/changelog.d/newton-visualizer-camera-origin.rst Documents the new camera-origin behavior.

Comments Outside Diff (1)

  1. source/isaaclab_visualizers/isaaclab_visualizers/newton/newton_visualizer.py, line 1272-1273 (link)

    P1 Absolute pose becomes relative

    When set_camera_view() is called while tracking an asset with a nonzero world origin, it stores the absolute coordinates in cfg.eye and cfg.lookat; the next tracking update adds the asset origin to those values, causing the camera to jump away from the requested position.

    Knowledge Base Used: Rendering and visualization extensions

Reviews (1): Last reviewed commit: "Track camera origins in Newton visualize..." | Re-trigger Greptile

@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

The new origin configuration preserves existing world-mode behavior and adds environment/asset-relative camera framing, but asset tracking currently conflicts with the documented absolute camera setter and resolves to world zero during initialization or explicit reapplication. The new public origin property also needs the required units and shape documentation.

  • Design and architecture: The opt-in origin model is compatible with the existing default, but cfg.eye and cfg.lookat are used both as origin-relative configuration and as storage for absolute values passed to set_camera_view(). Subsequent asset tracking or origin reapplication therefore offsets absolute coordinates again; the relative configured pose must be kept separate from absolute setter state.
  • API: The configuration fields and reapply_origin() are additive, but reapply_origin() does not correctly resolve asset origins. The public viewer_origin property must also document its physical units and tensor shape in accordance with repository API documentation requirements.
  • Implementation: The environment-origin lookup and bounds validation are coherent. However, _resolve_asset_origin() unconditionally returns zero, so initialization and reapply_origin() temporarily use world-relative framing, while the per-step asset update later reapplies an origin to whichever values are currently stored in cfg.eye and cfg.lookat, including absolute values written by set_camera_view().

Significant concerns. Posted 3 actionable findings inline.

Automated review; human maintainers own approval decisions.

Comment thread source/isaaclab_visualizers/isaaclab_visualizers/newton/newton_visualizer.py Outdated
@diegoferigo-rai
diegoferigo-rai force-pushed the diegoferigo/newton-visualizer-camera-origin branch from 7ddc048 to d6845ea Compare August 27, 2026 17:11
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset New asset feature or request documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant