A Python library for controlling HexDevice robots and devices
Project description
Hex Device Python Library
Overview
This library provides a simple interface for communicating with and controlling Hex devices. It uses Protocol Buffers for message serialization and WebSocket for real-time communication. The supported hardware list is as follows:
- [✅] ChassisMaver
- [✅] ChassisMark2
- [✅] ArmArcher
- [✅] ArmSaber
- [✅] HandsHtGp100
- [-] hex_lift
Installation
Install from PyPI (Recommended)
pip install hex_device
Clone the Repository (Development)
git clone --recurse-submodules https://github.com/hexfellow/hex_device_python.git
Prerequisites
- Python 3.8.10 or higher
- Anaconda Distribution (recommended for beginners) - includes Python, NumPy, and commonly used scientific computing packages
Quickstart
Install protoc
We highly recommend you to use protoc-27.1 since we have fully tested it in both x86_64 and arm64 archs.
You can use the binary installation method below to install protoc-27.1.
# For Linux x86_64
wget https://github.com/protocolbuffers/protobuf/releases/download/v27.1/protoc-27.1-linux-x86_64.zip
sudo unzip protoc-27.1-linux-x86_64.zip -d /usr/local
rm protoc-27.1-linux-x86_64.zip
# For Linux arm64
wget https://github.com/protocolbuffers/protobuf/releases/download/v27.1/protoc-27.1-linux-aarch_64.zip
sudo unzip protoc-27.1-linux-aarch_64.zip -d /usr/local
rm protoc-27.1-linux-aarch_64.zip
# Verify installation
protoc --version # Should display libprotoc 27.1
Install hex_device
Option 1: Package Installation
To install the library in your Python environment:
python3 -m pip install .
Option 2: Direct Usage (No Installation)
If you prefer to run the library without installing it in your Python environment:
-
Compile Protocol Buffer messages:
mkdir ./hex_device/generated protoc --proto_path=proto-public-api --python_out=hex_device/generated proto-public-api/*.proto
-
Install dependencies:
python3 -m pip install -r requirements.txt
-
Add the library path to your script:
import sys sys.path.insert(1, '<your project path>/hex_device_python') sys.path.insert(1, '<your project path>/hex_device_python/hex_device/generated')
Usage
The complete function interfaces can be found in our wiki.
-
A simple demo for all device: test/main.py
-
Example of robotic arm trajectory tracking: test/archer_traj_test.py
Copyright © 2025-present Hexfellow Org
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 Distribution
Built Distribution
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 hex_device-1.1.7.tar.gz.
File metadata
- Download URL: hex_device-1.1.7.tar.gz
- Upload date:
- Size: 50.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef557f7134fd90bfcc5ad8648425dfb4c1aafba7da8655401136e39ff4de6824
|
|
| MD5 |
b1e71ab6e0079716a2fe071a8da7b25c
|
|
| BLAKE2b-256 |
1c4360163e075f1bc1c375c2679b847ea776d20086dae5bcf7eebfe514589535
|
File details
Details for the file hex_device-1.1.7-py3-none-any.whl.
File metadata
- Download URL: hex_device-1.1.7-py3-none-any.whl
- Upload date:
- Size: 51.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
910a02d824b35cd4e8476d745a21175be20b814fa11bab424815744575a742a4
|
|
| MD5 |
529354ab8b0b6bd20f3027793238119e
|
|
| BLAKE2b-256 |
79aab749b0880832572a71f68956e9037b68c60708c176e172167deee4951ec4
|