[IGSTK-Users] reg Polaris Spectra tracker
Patrick Cheng
cheng at isis.georgetown.edu
Tue Nov 9 11:16:41 EST 2010
Hi Somi,
That's a good question.
In IGSTK we use timestamp to keep things in sync. Each transform will be
timestamped at its origination with certain valid time period, depending
on tracker update frequency and an overlapping constant.
You can check validity of each transform's timestamp after you have
obtained transforms from all your tracker tools. The timestamps' start
and end time will be slightly different, as transforms are updated
sequentially. But they should have similar lifespan as they are
refreshed within one tracker update cycle.
It might not be as accurate as the frame number in Polaris. But given
Polaris's tracking frequency, this should be a valid solution.
Patrick
On 11/9/10 9:58 AM, somi wrote:
> Hi,
>
> I have a Polaris tracker with 4 tracking tools attached to it.
> During the tracking update look I use "
> tracker_tool->RequestGetTransformToParent() "
> to get the transform. See the pseudo-code below for details.
>
> How do I make sure that the transform received for all the Tracker tool
> objects is from the same
> frame. Polaris frames have a unique frame number for each tracking data,
> which I could probably use. Is there any way to access it ?
>
>
> UpdateLoop()
> {
>
> // Update Tool 1
> tracker_tool1->RequestGetTransformToParent();
> if (coordObserver1->GotTransform())
> {
> TransformType transform;
> transform = coordObserver1->GetTransform();
> if ((is_visible = transform.IsValidNow()))
> {
> copy transform data
> }
> }
>
>
>
>
> // Update Tool 2
> tracker_tool2->RequestGetTransformToParent();
> if (coordObserver2->GotTransform())
> {
> TransformType transform;
> transform = coordObserver2->GetTransform();
> if ((is_visible = transform.IsValidNow()))
> {
> copy transform data
> }
> }
>
>
>
> .... update other tools
> }
>
>
> here, coordObserver is an igstk::TransformObserver
>
>
>
> Thanks,
> Somi
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
More information about the IGSTK-Users
mailing list