[BUG] driveworks sample_camera report Can not create time sensor with open NVPPS device Error: Permission denied

Required Info:

  • Software Version
    DRIVE OS 6.0.6
  • Target OS
    Linux
  • SDK Manager Version
    1.9.2.10884
  • Host Machine Version
    native Ubuntu Linux 20.04 Host installed with DRIVE OS DOCKER Containers

Describe the bug

there is permission issue when running driveworks camera sample.

[21-05-2023 19:11:18] Can not create time sensor: DW_HAL_CANNOT_OPEN_CHANNEL: EndpointNVPPS: cannot open NVPPS device with name: /dev/nvpps0
 Error: Permission denied

To Reproduce

/usr/local/driveworks/bin/sample_camera

the rig.json is edited and the camera with eligible module is connected.

Expected behavior

there is no permission issue without sudo.

Actual behavior

[21-05-2023 19:11:18] Can not create time sensor: DW_HAL_CANNOT_OPEN_CHANNEL: EndpointNVPPS: cannot open NVPPS device with name: /dev/nvpps0
 Error: Permission denied

the full log is in the following

# in target-orin-host
/usr/local/driveworks/bin/sample_camera
ProgramArguments: Missing argument 'dwTracePath' requested
[21-05-2023 19:11:18] Platform: Detected Drive Orin P3710
[21-05-2023 19:11:18] TimeSource: monotonic epoch time offset is 1684599544108287
[21-05-2023 19:11:18] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[21-05-2023 19:11:18] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[21-05-2023 19:11:18] PTP Time is available from Eth Driver
[21-05-2023 19:11:18] Adding variable DW_Base:DW_Version
[21-05-2023 19:11:18] Added variable DW_Base:DW_Version
[21-05-2023 19:11:18] Platform: number of GPU devices detected 1
[21-05-2023 19:11:18] Platform: currently selected GPU device 0, Resource Data Dir: trt_08_05_10_03, Arch: ga10b
[21-05-2023 19:11:18] Platform: currently selected GPU device integrated ID 0
[21-05-2023 19:11:18] CUDLAEngine:getDLACount: CUDLA version is = 1003000
[21-05-2023 19:11:18] CUDLAEngine:getDLACount: Number of DLA devices = 2
[21-05-2023 19:11:18] Context::mountResourceCandidateDataPath resource FAILED to mount from './resources': VirtualFileSystem: Failed to mount './resources/resources.pak'
[21-05-2023 19:11:18] Context::mountResourceCandidateDataPath resource FAILED to mount from '/home/nvidia/zhensheng/orin_ws/nv_driveworks_demo/target/data': VirtualFileSystem: Failed to mount '/home/nvidia/zhensheng/orin_ws/nv_driveworks_demo/target/data/resources.pak'
[21-05-2023 19:11:18] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/bin/../data
[21-05-2023 19:11:18] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.10/bin/../data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.10/bin/../data/resources.pak'
[21-05-2023 19:11:18] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/data
[21-05-2023 19:11:18] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.10/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.10/data/resources.pak'
[21-05-2023 19:11:18] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/bin/../lib/libdw_base.so.5.10
[21-05-2023 19:11:18] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/targets/aarch64-Linux/lib/libdw_base.so.5.10
[21-05-2023 19:11:18] SDK: No resources(.pak) mounted, some modules will not function properly
[21-05-2023 19:11:18] SDK: use EGL display as provided
[21-05-2023 19:11:18] TimeSource: monotonic epoch time offset is 1684599544108287
[21-05-2023 19:11:18] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[21-05-2023 19:11:18] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[21-05-2023 19:11:18] PTP Time is available from Eth Driver
[21-05-2023 19:11:18] Initialize DriveWorks SDK v5.10.87
[21-05-2023 19:11:18] Release build with GNU 9.3.0 from buildbrain-branch-0-g9a5b4670e12 against Drive PDK v6.0.6.0
[21-05-2023 19:11:18] SensorFactory::createSensor() -> time.nvpps, nvpps-device=/dev/nvpps0
[21-05-2023 19:11:18] Can not create time sensor: DW_HAL_CANNOT_OPEN_CHANNEL: EndpointNVPPS: cannot open NVPPS device with name: /dev/nvpps0
 Error: Permission denied
[21-05-2023 19:11:18] fromFile: Loading rig file: /usr/local/driveworks-5.10/data/samples/sensors/camera/camera/rig.json
[21-05-2023 19:11:18] rig::DatabaseOverlayer: Failed to open a file '/tmp/car_vin' - file likely does not exist - skipping overlay
[21-05-2023 19:11:18] No valid data file found for camera:sample0 in parameter string: camera-name=V1SIM623S4RU5195NB3,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216,skip-eeprom=1 (using configuration folder /usr/local/driveworks-5.10/data/samples/sensors/camera/camera/)
[21-05-2023 19:11:18] 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=V1SIM623S4RU5195NB3,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216,skip-eeprom=1
[21-05-2023 19:11:18] SensorFactory::createSensor() -> camera.gmsl, camera-name=V1SIM623S4RU5195NB3,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216,skip-eeprom=1
[21-05-2023 19:11:18] CameraBase: pool size set to 8
[21-05-2023 19:11:18] SensorFactory::createSensor() -> camera.gmsl.master, 
[21-05-2023 19:11:18] CameraMaster::parseDevBlock Getting device info list.
[21-05-2023 19:11:18] devBlock: 0 Slave = 0 Interface = csi-ab Camera_name = V1SIM623S4RU5195NB3 Link = 0 GroupInit = 0 RecCfg = 1
[21-05-2023 19:11:18] Camera Match Name: V1SIM623S4RU5195NB3 Description: Sony IMX623 RGGB module - 120-deg FOV, MIPI-IMX623, MAX96717F linkIndex: 4294967295 serInfo.Name: MAX96717F
[21-05-2023 19:11:18] Client, Setting up information for camera ID 0
[21-05-2023 19:11:18] Client, successfully found info for camera ID 0 bound to id 0
[21-05-2023 19:11:18]  ImageStreamer(NvMedia -> CUDA) 
[21-05-2023 19:11:18]  ImageStreamer(NvMedia -> CUDA) 
[21-05-2023 19:11:18]  ImageStreamer(NvMedia -> CUDA) 
[21-05-2023 19:11:18]  ImageStreamer(NvMedia -> CUDA) 
[21-05-2023 19:11:18]  ImageStreamer(NvMedia -> CUDA) 
[21-05-2023 19:11:18]  ImageStreamer(NvMedia -> CUDA) 
[21-05-2023 19:11:18]  ImageStreamer(NvMedia -> CUDA) 
[21-05-2023 19:11:18]  ImageStreamer(NvMedia -> CUDA) 
[21-05-2023 19:11:18] CameraClient: using NITO found at /usr/share/camera/V1SIM623S4RU5195NB3.nito
[21-05-2023 19:11:18] SIPLMaster::SIPLMaster: Setting up master camera
[21-05-2023 19:11:18] Platform: 
[21-05-2023 19:11:18] Platform Config: 
[21-05-2023 19:11:18] Description: 
[21-05-2023 19:11:18] Number of device blocks: 1
[21-05-2023 19:11:18] Device Block : 0
[21-05-2023 19:11:18] 	csiPort: 2
[21-05-2023 19:11:18] 	i2cDevice: 0
[21-05-2023 19:11:18] 	Deserializer Name: MAX96712_Fusa_nv
[21-05-2023 19:11:18] 	Deserializer Description: Maxim 96712 Aggregator Fusa_nv
[21-05-2023 19:11:18] 	Deserializer i2cAddress: 41
[21-05-2023 19:11:18] 	Simulator Mode: 0
[21-05-2023 19:11:18] 	Passive Mode: 0
[21-05-2023 19:11:18] 	Phy Mode: 1
[21-05-2023 19:11:18] 	Number of camera modules: 1
[21-05-2023 19:11:18] 	CameraModule index: 0
[21-05-2023 19:11:18] 		Name :V1SIM623S4RU5195NB3
[21-05-2023 19:11:18] 		Description: Sony IMX623 RGGB module - 120-deg FOV, MIPI-IMX623, MAX96717F
[21-05-2023 19:11:18] 		Serializer name: MAX96717F
[21-05-2023 19:11:18] 		Serializer description: Maxim 96717F Serializer
[21-05-2023 19:11:18] 		Serializer i2cAdress: 64
[21-05-2023 19:11:18] 			EEPROM name: M24C04
[21-05-2023 19:11:18] 			EEPROM i2cAddress: 84
[21-05-2023 19:11:18] 			EEPROM description: M24C04 EEPROM
[21-05-2023 19:11:18] 			Sensor ID: 0
[21-05-2023 19:11:18] 			Sensor name: IMX623
[21-05-2023 19:11:18] 			Sensor description: Sony IMX623 Sensor
[21-05-2023 19:11:18] 			Sensor i2cAddress: 26
[21-05-2023 19:11:18] 			Sensor isTPGEnabled: 0
[21-05-2023 19:11:18] 			Sensor isTriggerMode: 1
[21-05-2023 19:11:18] 				 cfa: 33
[21-05-2023 19:11:18] 				 embeddedTopLines: 1
[21-05-2023 19:11:18] 				 embeddedBottomLines: 22
[21-05-2023 19:11:18] 				 inputFormat: 20
[21-05-2023 19:11:18] 				 height: 1536
[21-05-2023 19:11:18] 				 width: 1920
[21-05-2023 19:11:18] 				 fps: 30.000000
[21-05-2023 19:11:18] 				 Embedded Data: 0
[21-05-2023 19:11:18] CameraMaster available outputs: 1
[21-05-2023 19:11:18] CameraClient: setting pipeline config for camera ID 0
[21-05-2023 19:11:18] CameraMaster: master initiation
MAX96712: Revision 5 detected
MAX96712 Link 0: PHY optimization was enabled
MAX96717F : Revision 4 detected!
Sensor IMX623 Rev 8 RGGB detected!
[21-05-2023 19:11:19] CameraMaster: Bootstrap NvSIPL and ClientPipelines complete
[21-05-2023 19:11:19] SAL: bootstrap complete
[21-05-2023 19:11:19] Initialize DriveWorks VisualizationSDK v5.10.87
[21-05-2023 19:11:19] Initialize DriveWorksGL SDK v5.10.87
onInitialize: Total cameras 1
onInitialize: getting image props 0
onInitialize: initilizing stream: 0
Main: Starting master.
[21-05-2023 19:11:19] CameraMaster: starting...
[21-05-2023 19:11:19] CameraClient: allocating image pool for ICP
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] Allocating NvSci group
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: allocate image pool for 0
[21-05-2023 19:11:19] Allocating NvSci ISP0 images
[21-05-2023 19:11:19] CameraClient: format not specified. Using h264 in Codec Header.
[21-05-2023 19:11:19] SIPLClient: Acquisition started
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:19] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] SIPLDeviceBlockNotificationHandler: Queue timeout
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
[21-05-2023 19:11:20] CameraClient: raw bit type is missing or unexpected in virtual channel info, meta info might be incomplete
Timing results:
Thread main:
-onProcess                CPU:     6us, std=   4       | GPU:     4us, std=   1       | samples=34
-onRender                 CPU: 33061us, std=9126       | GPU: 33084us, std=9119       | samples=34

[21-05-2023 19:11:21] CameraClient: Notification received from pipeline index:0 of type: NOTIF_WARN_ICP_CAPTURE_TIMEOUT
[21-05-2023 19:11:21] Sensor Health Signal for camera[0] camera.gmsl, camera-name=V1SIM623S4RU5195NB3,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216,skip-eeprom=1
	timestamp: 1684696280493220	sourceID: 1040
	Sensor notifications: 
[21-05-2023 19:11:21] Sensor statistics for: camera[0] camera.gmsl, camera-name=V1SIM623S4RU5195NB3,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216,skip-eeprom=1
[21-05-2023 19:11:21] Statistics for DW_SENSOR_STATE_DELTA_HOST_AND_HOST_TIME
Events: 69
Errors: 1
Drops: 0
minDelta: 33332.0000 us
maxDelta: 33334.0000 us
meanDelta: 33332.7266us 
Standard deviation: 0.6166
[21-05-2023 19:11:21] Sensor statistics for: camera[0] camera.gmsl, camera-name=V1SIM623S4RU5195NB3,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216,skip-eeprom=1
[21-05-2023 19:11:21] Statistics for DW_SENSOR_STATE_DELTA_SENSOR_AND_SENSOR_TIME
Events: 69
Errors: 1
Drops: 0
minDelta: 0.0000 us
maxDelta: 0.0000 us
meanDelta: 0.0000us 
Standard deviation: 0.0000
[21-05-2023 19:11:21] Sensor statistics for: camera[0] camera.gmsl, camera-name=V1SIM623S4RU5195NB3,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216,skip-eeprom=1
[21-05-2023 19:11:21] Statistics for DW_SENSOR_STATE_DELTA_HOST_AND_SENSOR_TIME
Events: 69
Errors: 1
Drops: 0
minDelta: -2.8138e+14 us
maxDelta: -2.8138e+14 us
meanDelta: -2.8138e+14us 
Standard deviation: 0.0000
[21-05-2023 19:11:21] Sensor statistics for: camera[0] camera.gmsl, camera-name=V1SIM623S4RU5195NB3,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216,skip-eeprom=1
[21-05-2023 19:11:21] Statistics for DW_SENSOR_STATE_DELTA_CURRENT_AND_HOST_TIME
Events: 69
Errors: 1
Drops: 0
minDelta: 0.0000 us
maxDelta: 0.0000 us
meanDelta: 0.0000us 
Standard deviation: 0.0000
[21-05-2023 19:11:21]  Buffers(Processed) should be          released before calling DeInit() on sipl camera 
[21-05-2023 19:11:21] Deinit master camera
[21-05-2023 19:11:21] SIPLDeviceBlockNotificationHandler: Queue timeout
[21-05-2023 19:11:21] SIPLClient: ImageQueue timeout
[21-05-2023 19:11:21] SIPLClient: ImageQueue shutdown
[21-05-2023 19:11:21] SIPLNotifier: Event notification queue shutdown
[21-05-2023 19:11:22] SIPLDeviceBlockNotificationHandler: Queue timeout
[21-05-2023 19:11:23] SIPLDeviceBlockNotificationHandler: Queue timeout
[21-05-2023 19:11:24] CameraClient: Stopping client
[21-05-2023 19:11:24] Releasing camera master
[21-05-2023 19:11:24] SIPLDeviceBlockNotificationHandler: Queue timeout
[21-05-2023 19:11:24] Driveworks VisualizationSDK released
[21-05-2023 19:11:24] Releasing Driveworks SDK Context
[21-05-2023 19:11:24] DriveworksGL SDK released

Additional context

  1. It’s in the target-orin-host rather than target-orin-docker
  2. There is no sudo used.
  3. no sudo is required.

Dear @lizhensheng,
Could you clarify if you are running this sample on target directly or using docker conatiner on target?

As I said in the top, It’s running on target directly(target-orin-host) rather than docker-container-on-target(target-orin-docker).

Dear @lizhensheng,
Could you share the camera module details and rig.json for confirmation?

the rigfile is in the following

{
    "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=V1SIM623S4RU5195NB3,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216,skip-eeprom=1",
                "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
}

You need to use sudo when running the sample because camera frame timestamps are in the TSC time domain, DW uses the time sensor to convert them to PTP. If creation of time sensor fails, DW will fallback to TSC timestamp instead of PTP timestamp.

Thanks for your info!

Any possibilities to use .udev files to configure the dev permission to avoid the sudo?

We haven’t tried anything on it. You are welcome to explore this possibility and give it a try.

Could you(the forum) provide the official sulution?

if [ -e /dev/nvpps0 ]; then
  chmod a+rw /dev/nvpps0
fi

solves this. thanks.

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