Synthetic data records from multi-camera are not sync

Hi,

I’m using the ‘generator_stereo.py’ to generate synthetic data from 2 cameras. Both cameras are pointing towards one moving object and the goal is to record data from both cameras at the same time. However, after recording I notice that there is a shift between 2 datasets because, by looking at the code, I guess one is saved after the other. Are there any way to record data from 2 view-ports at exactly same time?

I managed to do it by having IsaacSim’s ROS Camera Objects instead of REB Camera Objects. I also used ROS’ TimeSynchronizer to make sure the topics are synchronized.

1 Like

@ucabds6 Good idea! Thank you for sharing. I notice that the /bbox_3d topic is published with timestamp always 0 like:

stamp: 
  secs: 0
  nsecs: 0

which makes it difficult to sychronize the 3D bounding box with the image topic. Currently I’m using wait_for_message() method inside the TimeSynchronizer callback to save the pose (or bbox_3d), but I haven’t checked if the pose matches the image. Do you maybe have a better idea?

Not sure if this is helpful but I see that the header->seq field of images and bbox output is the same thus you can match the header from an image with the same seq field.