- C++ 81.4%
- Rust 12%
- Shell 1.9%
- PowerShell 1.7%
- Makefile 1.6%
- Other 1.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- decode: replace 3 temporary Vecs with one upfront-sized bones Vec (offsets computed once; zero-copy indexing of joint ids / quats / scale) - encode: exact Vec::with_capacity (38+n+6n+4+ceil(9n/2)+8) instead of a rounded up 44+13n; assert bone count fits u16 rather than silent truncation - fix docs: header is 38 bytes (sender_ip is u64), frame is 1605->361 (4.45x); angular error claim corrected to the measured 0.005 deg worst case - tests: stable chord-metric angle check (f32 acos near dot=1 is noise), dense seeded axis/angle sweep, and an allocation-budget test proving encode=1 alloc @ exact capacity, decode=1 alloc - seal: chunks_exact -> as_chunks, div_ceil; clippy clean |
||
| build | ||
| jni | ||
| main | ||
| rust | ||
| .gitattributes | ||
| .gitignore | ||
| LICENSE | ||
| NOTICE | ||
| README.md | ||
mocopi Motion Serializer
mocopi Motion Serializer is a cross-platform library for mocopi-related applications. Provides motion data serialization functionality across multiple platforms.
License Notice
- This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Notwithstanding the foregoing, this repository does not include the mocopi logo or application icons. Use of these assets requires entering into a separate mocopi Logo and Icon License Agreement. (here)
Overview
The mocopi Motion Serializer is a library designed for developing mocopi-related applications. It provides mocopi motion data serialization and deserialization functionality across multiple platforms, enabling efficient transmission and processing of motion capture data obtained from mocopi systems.
Key Features
- Cross-platform motion data serialization
- Efficient binary format optimized for storage and transmission
- UTC timestamp and timecode support
- Thread-safe operations
Supported Platforms
This library supports the following operating systems and platforms:
- Windows (x64)
- macOS (Universal Binary - Intel & Apple Silicon)
- iOS (arm64)
- Android (arm64-v8a, x86_64)
Build Instructions
Prerequisites
Each platform requires specific development tools and SDKs:
- Windows: Visual Studio 2019 or later
- macOS/iOS: Xcode with iOS SDK
- Android: Android NDK r21e or later
Platform-Specific Build Guide
Windows
Open the Visual Studio solution:
build/Windows/mocopi_motion_serializer.sln
macOS
Open the Xcode project:
build/macOS/mocopi_motion_serializer.xcodeproj
iOS
Open the Xcode project:
build/iOS/mocopi_motion_serializer.xcodeproj
Android
For detailed Android build instructions, refer to the build guide: Android Build Guide
Quick start:
cd build/Android/
# When using Windows PowerShell (recommended)
.\build_mmf.ps1
# When using macOS/Linux
chmod +x build_mmf.sh && ./build_mmf.sh
Project Structure
├── main/ # Core library source code
├── rust/ # Zero-dependency #![forbid(unsafe_code)] Rust serializer & mocopi-wupz-pq (4.45x smaller UDP/BLE frames)
├── build/ # Platform-specific build configurations
│ ├── Android/ # Android NDK build scripts and projects
│ ├── iOS/ # iOS Xcode projects
│ ├── macOS/ # macOS Xcode projects
│ └── Windows/ # Visual Studio solutions
└── jni/ # Android JNI configurations
Rust mocopi-wupz-pq Crate (rust/)
In addition to the C++ smf1 library in main/, the rust/ directory provides a zero-dependency, #![forbid(unsafe_code)] Rust crate (mocopi-wupz-pq) implementing both standard smf1 Box serialization and the ultra-compact mwz1 (wupz + p/q Smallest-Three S^3 Quaternion + 12-bit Omni BFP Position) wire format:
- Smallest-Three
S^3Quaternionp/q(QuatSmallestThreePq,6 bytesvs16 bytesFP32): Stores the 2-bit index of the largest quaternion component + three 15-bit signed rationals overQ_{S^3} = 23170 \approx \lfloor 16383\sqrt{2}\rfloor+ 1-bit parity, reconstructing the 4th component via exact integerisqrt_u64(measured worst-case angular error0.005°). - 4.45× Frame Compression for Unfragmented UDP & BLE: Compresses a full 27-bone mocopi frame from
1,605 bytes(smf1) down to361 bytes(mwz1), including an 8-bytewupzbitplane XOR-fold integrity seal — fitting 4 full 27-bone mocopi frames inside a single1,472-byteUDP payload without IPv4 fragmentation. - Run tests:
cargo test --manifest-path rust/Cargo.toml --release
Support
For technical support and questions, please join the following Discord server:
Discord: https://discord.gg/k55wY45y5N
Also refer to the documentation in the build/ directory for platform-specific build instructions.
Resources
- mocopi Official Developer Site: https://sony.net/mocopi-dev/
Copyright © 2025 Sony Corporation. All rights reserved.