Skip to content

Prototype a unified Newton visualizer with RTX rendering, Policy Ghosts, recording and replay, and camera sensor views - #8862

Closed
matthewtrepte wants to merge 111 commits into
isaac-sim:mainfrom
matthewtrepte:mtrepte/newton-viz-prototype
Closed

matthewtrepte wants to merge 111 commits into
isaac-sim:mainfrom
matthewtrepte:mtrepte/newton-viz-prototype

Conversation

@matthewtrepte

Copy link
Copy Markdown
Collaborator

Description

New Newton Visualizer prototype. A reworked Newton window that renders with OpenGL or RTX, compares policy checkpoints, records and replays animations, and shows any output of a scene camera. The visualizer is now named newton (newton_gl stays as an alias) and replaces the separate newton_rtx visualizer. Kit, Viser, and Rerun are unchanged apart from ignoring the new task views.

  • One window, two renderers. NewtonGLBackendCfg.initial_renderer ("opengl" default, or "rtx") picks the renderer the window opens in, and the HUD's Renderer selector switches it at runtime. NewtonRTXVisualizer, NewtonRTXBackendCfg, and the newton_rtx preset are removed; --viz newton_rtx raises an error that points at newton. The RTX view supports picking, markers, Visible Envs, and joint, contact, spring, center-of-mass, and inertia-box overlays, drawn as thin meshes.
  • Policy Ghosts. Compare checkpoints of one task in a single window as tinted ghost environments, with checkpoint discovery and per-slot opacity and tint. Enabled with --policy_ghosts.
  • Recording and animation playback. Record video, a .viser animation, or a policy checkpoint. Open an animation from the Recording section: it plays as a tinted ghost over the simulation, with a bottom transport bar (play/pause, timeline, loop, speed) and a "Hide live simulation" option. A recorded Policy Ghosts session lists its slots with a show/hide checkbox each.
  • Camera sensors. Camera Source lists every scene camera by its outputs, such as Camera (depth sensor), and a Channel selector shows RGB, depth, normals, segmentation, or all of them, with a depth range for the color scale.
  • Tracking Camera. Comes from the merged Add tracking cameras that follow a robot to the Newton GL visualizer #8620 branch (TrackingCameraCfg, the follower, task declarations); the Newton window lists it as "Tracking Camera" in Camera Source, and the Perspective view keeps its own pose while you switch sources.
  • HUD layout. An always-visible header (task, run, physics, environment count, step, rates) plus Playback, Camera View, Scene, Recording, Live Plots, Policy Ghosts, Articulation Inspector, and Control Bindings sections.
  • Fix. UsdFileCfg no longer skips its visual_material without Kit, which left OVRTX markers red.

This branch includes the mtrepte/newton-gl-tracked-view branch of #8620 (merged in), so that PR's changes will overlap when either lands.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (the newton_rtx visualizer is removed; see the migration guide)

Validation

  • Focused unit tests pass for the visualizer, launcher, video recorder, preset, recording, animation, tracking camera, and image-view paths (the merged Add tracking cameras that follow a robot to the Newton GL visualizer #8620 and main changes included).
  • Run live on Newton MJWarp: Anymal rough with Policy Ghosts (recorded and reopened as an animation), Kuka Allegro in RTX with joint and contact overlays, and Cartpole camera depth, segmentation, and albedo views through the Camera Source path.
  • Not run: the coffee and GB300 demos after the RTX change, Kit, Viser, and Rerun windows, the docs build, and every UI control in a window (the transport bar and Slots rows were checked in code and tests, not on screen).
  • The RTX integration tests for the removed visualizer are deleted; RTX-mode integration coverage is not yet replaced.

Known limits

  • Policy Ghosts, animations, and the collision, visual, edges, and wireframe overlays are OpenGL only.
  • The free viewer camera shows RGB only; other channels are for scene sensor cameras.
  • RTX overlay lines are fixed-width meshes, and their cost with large contact buffers is not measured.
  • visualizer=newton_gl through the preset path still warns that the preset is deprecated.

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 (do not edit CHANGELOG.rst or bump package versions — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

…policy-ghosting

# Conflicts:
#	source/isaaclab_rl/isaaclab_rl/entrypoints/backends/play_rsl_rl.py
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.
…icy-ghosting

# Conflicts:
#	source/isaaclab/isaaclab/visualizers/__init__.pyi
#	source/isaaclab_visualizers/isaaclab_visualizers/newton/newton_visualizer.py
#	source/isaaclab_visualizers/isaaclab_visualizers/viser/viser_visualizer.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant