Simple & intuitive Python API for HORUS robotics framework - ultra-low latency IPC and real-time scheduling
Project description
HORUS Robotics - Python Bindings
Python bindings for the HORUS robotics framework. Sub-microsecond messaging with a simple Python API.
Installation
pip install horus-robotics
Quick Start
import horus
# Create a node with callbacks
def my_tick(node):
node.send("output", 42.0)
msg = node.get("input")
if msg:
print(f"Got: {msg}")
node = horus.Node(
name="my_node",
pubs=["output"],
subs=["input"],
tick=my_tick,
rate=30,
)
horus.run(node, duration=10)
Typed Messages
from horus import Topic, CmdVel, Pose2D
topic = Topic("cmd_vel", CmdVel)
topic.send(CmdVel(linear=1.5, angular=0.3))
msg = topic.recv() # Returns CmdVel instance
Scheduler API
import horus
scheduler = horus.Scheduler()
scheduler.node(motor_ctrl).order(0).rt().rate_hz(1000.0).done()
scheduler.node(planner).order(5).compute().done()
scheduler.node(telemetry).order(10).async_io().rate_hz(1.0).done()
Multiple Nodes
import horus
def sensor_tick(node):
node.send("sensor_data", 42.0)
def control_tick(node):
data = node.get("sensor_data")
if data:
node.send("cmd_vel", data * 0.5)
sensor = horus.Node(name="sensor", pubs=["sensor_data"], tick=sensor_tick, rate=100)
controller = horus.Node(name="controller", subs=["sensor_data"], pubs=["cmd_vel"], tick=control_tick, rate=100)
horus.run(sensor, controller, duration=30)
Cross-Language
Rust and Python nodes communicate seamlessly through shared topics. Use Rust for real-time control and Python for AI/ML and high-level logic.
Documentation
Requirements
- Python 3.9+
- Linux (x86_64)
License
Apache-2.0 - see LICENSE
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 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 horus_robotics-0.1.9.tar.gz.
File metadata
- Download URL: horus_robotics-0.1.9.tar.gz
- Upload date:
- Size: 914.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e915418058d6293388bfcf89b10ee57856dd191f69e6044a6a8eeeb66de55be0
|
|
| MD5 |
e673b96479491357f7534b097dbd471c
|
|
| BLAKE2b-256 |
114bfae481a851075c27f12c02f109bdcca8ae0c3383b3687c7eb9da992b7067
|
File details
Details for the file horus_robotics-0.1.9-cp39-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: horus_robotics-0.1.9-cp39-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.9+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e7d54c3584cf4b47e1f16c0a37d81515383c41f3c9ed93bb56faf18567e9ef7
|
|
| MD5 |
b3bea18760018e60bcde60564f3511fc
|
|
| BLAKE2b-256 |
1d99b34798890dc7789f9c85a02e92b06ab89f3888561687bbc0a2fa53607ad1
|