Skip to main content

Zero-dependency ROS-like middleware for Python

This library is intended to be used for small projects that require a simple middleware for communication between processes. It is not intended to be a replacement for ROS.

PyPI Wheels platforms Downloads License

Why ZeroROS?

See these discussions in ROS Discourse and this one in reddit/ROS.

Installation

Use pip to install the library:

pip install zeroros

Usage

The library is composed of three main classes: Publisher, Subscriber and MessageBroker.

MessageBroker

The MessageBroker class is used to create a message broker that can be used by publishers and subscribers to communicate with each other.

from zeroros import MessageBroker

broker = MessageBroker()

Publisher

The Publisher class is used to publish messages to a topic. The constructor takes two arguments: the topic name and the message type. The topic name is a string, while the message type is a Python class. The message type is used to serialize and deserialize messages.

from zeroros import Publisher

pub = Publisher("topic_name", String)
pub.publish("Hello world!")

Subscriber

The Subscriber class is used to subscribe to a topic and receive messages. The constructor takes two arguments: the topic name and the message type. The topic name is a string, while the message type is a Python class. The message type is used to serialize and deserialize messages.

import time
from zeroros import Subscriber

def callback(msg):
    print(msg)

sub = Subscriber("topic_name", String, callback)
while True:
    # Do something else
    time.sleep(1)

# Stop the subscriber
sub.stop()

Messages

The library comes with a few built-in messages that can be used out of the box. The following messages are available:

  • std_msgs.String
  • std_msgs.Int
  • std_msgs.Float
  • std_msgs.Bool
  • std_msgs.Header
  • geometry_msgs.Vector3
  • geometry_msgs.Vector3Stamped
  • geometry_msgs.Twist
  • geometry_msgs.Quaternion
  • geometry_msgs.Pose
  • geometry_msgs.PoseStamped
  • geometry_msgs.PoseWithCovariance
  • geometry_msgs.TwistWithCovariance
  • nav_msgs.Odometry
  • nav_msgs.Path
  • sensors_msgs.LaserScan
  • More to come...

Metadata

Release files for zeroros 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zeroros 1.1.1
File Size Uploaded Provenance Actions
zeroros-1.1.1.tar.gz 75.8 kB Without provenance Details for zeroros-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zeroros 1.1.1
File Interpreter ABI Platform Actions
zeroros-1.1.1-py3-none-any.whl Python 3 none any Details for zeroros-1.1.1-py3-none-any.whl

Total release size: 89.8 kB

Release files / zeroros-1.1.1.tar.gz

Download URL zeroros-1.1.1.tar.gz
Size 75.8 kB
Tags Source
SHA-256 checksum
How to use checksums
06601e1e2c0dbeead84cceec14107277c25581083541d0fb727c94fb9abb8682
BLAKE2b-256 checksum
How to use checksums
5831159f9a1289cf6202cb336ea6a523ef1149afb632be44814547e8e5335979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / zeroros-1.1.1-py3-none-any.whl

Download URL zeroros-1.1.1-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52279bbf0520bff14138438b37b860c1e9b521600e38624e05b145177c491aba
BLAKE2b-256 checksum
How to use checksums
ace13bfbd0da5c035246d8ad737fb656203c6da116fd7accf6f67893b6bf82cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for zeroros 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page