dora-rs / dora

DORA (Dataflow-Oriented Robotic Architecture) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed dataflow capabilities. Applications are modeled as directed graphs, also referred to as pipelines.
https://dora-rs.ai
Apache License 2.0
1.47k stars 76 forks source link

dora_next_event()'s delay is too long #609

Open lassloss opened 1 month ago

lassloss commented 1 month ago

Here are some examples of successes and failures during my testing:

  1. C++version, transfer 1.3 MB images, use current compiled target/debug/dora to run the project, and the delay in obtaining images is about 100ms when dora_next_event() is used. If using the directly downloaded compiled dora(v0.3.5) to run XXX.yml, the delay is 4ms (only for versions before July 19th).
  2. In versions after July 19th, when running the official example using downloaded compiled dora, the second node cannot receive the data from the previous node due to deserialization issues. This may be caused by the mismatch between the cargo install dora cli compiled dora and the latest C++library functions. Simultaneously using current compiled target/debug/dora to run the program successfully, but the latency is still around 100ms.
haixuanTao commented 1 month ago

So, you have to use the release version if you want to have the best latency.

Make sure to use --release when compiling dora.

If you're using the latest main branch to compile C++, you should also use dora main branch to start your dataflow.

Otherwise, use https://github.com/dora-rs/dora/tree/v0.3.5 which is tagged to 0.3.5

lassloss commented 1 month ago

If you're using the latest main branch to compile C++, you should also use dora main branch to start your dataflow.

When I use the latest main branch to compile C++, the latency is 100ms. How can I reduce the latency? Should I use --release? I'm not familar with cargo and haven't found where the dora is compiled. Thanks!

Hennzau commented 1 month ago

Hi! What you should do is: