Ex: Live Client
Connect to Voyant sensor and capture incoming frames with Python.
🚧 These docs are out of date as of May, 2026. 🚧
They reflect the Meadowlark (Carbon dev kit) API and may not apply to Carbon systems.
Questions? Reach out to us at: support@voyantphotonics.com
They reflect the Meadowlark (Carbon dev kit) API and may not apply to Carbon systems.
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
VoyantClientinstance 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-apiinstalled: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)
...