Hi VickNV,
Thanks for pointing me that sample it is very informative. Sadly I found it also malfunction on my setup. And I also spot that I got the same image for both camera sensor.
Here is profiling log from sample using demo movie:
Timing results:
Thread main:
-onProcess CPU: 20757us, std=1772 | GPU: 20636us, std=1765 | samples=2524
-onRender CPU: 1029us, std= 402 | GPU: 1043us, std= 405 | samples=2524
[06-02-2020 13:52:06] Sensor statistics for: camera.virtual, video=.././data/samples/recordings/stereo0/video-left.h264,timestamp=.././data/samples/recordings/stereo0/video-time-left.txt,smoothing=true
[06-02-2020 13:52:06] Events: 0
Errors: 0
Drops: 0
minDelta: 33000.0000000
maxDelta: 67000.0000000
meanDelta: 33386.132813
Standard deviation: 1419.314941
[06-02-2020 13:52:06] Sensor statistics for: camera.virtual, video=.././data/samples/recordings/stereo0/video-right.h264,timestamp=.././data/samples/recordings/stereo0/video-time-right.txt,smoothing=true
[06-02-2020 13:52:06] Events: 0
Errors: 0
Drops: 0
minDelta: 33000.0000000
maxDelta: 67000.0000000
meanDelta: 33386.132813
Standard deviation: 1419.314941
Looks fine. But here is log from sample using my current setup:
[06-02-2020 13:53:54] Platform: Detected DDPX - Tegra A
[06-02-2020 13:53:54] TimeSource: monotonic epoch time offset is 1580986584740608
[06-02-2020 13:53:54] PTP Time is available from NVPPS Driver
[06-02-2020 13:53:54] Platform: number of GPU devices detected 1
[06-02-2020 13:53:54] Platform: currently selected GPU device integrated ID 0
[06-02-2020 13:53:55] SDK: Resources mounted from .././data/
[06-02-2020 13:53:55] SDK: Create NvMediaDevice
[06-02-2020 13:53:55] SDK: use EGL display as provided
[06-02-2020 13:53:55] TimeSource: monotonic epoch time offset is 1580986584740608
[06-02-2020 13:53:55] PTP Time is available from NVPPS Driver
[06-02-2020 13:53:55] Initialize DriveWorks SDK v2.2.3136
[06-02-2020 13:53:55] Release build with GNU 7.3.1 from heads/buildbrain-branch-0-gca7b4b26e65 against Drive PDK v5.1.6.1
[06-02-2020 13:53:55] Loading rig file: /home/nvidia/redmine_repo/niro-workspace/data/front_cam_can_imu.json
[06-02-2020 13:53:55] SensorFactory::createSensor() -> camera.gmsl, camera-type=ar0231-rccb-bae-sf3324,camera-group=a,slave=0,camera-mask=1000,camera-count=4
[06-02-2020 13:53:55] CameraGMSL: Couldnt set CameraGMSL setup thread sched params!
[06-02-2020 13:53:55] CameraGMSL: Create NvMediaIPPManager
[06-02-2020 13:53:55] CameraGMSL: required FPS = 30, resolution = 1920x1208
nvmedia isc: GetCameraPowerControlLevel: 936: Camera power control library: NVCCP
Max96712 Rev 2 detected!
MAX96712: Enable periodic AEQ on Link 0
MAX96705: Pre-emphasis set to 0xaa
Sensor AR0231 RCCB Rev7 detected!
[06-02-2020 13:53:56] CameraGMSL: default IPP event callback function set
[06-02-2020 13:53:56] 1
[06-02-2020 13:53:56] SensorManager: started
[06-02-2020 13:53:56] Initialize DriveWorks VisualizationSDK v2.2.3136
[06-02-2020 13:53:56] Initialize DriveWorksGL SDK v2.2.3136
[06-02-2020 13:53:56] StreamConsumerGL: successfully initialized
[06-02-2020 13:53:56] StreamProducerCUDA: successfully initialized
[06-02-2020 13:53:56] StreamConsumerGL: successfully initialized
[06-02-2020 13:53:56] StreamProducerCUDA: successfully initialized
terminate called after throwing an instance of 'std::runtime_error'
what(): Left and right timestamps must have the same value. Cameras are not synchronized.
Something is really broken on my setup. Please look that we can see that only one sensor is initialized. Which is very strange because in rig file we have two sensors also sample confirm that we get two sensors. I modify sample_calibration_stereo just to not throw exception to see what we get. Here is log:
Timing results:
Thread main:
-onProcess CPU: 64405us, std=3997 | GPU: 64280us, std=3999 | samples=263
-onRender CPU: 1082us, std=1637 | GPU: 1086us, std=1640 | samples=263
[06-02-2020 14:00:56] Sensor statistics for: camera.gmsl, camera-type=ar0231-rccb-bae-sf3324,camera-group=a,slave=0,camera-mask=1000,camera-count=4
[06-02-2020 14:00:56] Events: 529
Errors: 0
Drops: 0
minDelta: 33284.0000000
maxDelta: 33377.0000000
meanDelta: 33333.253906
Standard deviation: 18.385599
Timing result for onProcess function is about 64 ms which is why I got 15 fps. And also why I got statistic only for first sensor and not for second?
Here are printed timestamps from images:
Timestamps: Left: 1580997655996116 Right: 1580997655962757 delta: 33.359
Timestamps: Left: 1580997656062772 Right: 1580997656029432 delta: 33.34
Timestamps: Left: 1580997656129449 Right: 1580997656096087 delta: 33.362
Timestamps: Left: 1580997656196104 Right: 1580997656162794 delta: 33.31
Timestamps: Left: 1580997656262754 Right: 1580997656229445 delta: 33.309
Timestamps: Left: 1580997656329431 Right: 1580997656296121 delta: 33.31
Timestamps: Left: 1580997656396093 Right: 1580997656362775 delta: 33.318
Timestamps: Left: 1580997656462770 Right: 1580997656429454 delta: 33.316
Timestamps: Left: 1580997656529421 Right: 1580997656496107 delta: 33.314
Timestamps: Left: 1580997656596099 Right: 1580997656562787 delta: 33.312
Looks like left camera is about 30ms after right camera and also we got also about 60ms after previous left one.
And what most strange is that I got left and right camera exactly the same image?!
Below I past my rig configuration without boilerplate numbers:
{
"rig": {
"sensors": [
{
"correction_rig_T": [ ... ],
"correction_sensor_R_FLU": {
"roll-pitch-yaw": [ ... ]
},
"name": "FrontRight-A0-60",
"nominalSensor2Rig_FLU": {
"roll-pitch-yaw": [ ... ],
"t": [ ... ]
},
"parameter": "camera-type=ar0231-rccb-bae-sf3324,camera-group=a,slave=0,camera-mask=1000,camera-count=4",
"properties": {
"Model": "ftheta", [ ... ]
},
"protocol": "camera.gmsl"
},
{
"correction_rig_T": [ ... ]
],
"correction_sensor_R_FLU": {
"roll-pitch-yaw": [ ... ]
},
"name": "FrontLeft-A1-60",
"nominalSensor2Rig_FLU": {
"roll-pitch-yaw": [ ... ],
"t": [ ... ]
},
"parameter": "camera-type=ar0231-rccb-bae-sf3324,camera-group=a,slave=0,camera-mask=1100,camera-count=4",
"properties": {
"Model": "ftheta", [ ... ]
},
"protocol": "camera.gmsl"
}
],
"json-merge": "rig/vehicle.json"
},
"version": 2
}
I hope that I made some stupid mistake with parameters string with rig :)
Thanks for replay!