You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 34 kB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
Add Opentelemetry capabilities though capnproto messages (#24) * Multithreaded Python API and Pylot Example (#18) * Refactoring for multithreading * Refactoring code in order to use MemoryView * Resolving multi output by casting Python output type * Adding Python example runner * Adding Rayon ThreadPool for CPU bound multithreading * Adding benches * Small Refactoring of Python Binding * Adding documentation to Pylot Demo * Removing cloning states data using RwLock * Refactoring Servers to pass messages through tokio channels * Removing unwrap when possible * Splitting Zenoh function into separate module * Refactoring Zenoh into a struct * Adding several Python fix * Fix eyre issue * Adding docker for ease of build * Fixing docker problem * Reduce the frequency of source * Adding better Python Operator * Improving carla visualisation capabilities * Enabling better visualisation * adding object trajectory * Improving planning * Refactoring Python * Adding control operator * Improving planning operator * Better Control Operator * Fixing Planning Errors linked to applying Speed Factor * Fixing Docker Image Build issues * Adding a timestamp to messages * Fixing PID mutlithread errors * Drop Push Send after Pull period * Limiting the latency * Adding InfluxDB * Fixing Influxdb Naming and quota * Adding positional data * Making launching container command faster * Removing Dora-Pylot * Refactor Error Handling * Refactoring Error dubgging function Co-authored-by: haixuanTao <hai-xuan.tao@student.ecp.fr> * adding capnp metadata into messages * Allowing Context to propagate throughout node * Adding better tracing * Refactoring opentelemetry mod * Adding a degree parameter in messages * Adding depth for better tracing * Put a feature flag on tracing * Removing unnecessary copy of the messages * Small refactoring of messages * Refactoring of context logging * Adding opentelemetry metrics of system * Adding process telemetry * Commenting the build script * Rename feature tracing * Add documentation to module * Adding message documentation * Remove build script * skip capnp generated file * Reformating * Reformating loop * Testing example * Removing zenoh dependencies in Python * Improving example python api * removing rayon that is appearing twice due to merge * Simplifying python binding * Create a separate crate for messages * Moving `metrics` and `tracing` into separate crate * Moving `python` into a separate crate and removing `main` crate * Refactoring newly created crate * Remove `depth` from the message `metadata` * Add `capnp` installation within the CI * Add `capnp` installation into CI `clippy` step Co-authored-by: haixuanTao <hai-xuan.tao@student.ecp.fr>
3 years ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
9 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. #
  2. <p align="center">
  3. <img src="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/logo.svg" width="400"/>
  4. </p>
  5. <h2 align="center">
  6. <a href="https://www.dora-rs.ai">Website</a>
  7. |
  8. <a href="https://dora-rs.ai/docs/guides/getting-started/conversation_py/">Python API</a>
  9. |
  10. <a href="https://docs.rs/dora-node-api/latest/dora_node_api/">Rust API</a>
  11. |
  12. <a href="https://www.dora-rs.ai/docs/guides/">Guide</a>
  13. |
  14. <a href="https://discord.gg/6eMGGutkfE">Discord</a>
  15. </h2>
  16. <div align="center">
  17. <a href="https://github.com/dora-rs/dora/actions">
  18. <img src="https://github.com/dora-rs/dora/workflows/CI/badge.svg" alt="Build and test"/>
  19. </a>
  20. <a href="https://crates.io/crates/dora-rs">
  21. <img src="https://img.shields.io/crates/v/dora_node_api.svg"/>
  22. </a>
  23. <a href="https://docs.rs/dora-node-api/latest/dora_node_api/">
  24. <img src="https://docs.rs/dora-node-api/badge.svg" alt="rust docs"/>
  25. </a>
  26. <a href="https://pypi.org/project/dora-rs/">
  27. <img src="https://img.shields.io/pypi/v/dora-rs.svg" alt="PyPi Latest Release"/>
  28. </a>
  29. </div>
  30. <div align="center">
  31. <a href="https://trendshift.io/repositories/9190" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9190" alt="dora-rs%2Fdora | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
  32. </div>
  33. ## Highlights
  34. - 🚀 dora-rs is a framework to run realtime multi-AI and multi-hardware applications.
  35. - 🦀 dora-rs internals are 100% Rust making it extremely fast compared to alternative such as being ⚡️ [10-17x faster](https://github.com/dora-rs/dora-benchmark) than `ros2`.
  36. - ❇️ Includes a large set of pre-packaged nodes for fast prototyping which simplifies integration of hardware, algorithms, and AI models.
  37. <p align="center">
  38. <picture align="center">
  39. <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/bar_chart_dark.svg">
  40. <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/bar_chart_light.svg">
  41. <img src="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/bar_chart_light.svg">
  42. </picture>
  43. </p>
  44. <p align="center">
  45. <a href="https://github.com/dora-rs/dora-benchmark/" >
  46. <i>Latency benchmark with Python API for both framework, sending 40M of random bytes.</i>
  47. </a>
  48. </p>
  49. ## Latest News 🎉
  50. <details open>
  51. <summary><b>2025</b></summary>
  52. \[04/05\] Add support for dora-cotracker to track any point on a frame, dora-rav1e AV1 encoding up to 12bit and dora-dav1d AV1 decoding,
  53. - \[03/05\] Add support for dora async Python.
  54. - \[03/05\] Add support for Microsoft Phi4, Microsoft Magma.
  55. - \[03/05\] dora-rs has been accepted to [**GSoC 2025 🎉**](https://summerofcode.withgoogle.com/programs/2025/organizations/dora-rs-tb), with the following [**idea list**](https://github.com/dora-rs/dora/wiki/GSoC_2025).
  56. - \[03/04\] Add support for Zenoh for distributed dataflow.
  57. - \[03/04\] Add support for Meta SAM2, Kokoro(TTS), Improved Qwen2.5 Performance using `llama.cpp`.
  58. - \[02/25\] Add support for Qwen2.5(LLM), Qwen2.5-VL(VLM), outetts(TTS)
  59. </details>
  60. ## Support Matrix
  61. | | dora-rs |
  62. | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  63. | **APIs** | Python >= 3.7 including sync ⭐✅ <br> Rust ✅<br> C/C++ 🆗 <br>ROS2 >= Foxy 🆗 |
  64. | **OS** | Linux: Arm 32 ⭐✅ Arm 64 ⭐✅ x64_86 ⭐✅ <br>MacOS: Arm 64 ⭐✅ x64_86 ✅<br>Windows: x64_86 🆗<br> Android: 🛠️ (Blocked by: https://github.com/elast0ny/shared_memory/issues/32) <br> IOS: 🛠️ |
  65. | **Message Format** | Arrow ✅ <br> Standard Specification 🛠️ |
  66. | **Local Communication** | Shared Memory ✅ <br> [Cuda IPC](https://arrow.apache.org/docs/python/api/cuda.html) 📐 |
  67. | **Remote Communication** | [Zenoh](https://zenoh.io/) 📐 |
  68. | **Metrics, Tracing, and Logging** | Opentelemetry 📐 |
  69. | **Configuration** | YAML ✅ |
  70. | **Package Manager** | [pip](https://pypi.org/): Python Node ✅ Rust Node ✅ C/C++ Node 🛠️ <br>[cargo](https://crates.io/): Rust Node ✅ |
  71. > - ⭐ = Recommended
  72. > - ✅ = First Class Support
  73. > - 🆗 = Best Effort Support
  74. > - 📐 = Experimental and looking for contributions
  75. > - 🛠️ = Unsupported but hoped for through contributions
  76. >
  77. > Everything is open for contributions 🙋
  78. ## Node Hub
  79. > Feel free to modify this README with your own nodes so that it benefits the community.
  80. | Type | Title | Support | Description | Downloads | License |
  81. | ----------------------------- | --------------------------------------------------------------------------------------------------- | ------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
  82. | Camera | [PyOrbbeckSDK](https://github.com/dora-rs/dora/blob/main/node-hub/dora-pyorbbecksdk) | 📐 | Image and depth from Orbbeck Camera | ![Downloads](https://img.shields.io/pypi/dm/dora-pyorbbecksdk?label=%20) | ![License](https://img.shields.io/pypi/l/dora-pyorbbecksdk?label=%20) |
  83. | Camera | [PyRealsense](https://github.com/dora-rs/dora/blob/main/node-hub/dora-pyrealsense) | Linux🆗 <br> Mac🛠️ | Image and depth from Realsense | ![Downloads](https://img.shields.io/pypi/dm/dora-pyrealsense?label=%20) | ![License](https://img.shields.io/pypi/l/dora-pyrealsense?label=%20) |
  84. | Camera | [OpenCV Video Capture](https://github.com/dora-rs/dora/blob/main/node-hub/opencv-video-capture) | ✅ | Image stream from OpenCV Camera | ![Downloads](https://img.shields.io/pypi/dm/opencv-video-capture?label=%20) | ![License](https://img.shields.io/pypi/l/opencv-video-capture?label=%20) |
  85. | Peripheral | [Keyboard](https://github.com/dora-rs/dora/blob/main/node-hub/dora-keyboard) | ✅ | Keyboard char listener | ![Downloads](https://img.shields.io/pypi/dm/dora-keyboard?label=%20) | ![License](https://img.shields.io/pypi/l/dora-keyboard?label=%20) |
  86. | Peripheral | [Microphone](https://github.com/dora-rs/dora/blob/main/node-hub/dora-microphone) | ✅ | Audio from microphone | ![Downloads](https://img.shields.io/pypi/dm/dora-microphone?label=%20) | ![License](https://img.shields.io/pypi/l/dora-microphone?label=%20) |
  87. | Peripheral | [PyAudio(Speaker)](https://github.com/dora-rs/dora/blob/main/node-hub/dora-pyaudio) | ✅ | Output audio from speaker | ![Downloads](https://img.shields.io/pypi/dm/dora-pyaudio?label=%20) | ![License](https://img.shields.io/pypi/l/dora-pyaudio?label=%20) |
  88. | Actuator | [Feetech](https://github.com/dora-rs/dora-lerobot/blob/main/node-hub/feetech-client) | 📐 | Feetech Client | | |
  89. | Actuator | [Dynamixel](https://github.com/dora-rs/dora-lerobot/blob/main/node-hub/dynamixel-client) | 📐 | Dynamixel Client | | |
  90. | Chassis | [Agilex - UGV](https://github.com/dora-rs/dora/blob/main/node-hub/dora-ugv) | 🆗 | Robomaster Client | ![Downloads](https://img.shields.io/pypi/dm/dora-ugv?label=%20) | ![License](https://img.shields.io/pypi/l/dora-ugv?label=%20) |
  91. | Chassis | [DJI - Robomaster S1](https://huggingface.co/datasets/dora-rs/dora-robomaster) | 📐 | Robomaster Client | | |
  92. | Chassis | [Dora Kit Car](https://github.com/dora-rs/dora/blob/main/node-hub/dora-kit-car) | 🆗 | Open Source Chassis | ![Downloads](https://img.shields.io/pypi/dm/dora-kit-car?label=%20) | ![License](https://img.shields.io/pypi/l/dora-kit-car?label=%20) |
  93. | Arm | [Alex Koch - Low Cost Robot](https://github.com/dora-rs/dora-lerobot/blob/main/robots/alexk-lcr) | 📐 | Alex Koch - Low Cost Robot Client | | |
  94. | Arm | [Lebai - LM3](https://github.com/dora-rs/dora-lerobot/blob/main/node-hub/lebai-client) | 📐 | Lebai client | | |
  95. | Arm | [Agilex - Piper](https://github.com/dora-rs/dora/blob/main/node-hub/dora-piper) | 🆗 | Agilex arm client | ![Downloads](https://img.shields.io/pypi/dm/dora-piper?label=%20) | ![License](https://img.shields.io/pypi/l/dora-piper?label=%20) |
  96. | Robot | [Pollen - Reachy 1](https://github.com/dora-rs/dora-lerobot/blob/main/node-hub/dora-reachy1) | 📐 | Reachy 1 Client | | |
  97. | Robot | [Pollen - Reachy 2](https://github.com/dora-rs/dora/blob/main/node-hub/dora-reachy2) | 🆗 | Reachy 2 client | ![Downloads](https://img.shields.io/pypi/dm/dora-reachy2?label=%20) | ![License](https://img.shields.io/pypi/l/dora-reachy2?label=%20) |
  98. | Robot | [Trossen - Aloha](https://github.com/dora-rs/dora-lerobot/blob/main/robots/aloha) | 📐 | Aloha client | | |
  99. | Voice Activity Detection(VAD) | [Silero VAD](https://github.com/dora-rs/dora/blob/main/node-hub/dora-vad) | ✅ | Silero Voice activity detection | ![Downloads](https://img.shields.io/pypi/dm/dora-vad?label=%20) | ![License](https://img.shields.io/pypi/l/dora-vad?label=%20) |
  100. | Speech to Text(STT) | [Whisper](https://github.com/dora-rs/dora/blob/main/node-hub/dora-distil-whisper) | ✅ | Transcribe audio to text | ![Downloads](https://img.shields.io/pypi/dm/dora-distil-whisper?label=%20) | ![License](https://img.shields.io/pypi/l/dora-distil-whisper?label=%20) |
  101. | Object Detection | [Yolov8](https://github.com/dora-rs/dora/blob/main/node-hub/dora-yolo) | ✅ | Object detection | ![Downloads](https://img.shields.io/pypi/dm/dora-yolo?label=%20) | ![License](https://img.shields.io/pypi/l/dora-yolo?label=%20) |
  102. | Segmentation | [SAM2](https://github.com/dora-rs/dora/blob/main/node-hub/dora-sam2) | Cuda✅ <br> Metal🛠️ | Segment Anything | ![Downloads](https://img.shields.io/pypi/dm/dora-sam2?label=%20) | ![License](https://img.shields.io/pypi/l/dora-sam2?label=%20) |
  103. | Large Language Model(LLM) | [Qwen2.5](https://github.com/dora-rs/dora/blob/main/node-hub/dora-qwen) | ✅ | Large Language Model using Qwen | ![Downloads](https://img.shields.io/pypi/dm/dora-qwen?label=%20) | ![License](https://img.shields.io/pypi/l/dora-qwen?label=%20) |
  104. | Vision Language Model(VLM) | [Qwen2.5-vl](https://github.com/dora-rs/dora/blob/main/node-hub/dora-qwen2-5-vl) | ✅ | Vision Language Model using Qwen2.5 VL | ![Downloads](https://img.shields.io/pypi/dm/dora-qwen2-5-vl?label=%20) | ![License](https://img.shields.io/pypi/l/dora-qwen2-5-vl?label=%20) |
  105. | Vision Language Model(VLM) | [InternVL](https://github.com/dora-rs/dora/blob/main/node-hub/dora-internvl) | 🆗 | InternVL is a vision language model | ![Downloads](https://img.shields.io/pypi/dm/dora-internvl?label=%20) | ![License](https://img.shields.io/pypi/l/dora-internvl?label=%20) |
  106. | Vision Language Action(VLA) | [RDT-1B](https://github.com/dora-rs/dora/blob/main/node-hub/dora-rdt-1b) | 🆗 | Infer policy using Robotic Diffusion Transformer | ![Downloads](https://img.shields.io/pypi/dm/dora-rdt-1b?label=%20) | ![License](https://img.shields.io/pypi/l/dora-rdt-1b?label=%20) |
  107. | Translation | [ArgosTranslate](https://github.com/dora-rs/dora/blob/main/node-hub/dora-argotranslate) | 🆗 | Open Source translation engine | ![Downloads](https://img.shields.io/pypi/dm/dora-argotranslate?label=%20) | ![License](https://img.shields.io/pypi/l/dora-argotranslate?label=%20) |
  108. | Translation | [Opus MT](https://github.com/dora-rs/dora/blob/main/node-hub/dora-opus) | 🆗 | Translate text between language | ![Downloads](https://img.shields.io/pypi/dm/dora-opus?label=%20) | ![License](https://img.shields.io/pypi/l/dora-opus?label=%20) |
  109. | Text to Speech(TTS) | [Kokoro TTS](https://github.com/dora-rs/dora/blob/main/node-hub/dora-kokoro-tts) | ✅ | Efficient Text to Speech | ![Downloads](https://img.shields.io/pypi/dm/dora-kokoro-tts?label=%20) | ![License](https://img.shields.io/pypi/l/dora-kokoro-tts?label=%20) |
  110. | Recorder | [Llama Factory Recorder](https://github.com/dora-rs/dora/blob/main/node-hub/llama-factory-recorder) | 🆗 | Record data to train LLM and VLM | ![Downloads](https://img.shields.io/pypi/dm/llama-factory-recorder?label=%20) | ![License](https://img.shields.io/pypi/l/llama-factory-recorder?label=%20) |
  111. | Recorder | [LeRobot Recorder](https://github.com/dora-rs/dora-lerobot/blob/main/node-hub/lerobot-dashboard) | 📐 | LeRobot Recorder helper | | |
  112. | Visualization | [Plot](https://github.com/dora-rs/dora/blob/main/node-hub/opencv-plot) | ✅ | Simple OpenCV plot visualization | ![Downloads](https://img.shields.io/pypi/dm/dora-yolo?label=%20) | ![License](https://img.shields.io/pypi/l/opencv-plot?label=%20) |
  113. | Visualization | [Rerun](https://github.com/dora-rs/dora/blob/main/node-hub/dora-rerun) | ✅ | Visualization tool | ![Downloads](https://img.shields.io/pypi/dm/dora-rerun?label=%20) | ![License](https://img.shields.io/pypi/l/dora-rerun?label=%20) |
  114. | Simulator | [Mujoco](https://github.com/dora-rs/dora-lerobot/blob/main/node-hub/mujoco-client) | 📐 | Mujoco Simulator | | |
  115. | Simulator | [Carla](https://github.com/dora-rs/dora-drives) | 📐 | Carla Simulator | | |
  116. | Simulator | [Gymnasium](https://github.com/dora-rs/dora-lerobot/blob/main/gym_dora) | 📐 | Experimental OpenAI Gymnasium bridge | | |
  117. ## Examples
  118. | Type | Title | Description | Last Commit |
  119. | -------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
  120. | Audio | [Speech to Text(STT)](https://github.com/dora-rs/dora/blob/main/examples/speech-to-text) | Transform speech to text. | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fspeech-to-text&label=%20) |
  121. | Audio | [Translation](https://github.com/dora-rs/dora/blob/main/examples/translation) | Translate audio in real time. | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Ftranslation&label=%20) |
  122. | Vision | [Vision Language Model(VLM)](https://github.com/dora-rs/dora/blob/main/examples/vlm) | Use a VLM to understand images. | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fvlm&label=%20) |
  123. | Vision | [YOLO](https://github.com/dora-rs/dora/blob/main/examples/python-dataflow) | Use YOLO to detect object within image. | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fpython-dataflow&label=%20) |
  124. | Vision | [Camera](https://github.com/dora-rs/dora/blob/main/examples/camera) | Simple webcam plot example | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fcamera&label=%20) |
  125. | Model Training | [Piper RDT](https://github.com/dora-rs/dora/blob/main/examples/piper) | Piper RDT Pipeline | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fpiper&label=%20) |
  126. | Model Training | [LeRobot - Alexander Koch](https://raw.githubusercontent.com/dora-rs/dora-lerobot/refs/heads/main/README.md) | Training Alexander Koch Low Cost Robot with LeRobot | ![License](https://img.shields.io/github/last-commit/dora-rs/dora-lerobot?path=robots&label=%20) |
  127. | ROS2 | [C++ ROS2 Example](https://github.com/dora-rs/dora/blob/main/examples/c++-ros2-dataflow) | Example using C++ ROS2 | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fc%2b%2b-ros2-dataflow&label=%20) |
  128. | ROS2 | [Rust ROS2 Example](https://github.com/dora-rs/dora/blob/main/examples/rust-ros2-dataflow) | Example using Rust ROS2 | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Frust-ros2-dataflow&label=%20) |
  129. | ROS2 | [Python ROS2 Example](https://github.com/dora-rs/dora/blob/main/examples/python-ros2-dataflow) | Example using Python ROS2 | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fpython-ros2-dataflow&label=%20) |
  130. | Benchmark | [GPU Benchmark](https://github.com/dora-rs/dora/blob/main/examples/cuda-benchmark) | GPU Benchmark of dora-rs | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fcuda-benchmark&label=%20) |
  131. | Benchmark | [CPU Benchmark](https://github.com/dora-rs/dora-benchmark/blob/main) | CPU Benchmark of dora-rs | ![License](https://img.shields.io/github/last-commit/dora-rs/dora-benchmark?path=dora-rs&label=%20) |
  132. | Tutorial | [Rust Example](https://github.com/dora-rs/dora/blob/main/examples/rust-dataflow) | Example using Rust | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Frust-dataflow&label=%20) |
  133. | Tutorial | [Python Example](https://github.com/dora-rs/dora/blob/main/examples/python-dataflow) | Example using Python | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fpython-dataflow&label=%20) |
  134. | Tutorial | [CMake Example](https://github.com/dora-rs/dora/blob/main/examples/cmake-dataflow) | Example using CMake | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fcmake-dataflow&label=%20) |
  135. | Tutorial | [C Example](https://github.com/dora-rs/dora/blob/main/examples/c-dataflow) | Example with C node | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fc-dataflow&label=%20) |
  136. | Tutorial | [CUDA Example](https://github.com/dora-rs/dora/blob/main/examples/cuda-benchmark) | Example using CUDA Zero Copy | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fcuda-benchmark&label=%20) |
  137. | Tutorial | [C++ Example](https://github.com/dora-rs/dora/blob/main/examples/c++-dataflow) | Example with C++ node | ![License](https://img.shields.io/github/last-commit/dora-rs/dora?path=examples%2Fc%2b%2b-dataflow&label=%20) |
  138. ## Getting Started
  139. ### Installation
  140. ```bash
  141. pip install dora-rs-cli
  142. ```
  143. <details close>
  144. <summary><b>Additional installation methods</b></summary>
  145. Install dora with our standalone installers, or from [crates.io](https://crates.io/crates/dora-cli):
  146. ### With cargo
  147. ```bash
  148. cargo install dora-cli
  149. ```
  150. ### With Github release for macOS and Linux
  151. ```bash
  152. curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dora-rs/dora/releases/latest/download/dora-cli-installer.sh | sh
  153. ```
  154. ### With Github release for Windows
  155. ```powershell
  156. powershell -ExecutionPolicy ByPass -c "irm https://github.com/dora-rs/dorareleases/latest/download/dora-cli-installer.ps1 | iex"
  157. ```
  158. ### With Source
  159. ```bash
  160. git clone https://github.com/dora-rs/dora.git
  161. cd dora
  162. cargo build --release -p dora-cli
  163. PATH=$PATH:$(pwd)/target/release
  164. ```
  165. </details>
  166. ### Run
  167. - Run the yolo python example:
  168. ```bash
  169. ## Create a virtual environment
  170. uv venv --seed -p 3.11
  171. ## Install nodes dependencies of a remote graph
  172. dora build https://raw.githubusercontent.com/dora-rs/dora/refs/heads/main/examples/object-detection/yolo.yml --uv
  173. ## Run yolo graph
  174. dora run yolo.yml --uv
  175. ```
  176. > Make sure to have a webcam
  177. To stop your dataflow, you can use <kbd>ctrl</kbd>+<kbd>c</kbd>
  178. - To understand what is happening, you can look at the dataflow with:
  179. ```bash
  180. cat yolo.yml
  181. ```
  182. - Resulting in:
  183. ```yaml
  184. nodes:
  185. - id: camera
  186. build: pip install opencv-video-capture
  187. path: opencv-video-capture
  188. inputs:
  189. tick: dora/timer/millis/20
  190. outputs:
  191. - image
  192. env:
  193. CAPTURE_PATH: 0
  194. IMAGE_WIDTH: 640
  195. IMAGE_HEIGHT: 480
  196. - id: object-detection
  197. build: pip install dora-yolo
  198. path: dora-yolo
  199. inputs:
  200. image: camera/image
  201. outputs:
  202. - bbox
  203. - id: plot
  204. build: pip install dora-rerun
  205. path: dora-rerun
  206. inputs:
  207. image: camera/image
  208. boxes2d: object-detection/bbox
  209. ```
  210. - 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.
  211. ### Documentation
  212. The full documentation is available on [our website](https://dora-rs.ai/).
  213. A lot of guides are available on [this section](https://dora-rs.ai/docs/guides/) of our website.
  214. ## What is Dora? And what features does Dora offer?
  215. **D**ataflow-**O**riented **R**obotic **A**rchitecture (`dora-rs`) is a framework that makes creation of robotic applications fast and simple.
  216. `dora-rs` implements a declarative dataflow paradigm where tasks are split between nodes isolated as individual processes.
  217. The dataflow paradigm has the advantage of creating an abstraction layer that makes robotic applications modular and easily configurable.
  218. ### TCP Communication and Shared Memory
  219. 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.
  220. ### Arrow Message Format
  221. Nodes communicate with Apache Arrow Data Format.
  222. [Apache Arrow](https://github.com/apache/arrow-rs) 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.
  223. ### Opentelemetry
  224. 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.
  225. [Opentelemetry](https://opentelemetry.io/) is an open source observability standard that makes dora-rs telemetry collectable by most backends such as elasticsearch, prometheus, Datadog...
  226. Opentelemetry is language independent, backend agnostic, and easily collect distributed data, making it perfect for dora-rs applications.
  227. ### ROS2 Bridge
  228. **Note**: this feature is marked as unstable.
  229. - Compilation Free Message passing to ROS 2
  230. - Automatic conversion ROS 2 Message <-> Arrow Array
  231. ```python
  232. import pyarrow as pa
  233. # Configuration Boilerplate...
  234. turtle_twist_writer = ...
  235. ## Arrow Based ROS2 Twist Message
  236. ## which does not require ROS2 import
  237. message = pa.array([{
  238. "linear": {
  239. "x": 1,
  240. },
  241. "angular": {
  242. "z": 1
  243. },
  244. }])
  245. turtle_twist_writer.publish(message)
  246. ```
  247. > You might want to use ChatGPT to write the Arrow Formatting: https://chat.openai.com/share/4eec1c6d-dbd2-46dc-b6cd-310d2895ba15
  248. ## Zenoh Integration for Distributed Dataflow (Experimental)
  249. Zenoh is a high-performance pub/sub and query protocol that unifies data in motion and at rest. In **dora-rs**, Zenoh is used for remote communication between nodes running on different machines, enabling distributed dataflow across networks.
  250. ### What is Zenoh?
  251. - **Definition:**
  252. [Zenoh](https://zenoh.io) is an open-source communication middleware offering pub/sub and query capabilities.
  253. - **Benefits in DORA:**
  254. - Simplifies communication between distributed nodes.
  255. - Handles NAT traversal and inter-network communication.
  256. - Integrates with DORA to manage remote data exchange while local communication still uses efficient shared memory.
  257. ### Enabling Zenoh Support
  258. 1. **Run a Zenoh Router (`zenohd`):**
  259. Launch a Zenoh daemon to mediate communication. For example, using Docker:
  260. ```bash
  261. docker run -p 7447:7447 -p 8000:8000 --name zenoh-router eclipse/zenohd:latest
  262. ```
  263. ````markdown
  264. ## Create a Zenoh Configuration File 🎛️
  265. Create a file (e.g., `zenoh.json5`) with the router endpoint details:
  266. ```json5
  267. {
  268. connect: {
  269. endpoints: ["tcp/203.0.113.10:7447"],
  270. },
  271. }
  272. ```
  273. ````
  274. ---
  275. ## Launch DORA Daemons with Zenoh Enabled 🚀
  276. On each machine, export the configuration and start the daemon:
  277. ```bash
  278. export ZENOH_CONFIG=/path/to/zenoh.json5
  279. dora daemon --coordinator-addr <COORD_IP> --machine-id <MACHINE_NAME>
  280. ```
  281. ---
  282. ## Deploy Distributed Nodes via YAML 📄
  283. Mark nodes for remote deployment using the `_unstable_deploy` key:
  284. ```yaml
  285. nodes:
  286. - id: camera_node
  287. outputs: [image]
  288. - id: processing_node
  289. _unstable_deploy:
  290. machine: robot1
  291. path: /home/robot/dora-nodes/processing_node
  292. inputs:
  293. image: camera_node/image
  294. outputs: [result]
  295. ```
  296. ---
  297. ## Start the Coordinator and Dataflow 🏁
  298. Run the coordinator on a designated machine and start the dataflow:
  299. ```bash
  300. dora coordinator
  301. dora start dataflow.yml
  302. ```
  303. ---
  304. ## YAML Example for Distributed Dataflow 📘
  305. ```yaml
  306. communication:
  307. zenoh: {}
  308. nodes:
  309. - id: camera_node
  310. custom:
  311. run: ./camera_driver.py
  312. outputs:
  313. - image
  314. - id: processing_node
  315. _unstable_deploy:
  316. machine: robot1
  317. path: /home/robot/dora-nodes/processing_node
  318. inputs:
  319. image: camera_node/image
  320. outputs:
  321. - result
  322. ```
  323. ## Contributing
  324. We are passionate about supporting contributors of all levels of experience and would love to see
  325. you get involved in the project. See the
  326. [contributing guide](https://github.com/dora-rs/dora/blob/main/CONTRIBUTING.md) to get started.
  327. ## Discussions
  328. Our main communication channels are:
  329. - [Our Discord server](https://discord.gg/6eMGGutkfE)
  330. - [Our Github Project Discussion](https://github.com/orgs/dora-rs/discussions)
  331. Feel free to reach out on any topic, issues or ideas.
  332. We also have [a contributing guide](CONTRIBUTING.md).
  333. ## License
  334. This project is licensed under Apache-2.0. Check out [NOTICE.md](NOTICE.md) for more information.
  335. ---
  336. ## Further Resources 📚
  337. - [Zenoh Documentation](https://zenoh.io/docs/)
  338. - [DORA Zenoh Discussion (GitHub Issue #512)](https://github.com/dora-rs/dora/issues/512)
  339. - [Dora Autoware Localization Demo](https://github.com/dora-rs/dora-autoware-localization-demo)
  340. ```
  341. ```