Skip to main content

Communication made insanely easy - A simple, fast, and reliable communication library for robotics

Project description

NitROS

NitROS

Robot communication in 3 lines. Zero config. Just works.


The Problem

Before (ROS2):

  1. Create .msg file + edit CMakeLists.txt + package.xml
  2. colcon build
  3. Wait minutes
  4. Fix build errors
  5. source install/setup.bash
  6. Write code

After (NitROS):

pip install nitros

Done.


Get Started

from nitros import Publisher, Subscriber

# Publisher
pub = Publisher("sensors")
pub.send({"temperature": 23.5, "humidity": 65})

# Subscriber
def callback(msg):
    print(msg)

sub = Subscriber("sensors", callback)

That's it! No configuration, No setup, It just works.


Usage

Camera Streaming

# Publisher
pub = Publisher("camera", compression="image")
pub.send(frame)  # numpy array from cv2

# Subscriber
def show_frame(frame):
    cv2.imshow("Camera", frame)
    cv2.waitKey(1)

Subscriber("camera", show_frame)

Point Cloud

pub = Publisher("lidar", compression="pointcloud")
pub.send(points)  # numpy array, ~5x compression

Options

Publisher("topic", compression="image")       # JPEG compression (~10x)
Publisher("topic", compression="pointcloud")  # quantization + LZ4 (~5x)
Publisher("topic", log=True)                  # enable logging
Subscriber("topic", callback, log=True)       # enable logging

Supported Types

Dicts, lists, numpy arrays, PyTorch tensors (auto-converted to numpy) — auto-detected, auto-serialized.


Why NitROS?

Zero config mDNS auto-discovery. No IPs, no ports, no config files.
Send anything Dicts, numpy arrays, PyTorch tensors (auto-converted to numpy).
Smart compression JPEG for images, LZ4 for point clouds.
Fire and forget send() never blocks.
Production ready Auto-reconnection. Background threading.

CLI Tools

Already familiar with ros2 topic? You already know how to use this.

nitros topic list
nitros topic echo camera
nitros topic hz camera
nitros topic info camera

vs Others

NitROS ROS2 ZeroMQ
Setup pip install Hours Minutes
Config None Yes Yes
Type definitions Auto Manual .msg Manual
Discovery Auto (mDNS) DDS config Manual
Compression Built-in Manual Manual

License

Apache-2.0 License - see LICENSE

Contributing: Issues and PRs welcome at github.com/InputNamePlz/NitROS

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

nitros-0.1.2.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

nitros-0.1.2-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file nitros-0.1.2.tar.gz.

File metadata

  • Download URL: nitros-0.1.2.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for nitros-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a9e49af87f14c73e52f0b98cd3cab944ced784fd8ff429d75aa0099fdc6a5e3d
MD5 b351fbe396aa0995ca85068a6435bf48
BLAKE2b-256 e2643f4673151207513dd1ecdcae4d6248eec8242da227bd3fcb09d8d0b96253

See more details on using hashes here.

File details

Details for the file nitros-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: nitros-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for nitros-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb467ec1fdd749c079453d1bcc509378e117dfef327cfffa500d8fa6ab199447
MD5 bdb3c2bc48034f95d3bee0a64a3313ca
BLAKE2b-256 a1cd69160f053eeebf9cd367acfeff6ff717bdbc518c082a6b0383c68550cb0f

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