Example index
Look up the published C++ example for a given task.
Example index
External-input examples default to --capture-interaction auto_terminal for SDK terminal guidance. Pass --capture-interaction external for application-owned prompts and confirmations. Keep submitting input frames during calibration. Read the output when new samples arrive. See Calibration and frame input.
The device-selection example configures three external gloves (primary left/right and backup left), prints selected source IDs, and confirms expected ambiguity for name-only or side-only selection. Obtain the matching product examples and dependencies through Installation & requirements.
| File | Content | Requires hardware by default |
|---|---|---|
device_selection.cpp | Validate name-and-side selection, source ID reads, and expected ambiguity | No |
discover_gloves.cpp | Discover currently connected supported gloves and handle per-device errors | Yes |
skeleton.cpp | Read the joint angles and poses of the dynamic OpenXR hand skeleton | Yes |
main.cpp | Zero-argument auto-discovery of a single glove and subscribe to poses | Yes |
main.cpp | Read IMU raw counts or physical values | Yes |
main.cpp | Set the initial Unix-millisecond time reference | Yes |
emf.cpp | Read paired raw EMF I/Q | Yes |
pressure.cpp | Read HMP-MX raw values and kPa estimates | Yes |
external_input_run_background.cpp | Receive external frames in the background and subscribe to retargeting output (recommended) | No |
external_input_manual_update.cpp | Receive external frames in the host scheduling loop (advanced) | No |
async_runtime.cpp | C++20 real glove retargeting, co_await, executor, stop token | Yes |
foreground_runtime.cpp | Run continuously on the current thread | Yes |
background_runtime.cpp | background, request_stop, join | Yes |
manual_runtime.cpp | application-owned update loop | Yes |
haptics.cpp | haptics set/latest/clear | Yes |
debug_trace.cpp | Record Debug logs and observe pose and output at the same time | Yes |
multiple_outputs.cpp | One glove drives two named dexterous hand outputs | Yes |
main.cpp | Control the left and right gloves independently | Yes |
host_capture_calibration.cpp | Capture the left and right hands in sequence according to the selected algorithm package, then compute, save, and apply the calibration result for the selected configured target | Yes |
capture_quality.cpp | Assess 30-frame hand capture posture quality independently and demonstrate skip_stage() manual retention | Yes |
All examples are built with find_package(qnbot_glove CONFIG REQUIRED) and link qnbot::glove; coroutine examples additionally link qnbot::core_coro. To work through a scenario step by step, see Quick start.
Configuration examples
The matching examples include subscription_config.cpp and algorithm_configuration.cpp. The subscription example requires one glove; the algorithm example also requires a compatible installed target-hand package and, when selected, current-operator bone configuration. APIs and configuration fields appear in the table above. Execution details: matching example README and Quick start.
Wireless Receiver examples
Connect each hand with the shared Receiver port. Use the existing discovery, pose, and Skeleton examples with that connection.
Wireless IMU sample
Use matching combined-output firmware and follow Wireless IMU to connect the Receiver. Run the local example in Reading raw data to read each sensor’s validity and raw counts or mdps/mg physical values. For two hands, select each device and subscribe to its imu() in the same SDK instance.
Tactile ENF Positioning Glove (VetraGlove HMP-MX) pressure example: connect the glove and read raw pressure on its own.