BrainCo Stark SDK
Project description
BrainCo Stark SDK
Industrial dexterous hand control SDK supporting multiple protocols and platforms.
Supported Devices
| Device | Type | Motor | Touch | Protocol |
|---|---|---|---|---|
| Revo1 Basic | 1 | 6-DOF | - | Modbus, CAN |
| Revo1 Touch | 2 | 6-DOF | Capacitive | Modbus, CAN |
| Revo1 Advanced | 3 | 6-DOF | - | Modbus, CAN |
| Revo1 Advanced Touch | 4 | 6-DOF | Capacitive | Modbus, CAN |
| Revo2 Basic | 5 | 6-DOF | - | Modbus, CAN, CANFD |
| Revo2 Touch | 6 | 6-DOF | Capacitive | Modbus, CAN, CANFD |
| Revo2 Touch Pressure | 7 | 6-DOF | Pressure | Modbus, CAN, CANFD |
Touch Sensor Types
| Type | Devices | Features |
|---|---|---|
| Capacitive | Revo1 Touch, Revo1 Advanced Touch, Revo2 Touch | Normal/tangential force, proximity |
| Pressure (Modulus) | Revo2 Touch Pressure | High-precision pressure distribution |
Protocol & Platform
| Protocol | Linux | macOS | Windows | Adapter |
|---|---|---|---|---|
| Modbus RTU | ✅ | ✅ | ✅ | - |
| CAN 2.0 | ✅ | ✅ | ✅ | ZQWL (built-in) |
| CAN FD | ✅ | ✅ | ✅ | ZQWL (built-in) |
| CAN 2.0/FD | ✅ | ❌ | ✅ | ZLG (external DLL) |
| EtherCAT | ✅ | ❌ | ❌ | - |
API Overview
- Motor control (position, speed, current, force)
- Motor status (angle, current, error, voltage, etc.)
- Touch sensor (proximity, contact, pressure)
- Device info (SN, firmware version, hand type)
- System config (baudrate, CAN ID, limits)
- DFU (firmware update)
Full API: C Header | Python Stubs
Quick Start
Python
# Development build
conda activate py310
bash scripts/build_python.sh
# Run example
cd examples/python/revo2
python revo2_ctrl.py
C/C++
# Build SDK
bash scripts/build_c.sh
# Build & run examples
cd examples/stark/c
make
make run revo2_ctrl
Rust (internal)
# Run example
cargo run --example stark_test
# Test
cargo test stark_msg -- --show-output
Build & Publish
Python
# Setup conda environment (first time)
conda create -n py310 python=3.10
conda activate py310
pip install maturin patchelf
# Development build
bash scripts/build_python.sh
# Generate stubs (.pyi)
bash scripts/run_stub_gen.sh
# Publish to PyPI
bash scripts/publish_python.sh
C/C++
# Build SDK
bash scripts/build_c.sh
# Build and upload to OSS
bash scripts/build_c.sh -upload
Cross-Platform Build
Windows (cross-compile from macOS/Linux)
# Prerequisites: brew install mingw-w64 && rustup target add x86_64-pc-windows-gnu
# Build Windows DLL
bash scripts/build_win.sh
# Build C++ examples for Windows
cd examples/stark/c
make TARGET=win
Windows (native via GitHub Actions)
Production Windows builds use GitHub Actions with MSVC:
.github/workflows/build-c.yml- Build and upload C SDK (Windows/Linux/macOS).github/workflows/build-python.yml- Build and publish Python wheels
Linux (via Docker)
# Enter container
docker exec -it projects_x86_64 bash # x86_64
docker exec -it projects_arm64 bash # ARM64
# Inside container:
cd bc-stark-sdk
bash scripts/build_c.sh
conda activate py310
bash scripts/build_python.sh
Code Generation
# Generate C header (stark-sdk.h)
cargo b --lib --release --features stark-cbindgen
# Generate Python stubs (.pyi)
bash scripts/run_stub_gen.sh
# Copy to example repo
bash scripts/copy-to-example.sh
Scripts Reference
| Script | Description |
|---|---|
build_c.sh |
Build C SDK (native platform) |
build_c.sh -upload |
Build and upload to CDN |
build_win.sh |
Cross-compile Windows DLL |
build_python.sh |
Build Python wheel (dev) |
publish_python.sh |
Publish to PyPI |
run_stub_gen.sh |
Generate Python type stubs |
copy-to-example.sh |
Sync to example repository |
Documentation
- Protocol Overview - Modbus/CAN/EtherCAT comparison
- Architecture - Internal code structure
- Rust Examples - Rust example reference
- C++ Examples - Build & run guide
- CAN Adapter Guide - ZQWL/ZLG/SocketCAN setup
- CAN ID Guide - CAN protocol details
- CAN Protocol Comparison - CAN 2.0 vs CANFD
- Revo1 Advanced Touch - Hybrid device design
- EtherCAT Commands - EtherCAT CLI reference
- Shared Buffer API - High-performance data collection
- Parameter Spec - Unified parameter ranges
- Technical Architecture - External system design
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bc_stark_sdk-1.1.1-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: bc_stark_sdk-1.1.1-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 2.6 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53e6a2e0eefb0679a9797d4524d69e7422a32630b01a94219b8ef2d8c8d5712e
|
|
| MD5 |
dfa7652f226d42a8c8ed4154525e40aa
|
|
| BLAKE2b-256 |
cc48120f7f92d73fbee218b0fe5a77a64ab8c121db6c2077fd391a8d54961597
|
File details
Details for the file bc_stark_sdk-1.1.1-cp38-abi3-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: bc_stark_sdk-1.1.1-cp38-abi3-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.8+, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0355124691c44b2c4c67d90f0ab5220efb9ce5080bd3d7a5849ff6a806fad0f8
|
|
| MD5 |
a3a3a38f6facf0fe76d1b1ac505694fc
|
|
| BLAKE2b-256 |
3ac566d088e0b9d004082b718021cd9357c960e4ef1a6c42fc02a299cec1746d
|
File details
Details for the file bc_stark_sdk-1.1.1-cp38-abi3-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: bc_stark_sdk-1.1.1-cp38-abi3-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.8+, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ea468cbceac93123dc32ce070ad092a45b0f9770ed290c83c57b73a4e3617bf
|
|
| MD5 |
0486d5f4f4405e423ddf1891e6c3dcb7
|
|
| BLAKE2b-256 |
3f8319d86c414adc34c6940089814a9401d63aaca3b7b51d63e2d04ecab32bbb
|
File details
Details for the file bc_stark_sdk-1.1.1-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: bc_stark_sdk-1.1.1-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b50fbf6055b1a64d8ee7cfec5fef7e37b7d8c9f7b5028eb3340d13ac2bbea3b8
|
|
| MD5 |
9c7507fb206d196f150ff0c34ae404ee
|
|
| BLAKE2b-256 |
164cafb38d8884a754eba9cb7b872726cb8aa0749870abf2b89c1ee2da117de7
|