Markers in a tracked rigid body

Post Reply
kahl_hellmer
Posts: 10
Joined: Fri Sep 14, 2007 7:33 am
Location: Uppsala, Sweden

Markers in a tracked rigid body

Post by kahl_hellmer » Tue Aug 18, 2009 4:35 am

..a question about real-time tracking of a specific marker in a tracked rigid body. What would be the easiest/CPU-friendliest way of finding this marker? In a way - what I am looking for is a function like TT_TrackableMarker() for the tracked rigid body and not the rigid body definition.

Is the only way to go through each marker in a frame using TT_FrameMarkerX-Z and choose? WWJD?

Thanks,

Kahl Hellmer

beckdo
NaturalPoint Employee
NaturalPoint Employee
Posts: 519
Joined: Tue Jan 02, 2007 2:02 pm

Re: Markers in a tracked rigid body

Post by beckdo » Tue Aug 18, 2009 12:28 pm

Yes, that is the current way. If you have any specific function requests, let me know and I'll try to get them added into the API.

kahl_hellmer
Posts: 10
Joined: Fri Sep 14, 2007 7:33 am
Location: Uppsala, Sweden

Re: Markers in a tracked rigid body

Post by kahl_hellmer » Wed Aug 19, 2009 1:43 am

Ok, thanks. Then I'll do it the hard way for now..

It would help me alot if the API had a function that takes a rigid body index and a marker index as input and returns the marker position (not from definition, but the tracked position). Also, the possibility to explicitly index or set ID to the markers when creating a rigid body definition would in this case be very helpful.

Thanks again,

Kahl

litch09
Posts: 32
Joined: Tue Mar 10, 2009 6:28 pm

Re: Markers in a tracked rigid body

Post by litch09 » Wed Sep 30, 2009 3:39 pm

This is certainly an important feature which would help if implemented in future versions. What is the best way to do this calculation?

Do you have to calculate the distance of each marker (obtained from TT_FrameMarkerX-Z) from the the other markers and determine which markers best match the distances from the definition of the trackables obtained from TT_TrackableMarker()? Or is there a more efficient way?

Cheers,
Glen

kahl_hellmer
Posts: 10
Joined: Fri Sep 14, 2007 7:33 am
Location: Uppsala, Sweden

Re: Markers in a tracked rigid body

Post by kahl_hellmer » Thu Oct 01, 2009 11:40 am

You can also use the TT_TrackableMarker() information with the TT_TrackableLocation() and calculate where the markers "should" be. Its probably more CPU-friendly, but might not be suitable. I guess that what you described would be the correct way.

Kahl

litch09
Posts: 32
Joined: Tue Mar 10, 2009 6:28 pm

Re: Markers in a tracked rigid body

Post by litch09 » Thu Oct 01, 2009 2:02 pm

Yes, that does sound like a good way of doing this. I will give it a go.

Cheers

saftschachtel
Posts: 1
Joined: Wed Aug 03, 2011 2:24 am
Location: Germany, Magdeburg

Re: Markers in a tracked rigid body

Post by saftschachtel » Wed Aug 03, 2011 2:52 am

Hi guys!

I want to bring this post to life again.
I think the requested functionality is a very basic one.
I should be implemented definetly to the libraries.
Something like...

///Get the current position of a marker, that belongs to a rigid body.
/**
*\param rigidIndex - the index of the rigidbody
*\param markerIndex - the markerindex in the rigidbody
*\param posX, posY, posZ - pointer to variables in which the position is stored
*/
void TT_TrackableMarkerLocation( int rigidIndex, int markerIndex, float *posX, float *posY, float *posZ);

...would be really great!

Tom

Post Reply