Once a rigid body is defined in tracking tools, is it possible to stream the xyz coordinates of each individual marker that makes up the body?
I am currently reading this information into matlab, and while I can get the coordinates of the rigid body without a problem, the individual markers are not so straightforward. Individual markers can be streamed and received but they don't seem to be labelled in any coherent or consistent way.
When streaming all the individual markers to matlab, is it possible to know which marker belongs to which rigid body? and to have the labelling be consistent between frames?
Rigid Bodies - individual marker locations
-
- Posts: 1365
- Joined: Fri Jun 27, 2008 11:29 am
- Location: Corvallis, Oregon
Re: Rigid Bodies - individual marker locations
If you are streaming via our NatNet interface, you have access to rigid bodies plus XYZ for their individual markers. If you're streaming via VRPN, it only sends 6 DOF for rigid bodies. I believe the same is true for trackd.
Marketing Manager
TrackIR | OptiTrack
TrackIR | OptiTrack
Re: Rigid Bodies - individual marker locations
But is there a way to tell which rigid body an individual marker belongs to?
I can get a list of every marker being captured, but as far as I can see they're not labelled in any way that lets me know who they belong to
and yes, this is streamed via natnet into matlab
I can get a list of every marker being captured, but as far as I can see they're not labelled in any way that lets me know who they belong to
and yes, this is streamed via natnet into matlab
-
- NaturalPoint Employee
- Posts: 199
- Joined: Tue Jun 24, 2008 2:01 pm
- Location: Corvallis, OR, USA
- Contact:
Re: Rigid Bodies - individual marker locations
The NatNet FrameofMocap data contains all the mocap data in several different formats, depending on your use case and what type of models you have defined in your server application.
For your situation, it sounds like the sRigidBodyData structure within the frame of mocap data is what you want. It contains the list of rigid bodies, and for each rigid body -
- the # of markers associated with it
- their ids
- their positions
In this way - you should have consistent marker ids, as well as which rigid body they belong to. I believe the SampleClient3d.cpp illustrates this.
hope this helps,
Morgan
For your situation, it sounds like the sRigidBodyData structure within the frame of mocap data is what you want. It contains the list of rigid bodies, and for each rigid body -
- the # of markers associated with it
- their ids
- their positions
Code: Select all
// Rigid Body Data (single frame of one rigid body)
typedef struct sRigidBodyData
{
int ID; // RigidBody identifier
float x, y, z; // Position
float qx, qy, qz, qw; // Orientation
int nMarkers; // Number of markers associated with this rigid body
MarkerData* Markers; // Array of marker data ( [nMarkers][3] )
int* MarkerIDs; // Array of marker IDs
float* MarkerSizes; // Array of marker sizes
float MeanError; // Mean measure-to-solve deviation
sRigidBodyData()
{
Markers = 0; MarkerIDs = 0; MarkerSizes = 0;
}
} sRigidBodyData;
hope this helps,
Morgan