In our development, we change to using docker environment to work with the Sekonix GMSL cameras. However, the connection inside the docker seems troublesome.
To start out, I run the
sample_camera_gmslfile from nvidia to check whether the cameras are working inside the docker. However, this gives me a segmentation fault, after adding the related directories and the linking paths in the docker environment.
Can you provide an example on what needs to be accesible in the docker in order to work with the hardware cameras. Some excerpts of what I added so far:
When running the docker I mount:
-v /usr/local/driveworks-1.2/targets:/usr/local/driveworks-1.2/targets \
-v /usr/local/cuda-9.2/targets/aarch64-linux/lib:/usr/local/cuda-9.2/targets/aarch64-linux/lib \
-v /usr/lib:/usr/lib/externNV \
-v /usr/local/driveworks-1.2/targets/aarch64-Linux/lib:/usr/local/driveworks-1.2/targets/aarch64-Linux/lib \
-v /dev:/dev \
-v /lib/firmware:/lib/firmware \
further I set the linker paths:
What am I missing?
I added the following to my docker run script:
-h "v4l_5050a" \
-v /dev/bus/usb:/dev/bus/usb \
-v /home/user_name/NVIDIA:/home/nvidia/NVIDIA \
-v /home/user_name/dev:/home/nvidia/dev \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=$DISPLAY \
-v /usr/lib/x86_64-linux-gnu:/usr/lib/nvidia-390 \
-e LD_LIBRARY_PATH=/usr/lib/nvidia-390 \
which brought me to actually recognizing the devices in the docker if I read correctly. At least for GPU. However there still seems to be sth missing from driveworks.
27-3-2019 22:7:20] Initialize DriveWorks SDK v1.2.400
[27-3-2019 22:7:20] Release build with GNU 4.9.4 from v1.2.0-rc11-0-ga7f5475 against Vibrante PDK v18.104.22.168
[27-3-2019 22:7:20] Platform: Detected Drive PX2 - Tegra A
[27-3-2019 22:7:20] TimeSource: monotonic epoch time offset is 1553610640429839
[27-3-2019 22:7:20] TimeSource: PTP ioctl returned error. Synchronized time will not be available.
[27-3-2019 22:7:20] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[27-3-2019 22:7:20] Platform: number of GPU devices detected 2
[27-3-2019 22:7:20] Platform: currently selected GPU device discrete ID 0
[27-3-2019 22:7:20] SDK: Resource failed to mount from '/usr/local/driveworks-1.2/samples/data/resources': VirtualFileSystem: Failed to mount '/usr/local/driveworks-1.2/samples/data/resources[.pak]'
[27-3-2019 22:7:20] SDK: Resources mounted from /usr/local/driveworks-1.2/data/resources
[27-3-2019 22:7:20] SDK: Create NvMediaDevice
[27-3-2019 22:7:20] SDK: Create NvMediaIPPManager
[27-3-2019 22:7:20] SDK: Release NvMedia2D
[27-3-2019 22:7:20] SDK: Release NvMediaDevice
[27-3-2019 22:7:20] Driveworks exception thrown: DW_NOT_AVAILABLE: Cannot load EGL extensions: eglGetPlatformDisplayEXT, eglQueryDevicesEXT, eglQueryDeviceStringEXT
terminate called after throwing an instance of 'std::runtime_error'
what(): [2019-03-27 22:07:20] DW Error DW_NOT_AVAILABLE executing DW function:
dwInitialize(&m_sdk, DW_VERSION, &sdkParams)
I have the same problem. Have you managed to make it work?
The problem for EGL was the following. The program is finding the wrong lib:
I renamed the file /usr/lib/aarch64-linux-gnu/mesa-egl/libEGL.so.1. Now the program is finding the right lib.