MantisBT - IGSTK
View Issue Details
0011331IGSTKIGSTKpublic2010-10-19 05:022010-10-19 05:02
zhang xiaodong 
Patrick Cheng 
normalminorhave not tried
assignedopen 
0011331: a bug when navigating with NDI polaris spectra tracker
Recently, we are using NDI Polaris Hybrid tracker to navigate in our system with the igstk "navigator" example. The version of isgtk is 4.2 and the operation system is windows XP sp3, 32 bit. After configuration and initialization, the NDI ploris spectra does not work. According to a solution on the net as below:

//INIT before PHRQ
commandInterpreter->INIT(); //Add the code here
 
// request port handle using PHRQ
commandInterpreter->PHRQ("********", // device number
"*", // TIU or SCU
"1", // wireless
"**", // port
"**"); // channel
if (this->CheckError(commandInterpreter) =3D=3D FAILURE)
{
return FAILURE;
}

ph = commandInterpreter->GetPHRQHandle();

the code "commandInterpreter->INIT();" is added before the PHRQ command in the function "VerifyTrackerToolInformation" of igstkPolarisTracker.cxx. It worked well. However, the transform of tracking tools are wrong. So we debug the function step by step and find that ph = 1 every time. It indicates that INIT() resets the ph parameter to 1 and GetPHRQHandle() always gets 1 as ph of current tool when the current tool is attached to the tracker. No matter how many wireless tools are used, it only treats as one tool. So "commandInterpreter->INIT()" can not be added here. So we add it to the igstkNDITrakcer.cxx in the function InternalOpen():

NDITracker::ResultType NDITracker::InternalOpen( void )
{
  ...............


  commandInterpreter->INIT(); // add it here
  return result;

}

Then the phs for the different tools are right and the system works well.
No tags attached.
Issue History
2010-10-19 05:02zhang xiaodongNew Issue
2010-10-19 05:02zhang xiaodongStatusnew => assigned
2010-10-19 05:02zhang xiaodongAssigned To => Patrick Cheng

There are no notes attached to this issue.