Camera Driver Installation

You need to install dedicated camera driver.

Please ask ADLINK or the camera vendor for the latest camera driver.

1. Install Camera Driver

To install camera driver, please follow the commands below:

sudo apt update
sudo apt install -f <camera_driver.deb>

# Examples:
#
# [Tier IV]
# sudo apt install -f tier4-camera-gmsl_1.3.0_arm64.deb
#
# [Leopard AR0233]
# sudo apt install -f roscube-gmsl-serdes_0.9.3_arm64.deb

Warning

You can only install one camera driver in ROScube to avoid conflicts. If there are two or more, please remove them which you don’t use.
To remove unused camera driver, please use sudo apt remove --purge <camera driver>

2. Apply Device Tree

To enable the camera driver, you have to apply the device tree settings. Before applying, please use below command to list available modules:

sudo /opt/nvidia/jetson-io/config-by-hardware.py --list
../../_images/config-hardware-list.png

The camera device tree overlay may be located in different headers depends on the BSP and Jetpack version.

../../_images/config-hardware-list-tier4.png

To apply the device tree setings, please follow the commands below:

For Jetpack 4.6, 5.0, and later:

If the device tree is located in “Header 1”, please enter below command:

sudo /opt/nvidia/jetson-io/config-by-hardware.py -n 1='<YOUR_CAMERA_DEVICE_TREE_OVERLAY>'
# Examples:
#
# [Tier IV C1]
# sudo /opt/nvidia/jetson-io/config-by-hardware.py -n 1='TIERIV ISX021 GMSL2 Camera Device Tree Overlay'
#
# [Leopard AR0233]
# sudo /opt/nvidia/jetson-io/config-by-hardware.py -n 1='Leopard AR0233 RAW GMSL2 Camera Device Tree Overlay'

Otherwise, the device tree is located in “Header 2”, please enter below command:

sudo /opt/nvidia/jetson-io/config-by-hardware.py -n 2='<YOUR_CAMERA_DEVICE_TREE_OVERLAY>'
../../_images/config-hardware-name.png

For Jetpack 4.5:

Download the patched libgstnvarguscamerasrc.so and replace this file with the original one.

sudo rm /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvarguscamerasrc.so
sudo mv libgstnvarguscamerasrc.so /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvarguscamerasrc.so

Then, apply device tree into your system.

sudo /opt/nvidia/jetson-io/config-by-hardware.py -n '<YOUR_CAMERA_DEVICE_TREE_OVERLAY>'

3. Reboot

Finally, please reboot system for the new settings to take effect.

sudo reboot

4. Check Camera

After rebooting, you can check if the cameras are available.

Please use the following command to check:

ls /dev/video*
../../_images/dev-video.png

Warning

If there are no video devices, make sure cameras are connected.
And check the error logs by typing the command dmesg | egrep -i 'max9295|max9296' in terminal.