Repository navigation
Add a tracking camera to the Newton visualizer - #9050
matthewtrepte wants to merge 102 commits into
Conversation
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>
|
run-ci |
|
@greptileai review |
…cit view check and late track_path errors
|
@greptileai review |
…the viewer camera, and document the RTX limits
|
run-ci |
| eye=visualizer.cfg.eye, lookat=visualizer.cfg.lookat, focal_length=visualizer.cfg.focal_length | ||
| ) | ||
| ]) # fmt: skip | ||
| cameras = with_free_view(cameras, visualizer.cfg.eye, visualizer.cfg.lookat, visualizer.cfg.focal_length) |
There was a problem hiding this comment.
The earlier backend-name checks are gone, which is a good improvement. But the camera-list policy for tracking cameras still lives in high-level code: with_free_view(...) here, visualizer.cfg.tracking_cameras_only() a few lines below, and the same call in BaseVisualizer.initialize. SimulationContext is still deciding how tracking cameras combine with the free and scene cameras.
That rule is specific to visualizers that support tracking cameras, and it will differ per backend (e.g. the RTX toggle). Each new backend or view type would mean editing core again.
Can the visualizer resolve its own camera list from cfg.cameras, so the sim context just passes the cfg through? If that is too big for this PR, at least inline with_free_view instead of exposing it as a public helper in visualizer_cfg.py, and note the policy as temporary.
There was a problem hiding this comment.
Inlined with_free_view as a private helper in SimulationContext and noted the policy as temporary. Having each visualizer resolve its own camera list from cfg.cameras makes sense, but it's a bigger change, so I'd do it as a follow-up.
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.
|
run-ci |
# Conflicts: # source/isaaclab_tasks/isaaclab_tasks/core/reach/reach_env_cfg.py # source/isaaclab_tasks/isaaclab_tasks/core/velocity/velocity_env_cfg.py
|
run-ci |
Description
Adds a tracking camera to the Newton visualizer. Camera Source lists it as "Tracking Camera" next to the free Perspective view, and its controls edit the environment, asset, body, eye, look-at, focal length and heading settings, with a reset to what the task declared. The core tasks now declare one,
--video viz:<type>:trackingrecords it, andTrackingCameraCfgsubclassesPerspectiveCameraCfg. The Newton window follows it in both renderers: in RTX it moves the OVRTX viewer camera.eye/lookatand the Kit environment-origin backend next to the tracking camera.VisualizerCfg(view=...)is still accepted on tasks that declare tracking cameras; the explicit view wins.This is first in the stack of Newton visualizer PRs (#9050, then #9052, #9053 and #9096). #9051 has merged, so it builds on
main.Type of change
Validation
test_newton_visualizer_notifies_native_viewer_once_per_geometry_change,test_newton_scene_camera_controls_apply_uniformly_to_active_copies).Checklist
pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there