IsaacCapture / viz
AGENTS.md438 starsChanged 31 days agoApache-2.0View on GitHub
CRITICAL (non-optional): Before editing under src/viz/, complete the mandatory AGENTS.md preflight in ../../AGENTS.md (read every applicable AGENTS.md on your paths, not just this file). src/viz/ mirrors src/core/: a peer container of sub-modules, not a single sub-module. Each sub-module is its own static library. Tests live under ../../tests/ — see tests/AGENTS.md. - viz/core/ — foundational types + Vulkan/CUDA infrastructure. Library: viz_core. Today: VkContext, VizBuffer, Pose3D, Fov, Resolution, ViewInfo, PixelFormat, RenderTarget, FrameSync, HostImage, DeviceImage. HostImage owns CPU bytes and exposes a VizBuffer…
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- NVIDIA/IsaacTeleopword for word, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 1
- NVIDIA/IsaacTeleop★ 438100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- deps/cloudxr/webxr_client/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- examples/camera_streamer/AGENTS.mdAGENTS.md
- examples/egocap/AGENTS.mdAGENTS.md
- examples/teleop_ros2/AGENTS.mdAGENTS.md
- src/core/AGENTS.mdAGENTS.md
- src/core/codegen/AGENTS.mdAGENTS.md
- src/core/deviceio_base/AGENTS.mdAGENTS.md
- src/core/deviceio_session/AGENTS.mdAGENTS.md
- src/core/deviceio_trackers/AGENTS.mdAGENTS.md
- src/core/live_trackers/AGENTS.mdAGENTS.md
- src/core/log_bridge/AGENTS.mdAGENTS.md
- src/core/replay_trackers/AGENTS.mdAGENTS.md
- src/core/schema/AGENTS.mdAGENTS.md
- src/plugins/sensing/AGENTS.mdAGENTS.md
- src/plugins/sharpa_avatar/AGENTS.mdAGENTS.md
- src/python/isaaccapture/cts/common/AGENTS.mdAGENTS.md
- src/python/isaaccapture/cts/full_body/checker/AGENTS.mdAGENTS.md
- src/python/isaaccapture/cts/full_body/oracle/AGENTS.mdAGENTS.md
- src/python/isaaccapture/cts/hand/AGENTS.mdAGENTS.md
- src/python/isaaccapture/cts/hand/checker/AGENTS.mdAGENTS.md
- src/python/isaaccapture/logging_config/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- .cursor/rules/cmake-structure.mdcCursor rule
- cmake-structureSkill
- rebot-orin-setupSkill
- rebot-orin-setupSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
CRITICAL (non-optional): Before editing under src/viz/, complete the mandatory AGENTS.md preflight in ../../AGENTS.md (read every …
- Very specific: line 58
Test-only fixture layers (ClearRectLayer, ThrowingLayer) live in tests/cpp/viz/support/layers_testing/inc/viz/layers/testing/ and are …
- Very specific: line 102
When BUILD_VIZ=ON the build machine must have:
- Very specific: line 115
C++ namespace: all Televiz symbols in viz.
- Very specific: line 176
Test-only LayerBase subclasses and helpers live in tests/cpp/viz/support/layers_testing/inc/viz/layers/testing/ and ship via the …
- Very specific: line 200
When you add a new viz_<sub>_tests executable, no CI changes needed: the package step globs viz_*_tests and the runner loops over them.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->Agent notes — src/viz (Televiz)
CRITICAL (non-optional): Before editing under src/viz/, complete the
mandatory AGENTS.md preflight in ../../AGENTS.md
(read every applicable AGENTS.md on your paths, not just this file).
Package shape
src/viz/ mirrors src/core/: a peer container of sub-modules, not a
single sub-module. Each sub-module is its own static library. Tests live under
../../tests/ — see tests/AGENTS.md.
viz/core/— foundational types + Vulkan/CUDA infrastructure. Library:viz_core. Today:VkContext,VizBuffer,Pose3D,Fov,Resolution,ViewInfo,PixelFormat,RenderTarget,FrameSync,HostImage,DeviceImage.HostImageowns CPU bytes and exposes aVizBuffer view();DeviceImageowns CUDA-Vulkan interop memory (VkImage + cudaArray_t) plus one timeline semaphore (cuda_done_writing) that layers expose to the compositor for fine-grained producer→consumer sync. The reverse direction (consumer done reading) is handled at the layer level by buffering enough slots that the producer never targets a still-in-flight read. Consumed via discrete accessors — noview()becausecudaArray_tis opaque tiled memory, not a CUDA device pointer.VizBuffercovers linear pointer-backed memory (CPU bytes / CUDA device pointer; exposes__cuda_array_interface__/__array_interface__in Python). Math types (glm::vec3,glm::quat,glm::mat4) come from GLM 1.0.1 (FetchContent indeps/third_party/); useglm::value_ptr(mat)to get a rawfloat*for Vulkan / CUDA upload (POD-equivalent layout, no copy). CUDA-Vulkan interop requires CUDA Toolkit at link time (CUDA::cudart_static— statically linked, so consumers carry no runtimelibcudartdependency).VkContext::init()matches the current CUDA device to the chosen Vulkan physical device by UUID — every viz_core type can assume CUDA and Vulkan are talking to the same GPU without re-doing the match.viz/layers/— the concrete layers.LayerBaseitself lives inviz/session/. Library:viz_layers(STATIC). Depends PUBLIC onviz::core+viz::session, PRIVATE onviz::shaders. Today:ImageLayerBaseplusQuadLayer,CylinderLayerandEquirectLayeron top of it, andProjectionLayerdirectly onLayerBase. The three image layers are CUDA-fed via a mailbox ofDeviceImages owned by the sharedImageLayerBase, sizedkSlotCount = kMaxFramesInFlight + 2; producer side issubmit(VizBuffer)and the renderer always samples the most recently published slot. Pipelines built per-layer using the driver-sideVkPipelineCachefromVkContext. Deferred: a zero-copyacquire/releasevariant for producers that can write directly into a tiledcudaArray_t(NVDEC, custom CUDA kernels). The mailbox internals already track slot ownership, so the addition is local toImageLayerBaseand the layers built on it; revisit when a real producer demands it. Test-only fixture layers (ClearRectLayer,ThrowingLayer) live intests/cpp/viz/support/layers_testing/inc/viz/layers/testing/and are exposed via theviz::layers_testingstatic library — used byviz_session_teststo compose into aVizSession.viz/session/—VizSession,VizCompositor,FrameInfo,FrameTimingStats,SessionState,LayerBase,Swapchain,TileLayout, and the display backends (offscreen, window/GLFW, and XR). Library:viz_session. Linksviz::core,viz::xr,oxr::oxr_utils,glfw. Public API for the whole module — applications interact with Televiz throughVizSession::create().viz/xr/— OpenXR instance/session lifecycle, event polling, and thexrWaitFrame/xrBeginFrame/xrEndFrameloop. Swapchain wrapping and OpenXR↔viztype conversion live inviz_session'sXrBackend. Library:viz_xr. Always built underBUILD_VIZ—viz_coreandviz_sessionboth require the OpenXR loader. Depends onviz_core+ OpenXR.viz/python/— pybind11 module_viz, exposed asisaaccapture.viz.viz/shaders/— GLSL → SPIR-V at build time. Library:viz_shaders(INTERFACE — exposes generated headersviz/shaders/<name>.spv.h, each containing aninline constexpr alignas(uint32_t) unsigned charbyte array + aSizeconstant). Compilation runsglslangValidator(system-installed; CI getsglslang-toolsapt package). Add new shader programs by dropping<name>.vert/<name>.fraginviz/shaders/cpp/and callingcompile_shader(<name>.vert kVarName)in the local CMakeLists.
Catch2 and pytest suites for viz live under tests/cpp/viz/<sub-module>/
and tests/python/viz/ respectively (one Catch2 executable per sub-module:
viz_core_tests, viz_layers_tests, …).
src/viz/CMakeLists.txt is an orchestrator only — it adds the
sub-module sub-directories. Sub-module CMakeLists.txt files build the
actual libraries.
The whole module is gated by BUILD_VIZ at the top level, which
defaults to ON when find_package(Vulkan) and find_package(CUDAToolkit)
both succeed and OFF otherwise — a machine that cannot build viz still
configures. Override with -DBUILD_VIZ=ON/OFF. Note this is not the
BUILD_PLUGIN_OAK_CAMERA convention, which is a hard OFF.
Build paths that ship viz (the wheel CI on Linux + Windows) pass
-DBUILD_VIZ=ON explicitly. Lean Dockerfiles
(examples/teleop_ros2/Dockerfile) get viz-free builds for free.
When BUILD_VIZ=ON the build machine must have:
- Vulkan headers + loader:
libvulkan-devon Linux, LunarG SDK on Windows. - CUDA Toolkit (cudart for link; nvcc once we ship CUDA kernels):
apt
nvidia-cuda-toolkitor the official NVIDIA installer / CI action (Jimver/cuda-toolkit). The wheel excludeslibcuda.so.1— consumers supply it via NVIDIA driver. - glslangValidator for shader compilation:
glslang-toolsapt package on Linux,brew install glslangon macOS, ships with the Vulkan SDK on Windows.
Code conventions
- C++ namespace: all Televiz symbols in
viz. Internal helpers go in an anonymous namespace in the.cppthat needs them — there is noviz::detail. Test infrastructure inviz::testing. This is shared across all sub-modules — no per-module nested namespace. - Naming: types
PascalCase, methods/functions/variablessnake_case(matchessrc/core/). Private members use trailing underscore (instance_). Enum values usekPascalCase(kRGBA8). - Include paths: mirror the on-disk nesting since sub-modules are
children of
viz/, not peers of each other:<viz/core/vk_context.hpp>,<viz/layers/quad_layer.hpp>,<viz/session/viz_session.hpp>,<viz/xr/openxr_session.hpp>. Each sub-module'sinc/viz/<sub-module>/lives under that sub-module'scpp/, so per-library isolation is preserved (linking onlyviz::coreexposes onlyviz/core/...headers, not other sub-modules). - Library aliases: drop the redundant
viz_prefix in the alias —viz::core,viz::layers,viz::session,viz::xr. Real CMake target names use underscores (viz_core,viz_layers, ...) since::is reserved for ALIAS targets. Consumers always saytarget_link_libraries(... PRIVATE viz::core), never the underscore form. - Format: clang-format clean (Allman, 120 cols, 4-space indent, left
pointer alignment). Enforced in CI. Run
clang-format-14 -ilocally on any file you modify.
Tests
- C++ tests: Catch2 v3,
TEST_CASE("name", "[tag][tag]"), linked againstCatch2::Catch2WithMain. - Tag conventions:
[unit](no GPU),[gpu](Vulkan/CUDA required, must skip cleanly viaviz::testing::is_gpu_availablewhen no GPU),[xr](OpenXR runtime required, manual-only). catch_discover_tests(<target> ADD_TAGS_AS_LABELS)— exposes Catch2 tags as CTest labels. CI usesctest -L unitfor CPU selection; the GPU job runs each packagedviz_*_testsbinary directly with the Catch2[gpu]filter, because it downloads bare executables with no build tree.- GPU tests must use
GpuFixtureor callis_gpu_available()andSKIP()if false. Never assume a GPU is present.
Required test patterns
Beyond happy-path coverage, every new feature MUST add tests for:
- Invalid input rejection — assert public APIs throw on bad config (zero dimensions, uninitialized dependencies, unsupported modes) before any resource is allocated. Helps catch the "validate-then-allocate" failure mode.
- State-machine invariants — for any class with implicit state (begin/end pairs, init/destroy lifecycles, lock/unlock), explicitly test every invalid transition: double-begin, end-without-begin, destroy-then-use, etc. Expect throw, no silent no-op (no-op masks real bugs in caller code).
- Exception recovery — for any per-frame / per-iteration loop
that includes user code (layer record(), callbacks), inject an
exception via
viz::testing::ThrowingLayer(or equivalent) and verify the next call still works. Catches fence-deadlock, leaked-flag, and partial-state bugs that only surface on retry. - Idempotent destroy —
destroy()/ cleanup methods must be safe to call twice (and after partial init failure). Test it.
Test fixtures
Test-only LayerBase subclasses and helpers live in
tests/cpp/viz/support/layers_testing/inc/viz/layers/testing/ and ship via the
viz::layers_testing static library. Other test executables link
that library to compose fixtures. Today:
ClearRectLayer— paints a rect viavkCmdClearAttachments(no shaders); used to verify compositor dispatch produces real pixels.ThrowingLayer— throws fromrecord()on a configurable schedule; used for exception-recovery tests.- Catch2 sources live under
tests/cpp/viz/<sub-module>/. One executable per sub-module (viz_core_tests,viz_layers_tests, …). Do not collapse viz tests into a single mega-target.
CI coverage
build-ubuntu(GitHub-hosted, GPU-less): buildsviz_*_tests, runsctest --parallel—[unit]tests pass,[gpu]tests SKIP cleanly. The job also packages allviz_*_testsbinaries as theviz-tests-${arch}artifact.test-viz-gpu(self-hosted GPU runner, x64 + arm64): downloads theviz-tests-${arch}artifact and runs each binary with the[gpu]filter. This is where the GPU paths actually execute.publish-wheelrequireswheel-gateto pass with GPU validation enabled.NO_GPU_TESTS=1is allowed only when wheel publishing is disabled.
When you add a new viz_<sub>_tests executable, no CI changes needed:
the package step globs viz_*_tests and the runner loops over them.
OpenXR boundary
- Public API surface (in
viz_core,viz_layers,viz_session) must not expose OpenXR types. ConvertXrPosef/XrFovftoviz::Pose3D/Fovat the boundary. The conversion lives in an anonymous namespace inviz_session'sxr_backend.cpp, where the OpenXR headers are already in scope. - Vulkan types are exposed in the public API where functionally
necessary (
VkCommandBuffer,VkRenderPass,VkImagefor custom layer authoring). This is intentional — Vulkan is the contract for the extension mechanism. - HMD wait from Python is interruptible.
VizSession.createreleases the GIL andOpenXrSession::wait_for_systemcalls an optional poll hook; the binding uses it forPyErr_CheckSignalsand restores the previous hook on exit (nestedcreate()). Install Python SIGINT/SIGTERM handlers beforecreate(), and do not put Python.h intoviz_xr. C++ callers leave the hook null.
Coordinate system
OpenXR stage space conventions throughout: right-handed, Y-up, meters, radians. Robotics/ROS users converting from TF frames or other coordinate systems must do so at the application boundary — Televiz does not bridge to TF.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

