Jetson Nano has two power mode, 5W and 10W.
Once Opendatacam is installed and running without a monitor, it runs perfectly fine on 5W powermode (which is nice because you can power it with a powerbank). If you use it with a monitor connected, the display will be a bit laggy but it should work.
We recommend you to do the setup with a monitor connected and then make your Jetson nano available as a Wifi hotspot to operate it from another device.
The 10W Power mode of the Jetson won’t bring much performance improvement for Opendatacam.
The minimum setup for 5W power mode is:
For 10W power mode (this is good for desktop use when you plug the screen, the mouse, the keyboard, it draws powers from the peripherics)
Learn more about Jetson Nano ecosystem: https://elinux.org/Jetson_Nano#Ecosystem_Products_and_Sensors
Follow Flashing guide (don’t forget to verify if CUDA is in your PATH)
Using microUSD with a powerbank or a 5V⎓2A power supply, you just need to plug-in and the Jetson Nano will start when connected to it.
When started, we advise you to set the powermode of the Jetson Nano to 5W so it won’t crash, to do so, open a terminal and run:
sudo nvpmodel -m 1
To switch back to 10W power mode (default)
sudo nvpmodel -m 0
When working with the Jetson Nano with the monitor connected, we advise to use the barrel jack power. In order to do so you need first to put a jumper on the J48 pin (more details on Jetson Nano power supply)
By default, the Jetson Nano will already run on the 10W power mode, but you can make sure it is by running:
sudo nvpmodel -m 0
In order to reduce memory pressure (and crashes), it is a good idea to setup a 6GB swap partition. (Nano has only 4GB of RAM)
git clone https://github.com/JetsonHacksNano/installSwapfile cd installSwapfile chmod 777 installSwapfile.sh ./installSwapfile.sh
Reboot the Jetson nano
ls /dev/video* # Output should be: /dev/video0
If this isn’t the case, run the install script anyway, and after you will need to modify the config.json file to select your desired VIDEO_INPUT
If you have a Raspberry Pi Cam, see advanced usage.
# Download install script wget -N https://raw.githubusercontent.com/opendatacam/opendatacam/v2.0.0/docker/install-opendatacam.sh # Give exec permission chmod 777 install-opendatacam.sh # NB: You will be asked for sudo password when installing the docker container # Install command for Jetson Nano ./install-opendatacam.sh --platform nano
This will be super slow if you are using this directly on the monitor connected to the Jetson nano, see next step to access Opendatacam from an external device.
N.B: you need a wifi dongle for this.
Take note somewhere of the Jetson IP Address, in this case 10.42.0.1
Unplug monitor / ethernet / keyboard / mouse and reboot
Connect with another device to this Wifi network, and open
After rebooting the Jetson Nano may takes 1-5 min to start the docker container, so if your browser say “Page not found”, just retry after a few minutes
You should be able to operate Opendatacam without lag issues.
You’ll notice there are no button to power on / off button your Jetson Nano. When you plug the power supply it will power on immediately. If you want to restart you can just un-plug / re-plug if you are not connected via a Monitor or SSH. There is a way to add power buttons via the J40 pins, see nvidia forum.
You can connect your Jetson to ethernet and SSH into it to do all the setup without having to connect a monitor (after having setup a fixed IP)
Follow this article to test your raspberry pi cam
IMPORTANT: Unplug any usb webcam before plugging the raspberry pi cam or reboot after unpluging / plugin things.
NB: We hope this won’t be necessary after Jetpack 4.2.1 release with native docker support.
Follow Install without docker guide
config.json > VIDEO_INPUT , set
Restart Opendatacam, learn more about changing config.json here.
This is experimental, it might work for a time and then stop working… If it is the case you will be forced to re-flash your Jetson Nano as we have don’t know a way to uninstall this.
NB: We hope this won’t be necessary anymore after Jetpack 4.2.1 release with native docker support.
# Get scripts wget -N https://raw.githubusercontent.com/opendatacam/opendatacam/master/docker/run-jetson/setup-raspberrycam-proxy.sh wget -N https://raw.githubusercontent.com/opendatacam/opendatacam/master/docker/run-jetson/run-raspberrycam-proxy.sh # Give run permission sudo chmod 777 run-raspberrycam-proxy.sh setup-raspberrycam-proxy.sh # Setup proxy dependencies sudo ./setup-raspberrycam-proxy.sh # Install cronjob to start run-raspberrycam-proxy on boot cat <(crontab -l) <(echo "@reboot /bin/sh $(pwd)/run-raspberrycam-proxy.sh") | crontab - # Reboot your nano sudo reboot
Then you need to choose the
experimental_raspberrycam_docker options in the config.json. (see CONFIG.md)
"experimental_raspberrycam_docker"(NOTE: Under the hood, the important thing is that OpenCV get this gstreamer pipeline in entry:
v4l2src device=/dev/video2 ! video/x-raw, framerate=30/1, width=640, height=360 ! videoconvert ! appsink)
From the docker container, we can’t access directly the raspberrypi camera ( more background )
In order to do so we need to: