🚧 These docs are currently out of date. 🚧

They reflect the Meadowlark (Carbon dev kit) API and may not apply to Carbon systems.
Fully updated documentation will be published when Carbon Alpha ships in April 2026.

Questions? Reach out to us at: support@voyantphotonics.com

This example demonstrates how to receive live Voyant LiDAR data over multicast UDP using the Python bindings.

Available from v0.4.4. Requires pip install voyant-api.

What You’ll Learn

  • How to create a VoyantClient instance in Python
  • How to receive frames in a polling loop
  • How to access point cloud data as NumPy arrays

Prerequisites

  • Python 3.9 or later
  • voyant-api installed:
    pip install voyant-api
    
  • A Voyant LiDAR sensor (or sensor simulator running in loopback mode)

Example Code

View the complete example on GitHub: client_example.py

Key Concepts

Creating the Client

from voyant_api import VoyantClient, init_voyant_logging

init_voyant_logging()

client = VoyantClient(
    bind_addr="0.0.0.0:4444",
    group_addr="224.0.0.0",
    interface_addr="127.0.0.1",  # Use your network interface IP for a real sensor
    filter_points=True,           # Remove invalid points
)

Polling for Frames

try_receive_frame() is non-blocking — it returns None if no new frame is available yet:

while True:
    frame = client.try_receive_frame()
    if frame is not None:
        xyzv = frame.xyzv()  # NumPy array (N x 4): [x, y, z, radial_vel]
        print(f"{frame}")

Command Line Options

python client_example.py --help

# Connect on a specific interface
python client_example.py --interface-addr 192.168.20.100

# Keep invalid points in the point cloud
python client_example.py --keep-invalid-points

Expected Output

Starting Voyant client on 127.0.0.1
Press Ctrl+C to stop

Frame 1: VoyantFrame(frame_index=133, n_points=23040, n_valid=21500, timestamp=1742330842.722)
Frame 2: VoyantFrame(frame_index=134, n_points=23040, n_valid=21498, timestamp=1742330842.822)
...

Next Steps

  • Recorder — save live frames to disk
  • Playback — replay recordings offline

Copyright © Voyant Photonics, Inc.

This site uses Just the Docs, a documentation theme for Jekyll.