Jetson - Compile RealSense cameras

1 minute read


First of all, check the intel realsense documentation:

I followed most of the steps but I had to change some to make my cameras D435 and T265 work properly

¡WARNING!: Switch the cameras off before compiling the realsense libraries.

  1. Dependencies

    sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev
    sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
  2. Clone the following repository to get all the libraries needed

    git clone
    cd librealsense
  3. Checkout version 2.35.2 (last version at June 22, 2020) :

    There is a bug that make the compilation fail, follow this ticket to solve it:

    Checkout version 2.35.2:

    git checkout v2.35.2
  4. Rules

    sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
    sudo udevadm control --reload-rules && udevadm trigger
  5. Create build folder and open it

    mkdir build && cd build
  6. Compile using CMAKE

    Be sure to write the following inside ~/.bashrc :

    # CUDA
    export CUDACXX=/usr/local/cuda-10.0/bin/nvcc
    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64
    export PATH=${PATH}:/usr/local/cuda/bin

    In my case I am using cuda-10.0, change this with your installed version.


  7. Install

    If this is not the first time you install it:

    sudo make uninstall && make clean && make -j4 && sudo make install

    If it is the first time:

    sudo make clean && make -j4 && sudo make install
  8. To use this libraries with ROS2:

    sudo ln -s /usr/local/lib/ /usr/lib/aarch64-linux-gnu/
  9. Test