Unable to run sample_cgf_camera_interprocess

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

Hi ,
I am trying to run sample_cgf_camera_interprocess from the samples and i see that it fails.
Below is the command i used to run the same
sudo ./sample_cgf_camera_interprocess --rig=/home/xxxxx/rig_val.json --capture=/home/xxxxx/capture.h264

below is the log i see the error
xxxxx@tegra-ubuntu:/nfs/docker_share/606-ws/build-linux-64/install/usr/local/driveworks/samples/bin$ sudo ./sample_cgf_camera_interprocess --rig=/home/xxxxx/rig_val.json --capture=/home/xxxxx/capture.h264
ProgramArguments: Missing argument ‘dwTracePath’ requested
WindowEGL: find EGL devices
WindowEGL: found 1 EGL devices
WindowEGL: init EGL with GLES3 context
WindowEGL: bind OpenGLES3 API
WindowEGL: offscreen mode → use EGL PBuffer surface 1280x800
WindowEGL: create EGL context
WindowEGL: assign EGL context to current thread
[24-10-2023 20:42:51] Platform: Detected Drive Orin P3710
[24-10-2023 20:42:51] Adding variable DW_Base:DW_Version
[24-10-2023 20:42:51] Added variable DW_Base:DW_Version
[24-10-2023 20:42:51] Platform: number of GPU devices detected 1
[24-10-2023 20:42:51] Platform: currently selected GPU device 0, Resource Data Dir: trt_08_06_10_03, Arch: ga10b
[24-10-2023 20:42:51] Platform: currently selected GPU device integrated ID 0
[24-10-2023 20:42:51] CUDLAEngine:getDLACount: CUDLA version is = 1004000
[24-10-2023 20:42:51] CUDLAEngine:getDLACount: Number of DLA devices = 2
[24-10-2023 20:42:51] Context::mountResourceCandidateDataPath resource FAILED to mount from ‘./resources’: VirtualFileSystem: Failed to mount ‘./resources/resources.pak’
[24-10-2023 20:42:51] Context::mountResourceCandidateDataPath resource FAILED to mount from ‘/nfs/docker_share/606-ws/build-linux-64/install/usr/local/driveworks/samples/bin/data’: VirtualFileSystem: Failed to mount ‘/nfs/docker_share/606-ws/build-linux-64/install/usr/local/driveworks/samples/bin/data/resources.pak’
[24-10-2023 20:42:51] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks/data
[24-10-2023 20:42:51] Context::mountResourceCandidateDataPath resource FAILED to mount from ‘/usr/local/driveworks/data’: VirtualFileSystem: Failed to mount ‘/usr/local/driveworks/data/resources.pak’
[24-10-2023 20:42:51] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.14/data
[24-10-2023 20:42:51] Context::mountResourceCandidateDataPath resource FAILED to mount from ‘/usr/local/driveworks-5.14/data’: VirtualFileSystem: Failed to mount ‘/usr/local/driveworks-5.14/data/resources.pak’
[24-10-2023 20:42:51] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks/lib/libdw_base.so.5.14
[24-10-2023 20:42:51] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.14/targets/aarch64-Linux/lib/libdw_base.so.5.14
[24-10-2023 20:42:51] SDK: No resources(.pak) mounted, some modules will not function properly
[24-10-2023 20:42:51] egl::Display: found 1 EGL devices
[24-10-2023 20:42:51] egl::Display: use drm device: /dev/dri/card0
[24-10-2023 20:42:51] [24-10-2023 20:42:51] Initialize DriveWorks SDK v5.14.74
[24-10-2023 20:42:51] [24-10-2023 20:42:51] Release build with GNU 9.3.0 from buildbrain-branch-0-g30b7ba5bb0c against Drive PDK v6.0.8.0
[24-10-2023 20:42:51] SensorFactory::createSensor() → time.nvpps, nvpps-device=/dev/nvpps0
[24-10-2023 20:42:51] Found driver: time.nvpps
[24-10-2023 20:42:51] TimeSensor: failed to set NVPPS parameters. Error: Invalid argument
[24-10-2023 20:42:51] This platform does not support NVPPS GPIO mode. Fallback to timer mode
[24-10-2023 20:42:51] TimeSensor: initialized with no UTC time reference.
[24-10-2023 20:42:51] SensorFactory: Override default timeSensor with the user passed one
[24-10-2023 20:42:51] EndpointNVPPS: started on /dev/nvpps0
[24-10-2023 20:42:51] SensorFactory::createSensor() → camera.virtual, width=3848,height=2168,input-format=rgba
[24-10-2023 20:42:51] Found driver: camera.virtual
[24-10-2023 20:42:51] CameraVirtual: defaulting to non SIPL
[24-10-2023 20:42:51] CameraVirtual, no/invalid extension passed in the parameter string: width=3848,height=2168,input-format=rgba, defaulting to dummy CameraVirtual class
[24-10-2023 20:42:51] CameraBase: pool size set to 8
[24-10-2023 20:42:51] CameraVirtualRecording: format not specified. Using h264.
[24-10-2023 20:42:51] SyncDriver: GPU device available, enabling CUDA sync
[24-10-2023 20:42:51] SyncDriver: enableCUDAPresync, object successfully created
[24-10-2023 20:42:51] EncoderNvMedia: Setting encode on instance 0
[24-10-2023 20:42:51] EncoderNvMedia: Header Information not available for h264/h265 , Default Header Data
[24-10-2023 20:42:51] SyncDriver: GPU device available, enabling CUDA sync
[24-10-2023 20:42:51] SyncDriver: enableCUDAPresync, object successfully created
[24-10-2023 20:42:51] ImageStreamer(CUDA → NvMedia)
terminate called without an active exception
Aborted

The rig file worked fine with the sample camera test.

Is there any way i can find the reason for the failure in the cgf example.

not sure why its unable to find the hardware and points to camera.virtual

To determine why the sample_cgf_camera_interprocess created a virtual camera, you should inspect the initCameras() function in the code and review your rig_val.json file. The code snippet below shows how the cameras are initialized:

void DwCGFCameraInterprocessApp::initCameras()
{
    // if rig is selected
    dwRigHandle_t rigConfig{};
    CHECK_DW_ERROR(dwRig_initializeFromFile(&rigConfig, context,
                                            getArgument("rig").c_str()));

    uint32_t cnt = 0;
    CHECK_DW_ERROR(dwRig_getSensorCountOfType(&cnt, DW_SENSOR_CAMERA, rigConfig));

    for (uint32_t i = 0; i < cnt; i++)
    {
        uint32_t cameraSensorIdx = 0;
        CHECK_DW_ERROR(dwRig_findSensorByTypeIndex(&cameraSensorIdx, DW_SENSOR_CAMERA, i, rigConfig));

        const char* protocol = nullptr;
        CHECK_DW_ERROR(dwRig_getSensorProtocol(&protocol, cameraSensorIdx, rigConfig));
        const char* params = nullptr;
        CHECK_DW_ERROR(dwRig_getSensorParameterUpdatedPath(&params, cameraSensorIdx, rigConfig));
        dwSensorParams paramsClient{};
        paramsClient.protocol   = protocol;
        paramsClient.parameters = params;

        std::cout << "onInitialize: creating camera.gmsl with params: " << params << std::endl;
        CHECK_DW_ERROR(dwSAL_createSensor(&m_camera[m_totalCameras], paramsClient, m_sal));
        m_totalCameras++;
    }

Hi Vick,

this is how the rig file looks like

tegra-ubuntu:~$ cat rig_val.json
{
“rig”: {
“sensors”: [
{
“name”: “camera:sample1”,
“nominalSensor2Rig_FLU”: {
“roll-pitch-yaw”: [
0.0,
0.0,
0.0
],
“t”: [
1.8556,
-0.1499,
1.3165
]
},
“parameter”: “camera-name=V1SIM728S2RU4070HB20,interface=csi-gh,CPHY-mode=1,link=1,output-format=processed,async-record=1,file-buffer-size=16777216”,
“properties”: {
“Model”: “ftheta”,
“bw-poly”: “0.000000000000000 1.32318687974475e-4 4.32875922606879e-11 3.85626784072334e-15 -6.44246187287383e-18”,
“cx”: “1925.630249”,
“cy”: “1081.878052”,
“height”: “2168”,
“width”: “3848”
},
“protocol”: “camera.gmsl”
},{
“name”: “camera:sample2”,
“nominalSensor2Rig_FLU”: {
“roll-pitch-yaw”: [
0.0,
0.0,
0.0
],
“t”: [
1.8556,
-0.1499,
1.3165
]
},
“parameter”: “camera-name=V1SIM728S2RU4070HB20,interface=csi-gh,CPHY-mode=1,link=2,output-format=processed,async-record=1,file-buffer-size=16777216”,
“properties”: {
“Model”: “ftheta”,
“bw-poly”: “0.000000000000000 1.32318687974475e-4 4.32875922606879e-11 3.85626784072334e-15 -6.44246187287383e-18”,
“cx”: “1925.630249”,
“cy”: “1081.878052”,
“height”: “2168”,
“width”: “3848”
},
“protocol”: “camera.gmsl”
}, {
“name”: “camera:sample1”,
“nominalSensor2Rig_FLU”: {
“roll-pitch-yaw”: [
0.0,
0.0,
0.0
],
“t”: [
1.8556,
-0.1499,
1.3165
]
},
“parameter”: “camera-name=V1SIM728S2RU4070HB20,interface=csi-gh,CPHY-mode=1,link=3,output-format=processed,async-record=1,file-buffer-size=16777216”,
“properties”: {
“Model”: “ftheta”,
“bw-poly”: “0.000000000000000 1.32318687974475e-4 4.32875922606879e-11 3.85626784072334e-15 -6.44246187287383e-18”,
“cx”: “1925.630249”,
“cy”: “1081.878052”,
“height”: “2168”,
“width”: “3848”
},
“protocol”: “camera.gmsl”
}
],
“vehicle”: {
“valid”: false
}
},
“version”: 6
}

I did not have camera connected to the first link will that be a problem ?

Also do you have any references on how cgf was tested at your end ?

It’s important to ensure that the rig file matches the camera connections. Didn’t you say that the rig file work fine with the camera sample application? How did you connect the camera then?

Please refer to CGF Camera Interprocess Sample for the application.

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