Skip to content

Vicon: read each subject's pose from its root segment - #35

Closed
AmmarW wants to merge 1 commit into
IMRCLab:mainfrom
AmmarW:vicon-root-segment
Closed

AmmarW wants to merge 1 commit into
IMRCLab:mainfrom
AmmarW:vicon-root-segment

Conversation

@AmmarW

@AmmarW AmmarW commented Nov 5, 2026

Copy link
Copy Markdown

Problem

MotionCaptureVicon::rigidBodies() and rigidBodyByName() read the pose with GetSegmentGlobalTranslation(name, name), that is, from the segment named after the subject. Vicon Tracker names an object's single segment after the object, but not every setup does; ours names it root. For such subjects both lookups fail with InvalidSegmentName, the subject is skipped, and motion_capture_tracking publishes no poses at all, with no warning.

Fix

Ask the DataStream SDK for the subject's root segment (GetSubjectRootSegmentName) and read the pose from it, falling back to the subject's name if that call fails. Where the segment is named after the subject, the root segment is that segment, so existing setups behave as before.

Testing

A Vicon system streaming one object at 120 Hz (subject cf1, root segment root, as reported by the SDK's test client), read through motion_capture_tracking built against this branch:

/poses
before no messages
after 119.8 Hz, cf1 at (0.141, 0.008, 0.061) m

rigidBodies() and rigidBodyByName() asked the DataStream SDK for the
segment named after the subject. Vicon Tracker names an object's segment
that way, but other setups name it differently ("root" here), and such
subjects were never reported, so motion_capture_tracking published no
poses at all. Ask the SDK for the subject's root segment instead, falling
back to the subject's name if that call fails.

Tested against a Vicon system streaming one object at 120 Hz (subject
"cf1", root segment "root"): no poses before, cf1 at 119.8 Hz after.
@AmmarW AmmarW closed this Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant