Hi all,<br><br>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:<br>
<br>-------------------------------------------------------------------------------------------<br><br> for(unsigned int i = 0; i<500000; i++)<br> {<br> igstk::PulseGenerator::CheckTimeouts();<br> <br>
TransformType transform;<br> VectorType position;<br> <br> coordSystemAObserver->Clear();<br> tool->RequestGetTransformToParent();<br> <br> if(coordSystemAObserver->GotTransform())<br>
{<br> transform = coordSystemAObserver->GetTransform();<br> <br> if(transform.IsValidNow())<br> {<br> position = transform.GetTranslation();<br> std::cout << "Position:" << position[0] << " " << position[1] << " " << position[2] << std::endl;<br>
}<br> else<br> std::cout << "Invalid" << std::endl;<br> } <br><br> //vtksys::SystemTools::Delay(100);<br> }<br><br>-------------------------------------------------------------------------------------------<br>
<br>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?<br><br>Thank you for your help!<br>
<br>Kind Regards,<br>Rafael Palomar<br>