Python Examples
Sample scripts to illustrate use of the Voyant SDK.
This section contains practical examples demonstrating how to use the Voyant SDK in various scenarios. Each example includes annotated code, explanations of key concepts, and instructions for running the code.
Python Bindings
Python bindings are available on PyPI:
pip install voyant-api
See the Python Installation Guide for full details including virtual environment setup.
Available Examples
| Example | Description |
|---|---|
| Live Client | Receive and inspect live frames from a Carbon sensor |
| SDL Command | Reconfigure the sensor (state, FOV, frame rate) at runtime |
| Data Recording | Record live sensor data to disk |
| Playback | Play back a recording and convert frames to pandas DataFrames |
| PCD Conversion | Convert a recording to per-frame .pcd files |
| Background Noise Calibration | Calibrate the sensor’s background-noise mask |
| Peak Dump | Dump the raw peak stream to CSV while streaming |
Running the Examples
All examples are available in the voyant-sdk repository.
1. Install the Python bindings:
pip install voyant-api
2. Download the example scripts from voyant-sdk/python/examples/
3. Run directly with Python 3.9+
Using these examples
You are encouraged to:
- Use these examples as starting points for your own applications
- Modify and adapt the examples to suit your needs
- Share your improvements with the community
When using the example code, please retain the copyright notices at the top of each file.