Skip to content

refactor(retargeting): rename HeadPose tensor type to HeadInput - #862

Merged
aristarkhovNV merged 2 commits into
mainfrom
aaristarkhov/rename-headpose
Jul 31, 2026
Merged

refactor(retargeting): rename HeadPose tensor type to HeadInput#862
aristarkhovNV merged 2 commits into
mainfrom
aaristarkhov/rename-headpose

Conversation

@aristarkhovNV

@aristarkhovNV aristarkhovNV commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Motivation

HeadPose was ambiguous: the name is also used by the FlatBuffer schema (core::HeadPose, HeadPoseTrackedT, HeadPoseRecord), which is an unrelated concept. Renaming the retargeting tensor type to HeadInput matches the sibling HandInput naming and removes the collision.

Changes

  • Rename the tensor type HeadPoseHeadInput and HeadPoseIndexHeadInputIndex, updating all call sites. FlatBuffer schema names are deliberately untouched.
  • Keep the old names working as deprecated aliases (warn on access) at both the tensor_types package level and the tensor_types.indices / tensor_types.standard_types submodule paths — the latter is the path the repo's own examples import through, so it needs the shim too.
  • Fix a stale docstring in deviceio_source_nodes/interface.py that still listed the format as HeadPose.
  • Add TestDeprecatedHeadAliases covering both alias paths, mirroring TestDeprecatedPicoAliases from the earlier ...Pico rename.

Testing

  • Full build: cmake --preset py3.12 -DCMAKE_BUILD_TYPE=Release + cmake --build --preset py3.12.
  • ctest --output-on-failure --parallel: 309/309 passed locally (GPU/OpenXR tests skip without an HMD). Local run covers Release / py3.12 / x64 only; CI covers the rest of the matrix.
  • SKIP=check-copyright-year pre-commit run --all-files: clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Renamed the standard head-tracking tensor type to HeadInput for clearer terminology.
    • Updated head-source and transformation interfaces to use the new head input format.
    • Added backward-compatible aliases for the previous names, with deprecation warnings.
  • Bug Fixes

    • Updated examples and integrations to use the current head input schema consistently.
  • Tests

    • Expanded coverage for the new names, compatibility aliases, transformations, and optional head data.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b607896e-066f-4d4f-8d4b-af14e2afb557

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The standard head tensor factory and index enum are renamed from HeadPose and HeadPoseIndex to HeadInput and HeadInputIndex. Deprecated aliases preserve access to the former names with warnings. HeadSource, HeadTransform, examples, ROS2 helpers, visualization code, and tests now use the new names without changing transformation, validation, message construction, or optional-head behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: renaming the HeadPose tensor type to HeadInput.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch aaristarkhov/rename-headpose

Comment @coderabbitai help to get the list of available commands.

The DeviceIO source tensor types are named after the input they carry --
HandInput, ControllerInput, FullBodyInput, Generic3AxisPedalInput -- with
HeadPose the lone exception. Rename it, and HeadPoseIndex alongside it, so
the set is consistent.

HeadPose and HeadPoseIndex stay available as deprecated aliases through the
module's existing __getattr__, so graphs referring to them keep working and
warn rather than break.

Only the tensor group type moves: the FlatBuffers table in head.fbs is still
called HeadPose, and the group's fields are unchanged.

Signed-off-by: Andrei Aristarkhov <aaristarkhov@nvidia.com>
The rename added deprecated aliases only to the tensor_types package
__init__, but examples and downstream code import through the submodule
paths (tensor_types.indices, tensor_types.standard_types), which had no
aliases and raised ImportError.

- indices.py: add HeadPoseIndex -> HeadInputIndex to _DEPRECATED_ALIASES
- standard_types.py: add the _DEPRECATED_ALIASES/__getattr__ pair with
  HeadPose -> HeadInput, mirroring the existing pattern
- deviceio_source_nodes/interface.py: fix stale docstring reference
- test_tensor_group.py: cover both package- and submodule-level aliases

Signed-off-by: Andrei Aristarkhov <aaristarkhov@nvidia.com>
@aristarkhovNV
aristarkhovNV force-pushed the aaristarkhov/rename-headpose branch from 4021ea2 to 6d6c87a Compare July 31, 2026 16:52
@aristarkhovNV
aristarkhovNV merged commit 6dbd9ce into main Jul 31, 2026
37 checks passed
@aristarkhovNV
aristarkhovNV deleted the aaristarkhov/rename-headpose branch July 31, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants