OptiRX 0.3 on PyPI with Motive 1.7.x support

2015-01-20

OptiRX is a single-file pure Python library to receive motion capture data from OptiTrack mocap systems. The library is based on the direct depacketization example from their SDK, and doesn't require anything but Python (and the compatible mocap hardware and software, obviously).

Today I pushed to PyPI a new version, OptiRX 0.3, which is compatible with Motive 1.7.x, the latest version of the OptiTrack software.

This is how the library may be used when it runs on the same machine with the Motive server:

import optirx as rx

dsock = rx.mkdatasock()
version = (2, 7, 0, 0)  # NatNet version to use
while True:
    data = dsock.recv(rx.MAX_PACKETSIZE)
    packet = rx.unpack(data, version=version)
    if type(packet) is rx.SenderData:
        version = packet.natnet_version
    print packet

This update is a fruit of contributions by Jørgen Nordmoen and Lars Bjørlykke Kristiansen who took care to submit patches to my original library (a single file, compatible only with Motive 1.5.x, and not even on PyPI). At this point, when I've seen that there're other users beyond myself, I packaged and released the library properly.

OptiRX source repository: https://bitbucket.org/astanin/python-optirx

OptiRX PyPI page: https://pypi.python.org/pypi/optirx