Expand description
Public Rust API for the Enpose 6-DoF tracking system.
This API lets external applications discover Enpose tracker devices on
the local network (DeviceDiscovery) and connect to one to receive a
live stream of marker poses (PoseStream).
The networking parts are behind the default net feature. Building with
default-features = false keeps only the wire types (MarkerPose) and
the pure protocol constants, which is what targets without a sockets
stack (e.g. wasm32) should depend on.
§Example
use enpose_api::{DeviceDiscovery, PoseStream};
// Find a device, then stream poses from it.
if let Some(device) = DeviceDiscovery::new().discover()?.into_iter().next() {
let mut stream = PoseStream::from_device(&device, false)?;
// `true` waits for a pose update (up to a 3-second timeout).
for pose in stream.receive_pose_updates(true)? {
println!("marker {} @ ({}, {}, {})", pose.marker_id, pose.x, pose.y, pose.z);
}
}Re-exports§
pub use marker_pose::MarkerPose;pub use devicediscovery::DeviceDiscovery;pub use devicediscovery::DeviceInfo;pub use posestream::PoseStream;
Modules§
- devicediscovery
- Client-side discovery of Enpose tracker devices on the local network.
- ffi
- C ABI for the Enpose API.
- marker_
pose - The
MarkerPosewire type, shared between the Enpose API and the on-device daemon. - posestream
- Client-side pose streaming from a single Enpose tracker device.
- protocol
- Wire protocol shared by the Enpose API and the on-device daemon.