Ouster SDK
raw JSON → 0.16.2 verified Sat May 09 auth: no python
Official Python SDK for Ouster lidar sensors. Provides real-time data capture, visualization, and CLI tools for configuration, recording, and playback. Current version 0.16.2, with quarterly releases following a pattern of vX.Y.Z. Supports Python 3.8+. Breaking changes often involve reorganization under ouster.sdk prefix.
pip install ouster-sdk Common errors
error ModuleNotFoundError: No module named 'ouster.client' ↓
cause Imports using old path before v0.11.0 reorganization.
fix
Use 'from ouster.sdk.client import ...'
error AttributeError: module 'ouster.sdk.client' has no attribute 'LidarScan' ↓
cause Typo or outdated import; maybe using ouster.sdk.client incorrectly.
fix
Ensure correct spelling: from ouster.sdk.client import LidarScan. Check installed version; upgrade to >=0.11.0 if needed.
error RuntimeError: Sensor is not compatible ↓
cause SDK version >=0.13.0 requires firmware >=2.1.0.
fix
Update sensor firmware to 2.1.0 or later, or use an older SDK version.
Warnings
breaking In v0.11.0, all library-level modules were moved under ouster.sdk (e.g. ouster.client -> ouster.sdk.client). Old imports will break. ↓
fix Update imports to use ouster.sdk prefix. See migration guide: https://github.com/ouster-lidar/ouster-sdk/releases/tag/v0.11.0
deprecated ScanBatcher constructor with (size_t, const packet_format&) is deprecated; use (const sensor_info&) version. ↓
fix Pass a sensor_info object instead of manual size and format. See ScanBatcher doc.
breaking As of v0.13.0, SDK is no longer compatible with firmware < 2.1.0. Sensors must be updated. ↓
fix Update sensor firmware to at least 2.1.0. Consult Ouster support.
gotcha The --coord-frame option in ouster-cli filter defaults to BODY for backward compatibility but may not apply sensor extrinsics. Use WORLD to apply pose. ↓
fix Specify --coord-frame WORLD or SENSOR explicitly to match expectations.
Imports
- LidarScan wrong
from ouster.client import LidarScancorrectfrom ouster.sdk.client import LidarScan - SensorInfo wrong
from ouster.client import SensorInfocorrectfrom ouster.sdk.client import SensorInfo - ScanBatcher wrong
from ouster.client import ScanBatchercorrectfrom ouster.sdk.client import ScanBatcher - PacketSource wrong
from ouster.client import PacketSourcecorrectfrom ouster.sdk.client import PacketSource - PointViz wrong
from ouster.viz import PointVizcorrectfrom ouster.sdk.viz import PointViz
Quickstart
from ouster.sdk.client import SensorInfo, LidarScan, ScanBatcher
from ouster.sdk.client import PacketSource
import numpy as np
# Connect to sensor (use hostname or IP)
sensor_hostname = os.environ.get('OUSTER_HOSTNAME', '192.168.1.100')
sensor_info = SensorInfo(sensor_hostname)
print(sensor_info)
# Create a packet source
source = PacketSource(sensor_hostname)
# Batcher to assemble LidarScan
batcher = ScanBatcher(sensor_info)
# Collect one scan
for packet in source:
scan = batcher(packet)
if scan is not None:
print(f"Got scan at {scan.timestamp}")
break