Skip to main content

Poetry PyPI - Python Version PyPI - License Code style: black Statically typed: mypy


natnet client for motive applications with pure python


Installation

python -m pip install new-natnet-client

How's

How it works on the background

  1. When you try to connect to the motive application a background thread is started, in this thread is where all the data is received and unpacked.

  2. A request for connection is send

  3. If the motive application responds then the client starts working as expected. If a timeout value was set and no response was received on time, then the background thread stops.

How is data represented

The data received is converted to frozen and inmutable instances of the corresponding dataclass

How to read Motion Capture Data (MoCap) / frames

How stated before all data is received on the background, this means that reader must be synchronize for reading only when new data is received.

There are 2 ways to read:

1. Synchronous:

def foo():
    with NatNetClient(NatNetParams(...)) as client: # Create client
        if client is None: return # Make sure client connected successfully
        for frame_data in client.MoCap(): # Start reading data
            ...

2. Asynchronous:

async def foo():
    with NatNetClient(NatNetParams(...)) as client:
        if client is None: return
        async for frame_data in client.MoCapAsync():
            ...

From NATNET

This package provides the client for using Optitrack's NatNet tracking system, with type hints for python.

The NatNet SDK is a simple Client/Server networking SDK for sending and receiving data from Motive across networks. NatNet uses the UDP protocol in conjunction with either multicasting or point-to-point unicasting for transmitting data.

A list of changes made in each version can be found at the following website: https://www.optitrack.com/support/downloads/developer-tools.html

More about NatNet: https://docs.optitrack.com/developer-tools/natnet-sdk


Disclaimer: I have no relationship with Optitrack


Metadata

Release files for new-natnet-client 6.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for new-natnet-client 6.0.1
File Interpreter ABI Platform
new_natnet_client-6.0.1-py3-none-any.whl Python 3 none any Details

Release files / new_natnet_client-6.0.1-py3-none-any.whl

Download URL new_natnet_client-6.0.1-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
092d9e26a749be14e86e50dd175f96d9e3da18288a62441f775fc91a433267ce
BLAKE2b-256 checksum
How to use checksums
240343453d5293456c95e5c31458f60f6e07d9cb5f517e4636c6221cf5bc143b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.7 Windows/11
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page