stereolabs / zed-ros-examples

Examples for the ZED SDK ROS wrapper
https://www.stereolabs.com/docs/ros/
MIT License
84 stars 51 forks source link

ZEDX multicamera frames are not synced #51

Closed QamarBader closed 9 months ago

QamarBader commented 10 months ago

Preliminary Checks

Description

I am trying to launch two ZEDX cameras in ROS1 noetic connected to ZED BOX NVIDIA Jetson Orin through GMSL cables. When I record a bag using the following command:

rosbag record -b 0 -e /zed_multi/zedx_right/zed_nodelet_right/right_raw/image_raw_color/compressed /zed_multi/zedx_right/zed_nodelet_right/left_raw/image_raw_color/compressed /zed_multi/zedx_left/zed_nodelet_left/right_raw/image_raw_color/compressed /zed_multi/zedx_left/zed_nodelet_left/left_raw/image_raw_color/compressed

The frames are sometimes synced and sometimes go out of sync for unknown reason. There would be times where the recorded bag fully has synchronized messages, but when another bag is recorded after killing the node and starting it again, I lose synchronization.

Is there a reason for this randomness?

Important parameters: pub_frame_rate: 30 grab_frame_rate: 60 resolution: SVGA

Steps to Reproduce

  1. roslaunch zed_multicamera_example zed_multicam_single_nodelet.launch
  2. rosbag record -b 0 -e /zed_multi/zedx_right/zed_nodelet_right/right_raw/image_raw_color/compressed /zed_multi/zedx_right/zed_nodelet_right/left_raw/image_raw_color/compressed /zed_multi/zedx_left/zed_nodelet_left/right_raw/image_raw_color/compressed /zed_multi/zedx_left/zed_nodelet_left/left_raw/image_raw_color/compressed
  3. I rewrite the bag with header timestamps according to the documentation here. ...

Expected Result

Screenshot from 2023-08-18 11-19-13

Actual Result

Screenshot from 2023-08-18 11-27-01

ZED Camera model

ZED

Environment

OS: Ubuntu 20.04.6 LTS
Camera Model: ZEDX
ZED SDK Version: 4.0.5
NVIDIA Jetson Driver: ZED SDK for JetPack 5.1.1 (L4T 35.3)
CUDA Version: 11.4
Environment: ROS Noetic
Power Mode: MAXN
Fan Profile: Cool

Anything else?

With the exact same configuration (sometimes) I get the following error: Elaboration takes longer (0.0217196 sec) than requested by the FPS rate (0.016666667 sec). Please consider to lower the 'frame_rate' setting or to reduce the power requirements reducing the resolutions.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days