Skip to main content

ZROS: ZeroMQ ROS-like framework

Project description

ZROS: ZeroMQ ROS-like Framework

PyPI version License: MIT Python versions

zros_logo

ZROS is a fast, lightweight ROS-like library designed to bring the ease of ROS-2 to Python projects that require minimal overhead and high performance, using ZeroMQ for fast, asynchronous communication.

It provides a simple, pure Python alternative for robotic applications, computer vision pipelines, and distributed systems where a full ROS installation might be overkill.

Key Features

  • Fast & Lightweight: Built on top of ZeroMQ, ensuring low-latency communication between nodes.
  • ROS-like API: Uses familiar concepts like Node, Publisher, Subscriber, Timer, and spin() making it easy for ROS-2 developers to adapt.
  • No Complex Build System: Pure Python. No catkin_make, no colcon build, no source setup.bash. Just run your Python scripts.
  • Computer Vision Ready: Includes a built-in CvBridge for seamless OpenCV image transport.

Installation

From PyPI (Recommended)

uv pip install zros

From Source

git clone https://github.com/juliodltv/zros.git
cd zros
uv sync

Quick Start

Create a Publisher

from zros import Node, CvBridge
import cv2

class CameraPublisher(Node):
    def __init__(self):
        super().__init__("camera_pub")
        self.pub = self.create_publisher("video_topic")
        self.bridge = CvBridge()
        self.cap = cv2.VideoCapture(0)
        self.create_timer(1/60, self.timer_callback)

    def timer_callback(self):
        ret, frame = self.cap.read()
        if ret:
            self.pub.publish({"image": self.bridge.cv2_to_msg(frame)})

if __name__ == "__main__":
    CameraPublisher().spin()

Create a Subscriber

from zros import Node, CvBridge
import cv2

class VideoSubscriber(Node):
    def __init__(self):
        super().__init__("video_sub")
        self.bridge = CvBridge()
        self.create_subscriber("video_topic", self.callback)

    def callback(self, payload):
        img = self.bridge.msg_to_cv2(payload["image"])
        cv2.imshow("Video", img)
        cv2.waitKey(1)

if __name__ == "__main__":
    VideoSubscriber().spin()

Running Examples

You can find full examples in the examples/ directory.

# Terminal 1
uv run zroscore

# Terminal 2
uv run publisher

# Terminal 3
uv run subscriber

Documentation

For detailed usage instructions, examples, and API documentation, please refer to the ZROS Documentation.

Citation

@software{zros2026,
  author = {Julio De La Torre-Vanegas},
  title = {ZROS: A fast, lightweight ZeroMQ ROS-like library},
  year = {2026},
  url = {https://github.com/juliodltv/zros}
}

Project details


Download files

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

Source Distribution

zros-0.1.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

zros-0.1.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file zros-0.1.1.tar.gz.

File metadata

  • Download URL: zros-0.1.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zros-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c5770f8c20fd72eecb77a37b2f7f868f9b0c6cf7389ac1d08d46e6d37456da5e
MD5 97721f561ccd826c2c7bb63bdb3aff8c
BLAKE2b-256 a616afe84dd551efe2b0dffd090cb37f3847afa4c6d76a9b7200e6f1765ccfba

See more details on using hashes here.

File details

Details for the file zros-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zros-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zros-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af6e8c4c18f8b1edbdf3ef78f0e9e1c48f0f6cd79b2a621919ba93806e86b692
MD5 ed9ce44779c18c5bc6ca8daa2be093c4
BLAKE2b-256 37e288ccff0c7440c37cd0784b42a7f00c34a19928cb326b36c5aaf06384b307

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