Expose Meta IOBT body tracking as get_body_meta_* API - #16
Open
zerenluo123 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose Meta IOBT body tracking as
get_body_meta_*Companion to XR-Robotics/XRoboToolkit-Unity-Client-Quest#6,
which adds body tracking to the Quest client. That PR publishes a new
BodyMetakey; this oneparses it and exposes it to Python.
183 insertions, 0 deletions — the PICO
Bodypath is untouched.API
is_body_meta_available()boolget_body_meta_joints_pose()(N, 7)position + quaternion per jointget_body_meta_joint_ids()(N,)joint idsget_body_meta_position_valid()(N,)per joint,Falsewhen occludedget_body_meta_orientation_valid()(N,)fails independently of positionget_body_meta_tracking_space()(7,)tracking-space origin in the world frameget_body_meta_timestamp_ns()intshared with the other sources in the frameget_body_meta_info()dictof the metadata fieldsNaming follows the existing
get_body_*group with_meta_inserted, so the two are adjacent inautocomplete and neither shadows the other.
Why separate storage instead of reusing the
BodyarraysThe existing arrays are
std::array<..., 24>and the parser truncates:Meta IOBT sends 70 (or 84 for
FullBody), so reusing them would silently drop 46 joints. The twoskeletons are also not interchangeable — PICO's comes from IMU trackers with velocity and
acceleration per joint, Meta's is camera-inferred and carries neither, since
OVRPlugin.BodyJointLocationholds onlyLocationFlagsandPose.BodyMetastorage therefore usesstd::vectorsized from the incomingcountrather than a fixedarray, so a future switch to the 84-joint
FullBodyset needs no change here.Two behaviours worth knowing
isActiveis checked before the joints are stored. When the headset leaves the head, trackingstops but the client's JSON still holds the previous frame — it reuses its objects rather than
clearing them. The parser treats that as unavailable, because a stale frame read as live is worse
than no frame: nothing downstream can tell the difference.
calibis passed through, not acted on. Joints stream complete from the first frame;calibreaching
Validonly means the runtime stopped adjusting the skeleton's scale. Gating on it wouldstall the stream 30–60 s on every re-don for no gain.
Testing
Verified end-to-end against a Quest 3 running the companion client build:
Built against Python 3.12;
import xrobotoolkit_sdkand all 8 functions resolve.Happy to rename anything or restructure if you'd prefer a different shape.