Our QForce Tendon Implementation provides a high-performance C++ solution for converting
motion capture (MoCap) pose data to tendon control forces for anthropomorphic hand control like MyoHand
(MyoSuite). This implementation achieves a 20x speed improvement compared to Python
versions and has successfully processed 1700 hours of MoCap data in just 24 hours on a
48-core CPU.
Key Features
- High Performance: C++ implementation with 20x speed improvement over Python
- Scalable Processing: Handles large-scale datasets efficiently
- Robust Algorithm: QForce tendon algorithm with inverse dynamics and muscle modeling
- Video Generation: Built-in comparison video generation between reference and achieved
trajectories
- Cross-Platform: Supports Linux, macOS, and Windows
Quick Start
Prerequisites: C++ compiler (GCC 7+ or Clang 6+), CMake 3.16+, Python 3.7+, MuJoCo, OSQP,
and HDF5 libraries.
Installation
# Clone the repository
git clone https://github.com/micropilot/pose2tendon_ID
cd pose2tendon_ID
# Install system dependencies (Ubuntu/Debian)
sudo apt update
sudo apt install build-essential cmake libhdf5-dev
# Install MuJoCo and OSQP (see full README for details)
# Build the project
mkdir build && cd build
cmake ..
make -j$(nproc)
Usage
# Process HDF5 trajectory data
./qforce_tendon ../data/sample.hdf5 ../output/
# Generate comparison videos
python generate_video.py --bin_path ../output/sample.bin \
--hdf5_path ../data/sample.hdf5 \
--output_path ../videos/
Algorithm Overview
The QForce tendon algorithm processes trajectory data through several stages:
- Trajectory Processing: Reads joint angles and time from HDF5 compound dataset
- Inverse Dynamics: Computes generalized forces for target positions
- Muscle Modeling: Applies tendon dynamics and muscle properties
- Quadratic Programming: Solves for optimal control signals using OSQP
- Control Generation: Produces actuator control values
Performance
- Processing Speed: ~1000 trajectory points per second
- Memory Usage: ~50MB for 100k trajectory points
- Video Generation: ~30 seconds for 100k points (25 FPS output)