Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anshulranjan2004/meta-ros
A versatile and developer-friendly meta operating system for robotics that seamlessly integrates diverse hardware platforms and simplifies application development in the face of evolving robotic technologies.
https://github.com/anshulranjan2004/meta-ros
python robotframework robotics ros ros2
Last synced: 3 months ago
JSON representation
A versatile and developer-friendly meta operating system for robotics that seamlessly integrates diverse hardware platforms and simplifies application development in the face of evolving robotic technologies.
- Host: GitHub
- URL: https://github.com/anshulranjan2004/meta-ros
- Owner: AnshulRanjan2004
- License: gpl-3.0
- Created: 2024-08-20T17:16:48.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-11-22T04:28:24.000Z (3 months ago)
- Last Synced: 2024-11-22T05:22:23.202Z (3 months ago)
- Topics: python, robotframework, robotics, ros, ros2
- Language: Python
- Homepage: https://pypi.org/project/metaros/
- Size: 112 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:```bash
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.```python
from metaros import MessageBrokerbroker = 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.```python
from metaros import Publisherpub = 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.```python
import time
from metaros import Subscriberdef 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`
* `sensors_msgs.Image`
* More to come...