Meta-ROS
Zero-dependency ROS-like middleware for Python
This module acts as a middleware for communication between different processes using ZeroMQ. It consists of Publisher, Subscriber and MessageBroker classes to be able to publish and subscribe messages to a topic. The module contains different message types including string, int, float and more.
Why Meta-ROS?
A middleware solution designed for process communication, incorporating Publisher, Subscriber, and MessageBroker classes. It handles various message types, including strings, integers, and floats, facilitating seamless data exchange. This module fosters a cohesive and scalable robotics environment, driving innovation and research by enabling efficient communication and robust integration across different systems.
Installation
To install the library, use pip:
pip install metaros
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 metaros 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 metaros 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 metaros 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.LaserScansensors_msgs.Image- More to come...
Metadata
Release files for metaros 1.1.5
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 |
|---|---|---|---|---|
| metaros-1.1.5.tar.gz | 23.6 kB | Without provenance | Details for metaros-1.1.5.tar.gz |
Release files / metaros-1.1.5.tar.gz
| Download URL | metaros-1.1.5.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
053ede4f026f00d867288573db1d608fb979465121a98b0e03c154826463f670
|
|
BLAKE2b-256 checksum How to use checksums |
47598993ba2958cd20b3cc4ed403685f10019d9049bbfad9f854e156e133aefe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Security for metaros 1.1.5
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.