[IGSTK-Users] Error in PolarisTracker::AttachSROMFileNameToPort()

Torleif Sandnes Torleif.Sandnes at sintef.no
Tue May 8 07:46:20 EDT 2007


Hi.

I have spent some days trying to get tracking working in my  
application. I am new to tracking and did some copying and pasting  
from the Needle Biopsy example to my code.
Looking at the log from the tracker, I saw that it had entered the  
*tracking* state, periodically entered *AttemptingToUpdateState* and  
returned to *Tracking* with SuccessInput.
However, there was no tracking of the spatial object in my QView3D.

After investigating the transforms returned from the tracker and  
reading the code of PolarisTracker and checking all sorts of  
potential error sources, I found these lines in  
PolarisTracker::AttachSROMFileNameToPort()

void PolarisTracker::AttachSROMFileNameToPort( const unsigned int  
portNum,
                                                std::string fileName )
{
   igstkLogMacro( DEBUG, "PolarisTracker::AttachSROMFileNameToPort  
called..\n");

   // the first 3 ports are active, don't allow SROMS for them
   if ( (portNum >= 3) && (portNum <= NumberOfPorts) )
     {
     m_SROMFileNames[portNum] = fileName;
     }
}

It seems that if a port is below 3, it will not be taken into account  
and the tracker will continue as if everything is ok.
This leaves me with three questions:

1. Shouldn't the tracker enter some kind of error state if an invalid  
portnumber is specified by the user?

2. Doesn' t the AttachSROMFileNameToPort() break with the Attempting  
pattern used in igstk?
     (Along with SetCommunication()?)

3. Why are the three first ports on polaris considered active before  
any tools have been added?

Regards,
Torleif Sandnes
Sintef Health Research



More information about the IGSTK-Users mailing list