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
- [✅] ChassisTriggerA3
- [✅] 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.9 or higher
- Anaconda Distribution (recommended for beginners) - includes Python, NumPy, and commonly used scientific computing packages
Quickstart
Install protoc
-
Install protoc from package manager (Recommended only for Debian13/Ubuntu24.04)
sudo apt install protobuf-compiler
-
Install protoc from Github Releases (Recommended Ubuntu22.04 and below)
Just choose a suitable version and install it. Here below is an example of installing
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 be or more than 3.21.12
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
Q&A
Why did a previously working software package stop working after a redeployment?
- Please check the Change log to see if you are using cross-version software packages
If I want to use newer software packages, how do I perform hardware upgrades?
- Please contact our after-sales service, and we will provide hardware upgrade instructions based on the equipment you purchased
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.3.4b1.tar.gz.
File metadata
- Download URL: hex_device-1.3.4b1.tar.gz
- Upload date:
- Size: 72.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60531ee1c093dc138b540025003d332499dc836162696113df4f86ba680175a5
|
|
| MD5 |
96afce8430380d86877352667ee7a481
|
|
| BLAKE2b-256 |
a90635f88e959e9ba90436374156158970d3778e3cd7fc998a7f66490424e035
|
File details
Details for the file hex_device-1.3.4b1-py3-none-any.whl.
File metadata
- Download URL: hex_device-1.3.4b1-py3-none-any.whl
- Upload date:
- Size: 67.6 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 |
c9d6eb5b8d0abca93c9189ef476104012e9537fb97c7aa39de5ef47b64ca8176
|
|
| MD5 |
df932aa97e27886d79fdaea0b487f619
|
|
| BLAKE2b-256 |
66b14f00aac95d4dff06d2afbd963c5f279f9f9876fe58cf784506470720741c
|