SDKC++ SDK

Installation & requirements

Environment, Core pairing, and installation for Glove C++ SDK.

Current version · 2.0.0

Installation & requirements

The QnBot C++ SDK is used to connect to QnBot devices, manage gloves, read glove poses and retargeting outputs, and control glove fingertip haptics. The core interface targets C++17; when coroutines are needed, C++20 support can be enabled separately.

Environment requirements

  • macOS 14+ ARM64: a compiler that supports C++17, CMake 3.16 or later
  • x86_64 glibc Linux: a compiler that supports C++17, CMake 3.16 or later
  • aarch64 glibc Linux: a compiler that supports C++17, CMake 3.16 or later
  • Windows x86_64: Visual Studio 2022 (MSVC), CMake 3.21 or later
  • The QnBot C++ SDK delivery ZIP that matches the current platform
  • A QnBot VetraSense Glove, VetraGlove Nano, Helix or the Tactile ENF Positioning Glove (VetraGlove HMP-MX)
  • When using C++20 coroutine support, a compiler that supports coroutines and std::stop_token

The SDK provides four platform installation packages: macOS 14+ ARM64, glibc 2.34+ Linux x86_64, glibc 2.34+ Linux ARM64, and Windows 10 x64.

The SDK core target stays on C++17, which suits robot applications that need a stable C++17 baseline. C++20 is propagated only by the coroutine target to targets that choose to use it.

To change the SDK's application data directory, or to make the CLI and the SDK share one, see Application data directory.

Installation

Install the Glove SDK with Conan 2

With Conan 2 installed and your compiler environment and default profile configured, copy this command to download the Glove binary package from the remote:

conan remote add qnbot https://git.qnbot.com/api/packages/qnbot-packages/conan -f && conan install --requires="qnbot-sdk-glove/2.0.0" -r=qnbot --build=never --update

--update checks for updates to the selected version. --build=never only uses existing binaries. Run it in a terminal supporting &&; on Windows, use PowerShell 7 or cmd.exe.

This command installs qnbot-sdk-glove. Conan automatically installs the matching Core dependency declared by the package.

Use the package in CMake

The command above downloads packages into the Conan cache. To resolve find_package(qnbot_glove CONFIG REQUIRED) in your project, generate the CMake dependency configuration and toolchain as well.

Prepare the CMake project below and its main.cpp, then run this from the project root. This step is needed even if you have already downloaded the SDK; Conan reuses cached packages:

conan install --requires="qnbot-sdk-glove/2.0.0" -r=qnbot --build=never --update -s build_type=Release -g CMakeDeps -g CMakeToolchain --output-folder=build/conan

macOS / Linux

cmake -S . -B build/conan \
  -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \
  -DCMAKE_BUILD_TYPE=Release
cmake --build build/conan --config Release

Windows (PowerShell)

cmake -S . -B build/conan `
  -G "Visual Studio 17 2022" -A x64 `
  -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
cmake --build build/conan --config Release

CMakeDeps generates the package lookup configuration; CMakeToolchain passes dependency paths and compiler settings to CMake. The generated conan_toolchain.cmake is in build/conan, and CMake resolves it relative to that build directory. Keep linking qnbot::glove. Match the Conan profile's compiler, architecture, and build_type to the CMake configuration. Use separate build directories for different installation methods.

Before launching the program directly from a terminal, load the generated build/conan/conanrun.sh with . ./build/conan/conanrun.sh on macOS / Linux. On Windows, run build\conan\conanrun.bat in cmd.exe, then launch the program from that same terminal so it can find the matching shared libraries. See Conan CMakeDeps and CMakeToolchain for details.

Install the Glove SDK with vcpkg

Install and bootstrap vcpkg, with Git, vcpkg, and CMake available on PATH. Configure the compiler for your platform as described above, and set VCPKG_ROOT to the vcpkg installation you are using.

macOS / Linux

Copy this command for macOS ARM64. On Linux, replace --triplet using the table below:

QNBOT_PORTS="$(mktemp -d)" && git clone --depth=1 https://git.qnbot.com/qnbot-packages/vcpkg-registry.git "$QNBOT_PORTS" && vcpkg install qnbot-sdk-glove --classic --overlay-ports="$QNBOT_PORTS/ports" --triplet=arm64-osx

Windows (PowerShell 7 or later)

$QNBOT_PORTS = Join-Path ([System.IO.Path]::GetTempPath()) ([guid]::NewGuid().ToString('N')); git clone --depth=1 https://git.qnbot.com/qnbot-packages/vcpkg-registry.git "$QNBOT_PORTS" && vcpkg install qnbot-sdk-glove --classic --overlay-ports="$QNBOT_PORTS/ports" --triplet=x64-windows

The command fetches the current public ports and uses --overlay-ports to install qnbot-sdk-glove together with its matching Core dependency. --classic installs packages into this vcpkg instance's shared installed tree.

Platform--triplet
macOS ARM64arm64-osx
Linux x86_64x64-linux
Linux ARM64arm64-linux
Windows x86_64x64-windows

Use the package in CMake

Keep using find_package(qnbot_glove CONFIG REQUIRED) and qnbot::glove in the project. Configure with the vcpkg toolchain and the same triplet used for installation. This example targets macOS ARM64:

cmake -S . -B build/vcpkg \
  -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
  -DVCPKG_TARGET_TRIPLET=arm64-osx \
  -DVCPKG_MANIFEST_MODE=OFF \
  -DCMAKE_BUILD_TYPE=Release
cmake --build build/vcpkg --config Release

On Windows, use PowerShell:

cmake -S . -B build/vcpkg `
  -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" `
  -DVCPKG_TARGET_TRIPLET=x64-windows `
  -DVCPKG_MANIFEST_MODE=OFF
cmake --build build/vcpkg --config Release

VCPKG_MANIFEST_MODE=OFF makes CMake use the packages installed in classic mode. vcpkg supplies the package search paths for the installed packages. See the official vcpkg CMake documentation for more integration options.

Offline installation

Download the cpp ZIP for your platform from the Glove release. Extract the ZIP, then restore each Core and Glove -conan.tgz file into your Conan 2 cache with conan cache restore <file>.

Use a Conan profile matching the delivery. In the project directory, generate the CMake files without accessing a remote:

conan install --requires="qnbot-sdk-glove/2.0.0" --no-remote --build=never -s build_type=Release -g CMakeDeps -g CMakeToolchain --output-folder=build/conan

Build using the Conan toolchain commands above.

Configuring the CMake project

The application's CMakeLists.txt brings in the SDK through the public CMake package in the delivery directory:

cmake_minimum_required(VERSION 3.16)
project(my_qnbot_app LANGUAGES CXX)

find_package(qnbot_glove CONFIG REQUIRED)

add_executable(my_qnbot_app main.cpp)
target_link_libraries(my_qnbot_app PRIVATE qnbot::glove)

qnbot::glove provides the C++17 Glove interface and propagates the required dependencies. Only targets that use coroutines additionally link qnbot::core_coro:

target_link_libraries(my_qnbot_coro_app PRIVATE
  qnbot::glove qnbot::core_coro)

Verifying the installation

Change the executable in CMakeLists.txt to:

find_package(qnbot_glove CONFIG REQUIRED)

add_executable(qnbot_sdk_check verify_install.cpp)
target_link_libraries(qnbot_sdk_check PRIVATE qnbot::glove)

Create verify_install.cpp:

#include <qnbot/glove.hpp>

#include <iostream>

int main() {
    qnbot::GloveConfig glove_config;
    const qnbot::DeviceConfig device_config = glove_config;
    (void)device_config;
    std::cout << "QnBot C++ SDK ready\n";
}

Build with the commands for your installation method, then run the resulting qnbot_sdk_check executable.

Expected output:

QnBot C++ SDK ready