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 any Python 3.8.0 - 3.11.0
  • Use any suitable IDE (e.g., VS Code, PyCharm, or Spyder)

๐Ÿ”ง Required Python Libraries

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

  • pyrealsense2 โ€“ version: 2.54.2.5684
  • numpy โ€“ any version
  • open3d โ€“ version: 0.18.0
  • opencv-python โ€“ any 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 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
  • 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__)