I have been working on upping the game for the DonkeyCar and make AI more accessible to high-school students. The Raspberry Pi 3+ is just barely powerful enough to drive around a track and requires ideal lighting for training and driving. It is also not powerful enough to do training. It can only gather test data and run inference. Training must currently be done on other servers which is complex, time consuming and expensive.
My colleagues at the Optum Advanced Technology Collaborative have been looking into the Nvidia Jetson family of edge computers. Although the Xavier is a very powerful system, at $1,200 it is a bit too expensive for my CoderDojo students. Nvidia just release a much lower cost single-board computer (SBC) where the software developer kit (SDK) is priced at $100. That is a price that is much more realistic for an all-volunteer AI classroom.
I attempted to hook up my Raspberry Pi camera to it but it did not work. After posting a question on the Nvidia developer forum for the Nano, I got response that indicated I was using an incompatible camera. It turns out that the Nano only supports Camera Module V2. So I purchased a new camera on Amazon for $30 and it worked great. Here are the steps I took to get it working.
The photo below shows the package and the very clear labeling that this one is indeed the Module V2.
The next step is to hook the camera’s ribbon connector up correctly. Make sure the board is shutdown and the the power is disconnected. The CCD cameras are also very sensitive to static so use appropriate caution. The key is to know that the silver side of the connector is on the inside and the blue side is on the outside as shown in the photo below.
Once you press the connector down you should be able to pull gently on the ribbon to confirm the connector is gripping the end of the ribbon. Jim on the JetsonHacks channel has a nice video of connecting it here.
Now you should be able to power up the Nano and then type:
$ ls /dev/video0
If you don’t see the device file something must be wrong. Check to make sure you have the ribbon oriented correctly and that you have a Version 2 Pi camera. Version 1 will not work.
You can also test the video stream by downloading the CSI Camera code here:
Simple example of using a CSI-Camera (like the Raspberry Pi Version 2 camera) with the NVIDIA Jetson Nano Developer Kit…
The README.md file has the “G-streamer” shell command that you 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 -e
That program immediately streams the camera output to the monitor:
Proof that it works!
The Jetson Hacks has a more detailed page here: https://www.jetsonhacks.com/2019/04/02/jetson-nano-raspberry-pi-camera/
Thanks to Tommy Gilchrist for answering my question on the Forum.
I have been warned by several people that the Nvidia Jetson systems are not really designed for rookies like me. They really require quite a bit of UNIX background and deep knowledge of python container management. My hope is that the Nano is so low-cost that there will be a large community of support people like Tommy around to answer questions from newbies like me. Perhaps together we can make AI more accessible to high-school students in our CoderDojo programs.