No subject
Wed Oct 7 22:37:18 EDT 2009
command before the PHRQ to request a port handle for wireless tool.
so i add these code in the igstkPolarisTracker.cxx:
//INIT before PHRQ tested by Cruise
commandInterpreter->INIT();
if (this->CheckError(commandInterpreter) =3D=3D FAILURE)
{
return FAILURE;
}
// end test
before the PHRQ command:
// 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;
}
PolarisTrackerExample works well, the
"TrackerToolAttachmentToTrackerErrorEvent" disappeared, and can track
the tool position.
but i don't test whether this would affect the part of wired tool or
the internal statemachine.
However, i am still confused Is this prolem related to the Firmware
version for polaris spectra?
2009/10/21 Patrick Cheng <cheng at isis.georgetown.edu>:
> Hi Lin Qi,
>
> Did you use relative path or full path when you set the SROM file? It sho=
uld
> be full path.
>
> Patrick
>
> Lin Qi wrote:
>>
>> hi, Jake:
>>
>> Thanks for your reply!
>>
>> i removed the trackerTool2->RequestSetPortNumber( 1 );, =C2=A0but the
>> prolem is still the same.
>>
>> I analyzed the log file captured by NDI API sample program, the whole
>> command procedure of the tracking is like
>>
>> RESET -> COMM: comsetting -> INIT -> IRATE ->
>> PHRQ:********01****9EC3-> PVWR: SROM file -> PHSR: port# ->
>> PINIT:port# -> PENA :port# ->PHINF:port# ->TSTART
>>
>> The Hybrid Spectra system ran very well under the NDI API sample
>> program, so i think the hardware works well.
>>
>> but in the IGSTK, the command procedure is just like this:
>>
>> RESET->INIT->COMM:comsetting ->PHRQ:*********1****A4C1 ->TSTART
>>
>> After the sending the PHRQ, igstk received the ERROR0C4E42, =C2=A0is tha=
t
>> related to event "TrackerToolAttachmentToTrackerErrorEvent"?
>>
>> Obivously,without assigining the tool definition file with PVWR,
>> TSTART got the reply ERROR0C4E42 and the tracking failed.
>>
>> How to solve this problem?
>>
>> Thanks and Regards
>> 2009/10/21 Jake McIvor <jdmcivor at interchange.ubc.ca>:
>>>
>>> Hey Cruise,
>>>
>>> Try removing the line:
>>>
>>> =C2=A0trackerTool2->RequestSetPortNumber( 1 );
>>>
>>> I am not sure about the Spectra, but I use an older version of the
>>> hybrid and it isn't necessary to set the port number of wireless
>>> tools. =C2=A0The port number is generated by the tracker hardware after=
a
>>> port request is sent through the NDI API.
>>>
>>> Let me know if that works,
>>>
>>> Cheers,
>>>
>>> Jake
>>>
>>> --
>>> Jake McIvor
>>> MASc Candidate, Biomedical Engineering
>>> University Of British Columbia
>>>
>>> On Tue, Oct 20, 2009 at 9:54 AM, Lin Qi <lqi at ee.cuhk.edu.hk> wrote:
>>>>
>>>> hi, Patrick:
>>>>
>>>> I am trying to use the IGSTK 4.2 for research. My system is Polaris
>>>> Hybrid Spectra with Combined Revision 012 under the windows vista and
>>>> visual studio 2008.
>>>> The build process is all right. Then I modified the source code of
>>>> example PolarisTrackerExample.cxx to retain the only one wireless
>>>> tool.
>>>>
>>>> The serialcommunication seems ok. The tracker can response the reset
>>>> and initialization command.
>>>>
>>>> But there are some problems from the PolarisTrackerLog.txt:
>>>> 1. trackerTool2->RequestAttachToTracker( tracker ); =C2=A0will generat=
e the
>>>> message" TrackerToolAttachmentToTrackerErrorEvent "
>>>> 2. tracker->RequestStartTracking(); =C2=A0will generate the message"
>>>> TrackerStartTrackingErrorEvent "
>>>>
>>>> Then i used the NDI API sample application to test tracking wireless
>>>> tool, the demo ran well. And i got the log file
>>>> "NDIAPISampleCapture.txt"captured from the serial comm. i compared
>>>> this file with the file "RecordedStreamByPolarisTracker.txt" output by
>>>> PolarisTrackerExample.exe, and found that in IGSTK, the command
>>>> procedure to initialize the tracker system, set the port handle and
>>>> start tracking was so simple. Finally, the tracking failed.
>>>>
>>>> I don't know why this happened, is that the problem about Polaris
>>>> Spectra Combined Revision?
>>>>
>>>> All the files are attached!
>>>>
>>>> Can you help me about this problem?
>>>>
>>>> Thanks and Regards
>>>>
>>>> Cruise.
>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>>
>> _______________________________________________
>> 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