Skip to main content

Python bindings for Voyant Photonics, Inc. sensors

Project description

Voyant API - Python Bindings

Python bindings for Voyant Photonics LiDAR sensors, providing high-performance access to point cloud data.

Installation

pip install voyant-api

Sensor compatibility

Sensor Client
Carbon CarbonClient + CarbonConfig
Meadowlark VoyantClient (deprecated — see below)

Quick Start

Receiving live data (Carbon)

import time
from voyant_api import CarbonClient, CarbonConfig, init_voyant_logging

init_voyant_logging()

config = CarbonConfig()
config.set_bind_addr("0.0.0.0:5678")
config.set_group_addr("224.0.0.0")
config.set_interface_addr("192.168.1.100")

client = CarbonClient(config)
client.start()

# Press Ctrl+C to stop
while client.is_running():
    frame = client.try_receive_frame()
    if frame is not None:
        print(frame)

        # Get point cloud as numpy array (N x 4: x, y, z, radial_vel)
        xyzv = frame.xyzv()
        print(f"Points shape: {xyzv.shape}")
    else:
        time.sleep(0.001)

Config can also be loaded from a JSON file — see CarbonConfig JSON format below.

Recording data

import time
from voyant_api import CarbonClient, CarbonConfig, VoyantRecorder, RecordStatus, init_voyant_logging

init_voyant_logging()

config = CarbonConfig()
config.set_bind_addr("0.0.0.0:5678")
config.set_group_addr("224.0.0.0")
config.set_interface_addr("192.168.1.100")

client = CarbonClient(config)
client.start()

with VoyantRecorder(
    output_path="my_recording.bin",
    timestamp_filename=True,
    max_total_frames=1000,  # Optional: stop after 1000 frames
) as recorder:
    while client.is_running():
        frame = client.try_receive_frame()
        if frame is not None:
            status = recorder.record_frame(frame)
            if status == RecordStatus.STOP:
                break
        else:
            time.sleep(0.001)

Playing back recordings

from voyant_api import VoyantPlayback, init_voyant_logging
from voyant_api.pandas_utils import frame_to_dataframe

init_voyant_logging()

with VoyantPlayback(filter_points=True) as playback:
    playback.open("my_recording.bin")

    for frame in playback:
        if frame is None:
            break

        print(frame)

        # Convert to pandas DataFrame
        df = frame_to_dataframe(frame)
        print(df.head())

Converting recordings to PCD

from voyant_api import VoyantPlayback, init_voyant_logging
from voyant_api.pcd_utils import save_frame_to_pcd, frame_to_extended_pcd

init_voyant_logging()

with VoyantPlayback(filter_points=True) as playback:
    playback.open("my_recording.bin")

    for frame in playback:
        if frame is None:
            break

        # Save directly to .pcd file
        save_frame_to_pcd(frame, f"frame_{frame.frame_index}.pcd")

        # Or get a PointCloud object for further processing
        pc = frame_to_extended_pcd(frame)
        pc.save(f"frame_{frame.frame_index}.pcd")

API Overview

CarbonClient

Receives live data from Carbon sensors. Construct with a CarbonConfig and call start() before polling for frames.

config = CarbonConfig()
config.set_bind_addr("0.0.0.0:5678")
config.set_group_addr("224.0.0.0")
config.set_interface_addr("192.168.1.100")
config.set_range_max(50.0)
config.set_pfa(1e-4)

client = CarbonClient(config)
client.start()

CarbonConfig

Configuration for the Carbon pipeline. Construct with defaults and setters, or load from JSON.

# From defaults
config = CarbonConfig()
config.set_bind_addr("0.0.0.0:5678")

# From a JSON file
config = CarbonConfig.from_json("config.json")

CarbonConfig JSON format

All fields are optional and fall back to their defaults when omitted. To see all available fields and their current defaults, run:

from voyant_api import CarbonConfig
print(CarbonConfig())

This prints the full nested config with all current defaults, for example:

CarbonConfig { receiver: ReceiverConfig { multicast: MulticastReceiverConfig { bind_addr: "0.0.0.0:5678", group_addr: "224.0.0.0", interface_addr: "127.0.0.1" }, batch_size: 32, ... }, dsp: DspConfig { pfa: None, bandwidth_hz: 2000000000.0, elevation_fov_deg: 22.5, ... }, ... }

Any field shown in that output can be set in the JSON file. Fields showing None are unset and use sensor defaults.

VoyantRecorder

Records frames to binary files with automatic splitting options.

recorder = VoyantRecorder(
    output_path="recording.bin",
    timestamp_filename=True,         # Add timestamp to filename
    frames_per_file=None,            # Split after N frames
    duration_per_file=None,          # Split after N seconds
    size_per_file_mb=None,           # Split after N megabytes
    max_total_frames=None,           # Stop after N total frames
    max_total_duration=None,         # Stop after N total seconds
    max_total_size_mb=None,          # Stop after N total megabytes
)

VoyantPlayback

Plays back recorded data with rate control.

playback = VoyantPlayback(
    rate=1.0,              # Playback speed (None = as fast as possible)
    loopback=False,        # Loop continuously
    filter_points=True,    # Remove invalid points
)
playback.open("recording.bin")

Frame data access

# NumPy arrays
xyz   = frame.xyz()            # (N x 3): [x, y, z]
xyzv  = frame.xyzv()           # (N x 4): [x, y, z, radial_vel]
sph   = frame.spherical()      # (N x 3): [range, azimuth, elevation]

# Pandas DataFrames (via voyant_api.pandas_utils)
from voyant_api.pandas_utils import frame_to_dataframe, frame_to_extended_dataframe
df          = frame_to_dataframe(frame)           # 7 columns
df_extended = frame_to_extended_dataframe(frame)  # 11 columns

# PCD PointCloud objects (via voyant_api.pcd_utils)
from voyant_api.pcd_utils import frame_to_pcd, frame_to_extended_pcd, save_frame_to_pcd
pc = frame_to_pcd(frame)           # 7 fields
pc = frame_to_extended_pcd(frame)  # 11 fields
save_frame_to_pcd(frame, "out.pcd")

# Frame metadata
print(frame.frame_index)
print(frame.timestamp)
print(frame.n_points)
print(frame.n_valid_points)

Migrating from VoyantClient

VoyantClient is deprecated as of v0.5.0 and will be removed in a future release. Carbon sensor users should migrate to CarbonClient.

VoyantClient remains functional for Meadowlark sensors but will receive no new features or fixes.

The main differences:

VoyantClient (deprecated) CarbonClient
Config Constructor kwargs CarbonConfig object
Lifecycle No explicit start client.start() required
Shutdown client.stop() / client.wait_for_shutdown()
Timestamps use_msg_stamps set_use_msg_timestamp() — default True for Carbon

Before:

client = VoyantClient(
    bind_addr="0.0.0.0:4444",
    group_addr="224.0.0.0",
    interface_addr="192.168.1.100",
    filter_points=True,
    use_msg_stamps=True,
)

while True:
    frame = client.try_receive_frame()
    if frame is not None:
        process(frame)

After:

config = CarbonConfig()
config.set_bind_addr("0.0.0.0:5678")
config.set_group_addr("224.0.0.0")
config.set_interface_addr("192.168.1.100")

client = CarbonClient(config)
client.start()

# Press Ctrl+C to stop
while client.is_running():
    frame = client.try_receive_frame()
    if frame is not None:
        process(frame)
    else:
        time.sleep(0.001)

client.stop()

Features

  • High performance: Rust-based implementation with zero-copy data access
  • NumPy integration: Direct conversion to NumPy arrays via frame.xyzv()
  • Pandas support: DataFrame conversion via voyant_api.pandas_utils
  • PCD support: Point Cloud Data export via voyant_api.pcd_utils
  • Type hints: Full type annotations for IDE support (.pyi stubs included)
  • Recording & playback: Save and replay sensor data with timestamp preservation
  • Network streaming: Multicast UDP support for live sensor data

Complete examples

Full example scripts are available in the voyant-sdk repository:

  • client_example.py — Live data streaming with CarbonClient
  • recorder_example.py — Recording with all options
  • playback_example.py — Playback and processing
  • pcd_conversion_example.py — Converting recordings to PCD files

System requirements

  • Python: 3.9 or later
  • Dependencies: NumPy 2.0+, Pandas 2.0+, pypcd4 1.4+
  • Platforms: Linux, Windows, macOS
  • Hardware: Carbon sensors require v0.5.0+. Meadowlark sensors use the deprecated VoyantClient.

Documentation

Support

License

Proprietary — for use with Voyant Photonics hardware products only.

Copyright © 2025 Voyant Photonics, Inc. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

voyant_api-0.7.1.dev0-cp314-cp314-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.14Windows x86-64

voyant_api-0.7.1.dev0-cp314-cp314-manylinux_2_34_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

voyant_api-0.7.1.dev0-cp314-cp314-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

voyant_api-0.7.1.dev0-cp313-cp313-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.13Windows x86-64

voyant_api-0.7.1.dev0-cp313-cp313-manylinux_2_34_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

voyant_api-0.7.1.dev0-cp313-cp313-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

voyant_api-0.7.1.dev0-cp312-cp312-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.12Windows x86-64

voyant_api-0.7.1.dev0-cp312-cp312-manylinux_2_34_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

voyant_api-0.7.1.dev0-cp312-cp312-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

voyant_api-0.7.1.dev0-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

voyant_api-0.7.1.dev0-cp311-cp311-manylinux_2_34_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

voyant_api-0.7.1.dev0-cp311-cp311-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

voyant_api-0.7.1.dev0-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

voyant_api-0.7.1.dev0-cp310-cp310-manylinux_2_34_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

voyant_api-0.7.1.dev0-cp310-cp310-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

voyant_api-0.7.1.dev0-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9Windows x86-64

voyant_api-0.7.1.dev0-cp39-cp39-manylinux_2_34_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

voyant_api-0.7.1.dev0-cp39-cp39-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file voyant_api-0.7.1.dev0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ade860027a644100da5761860ea8563e434d589a9ce0c8bd1d0548f525b15f00
MD5 51a5f5b3c68a3c1f5f6e71fe1511f316
BLAKE2b-256 28628b493d0d42348d7f370424f20df83c0f06f9caaee296f770650af0f06eff

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f6392ba5fe5cf3a56d7c9c4eb7da87483acba7b5921fdeed00b8bacb1f2d2163
MD5 4e7d6f50447238ee1328e30de5e671ec
BLAKE2b-256 2111d1daf35467b68546f2e2f2aa98d871644ef7f90aa1e43399603a8aeaead0

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6f21eb6aea9631a91950d137557feb35de5966842f898cf56a7713dbcac00c27
MD5 c483b16b3244137445e216151eda978e
BLAKE2b-256 d1e621fd0438ab5ffcda652524b97bd89bebce1053cb870a704d15f493f2977d

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 357f8e9953306fcea9a30f80fda4f1cd03acc5e1af96da6999b9e75b5494075f
MD5 4a395e3d653deb850d0fd448b5cd1561
BLAKE2b-256 a9c75310f64939f2d6fc6d952d110811fe09602b12b99af10f4360ab68ce8822

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ca3194f3d7fbbf66890843408afe5c198359bc503ec7144ead7f73313dd75801
MD5 e7df2583b8487c0509e10dfbd6b4082d
BLAKE2b-256 74e8f45d28cfb6a94ebc0440a8d0924d1d72ae5cd63f6205e3c8eb474b91fa9b

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 165f0905c3899c205a21f06731882a835a5f76c5e515a0774486b0ee34ae9ad2
MD5 42f1aaa240e98af4174872e3386ebaef
BLAKE2b-256 f3567b265d1e7cdf3e5b9c2237892326ca2aa45a6f5fd8aa2c4e3019d55f63e7

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4c4d63c7a4a90dd6802bd7275203936f16f034e471eaf46cbdef693d5590231a
MD5 a00905b4e2d90e4d6274eabfe40d85e8
BLAKE2b-256 fba4caba0be43f8d58dfc357bd948c8d884af29b5105677704a6f0a31839d526

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5fcd029ff78960036a7c1be862fd3c966664543f566eff6641ebda286cc11404
MD5 3197c7e59722c24595747fc72549ca44
BLAKE2b-256 c200085e3b14b52a96b675c326b8996764b50345e6077f546713a154a3b7c5ef

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ad64bb66271523f560b4b46ee39b2f2703b61245cde72d2946ed38fdf265cc1f
MD5 5732eeb11f81f1ffa00abdac7088afd8
BLAKE2b-256 f91f4a5049cded6d4ec74bf456498764ea86a9ca2e3e50ef80f284925fefc8d7

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 10240547c0dcf2f37c162ed3ef476843c1d607a40c6e05025bf65bb2cf0a6b5c
MD5 44900b9339ea70e085fd4af17097e254
BLAKE2b-256 478a4f227715ea3c3edce8691f503f35d1a84faf68cbab8542b16d17c56ec6da

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1693ed4f118b823d378dd26d750ecd4bce842cd521151473e127fe7356883cbc
MD5 c29ec9aecc06f3c6f5608959b42d4bb8
BLAKE2b-256 59d20c8e41ba2f90450da05ff136ce76b25a361eb6d62b456d938fb94ac2c154

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b060000166787d9661afea61621dbf2e4d5e0b23b5fed407849fcb289db60b9f
MD5 cdacb1c8a3fcc6ae3a60d67dbbe13fe2
BLAKE2b-256 a7e2e899d71583762d37531484671d3966e7c3ef7933e1bc7cf06f15ef4ec6db

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 82dd9902daa8052f194dab31c9e3c02c636d93f15c3b3a7f2bf5caacda6c8551
MD5 8d3914206a0297f66fd20cf694d8dd4f
BLAKE2b-256 f35fbe5634a9e2c111ec3b4880ecc87b6440113a9e095ae7c9a39ad9b3b7157b

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1575b6e4623d2dcb0a39a5be07db4d10981a2aa720ff47305d6adaad5bf79e3d
MD5 6727b0cd8b10e7e156006c007fcef594
BLAKE2b-256 477691d2e0a064dde21b7c92d283c39a23dcdcac7a3a2998a48ebc27d8e0db03

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b32750511de6d8ad00e9761bcc2efa580ade7dba120f9ffa777d772343bd1947
MD5 88eeaeec49926597436e9005812a3eb1
BLAKE2b-256 7a2d974f8325111c652271bfd77ec4a8a4b2219d98db6232c309bb5db3557546

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 97a74828312021c883dd4f2214a7f139bc0bb4174c814f5b35eac41780623db4
MD5 2a71c1d0acb0e48941c14d6376f9a2e3
BLAKE2b-256 c2e07efcc7497e07770e8ac28b530679f2cf76ca955f53df4fdf1adc4574dd08

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0998833ebddaed92f0343b4dc7b7db1435f2b1498b9e3591d4bef940f6cb29a9
MD5 af8238c4cda5cc9e67d2ee4949812ad1
BLAKE2b-256 989a5120003ac2bd55b52f7feadfa8ffe2f685d6b691411aadb7ccfdf18331d0

See more details on using hashes here.

File details

Details for the file voyant_api-0.7.1.dev0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for voyant_api-0.7.1.dev0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d81cfcf859fb1ed4f03057b991c8fa1db26df5b61e577f5e0d6dd806df197bd
MD5 69a50c396b834e188ca30dc9ed1342d2
BLAKE2b-256 067cb83799da2179f58113be833a591a32b7e860a2755f600df72e780c537bc3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page