dora-rs / dora

DORA (Dataflow-Oriented Robotic Application) 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.35k stars 67 forks source link

Transform custom PyEvent into standard python dictionary for easier d… #557

Closed haixuanTao closed 2 weeks ago

haixuanTao commented 2 weeks ago

…ebuggability.

Currently having a custom PyEvent make debugging very hard as fields are hidden within the class PyEvent that is defined within Rust Code.

Python user are getting really confused about this obscure class.

This PR transforms the class into a standard python dictionary.

It also makes external event and dora event expose the same user API meaning to access the data people just use:

data = event["value"] instead of data = event.inner()

haixuanTao commented 2 weeks ago

Ezisting code will continue to work!

Except for ros2-bridge where you will have to change data.inner() -> data["value"] but I think that it is still okay as a breaking change

phil-opp commented 2 weeks ago

Ezisting code will continue to work!

Except for ros2-bridge where you will have to change data.inner() -> data["value"] but I think that it is still okay as a breaking change

Ok great! The ROS2 bridge change is fine I think given that we still consider it experimental.

haixuanTao commented 2 weeks ago

Ezisting code will continue to work! Except for ros2-bridge where you will have to change data.inner() -> data["value"] but I think that it is still okay as a breaking change

Ok great! The ROS2 bridge change is fine I think given that we still consider it experimental.

Yup. It makes the current implementation of the ros2-bridge closer to the rest of dora API