Skip to main content

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 SocketCAN (built-in, Linux)
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/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/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

Links

Project details


Release history Release notifications | RSS feed

This version

1.1.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

bc_stark_sdk-1.1.2-cp38-abi3-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.8+Windows x86-64

bc_stark_sdk-1.1.2-cp38-abi3-manylinux_2_31_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.31+ x86-64

bc_stark_sdk-1.1.2-cp38-abi3-manylinux_2_31_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.31+ ARM64

bc_stark_sdk-1.1.2-cp38-abi3-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file bc_stark_sdk-1.1.2-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for bc_stark_sdk-1.1.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3e0363b68c803ffbb658c6406bc4080cd28b6ba5584a1436da138552f4a51a54
MD5 18c776cba0072630f9d254b63b697d55
BLAKE2b-256 24073a446df4f9cc213640e7439bd019cec37f19c8dd2ee730020251a1569735

See more details on using hashes here.

File details

Details for the file bc_stark_sdk-1.1.2-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for bc_stark_sdk-1.1.2-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 a10eb1146418223ef8e5739752ab70cb187ed4170c490a271eefa9086526aae7
MD5 3d8dcd8ea118900a6d353d91b5098643
BLAKE2b-256 b5d25af44e9d6f5b22fb788a19a75f1b4f6505c2d994b6e46d9f82fc4020d7f4

See more details on using hashes here.

File details

Details for the file bc_stark_sdk-1.1.2-cp38-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for bc_stark_sdk-1.1.2-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 4299e6cb979bfbd5599de27462a092b61b9062dad4a53a7ee44dc3c91ae989c1
MD5 6fb2312b2aa5a0901fc9dff3ce3b9333
BLAKE2b-256 b76b250ff577f6e1e8c9fab79ff13dd25929d8dcb7728845493ba6ef3d40950e

See more details on using hashes here.

File details

Details for the file bc_stark_sdk-1.1.2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bc_stark_sdk-1.1.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e9ebb0a2d76d53d9d52ab304943a12d2cfb321be9325c02cf4df40748ff20eac
MD5 230e66fda90b0797433c1e6c76a2c62a
BLAKE2b-256 d9582c64440c1aad487d2ad6f40ca0ec46a086405040284069c27a1ae76e3950

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page