Robot communication in 3 lines. Zero config. Just works.
Before (ROS2):
- Create
.msgfile + editCMakeLists.txt+package.xml colcon build- Wait minutes
- Fix build errors
source install/setup.bash- Write code
After (NitROS):
pip install nitros. Done.
pip install nitrosThat's it. No CMake, no colcon, no setup scripts.
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.
# 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)pub = Publisher("lidar", compression="pointcloud")
pub.send(points) # numpy array, ~5x compressionPublisher("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 loggingDicts, lists, numpy arrays, PyTorch tensors (auto-converted to numpy) — auto-detected, auto-serialized.
| 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. |
| Non-blocking | send() never blocks. |
| Auto-reconnection | Background threading handles network issues. |
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 cameraNitROS is not a full ROS2 replacement. It focuses on making simple pub/sub communication easy.
What's missing:
- Transform system (TF/TF2)
- URDF support
- Action servers
- Service calls
- RQT tools
- Hardware drivers
Known issues:
- mDNS can be unreliable on some enterprise networks
- Not stress-tested at large scale
- Limited to basic pub/sub patterns
Best used for:
- Quick prototypes
- Simple robot-to-laptop communication
- Competition robots
- Learning robot communication basics
If you need the full ROS2 ecosystem, stick with ROS2. NitROS is for when you just want pub/sub to work.
| 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 |
Apache-2.0 License - see LICENSE
Contributing: Issues and PRs welcome at github.com/InputNamePlz/NitROS

