Skip to content

Add recording to the Newton visualizer - #9053

Open
matthewtrepte wants to merge 239 commits into
isaac-sim:mainfrom
matthewtrepte:mtrepte/newton-viz-4-recording
Open

matthewtrepte wants to merge 239 commits into
isaac-sim:mainfrom
matthewtrepte:mtrepte/newton-viz-4-recording

Conversation

@matthewtrepte

@matthewtrepte matthewtrepte commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds a Recording section to the Newton visualizer HUD for saving an mp4 video of the window (needs ffmpeg) and a .png screenshot. Files go to a configurable output folder with optional auto-numbering and timestamps (a video is stamped with the time it started). Video and screenshots have an Include HUD option, off by default. Each recording encodes to its own temporary file, and a clip is only kept when ffmpeg exits cleanly. Starting a new recording never discards the unsaved clip before the new one has encoded, and a failed frame read or a window resize shows a message instead of failing silently.

Third in the stack: it builds on #9050 (tracking cameras) and #9052 (HUD reorganization), which should merge first. #9051 has merged. Until then this diff also shows their commits, and it shrinks as they land.

Type of change

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

Validation

  • source/isaaclab_visualizers/test passes locally except two Newton adapter tests that need a newer Newton than the one installed here. CI is green on the current head.
  • Not yet recorded with Include HUD on in the live viewer; the full isaaclab --format hook run is still open.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • 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

matthewtrepte and others added 29 commits October 15, 2026 20:46
A perspective view can now frame an environment or follow an asset: env_index
places it relative to an environment origin, and track_path follows an asset's
position and, with follow_heading, its smoothed yaw. CameraFollower turns such
a view into world poses and reseeds the heading when an environment resets.
Visualizers that declare only task views get a free view beside them, and the
scene cameras they would find are kept. Add the viz:<type>:tracking video
source, which records the first task view whichever view the window shows.

Builds on the tracking views of isaac-sim#7760 by Antoine Richard.
Each perspective view renders itself, so a task view appears in Camera View
and the interactive view stays free. A recorder captures a task view by
borrowing the viewer camera for one frame and handing it back, so it does not
need the window to show that view. Nothing is created in the scene.
Fixed environment views and robot-following views for the locomotion tasks,
with the framings of isaac-sim#7760. Each task keeps its own viewport pose.
Create each task view's follower when the viewer initializes, so a bad env_index
or track_path fails there, and warn when the framed environment is not visible.
Keep the one-owner check on a perspective view's renderer, give each follower its
own clock, leave the streaming choice alone when a configuration only declares
task views, and drop a branch no caller reaches.
A velocity-task environment can reset near its old position with a new heading,
which the distance check misses. Also treat a yaw change no robot turns at
(over 10 rad/s) as a reset.
Say what a task view follows or frames instead of numbering it as another
perspective view.
Report the tracking form in the invalid video source error, correct the docs on
which visualizers show task views, type and place the free-view helper, give a
task view no pose instead of an error when no follower exists, and read the
task-view flag directly. Merge the Kit tracking case into the parametrized
invalid-source test and cover each recording case separately.
Kit follows a task view with its viewport, replacing the origin_type,
origin_env_index and origin_track_path fields of KitVisualizerCfg: the viewport
starts on the first declared view, and follow(), unfollow(), set_follow_env()
and set_view_offsets() switch it, from the environment window or code. The
deprecated viewer bridge and ViewportCameraController map onto them.

Viser gets a Follow task view checkbox, off by default, and an Environment
field. Newton GL gets an Environment field beside Camera View. A follower can
change its environment at runtime.
…m#8786

Resolve the merge with the visualizer config split: task views are
declared in VisualizerCfg.cameras and the Kit origin_* options stay
removed from KitBackendCfg. Task declarations use
SimulationCfg.visualizer_cfgs, the deprecated viewer bridge builds task
views on the new config, and Newton RTX leaves task views out.

Bring the follower and Newton GL behavior from isaac-sim#8786: set_track_path,
asset_names and body_names on CameraFollower, editable Tracking Camera
fields with a reset to the task default, and the Tracking Camera and
Perspective view names.
Start Kit on the first declared task view instead of the first listed one,
re-apply only an asset follow every step so an environment view stays
movable, warn when the deprecated viewer cannot add a task view, keep a view
tied to its environment when its asset is cleared, detect environment resets
by heading change instead of yaw rate, and drop the always-true reset result.
Insert the free view right before the first task view so scene cameras
declared ahead of it still open first, and set the viewport camera's focal
length when Kit starts following a task view.
Move the task view section after the Newton RTX description, remove the
untested-RTX note, the Kit control details and the duplicated migration
paragraph, and shorten the visualization concept text.
Viser keeps its main behavior and ignores task views. Mark the two Newton RTX
filters as removable together with the RTX visualizer.
Add TrackingCameraCfg, a PerspectiveCameraCfg subclass that frames an
environment or follows an asset, and give PerspectiveCameraCfg back its
world-coordinate meaning. Rename task views to tracking cameras in the
code, tests, docs and changelog fragments.
env_index is now optional. None picks the middle of the visible environments,
so the view has neighbors on every side, and the tasks no longer repeat env 0.
Apply a free view's pose when capturing it, reject tracking cameras without a scene or as an RTX image source, clear the heading filter on reset, and correct the docs, comments, and test markers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…check

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@matthewtrepte matthewtrepte added the documentation Improvements or additions to documentation label Nov 16, 2026
@matthewtrepte

Copy link
Copy Markdown
Collaborator Author

run-ci

@matthewtrepte

Copy link
Copy Markdown
Collaborator Author

@greptileai review

scene: The scene to read environment origins and assets from.
env_ids: The visible environments, or None when all are; the middle one is picked from these.
"""
self.cfg = copy.copy(cfg)

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 Camera labels show old targets

Copying the camera settings leaves the Camera Source dropdown reading the old view.cfg.source.track_path. After a user changes Asset in the HUD, the camera follows the new target but the dropdown still names the original target, or says “fixed to env.” This makes multiple tracking cameras harder to tell apart. Read follower.cfg.track_path when building the label.

@matthewtrepte

Copy link
Copy Markdown
Collaborator Author

@greptileai review

Guard the Franka Pour playback eye when no cameras are declared, read the scene's asset collections directly, move the free-view rule into SimulationContext as a private helper, and check the tracking camera FOV against an independent value.
# Conflicts:
#	source/isaaclab_tasks/isaaclab_tasks/core/reach/reach_env_cfg.py
#	source/isaaclab_tasks/isaaclab_tasks/core/velocity/velocity_env_cfg.py
…x-removal' into w/n53

# Conflicts:
#	source/isaaclab_visualizers/isaaclab_visualizers/newton/newton_visualizer.py
@matthewtrepte

Copy link
Copy Markdown
Collaborator Author

run-ci

This branch has not been deployed

No deployments
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.

4 participants