Setting up the Software Requirements to use LiDAR for Pose Determination - Carleton-SRL/SPOT GitHub Wiki

🐍 Setting Up the Python Environment for L515 LiDAR

To get started with the Intel RealSense LiDAR L515 for computer vision applications, follow the steps below to install Python and the required libraries.


📦 Required Python Version & IDE

  • Install only Python 3.8.0
  • Use any suitable IDE (e.g., VS Code, PyCharm, or Spyder)

🧩 Required Software Development Kit (SDK)

The L515 comes with its own SDK, available at https://github.com/realsenseai/librealsense.

[!IMPORTANT] The installation of this SDK is required for the use of Python module pyrealsense2.

Picking the right SDK version can be tricky; you need to keep an eye on:

  • the Ubuntu release version (lsb_release -a),
  • the Ubuntu kernel version (uname -a), and
  • the JetPack version (sudo apt-cache show nvidia-jetpack).

It may be necessary to use a beta release of the SDK; if so, follow the instructions to download the source code and build it directly on the Orin. Otherwise, you can follow the usual instructions for installing it on a Jetson device.

[!TIP] During a "Building from Source using Native Backend" undertaken on 13 Jan 2026, it was necessary to modify ./scripts/patch-realsense-ubuntu-L4T.sh to accommodate a specific version of the NVIDIA® Tegra® Linux Driver Package (L4T). Specifically, the list of accepted JETSON_L4T_VERSION values was modified to include 36.4.7, the version listed in the first line of /etc/nv_tegra_release.


🔧 Required Python Libraries

The L515 requires the following Python libraries (versions recommended):

  • pyrealsense2version: 2.54.2.5684
  • numpyany version
  • open3dversion: 0.18.0
  • opencv-pythonany version

You may also find the following standard modules useful: time, math, threading, sys, pickle, os, socket, struct, copy


🐍 Installing Python

  1. Visit https://www.python.org/downloads/
  2. Download Python 3.8+
  3. Run the installer
  4. IMPORTANT: Check the box “Add Python to PATH”
  5. Click “Install Now”

Installing Python through LINUX Terminal

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8
sudo apt install python3.8-dev python3.8-venv

💻 Installing Required Libraries

Open Command Prompt

  • Press Win + R, type cmd, and hit Enter
  • Or open your IDE's terminal window

Creating a virtual environment

cd Documents
mkdir LiDAR_pose_example
cd LiDAR_pose_example
python3.8 -m venv .lidar_venv
source .lidar_venv/bin/activate
  • Verify Python Installation
python --version
  • Upgrade pip
pip install --upgrade pip
  • Install Pyrealsense2
pip install pyrealsense2==2.54.2.5684
  • Install OpenCV
pip install opencv-python
  • Install Open3d
pip install open3d==0.18.0
  • Install Numpy
pip install numpy

To verify the installations, run this test script:

import cv2
import open3d as o3d
import pyrealsense2 as rs

print("OpenCV version:", cv2.__version__)
print("Open3D version:", o3d.__version__)
print("pyrealsense2 version:", rs.__version__)

Click here to go HOME