opendatacam

Jetson Nano

Limitations

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.

Shopping list

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)

For setup:

Learn more about Jetson Nano ecosystem: https://elinux.org/Jetson_Nano#Ecosystem_Products_and_Sensors

Setup Opendatacam

1. Flash Jetson Nano:

Follow Flashing guide (don’t forget to verify if CUDA is in your PATH)

2. Set correct Powermode according to your Power supply

Using microUSB

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
Using barrel jack (5V - 4A)

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)

jumper

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

3. Setup a swap partition:

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

4. Install Opendatacam

You need to install Docker compose (no official installer available for ARM64 devices)

sudo apt install python3-pip

sudo apt-get install -y libffi-dev
sudo apt-get install -y python-openssl
sudo apt-get install libssl-dev

sudo pip3 install docker-compose

And then install OpenDataCam

# Download install script
wget -N https://raw.githubusercontent.com/opendatacam/opendatacam/v3.0.1/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

5. (optional) Run on USB Camera

By default, OpenDataCam will start on a demo file, but if you want to run from an usbcam you should

ls /dev/video*
# Output should be: /dev/video1
"VIDEO_INPUT": "usbcam"

For example:

"v4l2src device=/dev/video1 ..."
sudo docker-compose restart

N.B : there is some issue to support out of the box (docker install) run from the CSI cam (raspberry pi cam), please see: https://github.com/opendatacam/opendatacam/blob/master/documentation/CONFIG.md#run-from-raspberry-pi-cam-jetson-nano for more info, you need to do a manual install for this

6. Test Opendatacam

Open http://localhost:8080.

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.

7. Access Opendatacam via Wifi hotspot

N.B: you need a wifi dongle for this.

connectioninformatio

Take note somewhere of the Jetson IP Address, in this case 10.42.0.1

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.

8. Tips

9. Build a case

Here are the steps to set up the Jetson NANO in the Wildlife Cam Casing from Naturebytes.