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 versionopen3d
โ 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
- Visit https://www.python.org/downloads/
- Download Python 3.8+
- Run the installer
- โ IMPORTANT: Check the box โAdd Python to PATHโ
- Click โInstall Nowโ
๐ป Installing Required Libraries
Open Command Prompt
- Press
Win + R
, typecmd
, 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__)