Skip to content

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

Merged
lotusl-code merged 1 commit into
mainfrom
merge-to-it/sharpa-avatar-detect-silent-glove
Oct 8, 2026
Merged

lotusl-code merged 1 commit into
mainfrom
merge-to-it/sharpa-avatar-detect-silent-glove

Conversation

@lotusl-code

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

Copy link
Copy Markdown
Contributor

[merge-to-it]

Summary

fetch_data() keeps returning a silent glove's last sample, so a glove that stopped sending data kept refreshing last_successful_fetch and the data timeout never fired. A fetch now counts as data only when the sample stamp advances (GloveState::last_sample_stamp), and the timeout drops from 10 s to 3 s.

Stacked below #1198 (liveness from fetched data, #1181), which relies on this timeout once the online flag is no longer consulted.

Testing

  • clang-format-14 --dry-run --Werror on touched C++; pre-commit (see note on the pre-existing svg failure).
  • Compiled avatar_hand_tracking_plugin.cpp against the pinned Avatar SDK 1.7.3-17 headers (-fsyntax-only); the plugin is not built in CI and has no unit tests.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Hand tracking now detects stalled glove data after 3 seconds instead of 10.
    • Repeated readings of the same cached sample no longer count as fresh data, so a silent glove can time out as expected.

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>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: a19b8124-6c2e-4ac5-b638-261e544ae753
📥 Commits

Reviewing files that changed from the base of the PR and between 6960d4a and b16eed0.

📒 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; 10 remain after this review.


📝 Walkthrough

Walkthrough

The plugin now tracks the newest sample timestamp for each glove. A successful fetch counts as new data only when its sample timestamp advances. Reset clears the stored timestamp, and the data timeout is reduced from 10 seconds to 3 seconds.

Priority: ⬇️ Low

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

Merge Risk: ⚪ Minimal · up to b16ee

The change makes cached samples stop refreshing glove liveness, with a three-second cutoff. Available evidence establishes no concrete regression or actionable merge blocker; the external SDK behavior behind the freshness check remains unverified.

🚥 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
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: detecting silent gloves by checking for newer sample stamps.
  • Fix all pre-merge checks with AI
✨ 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.

@ivany-nv ivany-nv added the NVIDIA label Oct 7, 2026
@lotusl-code
lotusl-code merged commit 83b6f84 into main Oct 8, 2026
35 checks passed
@lotusl-code
lotusl-code deleted the merge-to-it/sharpa-avatar-detect-silent-glove branch October 8, 2026 19:05
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 — b16eed0e Deployed Oct 7, 2026 by lotusl-code via publish-wheel #5306
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