mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 03:00:06 +02:00
A head-locked SteamVR overlay for the hand recorder (hands/rec/DESIGN.md): 1.2 m ahead, 12 degrees up, 36 degrees wide, drawn with stb_truetype into three shared DMA-BUFs as ft-gazepanel does. It shows the title, step, wrapped instruction, note, countdown, hand chips, near/far bar and a "Paused" cover, driven over @ft_handpanel. It also places the touch target, a 2 cm dot in its own overlay fixed in the room where the head was at the first command for that point, and logs head and controller poses to poses.jsonl at 250 Hz from a thread of its own. Both threads take one lock around OpenVR calls. --no-vr prints each picture's state to stdout (and --dump writes the pictures), for testing without a headset. hands/rec/build.sh builds it in the dev container. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
1.3 KiB
Bash
Executable File
18 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build the hand recorder's headset panel ft-handpanel in the dev container on the Frame
|
|
# (hands/rec/build/; it also runs there). Like gaze/build.sh: the pinned public OpenVR header
|
|
# (the DMA-BUF import is newer than the header shipped with SteamVR's samples) and stb_truetype
|
|
# for the text.
|
|
set -euo pipefail
|
|
root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
|
|
"$root/scripts/sync.sh" >/dev/null
|
|
exec "$root/scripts/frame.sh" -C hands/rec 'set -e; mkdir -p build/include
|
|
openvr=v2.15.6
|
|
[ -f build/include/openvr-$openvr ] || { curl -fsSL "https://raw.githubusercontent.com/ValveSoftware/openvr/$openvr/headers/openvr.h" -o build/include/openvr.h && touch build/include/openvr-$openvr; }
|
|
stb=2c980bb59875b0d32144a71867fbdebb2f77cd20
|
|
[ -f build/include/stb-$stb ] || { curl -fsSL "https://raw.githubusercontent.com/nothings/stb/$stb/stb_truetype.h" -o build/include/stb_truetype.h && touch build/include/stb-$stb; }
|
|
g++ -std=c++17 -O2 -Wall -Wno-unused-parameter -Wno-missing-field-initializers -Ibuild/include $(pkg-config --cflags gbm libdrm) \
|
|
-o build/ft-handpanel panel/ft-handpanel.cpp -L/opt/steamvr/bin/linuxarm64 -lopenvr_api -Wl,-rpath,/opt/steamvr/bin/linuxarm64 \
|
|
$(pkg-config --libs gbm libdrm) -lpthread
|
|
echo "built build/ft-handpanel"'
|