Repository navigation
egocap: show both hands in a panel on the recording screen - #1642
NVshawnhwang wants to merge 2 commits into
Conversation
Add a hand view to the side panel of the recording screen: both hands as the hand source reports them, drawn flat with the wrist at the bottom and the fingers up, so an operator can see at a glance that both gloves are tracking and that the drawing follows the fingers. The camera pictures are not drawn on. - The drawing is made from joint positions only: the hand's frame comes from the wrist and two knuckles, and its scale from bone lengths, so a fist is drawn at the open hand's size and no axis convention of the tracking space is assumed. - A hand that sends nothing leaves a dashed outline and a sentence; joints flagged invalid are left out. The hands differ in colour and in the shape of their joints. - Settings, Display, "Show the hand view" switches the panel, as does its Hide button. The choice is remembered in the browser. - The finger chains are one named table beside the joint names, with a test that each chain runs outward along a synthetic open hand. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Shawn Hwang <shhwang@nvidia.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
🤖 Agent-generated (Claude Code · claude-sonnet-5-5) Summary This adds a hand view to the recording screen: both hands drawn flat, wrist at the bottom, fingers up, scaled from bone lengths, with a Hide button and a Display setting. It is frontend only. I read The joint table is right: it matches Legend: 🚫 Blocker · 💡 Suggestion · 🔍 Nit
Questions for the author
Actionables (for bots — copy-paste-ready for AI)
|
gareth-morgan-nv
left a comment
There was a problem hiding this comment.
🤖 Agent-generated (Claude Code · claude-sonnet-5-5)
Approved. Please address the comments in my review as you see fit.
…awnHwang/egocap_hand_view Signed-off-by: Shawn Hwang <shhwang@nvidia.com>
NVdejung
left a comment
There was a problem hiding this comment.
🤖 Automated first-pass review (Claude, for Dejun) — I'll follow up personally where needed.
Summary — Adds a hand view at the top of the recording screen's side panel. Each hand is laid flat in a palm frame built from three joint positions and scaled by bone length. A Hide button and a Display setting (on by default, kept in localStorage) switch it off, and the tracking staleness rule moves into shared helpers in CaptureTree.tsx. The code is careful and well tested. The one blocker is what the README tells people to do when the glove joint-order check fails. This was a read-only review: I did not run the tests or the page.
Must fix
examples/egocap/frontend/README.md:617andexamples/egocap/frontend/src/handJoints.ts:7— the fix the docs give for a failed joint-order check is in the wrong layer.- The stream declares
HandJointOrder.OPENXR_26. The recorder converts hands by those indices and refuses any other order (recording_adapter.py:127). The 3D view draws its bones from its own table (viser_scene.py:64). - So if a glove's joints really arrive in another order, every recorded take is mislabelled. Following "correct the tables in
handJoints.ts" would make this panel look right and leave the 3D view crossed. It would hide the very data bug the check is there to catch. - Suggested wording: stop recording with that glove; the joint mapping where the glove's skeleton enters the stream is wrong.
- Also drop "Everything that names a joint or draws a bone reads these tables, so a correction is made here once". That is only true for this page:
protocol.py:482andviser_scene.pykeep their own tables. - A failed Thumb-side or Axes check (
README.md:620) is a stream problem in the same way. The earlier review already covers what the thumb check can prove at all.
- The stream declares
Suggestions
HandView.tsx:106— when the feed is not live, the sample is stale, or none has arrived, App passesnull(App.tsx:713). Both halves then say "No data from the left/right glove", which blames the gloves for a stream outage that also takes out the head. In the same situation Details says "No tracking sample yet." or "Tracking stale.". Give "no current sample" its own one-line wording across the panel, and keep the glove sentences forpresent === false.styles.css:2465— the 3D view right below colours the left hand blue and the right hand orange (viser_scene.py:67); this panel uses cyan and magenta. Two stacked drawings of the same hands with different side colours invite a misread, so pick one colour per side for both. Orange sits near--warning, so changing the 3D view may be the easier side.styles.css:3362/README.md:383— rough arithmetic: the hand panel is about 265 px at 17vh, and the 3D view isclamp(300px, 42vh, 560px), plus chrome. In a maximised 1080p browser that likely leaves Details well under its 200 px floor. The session details would then start below the fold on typical station screens, not only in "a short window". Either let the 3D view give up height while the hand view is on, or say this plainly in the README. Worth checking on a station screen.README.md:615— "the joints evenly along it" is the wrong pass criterion. The index bones inhandTestDoubles.tsare 55, 45, 26 and 20 mm, and real fingers taper the same way, so a correct glove fails this wording. Suggest "in order along it, the gaps shrinking toward the tip".- Nit,
styles.css:3271— an older copy of the.op-panel/.op-panel--3d/.op-panel--detailsrules still says "opening both never pushes either off the screen". With the hand view on, that is no longer true. Lines 3345–3380 repeat the same rules, so delete the older copy. - Nit,
handTestDoubles.ts:6— "and for the hand view's drawing harness": there is no harness in the tree.
Conflicts
- With
nvShawnHwang/egocap_rectification_inspection(the branch of#1641): 0 commits behind and the local 3-way merge is clean, so no rebase is needed. This PR merges after#1641in the stack. - With open PRs: no textual conflicts with any PR in the stack (
#1637–#1641below,#1643–#1646above, all from this author).- Semantic:
#1643(the side panel opens and closes) builds on this layout. The focus move after Hide and the hidden status line assume the<aside>is always on the page, so check both there with the panel closed. #1586(gareth-morgan-nv, based onmain) also editsApp.tsxandstyles.css. Conflicts were not computed because the base differs; whichever reachesmainsecond rebases.
- Semantic:
Change-by-change (16 files)
| File / area | What changed | Makes sense? |
|---|---|---|
HandView.tsx |
New panel: one cell per hand, dashed rest outline for a missing hand, discs (left) and diamonds (right), captions plus a text alternative, a 1 s tick so a stale sample stops showing, smoothed reach kept in a ref and stored after render | ✅ cell margins fit the mark sizes; |
handProjection.ts |
Palm frame from the wrist and the index/little knuckles, mirroring chosen by side, reach as the longest bone chain, bridged bones, fit-to-cell scale | ✅ checked the mirror sign and the degenerate/null paths; the decoder already nulls non-finite positions |
handJoints.ts |
OpenXR joint names moved here from CaptureTree.tsx, plus finger chains and the knuckle row |
|
CaptureTree.tsx |
Staleness moved into trackingSampleAgeMs / currentTracking; joint names imported |
✅ same behaviour (AcceptedTracking.decoded is never null) |
App.tsx |
Hand-view state; Hide moves focus to the <aside> (now tabIndex={-1}); panel above the 3D view; visually hidden status line; Settings props |
✅ Space and the letter shortcuts still fire with focus on the aside (RecordingPanel.tsx only skips inputs, buttons, summaries) |
SettingsPanel.tsx |
"Hand view" card on Display with a checkbox; DisplayTab props via Pick |
✅ App is the only caller |
handViewSetting.ts |
egocap.handView on/off in localStorage, default on, tolerant of blocked storage |
✅ |
styles.css |
Hand view styles and colours, flex: none for the hand panel, 200 px Details floor under it, focus ring for the aside, updated comments |
✅ contrast claims hold (about 4.7, 5.1 and 3.4 : 1 on --surface); |
README.md |
Display tab, side panel layout, new Hand view section and glove checklist | |
Tests and doubles: HandView.test.tsx, handProjection.test.ts, handJoints.test.ts, handViewSetting.test.ts, SettingsPanel.test.tsx, App.operatorLayout.test.tsx, handTestDoubles.ts |
Same drawing for a moved or turned hand, fist scale, invalid joints, absent/stale/not-live feeds, Hide with focus and persistence, Settings round-trip, the shared freshness rule | ✅ good coverage; localStorage is cleared between tests; |
| Public-repo hygiene | Added lines, docs, fixtures, title and description | ✅ no internal hosts, paths or names found |
Reviewed at 51e35a4 · 16 files · 2026-12-01 14:25 PST
Branch:
nvShawnHwang/egocap_hand_view, opened againstnvShawnHwang/egocap_rectification_inspection.One commit:
egocap: show both hands in a panel on the recording screenSummary
Adds a hand view to the Ego Capture recording screen: both hands as the hand source reports them, drawn in a
panel of their own at the top of the side panel, with a setting to switch it off. Until now the tracked hands
could only be seen in the 3D view. The camera pictures are not drawn on.
What changes (frontend only)
HandView.tsx: the panel. Left hand on the left, each hand drawn flat with the wrist at the bottom and thefingers up, scaled to its half. A hand that sends nothing leaves a dashed outline and "No data from the left
glove"; joints flagged invalid are left out, with a dashed bridge between valid ones. The hands differ in
colour and in the shape of their joints, so colour is never the only cue.
handProjection.ts: the geometry. The hand's frame is built from three joint positions (wrist, indexknuckle, little-finger knuckle) and its scale from bone lengths, so a fist is drawn at the open hand's size
and no axis convention of the tracking space is assumed.
handJoints.ts: the joint names and one named table of finger chains, with a test that each chain runsoutward along a synthetic open hand.
browser (
localStorage), shown by default.keep a minimum height; with it off the layout is unchanged.
How it was tested
npm run lint,npm run test(669 tests),npm run buildfromexamples/egocap/frontend.setting and the Hide button by keyboard.
Not yet verified (needs real gloves)
The drawing has only been fed the mock and synthetic hands. With gloves on, each of these takes under a minute
(the same list is in the frontend README):
time shortens only that finger's line.
🤖 Generated with Claude Code