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 15 kB

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
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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. An extremely fast and simple **dataflow oriented robotic** framework to manage your projects and run complex **apps**, written in Rust.
  34. <p align="center">
  35. <picture align="center">
  36. <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/bar_chart_dark.svg">
  37. <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/bar_chart_light.svg">
  38. <img src="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/bar_chart_light.svg">
  39. </picture>
  40. </p>
  41. <p align="center">
  42. <a href="https://github.com/dora-rs/dora-benchmark/" >
  43. <i>Latency benchmark with Python API for both framework, sending 40M of random bytes.</i>
  44. </a>
  45. </p>
  46. ## Latest News 🎉
  47. <details open>
  48. <summary><b>2025</b></summary>
  49. - \[2025/03\] Add support for Meta SAM2, Kokoro(TTS), Improved Qwen2.5 Performance using `llama.cpp`.
  50. - \[2025/02\] Add support for Qwen2.5(LLM), Qwen2.5-VL(VLM), outetts(TTS)
  51. </details>
  52. ## Highlights
  53. - 🚀 A single CLI to launch your Python and Rust robotic projects.
  54. - ⚡️ [10-17x faster](https://github.com/dora-rs/dora-benchmark) than `ros2`.
  55. - 🐍 Easy and Fast prototyping with a clean [Python API](https://dora-rs.ai/docs/guides/getting-started/conversation_py/).
  56. - 🖥️ Supports macOS, Linux, and Windows.
  57. - ⏬ Installable without Rust via `curl` or `powershell`.
  58. - ❇️ Includes a large set of pre-packaged nodes for fast prototyping.
  59. - 🛠️ Build and Run applications **without compilation step** beyond the native compiler of your favourite language.
  60. - 🤖 Simplifies building robotic applications by integrating hardware, algorithms, and AI models to facilitate seamless communication.
  61. - ⚙️ Eases integration of hardware and software by supporting Python, C, C++, and ROS2, while ensuring low-latency communication with zero-copy Arrow messages.
  62. ## Installation
  63. Install dora with our standalone installers, or from [crates.io](https://crates.io/crates/dora-cli):
  64. ### With pip
  65. ```bash
  66. pip install dora-rs-cli
  67. ```
  68. ### With cargo
  69. ```bash
  70. cargo install dora-cli
  71. ```
  72. ### With Github release for macOS and Linux
  73. ```bash
  74. curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/dora-rs/dora/main/install.sh | bash
  75. ```
  76. ### With Github release for Windows
  77. ```powershell
  78. powershell -c "irm https://raw.githubusercontent.com/dora-rs/dora/main/install.ps1 | iex"
  79. ```
  80. ## Documentation
  81. The full documentation is available on [our website](https://dora-rs.ai/).
  82. A lot of guides are available on [this section](https://dora-rs.ai/docs/guides/) of our website.
  83. ## Getting Started
  84. 1. Run some Python examples (A venv must be activated):
  85. ```bash
  86. cd examples/python-dataflow
  87. uv venv --seed
  88. uv pip install -e ../../apis/python/node --reinstall
  89. dora build dataflow.yml --uv
  90. dora run dataflow.yml --uv
  91. ```
  92. > Make sure to have a webcam
  93. To stop your dataflow, you can use <kbd>ctrl</kbd>+<kbd>c</kbd>
  94. ## What is Dora? And what features does Dora offer?
  95. **D**ataflow-**O**riented **R**obotic **A**rchitecture (`dora-rs`) is a framework that makes creation of robotic applications fast and simple.
  96. `dora-rs` implements a declarative dataflow paradigm where tasks are split between nodes isolated as individual processes.
  97. Each node defines its inputs and outputs to connect with other nodes.
  98. ```yaml
  99. nodes:
  100. - id: camera
  101. path: opencv-video-capture
  102. inputs:
  103. tick: dora/timer/millis/20
  104. outputs:
  105. - image
  106. -
  107. - id: plot
  108. path: opencv-plot
  109. inputs:
  110. image: camera/image
  111. ```
  112. The dataflow paradigm has the advantage of creating an abstraction layer that makes robotic applications modular and easily configurable.
  113. <p align="center">
  114. <picture align="center">
  115. <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/dora_diag_dark.svg">
  116. <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/dora_diag_light.svg">
  117. <img src="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/dora_diag_light.svg">
  118. </picture>
  119. </p>
  120. ---
  121. It offers several features, such as:
  122. ### TCP Communication and Shared Memory
  123. 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.
  124. ### Arrow Message Format
  125. Nodes communicate with Apache Arrow Data Format.
  126. [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.
  127. ### Opentelemetry
  128. 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.
  129. [Opentelemetry](https://opentelemetry.io/) is an open source observability standard that makes dora-rs telemetry collectable by most backends such as elasticsearch, prometheus, Datadog...
  130. Opentelemetry is language independent, backend agnostic, and easily collect distributed data, making it perfect for dora-rs applications.
  131. ### Hot-Reloading
  132. dora-rs implements Hot-Reloading for python which means you can change code at runtime in Python while keeping your state intact.
  133. Using the feature flag: `--attach --hot-reload`, dora-rs watch for code change and reload nodes that has been modified.
  134. You can check fail-safe mechanism at: https://github.com/dora-rs/dora/pull/239.
  135. See [this demo](http://www.youtube.com/watch?v=NvvTEP8Jak8).
  136. ### ROS2 Bridge
  137. **Note**: this feature is marked as unstable.
  138. - Compilation Free Message passing to ROS 2
  139. - Automatic conversion ROS 2 Message <-> Arrow Array
  140. ```python
  141. import pyarrow as pa
  142. # Configuration Boilerplate...
  143. turtle_twist_writer = ...
  144. ## Arrow Based ROS2 Twist Message
  145. ## which does not require ROS2 import
  146. message = pa.array([{
  147. "linear": {
  148. "x": 1,
  149. },
  150. "angular": {
  151. "z": 1
  152. },
  153. }])
  154. turtle_twist_writer.publish(message)
  155. ```
  156. > You might want to use ChatGPT to write the Arrow Formatting: https://chat.openai.com/share/4eec1c6d-dbd2-46dc-b6cd-310d2895ba15
  157. ## Showcases
  158. ### Self-Coding Robot: Code RAG (WIP)
  159. You can easily create a self-coding robot, by combining Hot-reloading with a Retrieval Augmented Generation (RAG) that is going to generate code modification from your prompt.
  160. See:[examples/python-operator-dataflow](examples/python-operator-dataflow)
  161. <p align="center">
  162. <picture align="center">
  163. <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/self_coding_dark.svg">
  164. <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/self_coding_light.svg">
  165. <img src="https://raw.githubusercontent.com/dora-rs/dora/main/docs/src/self_coding_light.svg">
  166. </picture>
  167. </p>
  168. Self-Coding Robot is just the tip of the iceberg of robotics combined with llm, that we hope to power. There is so much more that we haven't explored yet like:
  169. - [self-debugging](https://arxiv.org/pdf/2304.05128.pdf)
  170. - [memory](https://github.com/cpacker/MemGPT)
  171. - [function calling](https://github.com/ShishirPatil/gorilla)
  172. ### Cool Hardwares
  173. Cool hardware that we think might be good fit to try out dora-rs 🙋 We are not sponsored by manufacturers:
  174. | | Price | Open Source | Github | type | Dora Project |
  175. | --------------------------------- | ----- | ------------------ | ---------------------------------------------------- | ---------- | ------------------------------------------------------- |
  176. | DJI Robomaster S1 | 550$ | SDK | https://github.com/dji-sdk/RoboMaster-SDK | Rover | https://huggingface.co/datasets/dora-rs/dora-robomaster |
  177. | DJI Robomaster EP Core | 950$ | SDK | https://github.com/dji-sdk/RoboMaster-SDK | Rover, Arm | |
  178. | DJI Tello | 100$ | | | Drone | |
  179. | BitCraze Crazyflies | 225$ | Firmware, Lib, SDK | https://github.com/bitcraze | Drone | |
  180. | AlexanderKoch-Koch/low_cost_robot | 250$ | Everything | https://github.com/AlexanderKoch-Koch/low_cost_robot | Arm | |
  181. | xArm 1S | 200$ | | | Arm | |
  182. | Wavego | 250$ | | | Quadruplet | |
  183. | AINex | 800$ | | | Humanoid | |
  184. > For more: https://docs.google.com/spreadsheets/d/1YYeW2jfOIWDVgdEgqnMvltonHquQ7K8OZCrnJRELL6o/edit#gid=0
  185. ## Support Matrix
  186. | | dora-rs | Hoped for |
  187. | --------------------------------- | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
  188. | **Tier 1 Support** | Python, Rust | C, C++, ROS 2 |
  189. | **Tier 2 Support** | C, C++, ROS2 |
  190. | **Hot-reloading** | Python | Rust (https://github.com/orgs/dora-rs/discussions/360) |
  191. | **Message Format** | Arrow | Native |
  192. | **Local Communication** | Shared Memory | Custom Middleware, [zero-copy GPU IPC](https://arrow.apache.org/docs/python/api/cuda.html), intra-process `tokio::channel` communication |
  193. | **Remote Communication** | TCP | Custom Middleware, [Zenoh](https://zenoh.io/) |
  194. | **Metrics, Tracing, and Logging** | Opentelemetry | Native logging libraries into Opentelemetry |
  195. | **Data archives** | Parquet ([dora-record](https://github.com/dora-rs/dora/tree/main/node-hub/dora-record)) |
  196. | **Visualization and annotation** | OpenCV | [rerun.io](rerun.io) |
  197. | **Supported Platforms (x86)** | Windows, macOS, Linux |
  198. | **Supported Platforms (ARM)** | macOS, Linux |
  199. | **Configuration** | YAML |
  200. ## Contributing
  201. We are passionate about supporting contributors of all levels of experience and would love to see
  202. you get involved in the project. See the
  203. [contributing guide](https://github.com/dora-rs/dora/blob/main/CONTRIBUTING.md) to get started.
  204. ## Discussions
  205. Our main communication channels are:
  206. - [Our Discord server](https://discord.gg/6eMGGutkfE)
  207. - [Our Github Project Discussion](https://github.com/orgs/dora-rs/discussions)
  208. Feel free to reach out on any topic, issues or ideas.
  209. We also have [a contributing guide](CONTRIBUTING.md).
  210. ## License
  211. This project is licensed under Apache-2.0. Check out [NOTICE.md](NOTICE.md) for more information.