How to execute sensor_initializer sample on drive orin with usb camera provide by driveworks sdk?

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

Dear @akshay.tupkar ,
I don’t see any sensor_initializer sample in driveworks in DRIVE OS 6.0.8.1. Could you please confirm the path?

nvidia@tegra-ubuntu:/usr/local/driveworks/bin$ ls sensor_*
sensor_sync_server
nvidia@tegra-ubuntu:/usr/local/driveworks/bin$ ls sample_sens*
sample_sensors_info

nvidia@tegra-ubuntu:/usr/local/driveworks/tools/sensors$ ls
rig_json2json rig_viewer sensor_indexer sensor_initializer sipl_query wwdc_rig.json
this is path to this sample and its drive os 6.0.6

Dear @akshay.tupkar,
I have not tested with USB cameras.
Firstly, please check USB camera functionality with DriveWorks SDK Reference: USB Camera Capture Sample.
If works, could you check with protocol as camera.usb and parameters device in rig JSON file to see if it works?

I executed the sample and i could open the usb camera on drive orin.
I am attaching the rig.json file. Do I need to modify it for usb camera because in rig.json i cant see any camera.usb protocol
rig_json.txt (1.1 KB)

and one more doubt that i have is , is there any rig file provided for usb camera?

Dear @akshay.tupkar,
Yes. You need to update the needed parameters rig.json. Please share the USB camera sample log.
Update "protocol": "camera.gmsl" and “parameter”: “device=” in the rig.json . Remove nominalSensor2Rig_FLU and properties . Note that we have not tested using USB camera from rig file. Let us know your observation.

1 Like

I updated the rig file and attaching it with log messages
sensor_intializer_log.txt (3.3 KB)
updated_rig.txt (392 Bytes)

Dear @akshay.tupkar,

Could you share the DW USB camera sample log?

yeah but the issue is there are 2 usb ports to my system and out of these two, one port is already occupied and i have to connect keyboard to another one so I needed to connect my usb camera in the place of port to which keyboard is conected. So i cannot share the whole log messages which was displayed on console. So i recorded the screen and attaching it. Sorry for inconvenience

Dear @akshay.tupkar,
Could you try using device=0 parameter and update the status?

"sensors": [
            {
                "name": "camera:sample0",
                "parameter": "device=0",
                "protocol": "camera.usb"
            }
        ]

Program Arguments:
–offscreen=0
–profiling=1
–rig=/home/nvidia/akshay/driveworks/rig.json

[16-04-2024 06:48:40] Platform: Detected Drive Orin P3710
[16-04-2024 06:48:40] TimeSource: monotonic epoch time offset is 1713241706149489
[16-04-2024 06:48:40] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[16-04-2024 06:48:40] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[16-04-2024 06:48:40] PTP Time is available from Eth Driver
[16-04-2024 06:48:40] Platform: currently selected GPU device integrated ID 0
[16-04-2024 06:48:40] Context::mountResourceCandidateDataPath resource FAILED to mount from ‘./resources’: VirtualFileSystem: Failed to mount ‘./resources/resources.pak’
[16-04-2024 06:48:40] Context::mountResourceCandidateDataPath resource FAILED to mount from ‘/usr/local/driveworks-5.10/tools/sensors/data’: VirtualFileSystem: Failed to mount ‘/usr/local/driveworks-5.10/tools/sensors/data/resources.pak’
[16-04-2024 06:48:40] Context::mountResourceCandidateDataPath resource FAILED to mount from ‘/usr/local/driveworks-5.10/tools/sensors/…/…/data’: VirtualFileSystem: Failed to mount ‘/usr/local/driveworks-5.10/tools/sensors/…/…/data/resources.pak’
[16-04-2024 06:48:40] 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’
[16-04-2024 06:48:40] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/tools/sensors/…/…/targets/aarch64-Linux/lib/libdw_base.so.5.10
[16-04-2024 06:48:40] 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
[16-04-2024 06:48:40] SDK: No resources(.pak) mounted, some modules will not function properly
[16-04-2024 06:48:40] egl::Display: found 1 EGL devices
[16-04-2024 06:48:40] egl::Display: use drm device: drm-nvdc
[16-04-2024 06:48:40] TimeSource: monotonic epoch time offset is 1713241706149488
[16-04-2024 06:48:40] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[16-04-2024 06:48:40] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[16-04-2024 06:48:40] PTP Time is available from Eth Driver
[16-04-2024 06:48:40] Initialize DriveWorks SDK v5.10.87
[16-04-2024 06:48:40] Release build with GNU 9.3.0 from buildbrain-branch-0-g9a5b4670e12 against Drive PDK v6.0.6.0
[16-04-2024 06:48:40] SensorFactory::createSensor() → time.nvpps, nvpps-device=/dev/nvpps0
[16-04-2024 06:48:40] Can not create time sensor: DW_HAL_CANNOT_OPEN_CHANNEL: EndpointNVPPS: cannot open NVPPS device with name: /dev/nvpps0
Error: Permission denied
[16-04-2024 06:48:40] rig::DatabaseOverlayer: Failed to open a file ‘/tmp/car_vin’ - file likely does not exist - skipping overlay
[16-04-2024 06:48:40] Driveworks exception thrown: DW_FILE_INVALID: JsonInputArchive: fail to parse json

terminate called after throwing an instance of ‘std::runtime_error’
what(): [2024-04-16 06:48:40] DW Error DW_FILE_INVALID executing DW function:
dwRig_initializeFromFile(&rigConfiguration, sdk, rigFile.c_str())
at tools/sensor_initializer/main.cpp:102
Aborted

Dear @akshay.tupkar,
I noticed, currently, USB cameras are not enabled on sensor manager. SensorManager is used to parse the rig and interface with dwCamera module. We are working to enable usb cameras in future DW versions

Okay and thank you for your support

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