Skip to content

add display example image from zenoh#103

Draft
jpizarrom wants to merge 3 commits intoEclipse-SDV-Hackathon-Chapter-Three:mainfrom
jpizarrom:show-image-example-ego-vehicle
Draft

add display example image from zenoh#103
jpizarrom wants to merge 3 commits intoEclipse-SDV-Hackathon-Chapter-Three:mainfrom
jpizarrom:show-image-example-ego-vehicle

Conversation

@jpizarrom
Copy link

This PR add display image example from zenoh for the uprotocol-sensors

@jpizarrom
Copy link
Author

jpizarrom commented Oct 4, 2025

Hi @PLeVasseur

with this i show the images at 12/14 FPS on my laptop.
It looks like serde_json deserialize takes some time. if I don't do any operation/deserialize, only receiving the events, and just show a black image, got 35/40 FPS.

I did tried a bit to do the same on https://github.com/Eclipse-SDV-Hackathon-Chapter-Three/ego-vehicle-sensor-mock but just got 2/4 FPS

with python zenoh i was able to get 3/4 FPS, will try to do another PR with about this

@jpizarrom
Copy link
Author

jpizarrom commented Oct 4, 2025

@PLeVasseur if i send pub array: Vec<u8>, // Flat RGB array: shape (height, width*4) from sensors, instead of pub array: ArrayView2<'a, Color>, i got 30/35 FPS display on Rust zenoh image display

i just started with Rust/Carla/SDV stack in the hackathon -> so not sure if i am optimizing in the right place

carla-zenoh-uprotocol-flat-vec.mp4

@jpizarrom
Copy link
Author

jpizarrom commented Oct 5, 2025

@PLeVasseur i just updated this PR sample to serialize images as Vec<u8>, and this made Rust sample go from 10FPS to 35FPS, and also made Python client fluid. The json parsing was a bottleneck, for both Rust and Python, but affected much more my Python experiment.

the video shows CARLA Image over uProtocol over Zenoh for Rust and Python clients, both are fluid and probably with this changes, a ML model can use images over uProtocol over Zenoh to drive as POC. maybe Protobuf is better than just a vector, but nested dictionaries, can be a bottleneck.

the changes i did, are not zero-memory copy, i was more focused on the serialization.
I hope my conclusions are correct, as i just started with Rust, SDV stack, etc for the hackathon last week.

carla-zenoh-uprotocol-flat-vec-rust-and-python.mp4

@jpizarrom jpizarrom marked this pull request as draft October 5, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant