Please provide the following info (tick the boxes after creating this topic): Software Version
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other
Target Operating System
Linux
QNX
other
Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other
SDK Manager Version
1.9.3.10904
other
Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other
How to use drivework to synchronize time with multiple cameras?
Dear @deng.shigang ,
Did you use recorder tool? Do you expect the timestamp to be exactly same for all cameras?When use recorder tool, I would expect some delay in the first frame capture of cameras. After that, it should capture frames at ~30fps. Please check adding time sensor in rig file to sync to PTP timestamp
@SivaRamaKrishnaNV We have two cameras and we want them to simultaneously capture images for stereo matching algorithms. I don’t know how to add a time sensor to the rig file.
@SivaRamaKrishnaNV We have added the time sensor to the rig file, please help us check whether the addition is correct? rig.txt (2.9 KB)
How to confirm if PTP timestamp is noticed if TSC?
@deng.shigang rig looks good to me. TSC timestamp gets reset after booting. So you can verify the time using the timestamp from https://www.epochconverter.com/ . Please use the timeStamp/1000000 value to covert to human readable date.
Could you share the recorder log output as well?
@SivaRamaKrishnaNV We didn’t use a recording tool. We wanted to write our own code to synchronize the timestamps of the two cameras. Now that we’ve configured the rig file and we’ve written the code to use drivework to get data from both cameras, how do we get the timestamps of both cameras to sync?
@deng.shigang could you share the noticed timestamps of each camera. Can you give a try with recorder tool and share the observation.
From Camera Interfaces | NVIDIA Docs, I see SoC generates a TSC_EDGE_OUT signal on a GPIO pin that is connected to all deserializers. This common PWM signal is then forwarded to all 16 GMSL cameras to achieve frame synchronization
@SivaRamaKrishnaNV We’ll try to look at the time stamps on both cameras tomorrow. Can you tell me where that recording tool is? According to the above description, multiple cameras have automatically synchronized the timestamp, so do you still use dwSensorCamera_readFrame to read the data from each camera? Or is there another interface that can get data from multiple cameras at once?
@SivaRamaKrishnaNV We modified the sample_camera example code to output each camera timestamp on the command line. From the results, the time stamps of the two cameras are very different, basically 0 or 1.
I want to ask about the difference between using the dwSensorCamera_readFrame and dwSensorManager_acquireNextEvent functions. I saw in some multi-sensor calibration examples that dwSensorManager_acquireNextEvent was used. Is this function used to synchronize multiple sensor timestamps?
sample_camera log:
camera0timestamp:3893211616 camera1timestamp:3893211616 deviation:0
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
camera0timestamp:3893244950 camera1timestamp:3893244949 deviation:1
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
camera0timestamp:3893278283 camera1timestamp:3893278282 deviation:1
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
camera0timestamp:3893311616 camera1timestamp:3893311616 deviation:0
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
camera0timestamp:3893344950 camera1timestamp:3893344949 deviation:1
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
[15-12-2023 06:55:29] GenericImage: generic image cuda
camera0timestamp:3893378283 camera1timestamp:3893378282 deviation:1
@deng.shigang Note that when camera is running at 30FPS, we are sampling frame in every 33.33 msec. The timestamp difference between two cameras seems to be 1us. Few micro seconds gap can be ignored.
@SivaRamaKrishnaNV We tried to use dwSensorManager_acquireNextEvent to retrieve the data from both cameras, but we found that the while loop only executed once, can you help us see what is going on?
rig:rig.txt (2.9 KB)
code:main.txt (6.4 KB)
log: