Repository navigation
Conversation
ooctipus
marked this pull request as ready for review
November 20, 2026 01:56
nblauch
added a commit
that referenced
this pull request
Nov 20, 2026
Shares the camera setup across the Newton and RTX backends, reuses the sensor mask across grid outputs, declares the Cartpole active-gaze configs directly and shortens the Foveated Camera guide. On top, the guide's overview figure now shows a 180-degree fisheye in a cluttered scene of sim-ready objects.
Merged
7 tasks done
ooctipus
pushed a commit
that referenced
this pull request
Nov 20, 2026
Shares the camera setup across the Newton and RTX backends, reuses the sensor mask across grid outputs, declares the Cartpole active-gaze configs directly and shortens the Foveated Camera guide. On top, the guide's overview figure now shows a 180-degree fisheye in a cluttered scene of sim-ready objects.
ooctipus
pushed a commit
that referenced
this pull request
Nov 21, 2026
Shares the camera setup across the Newton and RTX backends, reuses the sensor mask across grid outputs, declares the Cartpole active-gaze configs directly and shortens the Foveated Camera guide. On top, the guide's overview figure now shows a 180-degree fisheye in a cluttered scene of sim-ready objects.
kellyguo11
pushed a commit
to isaac-sim/IsaacLab
that referenced
this pull request
Nov 24, 2026
#9074) # Description Adds `isaaclab_fovi`, a foveated camera for Isaac Lab built on the [fovi](https://pypi.org/project/fovi/) library, active-gaze manager terms, and an active-gaze Cartpole task. A foveated camera samples the scene densely where it looks and sparsely in the periphery, on a retina-like grid, instead of on a uniform pixel grid. The camera is an experimental feature. Try it with `uv run --extra fovi isaaclab example foveated-camera`. **Camera** (`isaaclab_fovi.sensors`, depends only on `isaaclab`) - `FoveatedCamera` / `FoveatedCameraCfg` work with the `newton_warp`, `newton_optix`, `isaac_rtx` and `ovrtx` renderers. Newton casts one ray per retinal sample; RTX and OVRTX render through a lens lookup texture. - The retina places its samples by visual angle inside the field of view of a physical camera: the one `spawn` describes (an ideal pinhole, or the OpenCV model in `spawn.distortion`), or any calibrated camera given as `camera_model`. - The gaze turns the retina relative to the physical camera's optical axis: `camera.set_gaze_angles(angles_deg)`. The gaze stays relative to the mount when the mount moves, and `get_world_poses` reports the mount on every renderer. `mask_to_sensor_fov` zeroes samples outside the physical camera's image. - `cmf_a_deg` sets the strength of foveation (default 0.591 deg, an estimate from human data); a large value gives a matched non-foveated baseline. - With the default grid style the camera publishes an upright `(num_envs, H, W, C)` image, as `ProxyArray` values like the core `Camera`. Sample-set styles publish `(num_envs, N, 1, C)`; they are experimental on RTX. - Optional two-layer pooling (`pool_enabled`, `pool_mode`); segmentation pools by modal label in its own dtype (`pool_int_mode="modal"`). With `mask_to_sensor_fov`, pooling leaves out the photoreceptors the physical camera does not see, so samples at the edge of its image are not darkened. - `set_intrinsic_matrices` leaves a foveated camera as configured and warns, as the core camera does for OpenCV lens models. - `FoveatedCameraCfg` rejects `tensor_processors` (such as PPISP) and `isp_cfg`: they process pixel images, and a foveated camera publishes retinal samples. **Active gaze** - `isaaclab_fovi.mdp`: `GazeActionCfg` (two bounded gaze actions, with a fixed or tracked mount), `gaze_state`, and `gaze_teacher_labels`, a teacher that labels the gaze action toward a point on an asset (never a policy input). They run as Warp kernels with recorded launches. - `IsaacContrib-Cartpole-Camera-Fovi` in `isaaclab_tasks.contrib.active_gaze`: the stock Cartpole camera task with a 32×32 foveated retina, two gaze actions and a teacher that looks at the pole's tip, with the stock image and critic observations, CNN and PPO settings. It is registered when the `fovi` extra is installed. Its `GazeSupervisedPPO` adds a mean-only gaze supervision loss, and its `GazeGaussianDistribution` head holds the gaze actions' noise at a fixed 0.1: the gaze step clamps its actions, so a learned gaze noise meets no resistance and PPO's entropy bonus would grow it. **Docs and example.** A concise Foveated Camera page under Experimental Features, next to the visuo-tactile sensor: an overview figure of a retina behind a 180° fisheye lens among sim-ready YCB and Isaac Lab objects, path-traced with OVRTX (one fixation far to the side shows how samples outside the lens render black), the sampling math, a configuration example, and two interactive viewers (`foveation-viewer.js`): one draws the sampling grid for a pinhole and a fisheye camera as the style, CMF constant, resolution, field of view and gaze change, the other shows which photoreceptors each pooled sample averages. Their geometry matches fovi's `SamplingCoords` and `GridPoolingLayer` exactly. The page documents the `foveated-camera` example (`examples/sensors/foveated_camera.py`, `isaaclab example foveated-camera`), which, like the tactile sensor's, is an example rather than a demo. The Camera, Configure Rendering and installation pages point to the page as experimental, and the troubleshooting import table lists the extra; the task is in the environment browser, with API pages for `isaaclab_fovi.mdp` and `isaaclab_fovi.sensors`. The docs build passes with warnings as errors. The example shows the retina in the Newton viewer through the stock scene-camera view. It draws its viewing-sphere panel with the viewer's stock `log_image` and reads its keys with `is_key_down`: I/J/K/L steer the gaze and O/U magnify the panel's retina. The PR does not change `isaaclab_visualizers`. **Simplification.** nblauch#5 (by ooctipus, merged here) shares the camera setup across the Newton and RTX backends, records the sensor mask once per update and reuses it for every grid output (about 10% faster masked publication with three outputs on an RTX 5090), declares the Cartpole configs directly, and shortened the guide. It changes no behaviour: the resolved Cartpole env and agent configs are identical, and the RTX lens textures, grid outputs and teacher labels match byte for byte. **Dependencies.** A new optional extra, `fovi`, installs this package and `fovi>=2.7` (MIT, PyPI), the only package it adds to the lock. fovi 2.7 moved its training-only packages into its own extras and replaced pygeodesic with its own exact geodesic solver, which matches pygeodesic to float64 rounding. fovi's other requirements are all already in Isaac Lab's lock. The camera writes the RTX lens textures as float32 EXR files itself, with NumPy and zlib, so it needs no image library. No core runtime code changes. Outside the new package and the contrib task, the PR touches the root `pyproject.toml` (the extra) and its extras test, `uv.lock`, `docker/Dockerfile.base` and `.github/workflows/build.yaml` (CI installs the extra and runs the package's tests), the docs, and `isaaclab/programs.py` with the standalone-script cases in `isaaclab/test/app/standalone_script_cases.py` (the example). **Companion.** A draft IsaacLabTutorial PR adds an SO-101 vial-placement task with active gaze that builds on this package. ## Type of change - New feature (non-breaking change which adds functionality) ## Validation - The tests cover what `isaaclab_fovi` builds on Isaac Lab, so that a later Isaac Lab change that breaks it fails here; fovi's own behaviour is left to fovi's tests. 67 simulator-free test cases under `source/isaaclab_fovi/test` (how the camera reads Isaac Lab's camera configs, its gaze and mount handling and sensor mask, its rays, lens textures and their EXR files, and published layout, its pooling of the camera's buffers and segmentation, and the gaze manager terms) and 5 under `source/isaaclab_tasks/test/contrib/test_active_gaze_ppo.py` (gaze-supervised PPO and the gaze head). Isaac Lab's kitless contrib environment smoke test builds and steps `IsaacContrib-Cartpole-Camera-Fovi`, and the standalone-script smoke test launches the `foveated-camera` example. - Render tests on Newton Warp, Newton OptiX and Isaac RTX (with Kit) and on OVRTX (Kit-less), three per renderer, on one scene per renderer: the distance seen at the retina's centre matches the analytic distance along the gaze, from the first frame after a gaze change; the gaze stays relative to a turned or moved mount; rendered distances follow each foveated ray. All 12 pass, OptiX included, with NVIDIA driver 595.112.07. - The example renders the same fixations on Newton + Warp, Isaac RTX and OVRTX. - fovi's software sampler, applied to a dense pinhole image of the same scene, uses the same sample positions as the rendered retina and agrees with it to 0.7/255 (Newton) and 2.8/255 (RTX) mean absolute RGB difference. This checks sampling parity, so the same retina can be computed from a real camera's images; it does not test sim-to-real transfer. ### Testing burden Measured on one RTX 6000 Ada with warm Warp caches, each test file in its own process as CI runs them: | Tests | Cases | Files | Time | |---|---|---|---| | Simulator-free (`isaaclab_fovi` and the contrib PPO test) | 72 | 8 | 35 s, mostly process start-up | | Render, with Kit (Newton Warp, Newton OptiX, Isaac RTX) | 9 | 1 | 15 s | | Render, OVRTX without Kit | 3 | 1 | 12 s | CI runs them in the existing job for `isaaclab_assets`, `isaaclab_contrib`, `isaaclab_teleop`, `isaaclab_mimic` and `isaaclab_experimental`. The Docker base image installs the `fovi` extra, which adds `fovi`. ### Performance Isaac Lab's runtime benchmark (random actions, no policy, so environments reset as in training), Cartpole with 1024 environments, 1000 timed steps after 100 warmup steps, one RTX 6000 Ada, NVIDIA driver 580.178.04, at 81f8fb7 with its locked environment (Isaac Sim 6.2.0.0, Newton 1.9.0.dev0, Warp 1.17.0, OVRTX 0.6.0, PyTorch 2.11.0+cu130, fovi 2.6.0). Step: mean `env.step` time ± its standard deviation. Memory: peak rise of the GPU's used memory (`nvidia-smi`, every 0.5 s), covering simulation and rendering but not training. | Renderer | Stock (96×96) | Fovi, 96×96 | Fovi, 32×32 (the task's) | |---|---|---|---| | Newton + Warp | 2.55 ± 0.64 ms, 1.10 GiB | 3.03 ± 0.67 ms, 1.16 GiB | 1.76 ± 0.67 ms, 0.66 GiB | | Newton + OVRTX | 18.11 ± 1.27 ms, 8.00 GiB | 22.11 ± 1.42 ms, 8.06 GiB | 11.88 ± 1.39 ms, 5.36 GiB | At the stock resolution the foveated camera costs about 0.5 ms (19%) on Newton and 4 ms (22%) on OVRTX, part of which is OVRTX's per-frame cost for a moving camera. Training 4096 foveated environments at 32×32 (8.0 GB) takes less memory than 512 stock environments at 96×96 (9.5 GB). ### Training Cartpole, 200 iterations, stock PPO settings, on L40 nodes at f17a5c2; final mean reward / success (fovi: gaze error to the pole tip). Runs are in the W&B project `nvidia/isaaclab_fovi` (NVIDIA-internal). | Physics + renderer | Stock, 96×96, 512 envs | Fovi, 32×32, 4096 envs | |---|---|---| | Newton + Warp | 4.96 / 1.00 ([run](https://wandb.ai/nvidia/isaaclab_fovi/runs/e7i9dr9b)) | 4.91 / 0.99, 0.58° ([run](https://wandb.ai/nvidia/isaaclab_fovi/runs/eu4w1kyl)) | | Newton + OVRTX | 4.92 / 0.98 ([run](https://wandb.ai/nvidia/isaaclab_fovi/runs/nb8ml3lb)) | 4.66 / 1.00, 0.79° ([run](https://wandb.ai/nvidia/isaaclab_fovi/runs/heg5tm92)) | | PhysX + Isaac RTX | 4.94 / 1.00 ([run](https://wandb.ai/nvidia/isaaclab_fovi/runs/cple02ng)) | 4.93 / 1.00, 0.78° ([run](https://wandb.ai/nvidia/isaaclab_fovi/runs/cfnyq8bb)) | | OVPhysX + OVRTX | 4.87 / 1.00 ([run](https://wandb.ai/nvidia/isaaclab_fovi/runs/p56b20ux)) | 4.93 / 1.00, 0.63° ([run](https://wandb.ai/nvidia/isaaclab_fovi/runs/wg3ip1oo)) | Fovi needs more iterations than stock because the policy also learns where to look. After the move to contrib, a local 150-iteration run (512 environments, Newton + Warp) reaches a mean reward of 4.70 with a 0.49° gaze error. ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/HEAD/skills/developer/test-audit/SKILL.md) to any test changes - [x] 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) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Co-authored-by: Octi Zhang <zhengyuz@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Behavior-preserving follow-up to isaac-sim#9074. Shares camera setup across backends, reuses visibility across grid outputs, and simplifies Cartpole configuration and gaze teacher buffers. The shorter guide retains both interactive viewers.
Benchmarks
Median GPU time on an RTX 5090 after warmup.
Validation
All 82 focused tests passed. Newton RGB and depth Cartpole ran live, including a gaze-supervised PPO update. The tested RTX lens textures, grid outputs, and teacher labels and diagnostics matched byte-for-byte.