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.
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.Stringstd_msgs.Intstd_msgs.Floatstd_msgs.Boolstd_msgs.Headergeometry_msgs.Vector3geometry_msgs.Vector3Stampedgeometry_msgs.Twistgeometry_msgs.Quaterniongeometry_msgs.Posegeometry_msgs.PoseStampedgeometry_msgs.PoseWithCovariancegeometry_msgs.TwistWithCovariancenav_msgs.Odometrynav_msgs.Pathsensors_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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.