Release of the version 0.0.5 of the Python API!

Hi everyone,

We just pushed a (beta) version of our Python Implementation on Pypi!


We currently only have builds for Windows and Linux, on thoses platforms installation should be as simple as running:
pip install HaplyHardwareAPI


Extended documentation will soon be released, in order to get you started here is a basic example of how to connect and exchange data with the device.

import HaplyHardwareAPI
import serial
# list of all the ports
import time

ports =
for port, desc, hwid in sorted(ports):
    print("{}: {} [{}]".format(port, desc, hwid))
# ask the user for the port to use:
port = input("Please enter the port to use: ")
    com = HaplyHardwareAPI.SerialStream(port)
except ValueError:
    print("Error opening port: {}".format(ValueError))
Inverse3 = HaplyHardwareAPI.Inverse3(com)
device_id, device_model_num, hardware_version, firmware_version, quaternion = Inverse3.ReceiveDeviceInfo()
print("Device ID: {}".format(device_id))
print("Made Handshake with device")
positions = [0, 0, 0]
velocities = [0, 0, 0]
forces = [0, 0, 0]
start_time = time.perf_counter()
count = 0
while True:
    count += 1
    positions, velocities = Inverse3.ReceiveState()
    if count % 1000 == 0:
        print("Positions: {}, Velocities: {}".format(
            positions, velocities))
        dt = time.perf_counter() - start_time
        print("frequency = {} Hz".format(1000 / dt))
        start_time = time.perf_counter()