Skip to main content

Pose WebSocket server

Streams one rigid body from any mocap system to a browser. Requires Python 3.10+.

Run from the repository root:

python3 -m venv .venv
. .venv/bin/activate
pip install ./pose
pose --demo

For Vicon:

pip install './pose[vicon]'
pose.vicon --host 192.154.4.124 --list  # List current object names
pose.vicon --host 192.154.4.124 --subject crazyflie | pose

Vicon uses the root segment; override with --segment NAME. Server defaults: 127.0.0.1:8765; change with --host/--port. Stop with Ctrl-C.

Pose API

Connect to ws://127.0.0.1:8765/pose. Each text message contains:

{"timestamp":1789600000.125,"position":[0.1,-0.2,0.5],"quaternion":[0,0,0,1]}
  • timestamp: Unix seconds when the producer received the sample.
  • position: meters, right-handed world frame: X forward, Y left, Z up.
  • quaternion: normalized [x,y,z,w], rotating body-local vectors into world coordinates.

All values must be finite numbers. The Vicon adapter converts millimeters to meters and reorders its SDK quaternion to this shared convention.

The stream is read-only. Invalid/occluded poses are skipped; tracking loss means silence. Clients should detect stale data. Slow clients skip pending samples; new connections receive only new samples. Input EOF stops the server.

Other adapters must emit this format as flushed, newline-delimited JSON to stdout, with diagnostics on stderr:

python -u my_mocap_adapter.py | pose

Browser

Run Python on the browser's computer. From a Connect button handler:

const response = await fetch("http://127.0.0.1:8765/health");
if (!response.ok) throw new Error("Pose server unavailable");
const socket = new WebSocket("ws://127.0.0.1:8765/pose");
socket.onmessage = ({data}) => console.log(JSON.parse(data));

Grant Chrome's local/loopback permission. Allowed origins: https://rc.rl.tools, http://localhost:8000, http://127.0.0.1:8000; extend with --allow-origin URL. /health returns last_pose_age_s (null before any sample).

Tests: python -B -m unittest discover -s pose/tests -v.

Metadata

Release files for poseproxy 0.0.1

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

Source distribution (sdist)

Source distribution for poseproxy 0.0.1
File Size Uploaded Provenance
poseproxy-0.0.1.tar.gz 8.9 kB Without provenance Details

Release files / poseproxy-0.0.1.tar.gz

Download URL poseproxy-0.0.1.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5bea1316a4925e87c18fed3ce228320d9db292a42e18f79965a275fd01677a02
BLAKE2b-256 checksum
How to use checksums
cec11a3986bb3fa71ad0eb1207cf0b0731a1580543143baa30b88ec0cc1a3679
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for poseproxy 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

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