Libargus Multi camera CUDA consumer

Hi,

I’m attempting to merge the syncSensor and cudaBayerDemosaic samples, to publish PIXEL_FMT_RAW16 images and demosaic them. both samples work fine individually, however when I add the second camera to the cudaBayerDemosaic sample, both streams receive no frames.

Any help is appreciated

Edit: I’m using IMX274 CSI cameras on L4T 32.3.1

Any error message?

sudo su
kill the process of nvargus-daemon
export enableCamScfLogs=5
/usr/sbin/nvargus-daemon

What if run two instance argus_cudabayerdemosaic?

argus_cudabayerdemosaic -d 0 &
argus_cudabayerdemosaic -d 1 &

Hi @ShaneCCC. Thanks for the reply and apologies for the late response. Here is the output log

=== NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections...=== argus_cudabayerdemosaic[16431]: Connection established (7F9A5141D0)NvPclSetHotplugCallback: ++++++++++++++++++++++
---- Imager: Calibration blob file handling supported in this build ----
NvPclHwGetModuleList: OFParserListModules Succeeded
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module2
NvPclHwMatchPartNum: Found calibration Part#: A6V26:"A6V26"
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: imx274_center_A6V26
NvPclHwPrintModuleDefinition -- Position: 2
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_lens
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: 
NvPclHwPrintCameraSubModule -- HwCamSubModule[1].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[1].DevName: imx274 30-001a
NvPclHwMatchPartNum: Found calibration Part#: A6V26:"A6V26"
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: imx274_front_A6V26
NvPclHwPrintModuleDefinition -- Position: 1
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: imx274 31-001a
NvPclHwMatchPartNum: Found calibration Part#: A6V26:"A6V26"
NvPclHwPrintModuleDefinition -- Name: imx274_bottom_A6V26
NvPclHwPrintModuleDefinition -- Position: 0
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: imx274 32-001a
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: NvPclModule list[0]: imx274_center_A6V26 position2
NvPclModuleListInitialize: NvPclModule list[1]: imx274_front_A6V26 position1
NvPclModuleListInitialize: NvPclModule list[2]: imx274_bottom_A6V26 position0
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
getHotplugMonitor: Getting hotplug monitor instance
 initializeHotplug++
 hotPlugfunc ++ 
 addWatch: Watch added wd='1'
CheckProcDTExists: INFO: accessing /proc/device-tree/tegra-virtual-camera-platform/modules; No such file or directory
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
setHotplugCallback: Registered new callback client
 hotPlugfunc: reading from inotify FD, Thread waiting 
NvPclSetHotplugCallback: ----------------------
NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 2 match at index[0]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9468fde0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f946bdf20
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f94414650
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f946bde90
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f947c34e0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f947bccc0
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16
CheckOverridesPermissions: stat(/Calib/camera_override.isp) call failed
LoadOverridesFile: looking for override file [/data/vendor/nvcam/settings/camera_overrides.isp] 2/16
CheckOverridesPermissions: stat(/data/vendor/nvcam/settings/camera_overrides.isp) call failed
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16
CheckOverridesPermissions: stat(/opt/nvidia/nvcam/settings/camera_overrides.isp) call failed
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16
CheckOverridesPermissions: override file [/var/nvidia/nvcam/settings/camera_overrides.isp] has correct owner and mode
---- imager: Found override file [/var/nvidia/nvcam/settings/camera_overrides.isp]. ----
Imager: looking for override file [/mnt/factory/camera/factory.bin] 1/16
Imager: looking for override file [/Calib/factory.bin] 2/16
Imager: looking for override file [/Calib/calibration.bin] 3/16
Imager: looking for override file [(null)] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
Imager: looking for override file [/data/vendor/nvcam/settings/factory.bin] 1/16
Imager: looking for override file [/data/vendor/nvcam/settings/imx274_center_A6V26.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/imx274_center_A6V26.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/imx274_center_A6V26.bin] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_lens)
NvPclCreateDriver: Found a Driver name match (v4l2_lens)
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_lens ++++++++++++++++++
initialize WARNING: No focuser object, allocating for lens
OFDPropertyCopyToLong: could not read property [maxslewrate]
loadLensMetadata: maxslewrate not set in driver
NvPclInitializeDrivers: NvOdmLensStub ------------------
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 106)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f946bde90
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f947c34e0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f947bccc0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f9468fde0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f946bdf20
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f94414650
NvPclStateControllerOpen: Failed ImagerGUID 2. (error 0xA000E)
NvPclStateControllerClose: Module imx274_center_A6V26 closed
NvPclOpen: PCL Open Failed. Error: 0xf
NvPclClose: ++++++++++++++++++++++
NvPclClose: ----------------------
NvPclOpen: ----------------------
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 582)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 295)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 458)
Acquiring SCF Camera device source via index 0 has failed. NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 1 match at index[1]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f947bb450
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f94414650
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f946bdf20
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9468fde0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f947bccc0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f947c34e0
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16
CheckOverridesPermissions: stat(/Calib/camera_override.isp) call failed
LoadOverridesFile: looking for override file [/data/vendor/nvcam/settings/camera_overrides.isp] 2/16
CheckOverridesPermissions: stat(/data/vendor/nvcam/settings/camera_overrides.isp) call failed
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16
CheckOverridesPermissions: stat(/opt/nvidia/nvcam/settings/camera_overrides.isp) call failed
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16
CheckOverridesPermissions: override file [/var/nvidia/nvcam/settings/camera_overrides.isp] has correct owner and mode
---- imager: Found override file [/var/nvidia/nvcam/settings/camera_overrides.isp]. ----
Imager: looking for override file [/mnt/factory/camera/factory.bin] 1/16
Imager: looking for override file [/Calib/factory.bin] 2/16
Imager: looking for override file [/Calib/calibration.bin] 3/16
Imager: looking for override file [(null)] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
Imager: looking for override file [/data/vendor/nvcam/settings/factory.bin] 1/16
Imager: looking for override file [/data/vendor/nvcam/settings/imx274_front_A6V26.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/imx274_front_A6V26.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/imx274_front_A6V26.bin] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
OFDPropertyGetString: could not read property [use_decibel_gain]
OFDPropertyGetString: could not read property [use_sensor_mode_id]
loadBinaryBlob: Binary read 8
OFDPropertyGetString: could not read property [type]
loadSubType: Sensor type missing in DT, 206
OFDPropertyCopyToLong: could not read property [set_mode_delay_ms]
OFDPropertyCopyToLong: could not read property [mode0.vc_id]
OFDPropertyCopyToLong: could not read property [mode0.dynamic_pixel_bit_depth]
OFDPropertyCopyToLongLong: could not read property [mode0.serdes_pix_clk_hz]
OFDPropertyCopyToLongLong: could not read property [mode0.exp_time_1h]
OFDPropertyCopyToFloat: could not read property [mode0.gain_step_pitch]
OFDPropertyCopyToLong: could not read property [mode0.embedded_metadata_width]
OFDPropertyGetString: could not read property [mode0.x_start]
OFDPropertyGetString: could not read property [mode0.y_start]
OFDPropertyGetString: could not read property [mode0.x_end]
OFDPropertyGetString: could not read property [mode0.y_end]
OFDPropertyGetString: could not read property [mode0.h_scaling]
OFDPropertyGetString: could not read property [mode0.v_scaling]
OFDPropertyCopyToLong: could not read property [set_mode_delay_ms]
OFDPropertyCopyToLong: could not read property [mode1.vc_id]
OFDPropertyCopyToLongLong: could not read property [mode1.serdes_pix_clk_hz]
OFDPropertyCopyToLongLong: could not read property [mode1.exp_time_1h]
OFDPropertyCopyToFloat: could not read property [mode1.gain_step_pitch]
OFDPropertyCopyToLong: could not read property [mode1.embedded_metadata_width]
OFDPropertyGetString: could not read property [mode1.x_start]
OFDPropertyGetString: could not read property [mode1.y_start]
OFDPropertyGetString: could not read property [mode1.x_end]
OFDPropertyGetString: could not read property [mode1.y_end]
OFDPropertyGetString: could not read property [mode1.h_scaling]
OFDPropertyGetString: could not read property [mode1.v_scaling]
OFDPropertyCopyToLong: could not read property [set_mode_delay_ms]
OFDPropertyCopyToLong: could not read property [mode2.vc_id]
OFDPropertyCopyToLongLong: could not read property [mode2.serdes_pix_clk_hz]
OFDPropertyCopyToLongLong: could not read property [mode2.exp_time_1h]
OFDPropertyCopyToFloat: could not read property [mode2.gain_step_pitch]
OFDPropertyCopyToLong: could not read property [mode2.embedded_metadata_width]
OFDPropertyGetString: could not read property [mode2.x_start]
OFDPropertyGetString: could not read property [mode2.y_start]
OFDPropertyGetString: could not read property [mode2.x_end]
OFDPropertyGetString: could not read property [mode2.y_end]
OFDPropertyGetString: could not read property [mode2.h_scaling]
OFDPropertyGetString: could not read property [mode2.v_scaling]
OFDPropertyCopyToLong: could not read property [set_mode_delay_ms]
OFDPropertyCopyToLong: could not read property [mode3.vc_id]
OFDPropertyCopyToLongLong: could not read property [mode3.serdes_pix_clk_hz]
OFDPropertyCopyToLongLong: could not read property [mode3.exp_time_1h]
OFDPropertyCopyToFloat: could not read property [mode3.gain_step_pitch]
OFDPropertyCopyToLong: could not read property [mode3.embedded_metadata_width]
OFDPropertyGetString: could not read property [mode3.x_start]
OFDPropertyGetString: could not read property [mode3.y_start]
OFDPropertyGetString: could not read property [mode3.x_end]
OFDPropertyGetString: could not read property [mode3.y_end]
OFDPropertyGetString: could not read property [mode3.h_scaling]
OFDPropertyGetString: could not read property [mode3.v_scaling]
initialize: Loaded Driver: 4 Modes Available--------------
NvPclInitializeDrivers: v4l2_sensor ------------------
NvPclOpen: ----------------------
CAM: serial no file already exists, skips storing againNvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 0 match at index[2]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f94b99960
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f94b72a10
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9479eea0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f947c0620
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9478e360
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9478e3f0
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16
CheckOverridesPermissions: stat(/Calib/camera_override.isp) call failed
LoadOverridesFile: looking for override file [/data/vendor/nvcam/settings/camera_overrides.isp] 2/16
CheckOverridesPermissions: stat(/data/vendor/nvcam/settings/camera_overrides.isp) call failed
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16
CheckOverridesPermissions: stat(/opt/nvidia/nvcam/settings/camera_overrides.isp) call failed
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16
CheckOverridesPermissions: override file [/var/nvidia/nvcam/settings/camera_overrides.isp] has correct owner and mode
---- imager: Found override file [/var/nvidia/nvcam/settings/camera_overrides.isp]. ----
Imager: looking for override file [/mnt/factory/camera/factory.bin] 1/16
Imager: looking for override file [/Calib/factory.bin] 2/16
Imager: looking for override file [/Calib/calibration.bin] 3/16
Imager: looking for override file [(null)] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
Imager: looking for override file [/data/vendor/nvcam/settings/factory.bin] 1/16
Imager: looking for override file [/data/vendor/nvcam/settings/imx274_bottom_A6V26.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/imx274_bottom_A6V26.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/imx274_bottom_A6V26.bin] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
OFDPropertyGetString: could not read property [use_decibel_gain]
OFDPropertyGetString: could not read property [use_sensor_mode_id]
loadBinaryBlob: Binary read 8
OFDPropertyGetString: could not read property [type]
loadSubType: Sensor type missing in DT, 206
OFDPropertyCopyToLong: could not read property [set_mode_delay_ms]
OFDPropertyCopyToLong: could not read property [mode0.vc_id]
OFDPropertyCopyToLong: could not read property [mode0.dynamic_pixel_bit_depth]
OFDPropertyCopyToLongLong: could not read property [mode0.serdes_pix_clk_hz]
OFDPropertyCopyToLongLong: could not read property [mode0.exp_time_1h]
OFDPropertyCopyToFloat: could not read property [mode0.gain_step_pitch]
OFDPropertyCopyToLong: could not read property [mode0.embedded_metadata_width]
OFDPropertyGetString: could not read property [mode0.x_start]
OFDPropertyGetString: could not read property [mode0.y_start]
OFDPropertyGetString: could not read property [mode0.x_end]
OFDPropertyGetString: could not read property [mode0.y_end]
OFDPropertyGetString: could not read property [mode0.h_scaling]
OFDPropertyGetString: could not read property [mode0.v_scaling]
OFDPropertyCopyToLong: could not read property [set_mode_delay_ms]
OFDPropertyCopyToLong: could not read property [mode1.vc_id]
OFDPropertyCopyToLongLong: could not read property [mode1.serdes_pix_clk_hz]
OFDPropertyCopyToLongLong: could not read property [mode1.exp_time_1h]
OFDPropertyCopyToFloat: could not read property [mode1.gain_step_pitch]
OFDPropertyCopyToLong: could not read property [mode1.embedded_metadata_width]
OFDPropertyGetString: could not read property [mode1.x_start]
OFDPropertyGetString: could not read property [mode1.y_start]
OFDPropertyGetString: could not read property [mode1.x_end]
OFDPropertyGetString: could not read property [mode1.y_end]
OFDPropertyGetString: could not read property [mode1.h_scaling]
OFDPropertyGetString: could not read property [mode1.v_scaling]
OFDPropertyCopyToLong: could not read property [set_mode_delay_ms]
OFDPropertyCopyToLong: could not read property [mode2.vc_id]
OFDPropertyCopyToLongLong: could not read property [mode2.serdes_pix_clk_hz]
OFDPropertyCopyToLongLong: could not read property [mode2.exp_time_1h]
OFDPropertyCopyToFloat: could not read property [mode2.gain_step_pitch]
OFDPropertyCopyToLong: could not read property [mode2.embedded_metadata_width]
OFDPropertyGetString: could not read property [mode2.x_start]
OFDPropertyGetString: could not read property [mode2.y_start]
OFDPropertyGetString: could not read property [mode2.x_end]
OFDPropertyGetString: could not read property [mode2.y_end]
OFDPropertyGetString: could not read property [mode2.h_scaling]
OFDPropertyGetString: could not read property [mode2.v_scaling]
OFDPropertyCopyToLong: could not read property [set_mode_delay_ms]
OFDPropertyCopyToLong: could not read property [mode3.vc_id]
OFDPropertyCopyToLongLong: could not read property [mode3.serdes_pix_clk_hz]
OFDPropertyCopyToLongLong: could not read property [mode3.exp_time_1h]
OFDPropertyCopyToFloat: could not read property [mode3.gain_step_pitch]
OFDPropertyCopyToLong: could not read property [mode3.embedded_metadata_width]
OFDPropertyGetString: could not read property [mode3.x_start]
OFDPropertyGetString: could not read property [mode3.y_start]
OFDPropertyGetString: could not read property [mode3.x_end]
OFDPropertyGetString: could not read property [mode3.y_end]
OFDPropertyGetString: could not read property [mode3.h_scaling]
OFDPropertyGetString: could not read property [mode3.v_scaling]
initialize: Loaded Driver: 4 Modes Available--------------
NvPclInitializeDrivers: v4l2_sensor ------------------
NvPclOpen: ----------------------
CAM: serial no file already exists, skips storing again=== argus_cudabayerdemosaic[16431]: CameraProvider initialized (0x7f94b2fc00)NvPclPowerOn: +++++++++++
NvPclPowerOn: -----------
NvPclPowerOn: +++++++++++
NvPclPowerOn: -----------
CAM: serial no file already exists, skips storing again(Argus) Error InvalidState: Stream is not in CONNECTING state. (in src/api/EGLOutputStreamImpl.cpp, function connectProducer(), line 150)
(Argus) Error InvalidState:  (propagating from src/api/CaptureSessionImpl.cpp, function connectAllRequestStreams(), line 330)
(Argus) Error InvalidState:  (propagating from src/api/CaptureSessionImpl.cpp, function repeatInternal(), line 509)
(Argus) Error InvalidState:  (propagating from src/api/CaptureSessionImpl.cpp, function repeat(), line 482)
=== argus_cudabayerdemosaic[16431]: Connection closed (7F9A5141D0)=== argus_cudabayerdemosaic[16431]: WARNING: CameraProvider was not destroyed before client connection terminated.=== argus_cudabayerdemosaic[16431]:          The client may have abnormally terminated. Destroying CameraProvider...=== argus_cudabayerdemosaic[16431]: CameraProvider destroyed (0x7f94b2fc00)=== argus_cudabayerdemosaic[16431]: WARNING: Cleaning up 2 outstanding streams...=== argus_cudabayerdemosaic[16431]: WARNING: Cleaning up 1 outstanding stream settings...=== argus_cudabayerdemosaic[16431]: WARNING: Cleaning up 1 outstanding sessions...NvPclPowerOff: +++++++++++
NvPclPowerOff: -----------
NvPclPowerOff: +++++++++++
NvPclPowerOff: -----------
=== argus_cudabayerdemosaic[16431]: NOTE: Destroy all libargus objects before destroying the CameraProvider to avoid these warnings.NvPclClose: ++++++++++++++++++++++
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f9468fde0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f947bccc0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f947c34e0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f947bb450
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f94414650
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f946bdf20
NvPclStateControllerClose: Module imx274_front_A6V26 closed
NvPclClose: ----------------------
NvPclClose: ++++++++++++++++++++++
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f947c0620
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f9478e360
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f9478e3f0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f94b99960
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f94b72a10
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f9479eea0
NvPclStateControllerClose: Module imx274_bottom_A6V26 closed
NvPclClose: ----------------------
NvPclShutdown: ++++++++++++++++++++++
NvPclModuleListShutdown: Client still conntected, skipping shutdown
NvPclShutdown: ----------------------
NvPclRemoveHotplugCallback: ++++++++++++++++++++++
getHotplugMonitor: Getting hotplug monitor instance
 shutdownHotplug: Requesting thread exit
 hotPlugfunc: Read 16 bytes from inotify FD
 hotPlugfunc: A File was Modified 00008000 NAME :  CREATE : 00000100, DELETE : 00000200 IGNORED : 00008000 CLOSE_WRITE : 00000008
 hotPlugfunc: Exit thread
 hotPlugfunc: close failure error: 'Bad file descriptor' (9)
 hotPlugfunc -- 
 shutdownHotplug -- : shutdown of hotplug is complete 
Removed callback client
NvPclRemoveHotplugCallback: ----------------------
=== argus_cudabayerdemosaic[16431]: Connection cleaned up (7F9A5141D0)

Running two instances of the program returns this on the second instance

execute:178 Failed to create CaptureSession

After I close down both instances I can’t start even one instance until I reboot the device

Does your camera board have three sensors?
I just try my two sensors configure with two session argus_cudabayerdemosaic without problem.

My apologies, I must correct and clarify myself. The plain, enedited cudaBayerDemosaic sample does work with two instances. However, when I convert this sample to a ROS node that outputs images on a rostopic, and then run two instances (or one instance with two cameras registered as in syncSensor sample), I get the above issues.

Edit: To answer your question, I am using one of these Leopard Imaging adapters (https://leopardimaging.com/product/accessories/adapters-carrier-boards/li-jtx1-mipi-adpt/) with two cameras attached, on a TX2 dev board.

Still not clear here. Does two instances working without ROS?
Looks like the board are three sensors design but only connect two sensors.
Could you modify the device tree to only two modules to clarify.

Yes, the two instances work without ROS.

I tried re-flashing the device after modifying the device tree to two modules as you suggested, but I have the same problem. I also noticed that the code for syncSensor and cudaBayerDemosaic is quite similar, however when I change PIXEL_FMT_YCbCr_420_888 in syncSensor to PIXEL_FMT_RAW16 as it is in cudaBayerDemosaic cuEGLStreamConsumerAcquireFrame will get stuck in what seems like an infinite loop. Could you explain why that is?

Essentially my problem boils down to the following:
Single camera captureSession + PIXEL_FMT_RAW16 : works as expected
Double camera captureSession + PIXEL_FMT_YCbCr_420_888: works as expected
Double camera captureSession + PIXEL_FMT_RAW16 : hangs up

UPDATE:
I tried gathering logs again and I get this outputted repeatedly

SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
NvPHSSendThroughputHints: sensorId=2, m_usecase=4, m_type=15, m_value=0, m_timeout_ms=1000

SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
updatePerfHints(): guid=1ll, CaptureIntent=1
updatePerfHints(): NvCameraCoreUseCase_Preview
NvPHSSendThroughputHints: sensorId=1, m_usecase=4, m_type=1, m_value=30, m_timeout_ms=1000

SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
NvPHSSendThroughputHints: sensorId=1, m_usecase=4, m_type=15, m_value=0, m_timeout_ms=1000

SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
CoordinatedCam does not support 2 Bayer and 0 YUV output buffers.

SCF: Error NotImplemented: unsupported output buffer config (in src/components/CaptureSetupEngineImpl.cpp, function chooseGenInstFunc(), line 254)
SCF: Error NotImplemented:  (propagating from src/components/CaptureSetupEngineImpl.cpp, function doGetInstructions(), line 2204)
SCF: Error NotImplemented:  (propagating from src/components/CaptureSetupEngine.cpp, function getInstructionList(), line 300)
SCF: Error NotImplemented:  (propagating from src/components/CaptureSetupEngine.cpp, function setupCC(), line 214)
SCF: Error NotImplemented:  (propagating from src/api/Session.cpp, function capture(), line 815)
disposing CC 0 Session 0
(Argus) Error NotImplemented:  (propagating from src/api/ScfCaptureThread.cpp, function run(), line 109)
Session::updatePerfHints()
updatePerfHints(): guid=2ll, CaptureIntent=1
updatePerfHints(): NvCameraCoreUseCase_Preview
NvPHSSendThroughputHints: sensorId=2, m_usecase=4, m_type=1, m_value=30, m_timeout_ms=1000

With CoordinatedCam does not support 2 Bayer and 0 YUV output buffers. clearly showing my setup is not supported yet. In this case could you suggested an alternate way of publishing through syncSensor to ROS?

Try the multiSensor sample code for two sensors.

This sample works as expected. However it utilizes two captureSessions. For my use-case I need the cameras to be synchronized as close as possible (hardware synchronization is not an option). From my understanding, using a single captureSession is the way to accomplish this?

It could be the ISP pipeline not support output RAW data for single session for multiple source.
Why do you must need RAW16?

I don’t have to use RAW16. My intention is to output synchronized images from the cameras to ROS topics. Unfortunately, ROS does not support YCbCr 420 so I thought to try the cudaBayerDemosaic code that outputs RGBA images.

In my other thread here (Converting frames collected through argus into ROS sensor_msgs::Image messages) I have tried some other methods to achieve this, but they have all been too slow. Do you have suggestions for how else this might be achieved?

What I can figure out is using multiple session and sync the frame by timestamp.

Would it be possible to use a CUDA kernel to convert YCbCr_420_888 to a supported colorspace (like RGB), instead of the histogram kernel in syncSensor?

Yes, you can.
And you can also try to use V4L2 Video Converter

https://docs.nvidia.com/jetson/l4t-multimedia/group__V4L2Conv.html

1 Like

I have successfully implemented this using a colorspace conversion kernel. Buffer copying to host memory causes computational overheads that bottleneck output FPS for higher resolutions. Will continue to investigate. Thanks for the help!