Jetbot can't work with Raspberry Pi Version 2 camera

Hi guys,

I follow Create SD Card Image From Scratch · NVIDIA-AI-IOT/jetbot Wiki · GitHub
to setup my Jetbot from “Jetson Nano Developer Kit SD Card Image”. it worked well with basic_motion.ipynb when i try teleoperation.ipynb, it show a error as below

---------------------------------------------------------------------------
from jetbot import Camera

camera = Camera.instance()


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

RuntimeError: Could not read image from camera.

During handling of the above exception, another exception occurred:

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



/usr/local/lib/python3.6/dist-packages/traitlets/config/configurable.py in instance(cls, *args, **kwargs)
    508         # Create and save the instance
    509         if cls._instance is None:
--> 510             inst = cls(*args, **kwargs)
    511             # Now make sure that the instance will also be returned by
    512             # parent classes' _instance attribute.

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

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

dmesg didn’t show enough information for further debug

dmesg | grep cam
[    0.528577] GPIO line 151 (camera-control-output-low) hogged as output/low
[    0.612815] camchar: rtcpu character device driver loaded
[    0.731860] tegra_camera_platform tegra-camera-platform: tegra_camera_probe:camera_platform_driver probe
[    0.732116] misc tegra_camera_ctrl: tegra_camera_isomgr_register isp_iso_bw=1500000, vi_iso_bw=750000, max_bw=1500000
[    3.512611] imx219 6-0010: tegracam sensor driver:imx219_v2.0.6

but when i try

nvgstcapture-1.0

or

$ 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 -e

in terminal, the camera worked well

any suggestion for this error ? thanks a lot .

Hi Keliang,

Which camera are you using? Also, could you see if the error occurs after restarting the camera daemon:

  1. Restart the Jupyter notebook

  2. Restart the camera daemon

sudo systemctl restart nvargus-daemon
  1. Re-run the notebook

Thanks,
John

1 Like

@Jaybdub,

thanks for reply.

Which camera are you using? Also, could you see if the error occurs after restarting the camera daemon:

==> Camera Raspberry Pi Version 2

before post this issue , i’ve done below operation and got the same error.

1. Restart the Jupyter notebook

2. Restart the camera daemon

sudo systemctl restart nvargus-daemon

3. Re-run the notebook

i took another SD card flash with jetbot_image_v0p3p0.zip and teleoperation.ipynb work well.

this mean camera hardware is ok .

Just Clarify again, The problematic system is following the steps below,

1,follow https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write to write Jetson Nano Developer Kit SD Card Image to system

2, do some test / development 

3, follow https://github.com/NVIDIA-AI-IOT/jetbot/wiki/Create-SD-Card-Image-From-Scratch to setup jetbot image

please help for further debug, thanks.

@Jaybdub,

Jetson Nano Developer Kit SD Card Image i used is jetson-nano-sd-r32.1-2019-03-18.zip

jetbot image is jetbot_image_v0p3p1.img

When the error occurs, call below command and the log as attachment.

journalctl -u jetbot_jupyter >> jetbot_jupyter_log.txt
journalctl -u nvargus-daemon >> nvargus_daemon_log.txt

jetbot_jupyter_log.txt (2.84 KB)
nvargus_daemon_log.txt (178 KB)

@Jaybdub,

some information for reference , i mounted the tow image (jetson-nano-sd-r32.1-2019-03-18.zip and jetbot_image_v0p3p1.img )to ubuntu system to make comparisons and found that :

/var/nvidia/nvcam/settings/nvcam_cache_0.bin
/var/nvidia/nvcam/settings/serial_no_0.bin

are missing in my error system .

unfortunately, when I make up these two files, the error remains same.

Hi jyabdub,

any update? thanks

me same , the problem occured as keliang please advice @jaybdub :
i already used the sdcard image jp45 from official jetbot, after installation import camera from jetbot return failed and camera cant be initialized, but when i run command from shell like @Keliang do camera working well,
i try in console with python3

import camera from jetbot
also return error

I have the same problem. Did any of you find a solution?

1 Like

I’m also looking for a solution.