cannot launch camera of driveworks-0.6 with exception "DW_CANNOT_CREATE_OBJECT"

Hi. I’m Hyejin.

After I failed to detect car or pedestrian with driveworks-0.6, I just decided I use 0.6, because I expect that problem could be fixed.

So I tried reinstall driveworks-0.6 on Drive-PX2, so I checked most samples are run well except drivenetNcamera.
And I install some library for simple screen recorder, then I found the camera function of all sample programs cannot run anymore.

I installed these libraries.

nvidia@nvidia:~/ssr$ sudo apt-get install ffmpeg
nvidia@nvidia:~/ssr$ sudo apt-get install libavcodec-dev
nvidia@nvidia:~/ssr$ sudo apt-get install qtbase5-dev

sudo apt-get install build-essential pkg-config qt4-qmake libqt4-dev libavformat-dev
libavcodec-dev libavutil-dev libswscale-dev libasound2-dev libpulse-dev libjack-jackd2-dev
libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxfixes-dev libxext-dev libxi-dev

And here are the error messages from “sample_camera_gmsl”

Camera image with 1920x1208 at 30 FPS
nvmEglStProducerCreateCommon: Entered
NvMediaEglStreamWrapperInitializeEgl: Cannot find function NvEglApiGetAccess
nvmEglStProducerCreateCommon:Wrapper initialization failed
NvMediaEglStreamProducerCreate: Failed to Create Producer
StreamProducerNvMediaImage: could not create NvMedia Image stream producer!
Driveworks exception thrown: DW_CANNOT_CREATE_OBJECT: could not create NvMedia Image stream producer

Driveworks exception thrown: DW_INVALID_ARGUMENT: Cannot cast handle, given instance is a nullptr

ERROR postNvMedia: DW_INVALID_ARGUMENT
Driveworks exception thrown: DW_INVALID_ARGUMENT: Cannot cast handle, given instance is a nullptr

Driveworks exception thrown: DW_INVALID_ARGUMENT: Cannot cast handle, given instance is a nullptr


Even though I will reinstall Drive-PX2 again becausue I need recording test on this Monday,
I want some Expert let me know what was happened on my Drive-PX2 camera samples.

same problem here, how did you solve it?

Dear WZhouuuu,
Can you check if this exists after flashing Drive 5.0.5a(feb release)

it just happened after I flashed PX2 with latest DriveInstall 5.0.5

Dear WZhouuuu,
I don’t see any problem with sample_camera_gmsl on my PX2 flashed with Drive5.0.5a. However can you check if setting the paths helps as discussed in https://devtalk.nvidia.com/default/topic/1028385/driveworks/couldn-t-launch-cameras-after-upgrading-to-driveworks-0-6/

If this does not help, Can you file a bug for this symptom and post ID here.
Please login to https://developer.nvidia.com/drive with your credentials. Please check MyAccount->MyBugs->Submit a new bug to file bug.

Dear WZhouuuu,

Recently, we’ve updated NVIDIA DRIVE 5.0.5.0bL (April 2, 2018).
So could you please update DPX2 SDK and check it again? Thanks.

I updated to 5.0.5.0bL. The camera was working at the beginning. But after I installed ROS, this error appeared again. Wondering why ROS would be the case?

Dear WZho776,
Similar issue is addressed at https://devtalk.nvidia.com/default/topic/1030193/general/-solved-cannot-find-function-nveglapigetaccess-after-installing-ros-kinetic/

Hi SivaRamaKrishna,

Thank you for your reply. Running sample as root did solve the problem. Also I found if I ssh to PX2, and run command DISPLAY=:0 ./sample_camera_gmsl --camera-type=ar0231, it also works, except giving an error:“TimeSource: PTP ioctl returned error. Synchronized time will not be available.
TimeSource: Could not detect valid PTP time source at ‘eth0’. Fallback to CLOCK_MONOTONIC.”

Is there any other way to work around it? Thanks!

I kept forgetting export library step… so in ~/.bashrc file, I added:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-9.0/lib:/usr/local/cuda-9.0/lib64:/usr/lib:/usr/local/cuda/targets/aarch64-linux/lib:/usr/local/cuda-9.0/lib:/usr/local/cuda-9.0/lib64:/usr/lib:/usr/local/cuda/targets/aarch64-linux/lib: now it’s working…

Dear WZhouuuu,

Please refer to below link for time sync. Thanks.

https://devtalk.nvidia.com/default/topic/1031778/faq/nvidia_drive_px2_time_sync_guide/