Skip to content

[merge-to-it] sharpa_avatar: judge glove liveness by fetched data, not the online flag (#1181) - #1198

Merged
lotusl-code merged 2 commits into
mainfrom
merge-to-it/sharpa-avatar-liveness-by-data
Oct 8, 2026
Merged

lotusl-code merged 2 commits into
mainfrom
merge-to-it/sharpa-avatar-liveness-by-data

Conversation

@lotusl-code

@lotusl-code lotusl-code commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

[merge-to-it]

Summary

Workaround for #1181: AvatarDevice::get_device_info().online stays false for a glove first discovered offline and powered on later, so refresh_data() stopped such a glove on every frame and it was reconnected every 2 s indefinitely. Liveness is now judged by fetched data only; a glove is disconnected after the data timeout.

Stacked on #1197 (target branch merge-to-it/sharpa-avatar-detect-silent-glove): without that change a powered-off glove would keep "fetching" its last sample and never time out.

Testing

  • clang-format-14 --dry-run --Werror; pre-commit; -fsyntax-only compile against Avatar SDK 1.7.3-17 headers.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Hand-tracking gloves now reset after 3 seconds without fresh data, even when the device continues to report an unchanged sample. This helps prevent stale hand-tracking data from remaining active.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in 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: Repository: NVIDIA/IsaacCapture/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 9940d711-783b-476a-a99c-65dd7056e61f

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/IsaacCapture/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 9ad39f72-1c9e-418e-8a0b-84c0dda3c72d
📥 Commits

Reviewing files that changed from the base of the PR and between 83b6f84 and 22cfd52.

📒 Files selected for processing (2)
  • src/plugins/sharpa_avatar/core/avatar_hand_tracking_plugin.cpp
  • src/plugins/sharpa_avatar/core/inc/avatar/avatar_hand_tracking_plugin.hpp

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The plugin now uses sample timestamps to determine whether fetched glove data is new. Repeated samples do not refresh the liveness timer. The timer resets the glove after three seconds without a newer sample. GloveState::reset also clears the stored sample timestamp.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 22cfd

No concrete runtime failure is established by the available evidence. The change presents no supported merge-blocking risk beyond normal checks.

🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. 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 summarizes the main change: glove liveness is judged by fetched sample data instead of the online flag.
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 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Comment thread src/plugins/sharpa_avatar/core/avatar_hand_tracking_plugin.cpp Outdated
Base automatically changed from merge-to-it/sharpa-avatar-detect-silent-glove to main October 8, 2026 19:05
lotusl-code and others added 2 commits October 8, 2026 14:27
…t the online flag

AvatarDevice::get_device_info().online stays false for a glove first
discovered offline and powered on later, so such a glove was started and
then stopped every 2 s. refresh_data() no longer checks that flag; a
glove is disconnected only after the data timeout. Workaround for #1181.

Signed-off-by: Lotus Li <lotusl@nvidia.com>
…stamps

With --datasets=haptic nothing dropped a glove's handle once the online
reset was removed: the data timeout was gated on a data dataset and
set_task() failures only log. A power-cycled glove kept its dead handle,
which blocked reconnection. A haptic-only glove now fetches RAW so the
same stamp-based data timeout applies to every configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lotus Li <lotusl@nvidia.com>
@lotusl-code
lotusl-code force-pushed the merge-to-it/sharpa-avatar-liveness-by-data branch from cf8860e to 0c87e8a Compare October 8, 2026 21:42
@lotusl-code
lotusl-code enabled auto-merge (squash) October 8, 2026 21:54
@lotusl-code
lotusl-code merged commit 0a11713 into main Oct 8, 2026
33 checks passed
@lotusl-code
lotusl-code deleted the merge-to-it/sharpa-avatar-liveness-by-data branch October 8, 2026 22:04
lotusl-code added a commit that referenced this pull request Oct 9, 2026
* [merge-to-it] sharpa_avatar: pin only the primary APT signing key fingerprint (#1196)

install_avatar_sdk.sh failed its key check because it also required
F9A50A81FE8797F953DB24E1938548788D899BCC, which is the encryption
subkey of the Sharpa signing key, while the check reads primary
fingerprints only. Pin the primary key alone.

Signed-off-by: Lotus Li <lotusl@nvidia.com>

* [merge-to-it] sharpa_avatar: detect a silent glove by new sample stamps (#1197)

fetch_data() keeps returning a silent glove's last sample, so a glove
that stopped sending data still counted as fetched and the data timeout
never fired. Only a sample whose stamp advances now counts as data, and
the timeout drops from 10 s to 3 s.

Signed-off-by: Lotus Li <lotusl@nvidia.com>

* [merge-to-it] sharpa_avatar: judge glove liveness by fetched data, not the online flag (#1181) (#1198)

* [merge-to-it] sharpa_avatar: judge glove liveness by fetched data, not the online flag

AvatarDevice::get_device_info().online stays false for a glove first
discovered offline and powered on later, so such a glove was started and
then stopped every 2 s. refresh_data() no longer checks that flag; a
glove is disconnected only after the data timeout. Workaround for #1181.

Signed-off-by: Lotus Li <lotusl@nvidia.com>

* [merge-to-it] sharpa_avatar: time out a haptic-only glove by its RAW stamps

With --datasets=haptic nothing dropped a glove's handle once the online
reset was removed: the data timeout was gated on a data dataset and
set_task() failures only log. A power-cycled glove kept its dead handle,
which blocked reconnection. A haptic-only glove now fetches RAW so the
same stamp-based data timeout applies to every configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lotus Li <lotusl@nvidia.com>

---------

Signed-off-by: Lotus Li <lotusl@nvidia.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Signed-off-by: Lotus Li <lotusl@nvidia.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
dev — 0c87e8a3 Deployed Oct 8, 2026 by lotusl-code via publish-wheel #5404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants