How to run Nvidia sample camera application to capture an image from GMSL Camera

@SivaRamaKrishnaNV
Strange behaviour of nvsipl_camera
I have tried capturing an image using nvsipl_camera binary which is present inside /usr/local/bin on Nvidia Drive OS 6.0.5. I am able to do it successfully with this approach

I have tried another approach, I built nvsipl_camera sample application with the source code available in /drive/drive-linux/samples/nvmedia/nvsipl/test/camera.
I am unable to capture the image with this binary, error message:
./nvsipl_camera -c SG0820C5300M_CPHY_x4 -m “0x0001” --showfps --disableISP0Output --disableISP1Output --disableISP2Output --enableRawOutput --skipFrames 50 --writeFrames 1 -f fileName
nvsipl_camera: ERROR: GetPtpDeviceNodeIndex: ioctl(SIOETHTOOL) failed

nvsipl_camera: ERROR: GetPtpDeviceNodeIndex: ioctl(SIOETHTOOL) failed

nvsipl_camera: ERROR: GetPtpDeviceNode failed

nvsipl_camera: ERROR: CClockIdMgr::GetClockId failed

nvsipl_camera: ERROR: Notification Handler Init failed. status: 10

Interestingly, it does not support triggerLine and triggerFreq options. I have attached the output of both nvsipl binaries.
Could you please let me know the right command to capture image with the latest nvsipl_camera
nvidia-custom-built-nvsipl-supported-options.txt (25.0 KB)
nvidia-old-nvsipl-supported-options.txt (25.3 KB)

I don’t see this configuration listed in my target with DRIVE OS 6.0.10 release. Did you receive any files from vendor? You need NITO file from vendor to be able to use ISP pipeline. Please see below message from DriveWorks SDK Reference: Camera.

If you do not have a NITO file (e.g., working with a custom camera), you can still retrieve raw images (output-format=raw ) but you will not be able to use DriveWorks to process them, will require a custom code to do so.

You can try below suggestion to see if it works with sample_camera.
Update the rig.sjon used with sample_camera with output-format=raw and try running ./sample_camera --rig=/path/to/rig.json --write-file=record_video.raw --offscreen=1.

Note that, forum support is limited to cameras listed in DRIVE AGX Orin Sensors & Accessories | NVIDIA Developer

I am focusing on NvSIPL framework to capture an image, as I said earlier we are able to capture images using nvsipl_camera command. Could you please confirm that NvSIPL framework is the right approach? can we use this as an alternate to DriveWorks apis?

Yes. NvSIPL is used to capture camera frames. But without NITO file, you can not use ISP pipeline to get processed output.

DW API internally uses NvMedia/TensorRT/CUDA to facilitate developers quickly develop applications.

@SivaRamaKrishnaNV Please check the attached file to know about the nito files present on my hardware.

My question is:
We are able to capture images using this command:
nvsipl_camera -c SENSING_SG8_AR0820 -m “0x1111” --showfps --disableISP0Output --disableISP1Output --disableISP2Output --enableRawOutput --triggerLine 0 --triggerFreq 30 --skipFrames 50 --writeFrames 1 -f fileName

I am assuming that there are nito files present for SENSING_SG8_AR0820, but still able to capture images. Please correct me if I am wrong.

2nd question:
We are facing issues with the custom built nvsipl_camera application(built using nvidia sample source code). please check logs here>
root@fangzai-a:/home/nvidia/spc-image-capture# ./nvsipl_camera -c SENSING_SG8_AR0820 -m “0x0001” --showfps --disableISP0Output --disableISP1Output --disableISP2Output --enableRawOutput --skipFrames 10 --writeFrames 1 -f fileName
Checking SIPL version
Checking SIPL version
NvSIPL library version: 1.0.0
NVSIPL header version: 1 0 0
Parsing command line arguments
Setting verbosity level: 1
Setting up signal handler
Getting platform configuration for SENSING_SG8_AR0820
Setting link masks
Creating camera master
Setting up master
Creating consumers
Creating consumer for output:0 of sensor:0
Profiler initialization for output:0 of sensor:0
Consumer initialization for output:0 of sensor:0
nvsipl_camera: ERROR: GetPtpDeviceNodeIndex: ioctl(SIOETHTOOL) failed

nvsipl_camera: ERROR: GetPtpDeviceNodeIndex: ioctl(SIOETHTOOL) failed

nvsipl_camera: ERROR: GetPtpDeviceNode failed

CClockIdMgr::GetClockId failed
nvsipl_camera: ERROR: Notification Handler Init failed. status: 10

To keep it simple, with preinstalled nvsipl_camera application, we are able to capture images, but with the custom nvsipl_camera application, we are not able to do it.

@SivaRamaKrishnaNV Any update on this?

@SivaRamaKrishnaNV Could you please check these errors:
[22-04-2022 14:10:26] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[22-04-2022 14:10:26] TimeSource Nvpss : PTP ioctl returned error. Synchronized time will not be available from this timesource.
[22-04-2022 14:10:26] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[22-04-2022 14:10:26] TimeSource Eth: PTP ioctl returned error. Synchronized time will not be available from this timesource.
[22-04-2022 14:10:26] TimeSource: Could not detect valid PTP time source at ‘mgbe2_0’. Fallback to CLOCK_MONOTONIC.
[22-04-2022 14:10:26] Initialize DriveWorks SDK v5.8.82
[22-04-2022 14:10:26] Release build with GNU 9.3.0 from buildbrain-branch-0-g33d6f4a1440 against Drive PDK v6.0.5.0

I have run the command: ./sample_camera --rig=rig.json --write-file=record_video.mp4 --offscreen=1

There are no NITO files present. You can capture RAW images. To get processed images like yuv or RGBA, it has to use ISP pipeline which need NITO files.

Please check using --write-file=record_video.raw
to see if it works. When you try to store raw output please use output-format=raw in rig.json. Mp4 is not expected to work as it is processed output. Also the above log warnings you shared can be ignored in this context.

I have tried to capture the raw output as you said , please find the attached log. Sample camera application is crashing, and please do note that .nito file is present for the camera name menitoned in rig.json
sample-camera-log.txt (10.0 KB)

Dear @a.ratnakaram ,

[22-04-2022 17:34:38] Platform: Orin platform detected: model - p3663-a01-f0100-a
[22-04-2022 17:34:38] TimeSource: monotonic epoch time offset is 1650545674765688
[22-04-2022 17:34:38] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0

Noticed in the above shared log, you are using p3663 which is not supported via forum. Please reach out to your NV representative for right support channel for this camera issue.

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