[IGSTK-Users] Timing considerations
Rafael Palomar
rafaelpalomaravalos at gmail.com
Tue Jun 22 07:35:54 EDT 2010
Hi all,
I'm making some advances on tracking with Aurora and IGSTK, however always a
new problem arises. Now I have a basic application that tries to get the
position of the tracker tool and show it by standard output. My problem now
is that sometimes I get invalid transformations (I guess it is about timing)
and sometimes valid transformations. Here you can see the main loop:
-------------------------------------------------------------------------------------------
for(unsigned int i = 0; i<500000; i++)
{
igstk::PulseGenerator::CheckTimeouts();
TransformType transform;
VectorType position;
coordSystemAObserver->Clear();
tool->RequestGetTransformToParent();
if(coordSystemAObserver->GotTransform())
{
transform = coordSystemAObserver->GetTransform();
if(transform.IsValidNow())
{
position = transform.GetTranslation();
std::cout << "Position:" << position[0] << " " <<
position[1] << " " << position[2] << std::endl;
}
else
std::cout << "Invalid" << std::endl;
}
//vtksys::SystemTools::Delay(100);
}
-------------------------------------------------------------------------------------------
As you can see I am displaying either "invalid" or the position I get. Do
you think is it a problem of synchronization between getting the transform
and producing the data by the tracker?
Thank you for your help!
Kind Regards,
Rafael Palomar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20100622/24f98e13/attachment.html>
More information about the IGSTK-Users
mailing list