Skip to content

Conversation

NageshMandal
Copy link
Contributor

This PR adds a brand‑new Python implementation of the Rerun node—packaged as dora-rerun-py—to the Dora ecosystem. With this change you can now write Dora dataflow nodes in pure Python and visualize data in Rerun

What’s included

dora-rerun-py package
A standalone Python package under node-hub/dora-rerun-py/ that subscribes to Dora events and logs them via the Rerun Python SDK.
Supports images (with proper color_model), depth→3D point clouds, 2D bounding boxes, text logs, numeric series, and joint states.
pyproject.toml with correct project metadata, dependencies (numpy, opencv-python, pyarrow, rerun-sdk, dora), and console script registration.

example.video.mp4

Upcoming Updates

🌐 3D Point Cloud and Trajectory Viewer: Enables visualization of robot sensor positions and movement paths in 3D space, helping users see robot sensor data clearly.
🤖 Robot Arm Pose Viewer: Allows viewing of robot joint positions in 3D using line strips, which is useful for understanding robot arm movements.
🛰️ Sensor Visualization Extensions:
IMU (Inertial Measurement Unit): This tool visualizes real-time gyroscope and accelerometer data as line charts, showing orientation and movement. It can also represent orientation with arrows or a cube in a 3D view.
GPS: Displays the robot's GPS coordinates as dynamic points or lines in 3D, showing paths and updating positions over time as the robot moves.
Ultrasonic Sensor: Shows distances as expanding circles or vertical bars originating from the sensor, helping detect obstacles and map short-ranges.
Infrared (IR) Sensor: Displays simple visual indicators for detecting proximity or following lines, seen as signal bars or colored dots.
Time-of-Flight (ToF) Sensor: Provides precise depth information using a colored depth map or grid, showing nearby distances accurately.
Radar: Visualizes fast-moving objects or reflections as vector cones or points on a map, helping simulate how robots perceive their environment.

@NageshMandal NageshMandal changed the title dora-rerun-py: Python Rerun Node for Dora dora-rerun-py : Python Rerun Node for Dora Apr 15, 2025
@NageshMandal
Copy link
Contributor Author

@haixuanTao please review. i have lots of new updates for rerun to Visualization and Debugging

@NageshMandal
Copy link
Contributor Author

@phil-opp please review

@Hennzau
Copy link
Collaborator

Hennzau commented Apr 24, 2025

Hi! The node implementation seems correct, but I have one doubt: having two same nodes but one in Rust and one in Python may be hard to debug at some point. Do you have any suggestion? Why prefer python over Rust?

@NageshMandal
Copy link
Contributor Author

In Rerun there are lots of examples in python. we can use it for enhancing debugging with rerun.
Python’s REPL and notebooks let you hook up live LiDAR or camera feeds, tweak your preprocessing filters, and immediately see plots or images inline. This is invaluable when you’re still experimenting with data formats or calibrations.
Libraries like NumPy, OpenCV, PyTorch, even ROS-Python bindings, are mature, well-documented, and full of examples. You can stand up a working demo in hours rather than days.
The Rerun Python SDK (pip install rerun_sdk) gives you one-line calls to rr.log() for images, point clouds, debug texts, etc. That means your tutorial or example script stays under 50 lines.
You can package your demo as a simple Python script—no need to worry about Rust’s cargo setup or linking against Zenoh.

Copy link
Collaborator

@Hennzau Hennzau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems fine for me! just one comment about the build and path procedure

- bbox

- id: plot
path: ./node-hub/dora-rerun-py/dora_rerun_py/main.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better to make it work with pip and symlink scripts like:

build: pip install opencv-video-capture
path: opencv-video-capture

- bbox

- id: plot
path: ./node-hub/dora-rerun-py/dora_rerun_py/main.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you have to use a __main__.py file?

@Hennzau
Copy link
Collaborator

Hennzau commented Apr 24, 2025

In Rerun there are lots of examples in python. we can use it for enhancing debugging with rerun. Python’s REPL and notebooks let you hook up live LiDAR or camera feeds, tweak your preprocessing filters, and immediately see plots or images inline. This is invaluable when you’re still experimenting with data formats or calibrations. Libraries like NumPy, OpenCV, PyTorch, even ROS-Python bindings, are mature, well-documented, and full of examples. You can stand up a working demo in hours rather than days. The Rerun Python SDK (pip install rerun_sdk) gives you one-line calls to rr.log() for images, point clouds, debug texts, etc. That means your tutorial or example script stays under 50 lines. You can package your demo as a simple Python script—no need to worry about Rust’s cargo setup or linking against Zenoh.

Thx for the explanation! It seems acceptable for me!
Try to make the CI work, I don't know what happened, you might need to run it again

@haixuanTao
Copy link
Collaborator

As mentioned on discord, I think it's going to be difficult for us to maintain both dora-rerun and dora-rerun-py. I also fear that it might be confusing for some. I thnk that we can link to your repo on the README what do you think?

@NageshMandal
Copy link
Contributor Author

You’re right maintaining two parallel codebases is going to get unwieldy, and could definitely confuse users. Linking out to the Python port from our main README sounds like a solid compromise. I’d suggest adding a “Related Projects” (or “Python Implementation”) section near the top of the README that says something like:

For a native-Python version of Dora Rerun, check out the dora-rerun-py project

That way anyone looking for Python support will find it immediately, and we keep our core docs focused. Let me know if you’d like me to draft that section or submit a PR!

@haixuanTao
Copy link
Collaborator

That sounds great!

@phil-opp phil-opp added the waiting-for-author The pull request requires adjustments by the PR author. label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-author The pull request requires adjustments by the PR author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants