Python

A loosely connected collection of examples and concepts useful for working with the Ouster Python SDK. If you are just starting, please see Ouster SDK Installation.

To start developing with source code, please see Python.

For convenience, we will use $SAMPLE_DATA_PCAP_PATH and $SAMPLE_DATA_JSON_PATH for the locations of the sample data pcap and json.

For Python code, pcap_path and sensor_info_path are taken to be set to those values, respectively:

pcap_path = '<SAMPLE_DATA_PCAP_PATH>'
sensor_info_path = '<SAMPLE_DATA_JSON_PATH>'

Similarly, $SENSOR_HOSTNAME is used for your sensor’s hostname.

Python Examples Catalog

Category

Description

Examples

Core module basics

Connect to your sensor, record data to a PCAP or OSF file.

Record and Replay Data

Working with Ouster sensor.

Converting Data Formats

Convert PCAPs to various file formats (CSV, LAS, PCD, PLY).

Converting Data Formats

Read, write using OSF API.

Working with OSF Files

Visualizing Point Clouds

See your data. Visualize point clouds in real-time from a sensor or from a file using Open3D, and Matplotlib.

Visualizing with Open3D

Visualize point clouds from a sensor or from a file using Matplotlib.

Visualizing with Matplotlib

Understanding Sensor Data

Go deeper into the data. Understand the LidarFrame data structure.

The LidarFrame Object

How to work with 2D and 3D representations.

2D and 3D Projections

How to parse raw UDP packets.

Working with UDP Packets

Pose Optimizer

Use the Pose Optimizer to refine it.

Pose Optimizer