CSI camera not working on JetBot/Jetson docker

I have been trying to make my CSI camera work on my Jetbot for some days. I read many old posts with different people having a similar problem. I have tried their solutions but without any success. I tried to restart nvargus_daemon (sudo systemctl restart nvargus-daemon), download additional jetpack packages, and reinstall the Jetson Nano Developer. When I tried

gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12’ ! nvvidconv flip-method=0 ! ‘video/x-raw,width=960, height=616’ ! nvvidconv ! nvegltransform ! nveglglessink -ereboot

the camera works, but when I try to create a Camera instance, I keep receiving the same error message: RuntimeError: Could not initialize camera. Please see error trace. I think maybe the problem is on docker (jetbot/docker at master · NVIDIA-AI-IOT/jetbot · GitHub). My jet version is 0.4.3 and my LTS 32.5.0. If anyone has something to share that could help me to fix this issue, I would appreciate that.

Thank you.

RuntimeErrorTraceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/jetbot-0.4.3-py3.6.egg/jetbot/camera/opencv_gst_camera.py in __init__(self, *args, **kwargs)
     29             if not re:
---> 30                 raise RuntimeError('Could not read image from camera.')
     31 

RuntimeError: Could not read image from camera.

During handling of the above exception, another exception occurred:

RuntimeErrorTraceback (most recent call last)
<ipython-input-1-87257c35b9ce> in <module>
      1 from jetbot import Camera
      2 
----> 3 camera = Camera.instance()

/usr/local/lib/python3.6/dist-packages/jetbot-0.4.3-py3.6.egg/jetbot/camera/opencv_gst_camera.py in instance(*args, **kwargs)
     70     @staticmethod
     71     def instance(*args, **kwargs):
---> 72         return OpenCvGstCamera(*args, **kwargs)

/usr/local/lib/python3.6/dist-packages/jetbot-0.4.3-py3.6.egg/jetbot/camera/opencv_gst_camera.py in __init__(self, *args, **kwargs)
     35             self.stop()
     36             raise RuntimeError(
---> 37                 'Could not initialize camera.  Please see error trace.')
     38 
     39         atexit.register(self.stop)

RuntimeError: Could not initialize camera.  Please see error trace.

Have a reference to below topic.

Unfortunately, I am still getting the same error, and now when I try to run gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12’ ! nvvidconv flip-method=0 ! ‘video/x-raw,width=960, height=616’ ! nvvidconv ! nvegltransform ! nveglglessink, it doesn’t work anymore.

Using winsys: x11
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:736 Failed to create CaptureSession

Got EOS from element "pipeline0".
Execution ended after 0:00:00.031032969
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Try the command again after restart nvargus-daemon by below command.

sudo service nvargus-daemon restart

It didn’t work, but your previous answer gave me the idea of trying the jetpak 4.5 instead of 4.6. Problem solved.

Thank you.

1 Like

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