Skip to content

[Scripts] Remove legacy benchmark_camera script and update documentation - #7922

Merged
ooctipus merged 3 commits into
isaac-sim:developfrom
StafaH:fix/modernize-camera-benchmark
Sep 20, 2026
Merged

ooctipus merged 3 commits into
isaac-sim:developfrom
StafaH:fix/modernize-camera-benchmark

Conversation

@StafaH

@StafaH StafaH commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Removes the legacy benchmark_cameras.py script and its CLI-only test rather than porting an RTX-focused camera-count benchmark to 3.0. The repository already has benchmark_renderer.py for renderer profiling across Newton Warp and OVRTX.

The former camera-capacity guide is replaced by Select and configure a Renderer, a user-focused how-to that:

  • explains when to select Newton Warp, OVRTX, or legacy Isaac RTX;
  • documents the VRAM, throughput, fidelity, runtime, and output-coverage trade-offs;
  • shows task-level renderer selection with compatible physics presets; and
  • shows the relevant Newton Warp, OVRTX, and Isaac RTX configuration options.

The guide links to the existing renderer capability and camera-output support references rather than duplicating their full matrices.

Type of change

  • Documentation update
  • Maintenance cleanup

Release backport

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

Screenshots

Not applicable.

Validation

  • uv run --isolated --extra dev -- make -C docs current-docs
  • git diff --check
  • uv run isaaclab -f: formatting and documentation hooks passed; the repository-wide changelog-fragment check remains blocked by unrelated existing immutable and missing fragments.

@StafaH
StafaH requested a review from a team September 20, 2026 08:10
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Sep 20, 2026
@greptile-apps

greptile-apps Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR should not merge until autotuning records metrics for the same passing camera count it reports to the user.

Findings

  1. P1 Autotune Records Failing Trial ▶

Summary

The PR modernizes the camera benchmark around the unified Camera and RayCasterCamera APIs, updates runtime and scene creation, adds explicit ProxyArray-to-Torch views at the point-cloud boundary, revises autotuning and measurement lifecycle handling, and adds simulator-free CLI regression tests and updated documentation.

  • Consolidates legacy standard and tiled camera options behind the current Camera API while retaining deprecated aliases.
  • Uses configuration-driven standalone and task scenes with current launcher, Fabric, physics, and sensor APIs.
  • Makes warmup and measurement counts explicit, synchronizes CUDA timing, and avoids retaining frame outputs.
  • Adds CLI validation tests for compatibility aliases and invalid argument combinations.
  • One autotune result-selection issue remains: recorded metrics can belong to the threshold-exceeding trial rather than the reported largest passing count.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  CLI[Parse and validate CLI] --> Select{Camera kind}
  Select -->|RTX| Camera[Create Camera configuration]
  Select -->|Ray caster| Ray[Create RayCasterCamera configuration]
  Camera --> Mode{Task supplied?}
  Ray --> Mode
  Mode -->|No| Scene[Create standalone vectorized scene]
  Mode -->|Yes| Task[Inject sensors into task configuration]
  Scene --> Launch[Launch simulation runtime]
  Task --> Launch
  Launch --> Warmup[Run exact warmup steps]
  Warmup --> Measure[Run measured steps and sample utilization]
  Measure --> Threshold{Autotune and within limits?}
  Threshold -->|Yes| Increase[Increase camera count]
  Increase --> Measure
  Threshold -->|No| Record[Record benchmark results]
Loading

Reviews (1) · Last reviewed commit: "Modernize camera benchmark"

Comment thread scripts/benchmarks/benchmark_cameras.py Outdated
Comment on lines +663 to +667
final_analysis = _run_task_trial(env_cfg, monitor)
utilization = final_analysis["system_utilization_analytics"]
within_thresholds = all(value <= limit for value, limit in zip(utilization, thresholds))
if not args_cli.autotune or not within_thresholds:
break

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.

P1 Autotune Records Failing Trial

When a trial exceeds a utilization threshold, final_analysis has already been replaced with that trial's results before the loop exits. The script then reports last_passing_count, but records timing and utilization from the threshold-exceeding count, so the saved benchmark does not represent the advertised autotune result. Preserve the previous passing analysis with its count, or record every trial with matching metadata.

@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 modernization coherently unifies the Camera and RayCasterCamera paths, adopts config-first launching, and handles ProxyArray-to-Torch conversion at the depth-processing boundary. Three compatibility and benchmark-contract issues remain: explicit zero-valued legacy counts are rejected, the default autotune interval invalidates the newly documented two-cameras-per-environment command, and standalone num_objects now applies per environment despite being documented as a scene-wide count.

  • Design and architecture: The pre-launch configuration and post-launch instantiation split is coherent, as are the unified CameraSelection flow, per-environment camera cardinality, and ray-caster mounts. However, placing standalone objects below {ENV_REGEX_NS} makes object count scale with camera count, materially changing the benchmark workload unless this per-environment behavior is explicitly intended and documented.
  • API: Deprecated aliases do not fully preserve accepted legacy command shapes because an explicit zero count is treated as a selected camera kind. Autotune validation also conflicts with the default interval and the guide's task_num_cameras_per_env=2 example. The num_objects CLI description and guide should state that the value is per environment if that new behavior is intentional.
  • Implementation: The exact warmup and measurement loops, CUDA synchronization, NVML cleanup, zero-action reuse, and non-retained camera outputs are well structured. Before merge, adjust legacy zero-count resolution, make autotune interval handling compatible with the documented command, and align the standalone object-count implementation or documentation with the intended workload.

Minor fixes needed. Posted 3 actionable findings inline.

Automated review; human maintainers own approval decisions.

Comment thread scripts/benchmarks/benchmark_cameras.py Outdated
("--num_tiled_cameras", args.num_tiled_cameras, args.tiled_camera_data_types),
("--num_standard_cameras", args.num_standard_cameras, args.standard_camera_data_types),
]
selected_legacy = [(name, count, data_types) for name, count, data_types in legacy_counts if count is not None]

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.

🟡 Warning · Api — Explicit zero legacy counts now rejected

Legacy counts default to None and any supplied value marks the option as selected, so --num_tiled_cameras 100 --num_standard_cameras 0 now errors as mutually exclusive. The previous script defaulted both to 0 and only conflicted on two positive counts, and its own warning text told users to set the unused counts to 0. Treat non-positive legacy counts as unselected while keeping the negative-value rejection.

Comment thread scripts/benchmarks/benchmark_cameras.py Outdated
if args.autotune:
if args.autotune_camera_count_interval <= 0:
parser.error("--autotune_camera_count_interval must be greater than zero.")
if args.autotune_camera_count_interval % args.task_num_cameras_per_env != 0:

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.

🟡 Warning · Api — Autotune interval default rejects documented example

The default --autotune_camera_count_interval is 25, so this check fails for any even --task_num_cameras_per_env. The autotune example added in the same PR (docs lines 76-78: --task_num_cameras_per_env 2 --autotune) therefore exits with status 2 before launching. Either round the interval up to a multiple of the per-env count, or change the default/documented example so the guide's command runs.

Comment thread scripts/benchmarks/benchmark_cameras.py Outdated
experiment_group.add_argument(
"--experiment_length", type=int, default=15, help="Number of measured simulation steps."
)
experiment_group.add_argument("--num_objects", type=int, default=10, help="Number of objects in the sample scene.")

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.

🔵 Suggestion · Implementation — num_objects is now per environment

The standalone scene uses num_envs=selection.count and spawns objects under {ENV_REGEX_NS}/Objects/Obj_XX, so the total is num_objects * num_cameras. The help text ("Number of objects in the sample scene") and the guide example (--num_cameras 2 --num_objects 100, described as 100 objects) both understate the spawned count, which changes what the benchmark measures. Reword both to state "per environment".

@StafaH StafaH changed the title Modernize camera benchmark for current sensor APIs [Scripts] Modernize camera benchmark for current sensor APIs Sep 20, 2026
@StafaH

StafaH commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 20, 2026
@StafaH StafaH changed the title [Scripts] Modernize camera benchmark for current sensor APIs [Scripts] Remove legacy benchmark_camera script and update documentation Sep 20, 2026
@ooctipus
ooctipus merged commit 0daf5fe into isaac-sim:develop Sep 20, 2026
53 checks passed
@isaaclab-bot

isaaclab-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Backported to release/3.0.0 as 7d6979a.

isaaclab-bot Bot pushed a commit that referenced this pull request Sep 20, 2026
…ion (#7922)

# Description

Removes the legacy `benchmark_cameras.py` script and its CLI-only test
rather than porting an RTX-focused camera-count benchmark to 3.0. The
repository already has `benchmark_renderer.py` for renderer profiling
across Newton Warp and OVRTX.

The former camera-capacity guide is replaced by **Select and configure a
Renderer**, a user-focused how-to that:

- explains when to select Newton Warp, OVRTX, or legacy Isaac RTX;
- documents the VRAM, throughput, fidelity, runtime, and output-coverage
trade-offs;
- shows task-level renderer selection with compatible physics presets;
and
- shows the relevant Newton Warp, OVRTX, and Isaac RTX configuration
options.

The guide links to the existing renderer capability and camera-output
support references rather than duplicating their full matrices.

## Type of change

- Documentation update
- Maintenance cleanup

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Screenshots

Not applicable.

## Validation

- `uv run --isolated --extra dev -- make -C docs current-docs`
- `git diff --check`
- `uv run isaaclab -f`: formatting and documentation hooks passed; the
repository-wide changelog-fragment check remains blocked by unrelated
existing immutable and missing fragments.

(cherry picked from commit 0daf5fe)
@StafaH
StafaH deleted the fix/modernize-camera-benchmark branch September 21, 2026 02:23
ooctipus added a commit that referenced this pull request Sep 21, 2026
…7530, #7899) (#7926)

## Description

Backports the two changes merged into `develop` since September 19 that
are still missing from `release/3.0.0`:

| Source PR | Change | Source commit |
| --- | --- | --- |
| #7530 | Validate camera outputs against renderer capabilities before
simulator startup | `31d1c53510490c76841e9c35a329574b357d9900` |
| #7899 | Share native resources by construction cfg and centralize
ownership and teardown | `c90c3a1097a0a669a823b880b1c8d0654d7fd267` |

Includes the original regression tests, API documentation, and changelog
fragments. #7530 applied without changes. #7899 required two conflict
resolutions to retain the release branch's OVRTX mapping API,
documentation, and tests. Of its 62 files, 59 match the merged source
exactly; the other three retain those existing release additions.
Release versions, lockfile entries, compiled changelogs, and
documentation routing are preserved.

## Audit

Checked all **33 PRs** merged from September 19, 2026 00:00
America/Los_Angeles through `develop` commit `c90c3a1097` (September 20,
21:29 Pacific), against release base `75e9c8ce12`. **31 are already
backported; the remaining two are included here.** Git first-parent
history and GitHub's merged PR list agree. Automatic changelog/version
compilation remains branch-specific.

<details>
<summary>31 PRs already recorded in release</summary>

| Source PRs | Existing release commit |
| --- | --- |
| #7777, #7608, #7895, #7872, #7831, #7834, #7838, #7840, #7903, #7674 |
[`ff22c52891`](ff22c52)
|
| #7886 |
[`41bfaee5f0`](41bfaee)
|
| #7042 |
[`970d21ef48`](970d21e)
|
| #7905 |
[`f0563d1f9e`](f0563d1)
|
| #7604 |
[`dca7cfe984`](dca7cfe)
|
| #7610, #7603 |
[`5dd2220243`](5dd2220)
|
| #7839 |
[`b8b93bb96e`](b8b93bb)
|
| #6851 |
[`baa025ad90`](baa025a)
|
| #7250 |
[`f86b33e6b1`](f86b33e)
|
| #7910 |
[`24f7b4842b`](24f7b48)
|
| #7810 |
[`9738e096c8`](9738e09)
|
| #7832 |
[`be270ed88b`](be270ed)
|
| #4679 |
[`80157aa22d`](80157aa)
|
| #7914 |
[`01b59b5a22`](01b59b5)
|
| #7502 |
[`db7db61f60`](db7db61)
|
| #7918 |
[`bca9dba8bb`](bca9dba)
|
| #7919 |
[`ef1514c97c`](ef1514c)
|
| #7922 |
[`7d6979a19e`](7d6979a)
|
| #7923 |
[`a1dd560b98`](a1dd560)
|
| #7924 |
[`892e51dc1d`](892e51d)
|
| #7925 |
[`75e9c8ce12`](75e9c8c)
|

</details>

## Validation

**745 tests passed** on the combined backport:

- Core registry, configclass, replication, camera contracts, and task
presets: 158 passed.
- Newton manager/model/reset and coupling suites: 299 passed.
- OVPhysX/OVRTX lifecycle, scene data, bindings, and material contracts:
141 passed on CPU.
- Clone-plan algebra: 83 passed.
- All 8 OV CUDA cases skipped in the CPU run: 8 passed on GPU.
- OVPhysX ray-caster regression: 1 passed.
- Kit simulation-context and PhysX scene-data tests: 54 passed.
- Newton solver reset integration: 1 passed.

The registry-identity and borrowed-config-field regressions both fail
with the pre-backport implementations and pass with this change.
Backport file-scope validation, source-file comparison, `git diff
--check`, and `uv run isaaclab -f` passed.

Local validation used PyTorch 2.12.0/CUDA 13.0, Isaac Sim 6.0.1.0,
Newton 1.6.0rc1, and an RTX 5090. Existing deprecation/runtime warnings
occurred. Full Docker CI is requested separately against the pinned
environment; local checks do not claim a startup or runtime speedup.

## Checklist

- [x] Read the contribution guidelines and ran formatting/changelog
checks.
- [x] Included source tests, documentation, and changelog fragments.
- [x] Verified regression behavior and preserved release-specific
changes.
- [x] Recorded source commit hashes and audited the requested merge
window.

---------

Co-authored-by: Antoine RICHARD <[email protected]>
Co-authored-by: ooctipus <[email protected]>
ooctipus added a commit that referenced this pull request Sep 24, 2026
…ng docs (#7957)

Backports the three changes from the September 20–23 `develop` audit
that are missing from `release/3.0.0`, alongside the existing
cloning-guide backport:

- #7722 (`4cf439dfeb`): reject a second `SimulationContext` construction
instead of silently discarding its configuration. Includes the original
fixture cleanup and regression coverage.
- #7893 (`22fcd71bc4`): validate DelayBuffer lag values before mutating
its live configuration.
- #7947 (`6e9ef17f59`): make `v3.0.0-EA` the default documentation
version in deployment and local multi-version builds.
- #7129 (`354168560f`): clarify that `replicate_physics=False` skips the
active physics context while other declared replication contexts still
run.

**Compatibility:** repeated `SimulationContext(...)` calls now raise.
Retrieve the live context with `SimulationContext.instance()`, or call
`clear_instance()` before constructing a replacement. The original major
changelog fragment includes this migration.

The runtime and test files match current `develop`. The docs-default
backport adapts the release branch's existing redirect template,
validates the target page, and preserves explicit overrides. The
cloning-guide backport preserves the current release APIs; its obsolete
sections were already removed.

## Release audit

Checked all **35 PRs** merged into `develop` from **2026-09-20 16:43:18
UTC** through `cff81e8473` (September 23), against release head
`5d3e0b695e`. **32 are already covered; the remaining three are included
here.** Git history, patch equivalence, GitHub's merged PR list, and
remaining file differences were checked. Branch-specific
version/changelog compilation and existing release-only changes are
preserved.

<details>
<summary>Already covered PRs</summary>

26 have an equivalent patch in release: #7919, #7922, #7923, #7924,
#7925, #6758, #7928, #7902, #7927, #7891, #7931, #7691, #7861, #7929,
#7916, #7939, #4609, #7942, #7940, #7948, #7937, #7955, #7960, #7961,
#7970, #7958.

Six were squash-merged or adapted: #7530 and #7899 in #7926; #7637 in
#7933; #7860 in #7936; #7954 and #7950 in #7964. Their implementation
differences were checked against the current release tree.

</details>

## Validation

- **276 tests passed**: SimulationContext (51, including CPU/CUDA),
headless context construction (15), nine schema/fragment suites (165),
four manager suites (38), and DelayBuffer (7).
- Both backported regressions reproduce with the original release
implementations.
- Docs redirect recipe: local/deployment EA defaults, explicit override,
and missing-target rejection passed with a stubbed Sphinx builder.
- All 22 changed files match the intended backport scope; `uv run
isaaclab -f` and `git diff --check` passed.
- Fresh Sphinx validation (`-b dummy -W --keep-going`): passed without
warnings, excluding static assets as the HTML builder does. Full HTML
documentation CI is running.

Local runtime validation used PyTorch 2.12.0, CUDA 13.0, Isaac Sim
6.0.1.0, and an RTX 5090. Existing runtime/deprecation warnings
occurred; the CI jobs validate the pinned environments.

The previous [docs CI
failure](https://github.com/isaac-sim/IsaacLab/actions/runs/35795116307/job/106972539281)
was an external connection reset fetching the Omniverse intersphinx
inventory, producing one warning under `-W`. That URL returned HTTP 200
when rechecked. This update starts a fresh docs build.

---------

Co-authored-by: hujc <[email protected]>
Co-authored-by: Zihan Xu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants