SDKC++ SDK

Installation & requirements

Environment requirements and installation methods for the C++ SDK.

Current version · 1.4.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.

This document applies to the QnBot C++ SDK/Glove delivery package corresponding to qnbot-sdk-glove 1.3.0. You only need to choose the complete delivery package that matches the current platform; they do not need to choose compatible dependency versions 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 or VetraGlove Nano
  • When using C++20 coroutine support, a compiler that supports coroutines and std::stop_token

Version 1.3.0 currently 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

Download the Core and Glove 1.3.0 delivery packages that match your operating system and CPU architecture from docs.qnbot.com. The two components must use the same version; the headers, libraries, CMake package, and runtime resources in the delivery directory should be kept together and must not be mixed across platforms or versions.

macOS

macOS ARM64 uses qnbot-cpp-sdk-1.3.0-mac-arm.zip:

unzip qnbot-cpp-sdk-1.3.0-mac-arm.zip -d qnbot-cpp-sdk

Linux

x86_64 glibc Linux uses qnbot-cpp-sdk-1.3.0-linux-x64.zip:

unzip qnbot-cpp-sdk-1.3.0-linux-x64.zip -d qnbot-cpp-sdk

aarch64 glibc Linux uses qnbot-cpp-sdk-1.3.0-linux-arm64.zip:

unzip qnbot-cpp-sdk-1.3.0-linux-arm64.zip -d qnbot-cpp-sdk

Windows

Windows x86_64 uses PowerShell:

Expand-Archive `
  -Path .\qnbot-cpp-sdk-1.3.0-windows-x64.zip `
  -DestinationPath .\qnbot-cpp-sdk

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)

Applications do not need to add include directories or library directories manually.

When configuring the project, pass the extracted installation prefix to CMAKE_PREFIX_PATH. macOS and Linux:

cmake -S . -B build -DCMAKE_PREFIX_PATH=/absolute/path/to/qnbot-cpp-sdk
cmake --build build --config Release

Windows PowerShell:

cmake -S . -B build `
  -DCMAKE_PREFIX_PATH=C:\absolute\path\to\qnbot-cpp-sdk
cmake --build build --config Release

Verifying the installation

The checks below only verify the CMake package, headers, compilation, linking, and program startup. They do not connect to a glove and do not require the retargeting algorithm package. 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";
}

Run on macOS and Linux:

cmake -S . -B build/app \
  -DCMAKE_PREFIX_PATH=/absolute/path/to/qnbot-cpp-sdk \
  -DCMAKE_BUILD_TYPE=Release
cmake --build build/app --config Release
./build/app/qnbot_sdk_check

Run on Windows PowerShell:

cmake -S . -B build\app `
  -G "Visual Studio 17 2022" -A x64 `
  -DCMAKE_PREFIX_PATH=C:\absolute\path\to\qnbot-cpp-sdk
cmake --build build\app --config Release
build\app\Release\qnbot_sdk_check.exe

Expected output:

QnBot C++ SDK ready