-
Notifications
You must be signed in to change notification settings - Fork 394
[bug]ros_to_dimos is too slow for real-time ROS image/camera/TF streams #1753
Description
Description
We found that the generic ros_to_dimos(...) path is a major bottleneck for real-time ROS 2 sensor streams in dimos, especially for:
sensor_msgs/Imagesensor_msgs/CameraInfotf2_msgs/TFMessage
In our Go2 EDU + ZED setup, using the generic conversion path caused:
- noticeable RGB visualization lag in Rerun
- unreliable startup behavior for camera pinhole initialization
- less robust TF behavior than direct raw ROS handling for
/tfand/tf_static
After replacing the generic path with specialized manual conversions:
Image: raw ROS + directbgr8 -> numpy -> Image.from_numpy(...)CameraInfo: raw ROS + direct field copyTF: raw ROS + direct per-transform conversion
the system became much more responsive and the RGB camera correctly stayed attached to the robot in Rerun.
It would be great if dimos added dedicated fast paths for these common high-rate message types instead of routing them through the generic conversion path.
Steps to Reproduce
-
Set up a ROS 2 pipeline that publishes:
sensor_msgs/Imageon a ZED RGB topic such as/zed/zed_node/rgb/color/rect/imagesensor_msgs/CameraInfoon/zed/zed_node/rgb/color/rect/camera_infotf2_msgs/TFMessageon/tfand/tf_static
-
Bridge these topics into
dimosusing the generic ROS conversion/subscription path, includingros_to_dimos(...)for image and camera messages. -
Visualize the resulting streams in
rerun_bridge, especially:- the RGB camera view
- the camera frustum / image plane in 3D
- the camera attachment relative to the robot TF tree
-
Compare that behavior against a version that uses direct raw ROS handling:
Image: directbgr8 -> numpy -> Image.from_numpy(...)CameraInfo: direct field copyTF: direct raw ROS subscription and per-transform conversion
-
Observe that the generic path shows noticeably higher latency and less robust startup behavior, while the direct conversion path is more responsive and attaches the camera correctly in Rerun.
Logs / Error Output
Commit Hash
3de12f8
Operating system
Ubuntu24.04
Robot Model
Other (specify below)
Firmware Version
No response
Additional Context
robot is Unitree go2 Edu