Decode NatNet
messages in Rust.
NatNet
is the software solution supporting OptiTrack
many offerings. Since motion tracking data is multicast it can be decoded
in any language and this crate is a Rust (unofficial!) implementation.
use natnet_decode::NatNet;
use semver::Version;
let mut data = Vec::new();
// Fill data here
// ...
// We can then decode this:
let parsed = NatNet::unpack_with(&Version::parse("2.5.0").unpack(), &mut data.as_ref());
// Do stuff with parsed
println!("{:?}", parsed);
This crate is heavily inspired by python-optirx and test data is borrowed with permission.