#low-latency #dataflow #operator #format

dora-operator-api

dora goal is to be a low latency, composable, and distributed data flow

54 releases

0.3.10 Mar 4, 2025
0.3.8 Dec 11, 2024
0.3.7 Nov 18, 2024
0.3.5 Jul 3, 2024
0.1.0 Jun 24, 2022

#177 in Robotics

Download history 5/week @ 2024-11-26 259/week @ 2024-12-10 6/week @ 2024-12-17 1/week @ 2025-01-07 368/week @ 2025-02-04 26/week @ 2025-02-11 198/week @ 2025-02-18 99/week @ 2025-02-25 139/week @ 2025-03-04 9/week @ 2025-03-11

455 downloads per month

Apache-2.0

26KB
651 lines

Website | Python API | Rust API | Guide | Discord

dora-rs%2Fdora | Trendshift

Highlights

  • πŸš€ dora-rs is a framework to run realtime multi-AI and multi-hardware applications.
  • πŸ¦€ dora-rs internals are 100% Rust making it extremely fast compared to alternative such as being ⚑️ 10-17x faster than ros2.
  • ❇️ Includes a large set of pre-packaged nodes for fast prototyping which simplifies integration of hardware, algorithms, and AI models.

Latency benchmark with Python API for both framework, sending 40M of random bytes.

Latest News πŸŽ‰

2025
  • [03/05] dora-rs has been accepted to GSoC 2025 πŸŽ‰, with the following idea list.
  • [03/04] Add support for Zenoh for distributed dataflow.
  • [03/04] Add support for Meta SAM2, Kokoro(TTS), Improved Qwen2.5 Performance using llama.cpp.
  • [02/25] Add support for Qwen2.5(LLM), Qwen2.5-VL(VLM), outetts(TTS)

Support Matrix

dora-rs
APIs Python >= 3.7 βœ…
Rust βœ…
C/C++ πŸ†—
ROS2 >= Foxy πŸ†—
OS Linux: Arm 32 βœ… Arm 64 βœ… x64_86 βœ…
MacOS: Arm 64 βœ… x64_86 βœ…
Windows: x64_86 πŸ†—
Android: πŸ› οΈ (Blocked by: https://github.com/elast0ny/shared_memory/issues/32)
IOS: πŸ› οΈ
Message Format Arrow βœ…
Standard Specification πŸ› οΈ
Local Communication Shared Memory βœ…
Cuda IPC πŸ“
Remote Communication Zenoh πŸ“
Metrics, Tracing, and Logging Opentelemetry πŸ“
Configuration YAML βœ…
Package Manager pip: Python Node βœ… Rust Node βœ… C/C++ Node πŸ› οΈ
cargo: Rust Node βœ…
  • βœ… = First Class Support
  • πŸ†— = Best Effort Support
  • πŸ“ = Experimental and looking for contributions
  • πŸ› οΈ = Unsupported but hoped for through contributions

Everything is open for contributions πŸ™‹

Node Hub

Feel free to modify this README with your own nodes so that it benefits the community.

Type Title Support Description Downloads License
Camera PyOrbbeckSDK πŸ“ Image and depth from Orbbeck Camera Downloads License
Camera PyRealsense LinuxπŸ†—
MacπŸ› οΈ
Image and depth from Realsense Downloads License
Camera OpenCV Video Capture βœ… Image stream from OpenCV Camera Downloads License
Peripheral Keyboard βœ… Keyboard char listener Downloads License
Peripheral Microphone βœ… Audio from microphone Downloads License
Peripheral PyAudio(Speaker) βœ… Output audio from speaker Downloads License
Actuator Feetech πŸ“ Feetech Client
Actuator Dynamixel πŸ“ Dynamixel Client
Chassis Agilex - UGV πŸ†— Robomaster Client Downloads License
Chassis DJI - Robomaster S1 πŸ“ Robomaster Client
Chassis Dora Kit Car πŸ†— Open Source Chassis Downloads License
Arm Alex Koch - Low Cost Robot πŸ“ Alex Koch - Low Cost Robot Client
Arm Lebai - LM3 πŸ“ Lebai client
Arm Agilex - Piper πŸ†— Agilex arm client Downloads License
Robot Pollen - Reachy 1 πŸ“ Reachy 1 Client
Robot Pollen - Reachy 2 πŸ†— Reachy 2 client Downloads License
Robot Trossen - Aloha πŸ“ Aloha client
Voice Activity Detection(VAD) Silero VAD βœ… Silero Voice activity detection Downloads License
Speech to Text(STT) Whisper βœ… Transcribe audio to text Downloads License
Object Detection Yolov8 βœ… Object detection Downloads License
Segmentation SAM2 Cudaβœ…
MetalπŸ› οΈ
Segment Anything Downloads License
Large Language Model(LLM) Qwen2.5 βœ… Large Language Model using Qwen Downloads License
Vision Language Model(VLM) Qwen2.5-vl βœ… Vision Language Model using Qwen2.5 VL Downloads License
Vision Language Model(VLM) InternVL πŸ†— InternVL is a vision language model Downloads License
Vision Language Action(VLA) RDT-1B πŸ†— Infer policy using Robotic Diffusion Transformer Downloads License
Translation ArgosTranslate πŸ†— Open Source translation engine Downloads License
Translation Opus MT πŸ†— Translate text between language Downloads License
Text to Speech(TTS) Kokoro TTS βœ… Efficient Text to Speech Downloads License
Recorder Llama Factory Recorder πŸ†— Record data to train LLM and VLM Downloads License
Recorder LeRobot Recorder πŸ“ LeRobot Recorder helper
Visualization Plot βœ… Simple OpenCV plot visualization Downloads License
Visualization Rerun βœ… Visualization tool Downloads License
Simulator Mujoco πŸ“ Mujoco Simulator
Simulator Carla πŸ“ Carla Simulator
Simulator Gymnasium πŸ“ Experimental OpenAI Gymnasium bridge

Examples

Type Title Description Last Commit
Audio Speech to Text(STT) Transform speech to text. License
Audio Translation Translate audio in real time. License
Vision Vision Language Model(VLM) Use a VLM to understand images. License
Vision YOLO Use YOLO to detect object within image. License
Vision Camera Simple webcam plot example License
Model Training Piper RDT Piper RDT Pipeline License
Model Training LeRobot - Alexander Koch Training Alexander Koch Low Cost Robot with LeRobot License
ROS2 C++ ROS2 Example Example using C++ ROS2 License
ROS2 Rust ROS2 Example Example using Rust ROS2 License
ROS2 Python ROS2 Example Example using Python ROS2 License
Benchmark GPU Benchmark GPU Benchmark of dora-rs License
Benchmark CPU Benchmark CPU Benchmark of dora-rs License
Tutorial Rust Example Example using Rust License
Tutorial Python Example Example using Python License
Tutorial CMake Example Example using CMake License
Tutorial C Example Example with C node License
Tutorial CUDA Example Example using CUDA Zero Copy License
Tutorial C++ Example Example with C++ node License

Getting Started

Installation

pip install dora-rs-cli
Additional installation methods

Install dora with our standalone installers, or from crates.io:

With cargo

cargo install dora-cli

With Github release for macOS and Linux

curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/dora-rs/dora/main/install.sh | bash

With Github release for Windows

powershell -c "irm https://raw.githubusercontent.com/dora-rs/dora/main/install.ps1 | iex"

With Source

git clone https://github.com/dora-rs/dora.git
cd dora
cargo build --release -p dora-cli
PATH=$PATH:$(pwd)/target/release

Run

  • Run the yolo python example:
## Create a virtual environment
uv venv --seed -p 3.11

## Install nodes dependencies of a remote graph
dora build https://raw.githubusercontent.com/dora-rs/dora/refs/heads/main/examples/object-detection/yolo.yml --uv

## Run yolo graph
dora run yolo.yml --uv

Make sure to have a webcam

To stop your dataflow, you can use ctrl+c

  • To understand what is happening, you can look at the dataflow with:
cat yolo.yml
  • Resulting in:
nodes:
  - id: camera
    build: pip install opencv-video-capture
    path: opencv-video-capture
    inputs:
      tick: dora/timer/millis/20
    outputs:
      - image
    env:
      CAPTURE_PATH: 0
      IMAGE_WIDTH: 640
      IMAGE_HEIGHT: 480

  - id: object-detection
    build: pip install dora-yolo
    path: dora-yolo
    inputs:
      image: camera/image
    outputs:
      - bbox

  - id: plot
    build: pip install dora-rerun
    path: dora-rerun
    inputs:
      image: camera/image
      boxes2d: object-detection/bbox
  • In the above example, we can understand that the camera is sending image to both the rerun viewer as well as a yolo model that generates bounding box that is visualized within rerun.

Documentation

The full documentation is available on our website. A lot of guides are available on this section of our website.

What is Dora? And what features does Dora offer?

Dataflow-Oriented Robotic Architecture (dora-rs) is a framework that makes creation of robotic applications fast and simple.

dora-rs implements a declarative dataflow paradigm where tasks are split between nodes isolated as individual processes.

The dataflow paradigm has the advantage of creating an abstraction layer that makes robotic applications modular and easily configurable.

TCP Communication and Shared Memory

Communication between nodes is handled with shared memory on a same machine and TCP on distributed machines. Our shared memory implementation tracks messages across processes and discards them when obsolete. Shared memory slots are cached to avoid new memory allocation.

Arrow Message Format

Nodes communicate with Apache Arrow Data Format.

Apache Arrow is a universal memory format for flat and hierarchical data. The Arrow memory format supports zero-copy reads for lightning-fast data access without serialization overhead. It defines a C data interface without any build-time or link-time dependency requirement, that means that dora-rs has no compilation step beyond the native compiler of your favourite language.

Opentelemetry

dora-rs uses Opentelemetry to record all your logs, metrics and traces. This means that the data and telemetry can be linked using a shared abstraction.

Opentelemetry is an open source observability standard that makes dora-rs telemetry collectable by most backends such as elasticsearch, prometheus, Datadog...

Opentelemetry is language independent, backend agnostic, and easily collect distributed data, making it perfect for dora-rs applications.

ROS2 Bridge

Note: this feature is marked as unstable.

  • Compilation Free Message passing to ROS 2
  • Automatic conversion ROS 2 Message <-> Arrow Array
import pyarrow as pa

# Configuration Boilerplate...
turtle_twist_writer = ...

## Arrow Based ROS2 Twist Message
## which does not require ROS2 import
message = pa.array([{
            "linear": {
                "x": 1,
            },
            "angular": {
                "z": 1
            },
        }])

turtle_twist_writer.publish(message)

You might want to use ChatGPT to write the Arrow Formatting: https://chat.openai.com/share/4eec1c6d-dbd2-46dc-b6cd-310d2895ba15

Contributing

We are passionate about supporting contributors of all levels of experience and would love to see you get involved in the project. See the contributing guide to get started.

Discussions

Our main communication channels are:

Feel free to reach out on any topic, issues or ideas.

We also have a contributing guide.

License

This project is licensed under Apache-2.0. Check out NOTICE.md for more information.


lib.rs:

The operator API is a framework to implement dora operators. The implemented operator will be managed by dora.

This framework enable us to make optimisation and provide advanced features. It is the recommended way of using dora.

An operator requires to be registered and implement the DoraOperator trait. It is composed of an on_event method that defines the behaviour of the operator when there is an event such as receiving an input for example.

Try it out with:

dora new op --kind operator

Dependencies

~15–22MB
~329K SLoC