Custom camera work well in "nvsipl_camera" sample but not in driveworks sample

I linked a custom camera to Orin DevKit’s port A pin 1.
DriveOS version: 6.0.5.0
DriveWorks version: 5.8

The info about my custom camera from the “sipl_query” tool is showed below:

Platforms:
Platform config: SG0233C5200M_DPHY_x4

Cameras:
Name: SG0233C5200M

Sensors:
Name: GW5200

EEPROMS:
Name: N24C64

Serializers:
Serializer name: MAX9295

The DriveOS sample “nvsipl_camera” is worked well.
But the DriveWorks sample “sample_camera” had something wrong, this is the log:

orin5@tegra-ubuntu:/usr/local/driveworks/samples/bin$ ./sample_camera
ProgramArguments: Missing argument 'dwTracePath' requested
[21-10-2022 12:22:38] Platform: Detected Drive Orin P3710
[21-10-2022 12:22:38] TimeSource: monotonic epoch time offset is 1666354900075083
[21-10-2022 12:22:38] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[21-10-2022 12:22:38] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[21-10-2022 12:22:38] PTP Time is available from Eth Driver
[21-10-2022 12:22:38] Adding variable DW_Base:DW_Version
[21-10-2022 12:22:38] Addded variable DW_Base:DW_Version
[21-10-2022 12:22:38] Platform: number of GPU devices detected 1
[21-10-2022 12:22:38] Platform: currently selected GPU device 0, Resource Data Dir: trt_08_04_12_05, Arch: ga10b
[21-10-2022 12:22:38] Platform: currently selected GPU device integrated ID 0
[21-10-2022 12:22:38] CUDLAEngine:getDLACountandCheck: CUDLA version is = 1002001
[21-10-2022 12:22:38] CUDLAEngine:getDLACountandCheck: Number of DLA devices = 2
[21-10-2022 12:22:38] ========== DLA Device 0 Attributes ==========
[21-10-2022 12:22:38]            UVA supported = 0
[21-10-2022 12:22:38]            Device version = 1
[21-10-2022 12:22:38]            Device 0 Check PASSED
[21-10-2022 12:22:38] ========== DLA Device 1 Attributes ==========
[21-10-2022 12:22:38]            UVA supported = 0
[21-10-2022 12:22:38]            Device version = 1
[21-10-2022 12:22:38]            Device 1 Check PASSED
[21-10-2022 12:22:38] Context::mountResourceCandidateDataPath resource FAILED to mount from './resources': VirtualFileSystem: Failed to mount './resources/resources.pak'
[21-10-2022 12:22:38] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.8/samples/bin/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.8/samples/bin/data/resources.pak'
[21-10-2022 12:22:38] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks/data
[21-10-2022 12:22:38] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks/data/resources.pak'
[21-10-2022 12:22:38] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.8/data
[21-10-2022 12:22:38] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.8/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.8/data/resources.pak'
[21-10-2022 12:22:38] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks/lib/libdw_base.so.5.8
[21-10-2022 12:22:38] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.8/targets/aarch64-Linux/lib/libdw_base.so.5.8
[21-10-2022 12:22:38] SDK: No resources(.pak) mounted, some modules will not function properly
[21-10-2022 12:22:38] SDK: Create NvMediaDevice
[21-10-2022 12:22:38] SDK: use EGL display as provided
[21-10-2022 12:22:38] TimeSource: monotonic epoch time offset is 1666354900075083
[21-10-2022 12:22:38] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[21-10-2022 12:22:38] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[21-10-2022 12:22:38] PTP Time is available from Eth Driver
[21-10-2022 12:22:38] Initialize DriveWorks SDK v5.8.82
[21-10-2022 12:22:38] Release build with GNU 9.3.0 from buildbrain-branch-0-g33d6f4a1440 against Drive PDK v6.0.5.0
[21-10-2022 12:22:38] SensorFactory::createSensor() -> time.nvpps, nvpps-device=/dev/nvpps0
[21-10-2022 12:22:38] Can not create time sensor: DW_HAL_CANNOT_OPEN_CHANNEL: EndpointNVPPS: cannot open NVPPS device with name: /dev/nvpps0
 Error: Permission denied
[21-10-2022 12:22:38] Rig::fromFile: Loading rig file: /usr/local/driveworks-5.8/data/samples/sensors/camera/camera/rig.json
[21-10-2022 12:22:38] rig::DatabaseOverlayer: Failed to open a file '/tmp/car_vin' - file likely does not exist - skipping overlay
[21-10-2022 12:22:38] No valid data file found for camera:sample0 in parameter string: camera-name=SG0233C5200M,interface=csi-ab,link=0,output-format=processed (using configuration folder /usr/local/driveworks-5.8/data/samples/sensors/camera/camera/)
[21-10-2022 12:22:38] rig::DatabaseOverlayer: Failed to open a file '/tmp/car_vin' - file likely does not exist - skipping overlay
onInitialize: creating camera.gmsl with params: camera-name=SG0233C5200M,interface=csi-ab,link=0,output-format=processed
[21-10-2022 12:22:38] SensorFactory::createSensor() -> camera.gmsl, camera-name=SG0233C5200M,interface=csi-ab,link=0,output-format=processed
[21-10-2022 12:22:38] CameraBase: pool size set to 8
[21-10-2022 12:22:38] SensorFactory::createSensor() -> camera.gmsl.master, 
[21-10-2022 12:22:39] CameraMaster::parseDevBlock Getting device info list.
[21-10-2022 12:22:39] devBlock: 0 Slave = 0 Interface = csi-ab Camera_name = SG0233C5200M Link = 0
[21-10-2022 12:22:39] Camera Match Name: SG0233C5200M Description:  linkIndex: 4294967295 serInfo.Name: MAX9295
[21-10-2022 12:22:39] Client, Setting up information for camera ID 0
[21-10-2022 12:22:39] CameraClient, YUV camera detected, overriding all output types to produce processed only output
[21-10-2022 12:22:39] Client, successfully found info for camera ID 0 bound to id 0
[21-10-2022 12:22:39]  ImageStreamer(NvMedia -> CUDA) 
[21-10-2022 12:22:39]  ImageStreamer(NvMedia -> CUDA) 
[21-10-2022 12:22:39]  ImageStreamer(NvMedia -> CUDA) 
[21-10-2022 12:22:39]  ImageStreamer(NvMedia -> CUDA) 
[21-10-2022 12:22:39]  ImageStreamer(NvMedia -> CUDA) 
[21-10-2022 12:22:39]  ImageStreamer(NvMedia -> CUDA) 
[21-10-2022 12:22:39]  ImageStreamer(NvMedia -> CUDA) 
[21-10-2022 12:22:39]  ImageStreamer(NvMedia -> CUDA) 
[21-10-2022 12:22:39] CameraClient: no NITO found at /opt/nvidia/nvmedia/nit/SG0233C5200M.nito
[21-10-2022 12:22:39] CameraClient: no NITO found at /opt/nvidia/nvmedia/nit/sg0233c5200m.nito
[21-10-2022 12:22:39] CameraClient: using NITO found at /opt/nvidia/nvmedia/nit/template.nito
[21-10-2022 12:22:39] SIPLMaster::SIPLMaster: Setting up master camera
[21-10-2022 12:22:39] Platform: 
[21-10-2022 12:22:39] Platform Config: 
[21-10-2022 12:22:39] Description: 
[21-10-2022 12:22:39] Number of device blocks: 1
[21-10-2022 12:22:39] Device Block : 0
[21-10-2022 12:22:39] 	csiPort: 2
[21-10-2022 12:22:39] 	i2cDevice: 0
[21-10-2022 12:22:39] 	Deserializer Name: MAX96712
[21-10-2022 12:22:39] 	Deserializer Description: Maxim 96712 Aggregator
[21-10-2022 12:22:39] 	Deserializer i2cAddress: 41
[21-10-2022 12:22:39] 	Simulator Mode: 0
[21-10-2022 12:22:39] 	Passive Mode: 0
[21-10-2022 12:22:39] 	Phy Mode: 0
[21-10-2022 12:22:39] 	Number of camera modules: 1
[21-10-2022 12:22:39] 	CameraModule index: 0
[21-10-2022 12:22:39] 		Name :SG0233C5200M
[21-10-2022 12:22:39] 		Description: 
[21-10-2022 12:22:39] 		Serializer name: MAX9295
[21-10-2022 12:22:39] 		Serializer description: Maxim 9295 Serializer
[21-10-2022 12:22:39] 		Serializer i2cAdress: 64
[21-10-2022 12:22:39] 			EEPROM name: N24C64
[21-10-2022 12:22:39] 			EEPROM i2cAddress: 80
[21-10-2022 12:22:39] 			EEPROM description: N24C64 EEPROM
[21-10-2022 12:22:39] 			Sensor ID: 0
[21-10-2022 12:22:39] 			Sensor name: GW5200
[21-10-2022 12:22:39] 			Sensor description: GEO GW5200 SOC
[21-10-2022 12:22:39] 			Sensor i2cAddress: 109
[21-10-2022 12:22:39] 			Sensor isTPGEnabled: 0
[21-10-2022 12:22:39] 			Sensor isTriggerMode: 1
[21-10-2022 12:22:39] 				 cfa: 4
[21-10-2022 12:22:39] 				 embeddedTopLines: 0
[21-10-2022 12:22:39] 				 embeddedBottomLines: 0
[21-10-2022 12:22:39] 				 inputFormat: 0
[21-10-2022 12:22:39] 				 height: 1080
[21-10-2022 12:22:39] 				 width: 1920
[21-10-2022 12:22:39] 				 fps: 30.000000
[21-10-2022 12:22:39] 				 Embedded Data: 0
[21-10-2022 12:22:39] CameraMaster available outputs: 16
[21-10-2022 12:22:39] CameraClient: setting pipeline config for camera ID 0
[21-10-2022 12:22:39] CameraMaster: master initiation
MAX96712: Revision 5 detected
MAX96712 Link 0: PHY optimization was enabled
MAX9295: Revision 8 detected!
[21-10-2022 12:22:39] CameraMaster: Bootstrap NvSIPL and ClientPipelines complete
[21-10-2022 12:22:39] CameraClient::readEEPROMInfo:  
[21-10-2022 12:22:39] CameraClient: readEEPROM, failed to read param 131073 from EEPROM. Status = 10
[21-10-2022 12:22:39] CameraClient: readEEPROM, failed to read param 131074 from EEPROM. Status = 9
[21-10-2022 12:22:39] CameraClient: readEEPROM, failed to read param 131075 from EEPROM. Status = 9
[21-10-2022 12:22:39] CameraClient: readEEPROM, failed to read param 4 from EEPROM. Status = 9
[21-10-2022 12:22:39] 		 fwVersionMajor:  0
[21-10-2022 12:22:39] 		 fwVersionMinor:  0
[21-10-2022 12:22:39] 		 fwVersionPatch:  0
[21-10-2022 12:22:39] CameraClient: readEEPROM, failed to read param 0 from EEPROM. Status = 9
[21-10-2022 12:22:39] CameraClient::copyEEPROM: failed to read eeprom data from sensor. (DW_NVMEDIA_ERROR)
[21-10-2022 12:22:39] SAL: bootstrap complete
[21-10-2022 12:22:39] Initialize DriveWorks VisualizationSDK v5.8.82
[21-10-2022 12:22:39] Initialize DriveWorksGL SDK v5.8.82
onInitialize: Total cameras 1
onInitialize: getting image props 0
onInitialize: initilizing stream: 0
Main: Starting master.
[21-10-2022 12:22:39] CameraMaster: starting...
[21-10-2022 12:22:39] CameraMaster: getNvSciImageAttributes failed 9
[21-10-2022 12:22:39] Driveworks exception thrown: DW_INTERNAL_ERROR: CameraClient::getSiplImageAttributes ICP failed to allocate NvSciImageAttrList

terminate called after throwing an instance of 'std::runtime_error'
  what():  [2022-10-21 12:22:39] DW Error DW_INTERNAL_ERROR executing DW function:
 dwSensor_start(m_camera[i])
 at /usr/local/driveworks/samples/src/sensors/camera/camera/main.cpp:449
Aborted

The Rig file is showed below:

{
    "rig": {
        "sensors": [
            {
                "name": "camera:sample0",
                "nominalSensor2Rig_FLU": {
                    "roll-pitch-yaw": [
                        0.0,
                        0.0,
                        0.0
                    ],
                    "t": [
                        1.8621,
                        -0.1939,
                        1.3165
                    ]
                },
                "parameter": "camera-name=SG0233C5200M,interface=csi-ab,link=0,output-format=processed",
                "properties": {
                    "Model": "ftheta",
                    "bw-poly": "0.000000000000000 5.35356812179089e-4 4.99266072928606e-10 4.27370422037554e-12 -6.68245573791717e-16",
                    "cx": "1927.764404",
                    "cy": "1096.686646",
                    "height": "2168",
                    "width": "3848"
                },
                "protocol": "camera.gmsl"
            }
        ],
        "vehicle": {
            "valid": false
        }
    },
    "version": 2
}

Dear @liangzhicheng1,
Could you list the nito files at /opt/nvidia/nvmedia/nit/? Also, did nvsipl_camera work?

Here the nito files:

orin5@tegra-ubuntu:/opt/nvidia/nvmedia/nit$ ls
AR0820C70FOV_24BIT_RGGB.nito    SIM_V1SIM728S1RU3030NB20.nito  V1SIM728S1RU3030NB20.nito  V1SIM728S2RU3070HB30.nito  V1SIM728S2RU4120NB20.nito  V728S1-120V1-FWC.nito
F008A120RM0A.nito               SIM_V1SIM728S1RU3070HB20.nito  V1SIM728S1RU3070HB20.nito  V1SIM728S2RU3120HB30.nito  V623S2-195V1-SVS.nito      V728S1-120V1-SCF.nito
I0OO23111CML1050NB10.nito       SIM_V1SIM728S1RU3120NB20.nito  V1SIM728S1RU3120NB20.nito  V1SIM728S2RU3120NB30.nito  V728S1-030V1-FTC.nito      VC0820C030R24.nito
LI-OV2311-VCSEL-GMSL2-55H.nito  V1SIM623S3RU3200NB20.nito      V1SIM728S2RU1030NB30.nito  V1SIM728S2RU4070HB20.nito  V728S1-030V1-RC.nito       VC0820C070R24.nito
SIM_V1SIM623S3RU3200NB20.nito   V1SIM623S4RU5195NB3.nito       V1SIM728S2RU2030NB20.nito  V1SIM728S2RU4120HB20.nito  V728S1-070V1-SCR.nito      template.nito

It seems that the sample used the default template.nito

The nvsipl_camera worked well, and i saw the image from the monitor.
The launch command was:

sudo ./nvsipl_camera -c "SG0233C5200M_DPHY_x4" --link-enable-masks "0x0001 0x0000 0x0000 0x0000" --enableRawOutput --disableISP0Output --disableISP1Output --disableISP2Output --showfps -d 0

By the way, my camera is a YUV422 camera, and the resolution is 1920x1080.

If i don’t need ISP treatment in the Orin SoC, can i ignore the nito file? And how to ignore?
I just need to get the dwCameraFrameHandle_t and dwImageHandle_t object.

Dear @liangzhicheng1,
Could you share Nvsipl_camera sample command and log?

Command:

sudo ./nvsipl_camera -c "SG0233C5200M_DPHY_x4" --link-enable-masks "0x0001 0x0000 0x0000 0x0000" --enableRawOutput --disableISP0Output --disableISP1Output --disableISP2Output --showfps -d 1

Log:

orin5@tegra-ubuntu:/opt/nvidia/drive-linux/samples/nvmedia/nvsipl/test/camera$ sudo ./nvsipl_camera -c "SG0233C5200M_DPHY_x4" --link-enable-masks "0x0001 0x0000 0x0000 0x0000" --enableRawOutput --disableISP0Output --disableISP1Output --disableISP2Output --showfps -d 1
WARNING: RAW output is being requested with Display
WARNING: Frame Drops and drops in FPS are likely to be observed
MAX96712: Revision 5 detected
MAX96712 Link 0: PHY optimization was enabled
MAX9295: Revision 8 detected!
Enter 'ld' to list display-able outputs.
Enter 'e' followed by group ID and display ID to enable display for specific camera group
Enter 'les' followed by sensor ID to enable LED
Enter 'lds' followed by sensor ID to disable LED
Enter 'dl' followed by sensor ID to disable the link
Enter 'el' followed by sensor ID to enable the link without module reset
Enter 'elr' followed by sensor ID to enable the link with module reset
Enter 'cm' to check the module availabilty
Enter 'q' to quit the application
-
Output
Sensor0_Out0	Frame rate (fps):		26.999

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.9989

Output
Sensor0_Out0	Frame rate (fps):		29.9989

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.9989

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.9989

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.9989

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.9989

Output
Sensor0_Out0	Frame rate (fps):		29.9989

Output
Sensor0_Out0	Frame rate (fps):		29.9989

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.9989

Output
Sensor0_Out0	Frame rate (fps):		29.9989

Output
Sensor0_Out0	Frame rate (fps):		29.999

Output
Sensor0_Out0	Frame rate (fps):		29.999

^COutput
Sensor0_Out0	Frame rate (fps):		29.9979

Sensor0		Frame drops: 0		Frame discontinuities: 0
SUCCESS

Dear @liangzhicheng1,
If I don’t need ISP treatment in the Orin SoC, can i ignore the nito file? And how to ignore? I just need to get the dwCameraFrameHandle_t and dwImageHandle_t object

Yes, In general setting output-format=raw enables only ICP pipeline and disables ISP

Note that, custom camera support is not provided via forum. Please contact your NVIDIA representative for further support on this issue is needed.

But when i set output-format=raw, the same error occured from the sample_camera as the top of this topic.

Main: Starting master.
[21-10-2022 12:22:39] CameraMaster: starting...
[21-10-2022 12:22:39] CameraMaster: getNvSciImageAttributes failed 9
[21-10-2022 12:22:39] Driveworks exception thrown: DW_INTERNAL_ERROR: CameraClient::getSiplImageAttributes ICP failed to allocate NvSciImageAttrList

terminate called after throwing an instance of 'std::runtime_error'
  what():  [2022-10-21 12:22:39] DW Error DW_INTERNAL_ERROR executing DW function:
 dwSensor_start(m_camera[i])
 at /usr/local/driveworks/samples/src/sensors/camera/camera/main.cpp:449
Aborted

Dear @liangzhicheng1,
Note that, If the camera is not listed in DRIVE AGX Orin Sensors & Accessories | NVIDIA Developer , the related issues can not be supported via forum. Please contact your NVIDIA representative for further support.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.