[IGSTK-Users] igstkPolarisTrackerToolTest - 2 more changes, sorry

Patrick Cheng cheng at isis.georgetown.edu
Wed Oct 15 14:57:38 EDT 2008


Hi Anka,

Can you send the entire print out (or logIgstkPolarisTrackerTest ) and 
RecordedStreamByPolarisTrackerTest.txt to us?

This test program is trying to attach 3 tools to the tracker
1. Active tool connected to Polaris port 1.
2. Passive tool with the SROM you specified.
3. an AuroraTool, which is suppose to fail. (So you observe the 
switching in the output)

When you say, "handshaking seems to go well", do you mean the serial 
communication established successfully? In that case, you should hear a 
beep from the tracker. Are you using direct serial connection, or 
USB2Serial?

If you are using COM3, you should probably put "2" in the argument.
This is how IGSTK define serial port:
  /** Available port numbers. */
   enum PortNumberType { PortNumber0 = 0,
                         PortNumber1 = 1,
                         PortNumber2 = 2,
                         PortNumber3 = 3,
                         PortNumber4 = 4,
                         PortNumber5 = 5,
                         PortNumber6 = 6,
                         PortNumber7 = 7 };

And by default, under Windows:

/* define some cmake-configurable macros */
#define IGSTK_SERIAL_PORT_0 "COM1:"
#define IGSTK_SERIAL_PORT_1 "COM2:"
#define IGSTK_SERIAL_PORT_2 "COM3:"
#define IGSTK_SERIAL_PORT_3 "COM4:"
#define IGSTK_SERIAL_PORT_4 "COM5:"
#define IGSTK_SERIAL_PORT_5 "COM6:"
#define IGSTK_SERIAL_PORT_6 "COM7:"
#define IGSTK_SERIAL_PORT_7 "COM8:"


Under Linux:

/* define some cmake-configurable macros */
#define IGSTK_SERIAL_PORT_0 "/dev/ttyS0:"
#define IGSTK_SERIAL_PORT_1 "/dev/ttyS1:"
#define IGSTK_SERIAL_PORT_2 "/dev/ttyS2:"
#define IGSTK_SERIAL_PORT_3 "/dev/ttyS3:"
#define IGSTK_SERIAL_PORT_4 "/dev/ttyS4:"
#define IGSTK_SERIAL_PORT_5 "/dev/ttyS5:"
#define IGSTK_SERIAL_PORT_6 "/dev/ttyS6:"
#define IGSTK_SERIAL_PORT_7 "/dev/ttyS7:"



Patrick


Anka Kochanowska wrote:
> Thanks!
> I am just trying to learn how to use Polaris in IGSTK, that's how I got 
> to try the tool test.
> I've been using release IGSTK-3.0, but changed now to CVS version, taken 
> maybe a week ago.
> So now my command is
> ./igstkTests igstkPolarisTrackerTest logIgstkPolarisTrackerTest 
> /opt/polaris_rom_files/passive_pointer/1400394.rom 3
> My Polaris port is #3, handshaking seems to go well, but testing is 
> getting worse - after the test determined that it is a wireless tool, it 
> switched to Aurora tracker and then back to Polaris.
> Seems that it does not like command:
> Write(PHRQ:*********1****A4C1\x0D, 24)
> 
> Anka:-)
> _____________
> 
> 1224095016.45286202430725097656  :    (DEBUG) 
> igstk::TrackerTool::TrackerToolConfigurationSuccessProcessing called ...
> 1224095016.45288491249084472656  :    (DEBUG) 
> igstk::TrackerTool::RequestAttachToTracker called...
> 1224095016.45290398597717285156  :    (DEBUG) State transition is being 
> made : PolarisTrackerTool  PointerID 0x8515d88 ConfiguredState(227)  
> with AttachToolToTrackerInput(215) ---> 
> AttemptingToAttachTrackerToolToTrackerState(228).
> 1224095016.45291590690612792969  :    (DEBUG) 
> igstk::TrackerTool::AttemptToAttachTrackerToolToTracker called ...
> 1224095016.45292592048645019531  :    (DEBUG) 
> igstk::Tracker::RequestAttachTool called ...
> 1224095016.45294594764709472656  :    (DEBUG) State transition is being 
> made : PolarisTracker  PointerID 0x8506da0 
> CommunicationEstablishedState(99)  with AttachTrackerToolInput(108) ---> 
> AttemptingToAttachTrackerToolState(100).
> 1224095016.45295691490173339844  :    (DEBUG) 
> igstk::Tracker::AttemptToAttachTrackerToolProcessing called ...
> 1224095016.45296788215637207031  :    (DEBUG) 
> igstk::PolarisTracker::VerifyTrackerToolInformation called ...
> 1224095016.45297908782958984375  :    (DEBUG) igstk::NDITracker:: 
> GetCommandInterpreter ...
> 1224095016.453144073486328125  :    (DEBUG) 
> SerialCommunication::PurgeBuffers called ...
> 1224095016.45316600799560546875  :    (DEBUG) State transition is being 
> made : SerialCommunicationForPosix  PointerID 0x8500528 
> ReadyForCommunicationState(73)  with PurgeBuffersInput(90) ---> 
> AttemptingToPurgeBuffersState(78).
> 1224095016.45317792892456054688  :    (DEBUG) 
> SerialCommunicationForPosix::InternalPurgeBuffers called ...
> 1224095016.45320105552673339844  :    (DEBUG) State transition is being 
> made : SerialCommunicationForPosix  PointerID 0x8500528 
> AttemptingToPurgeBuffersState(78)  with SuccessInput(81) ---> 
> ReadyForCommunicationState(73).
> 1224095016.45322394371032714844  :    (DEBUG) 
> SerialCommunication::Write(PHRQ:*********1****A4C1\x0D, 24) called...
> 1224095016.45326590538024902344  :    (DEBUG) State transition is being 
> made : SerialCommunicationForPosix  PointerID 0x8500528 
> ReadyForCommunicationState(73)  with WriteInput(88) ---> 
> AttemptingToWriteState(76).
> 1224095016.45329308509826660156  :    (DEBUG) State transition is being 
> made : SerialCommunicationForPosix  PointerID 0x8500528 
> AttemptingToWriteState(76)  with SuccessInput(81) ---> 
> ReadyForCommunicationState(73).
> 1224095016.45331501960754394531  :    (DEBUG) State transition is being 
> made : SerialCommunicationForPosix  PointerID 0x8500528 
> ReadyForCommunicationState(73)  with ReadInput(87) ---> 
> AttemptingToReadState(75).
> 1224095016.48632693290710449219  :    (DEBUG) State transition is being 
> made : SerialCommunicationForPosix  PointerID 0x8500528 
> AttemptingToReadState(75)  with SuccessInput(81) ---> 
> ReadyForCommunicationState(73).
> 1224095016.48637509346008300781  :    (DEBUG) 
> SerialCommunication::Read(ERROR016BC2\x0D, 2047, 12) called...
> 1224095016.48639392852783203125  :    (WARNING) NDI Error 0x01: Invalid 
> command
> 1224095016.48643994331359863281  :    (DEBUG) State transition is being 
> made : PolarisTracker  PointerID 0x8506da0 
> AttemptingToAttachTrackerToolState(100)  with FailureInput(115) ---> 
> CommunicationEstablishedState(99).
> 1224095016.4864521026611328125  :    (DEBUG) 
> igstk::Tracker::AttachingTrackerToolFailureProcessing called ...
> 1224095016.48646211624145507812  :    (DEBUG) 
> igstk::TrackerTool::ReportFailedTrackerToolAttachment called ...
> 1224095016.48648309707641601562  :    (DEBUG) State transition is being 
> made : PolarisTrackerTool  PointerID 0x8515d88 
> AttemptingToAttachTrackerToolToTrackerState(228)  with 
> AttachmentToTrackerFailureInput(222) ---> ConfiguredState(227).
> 1224095016.4864959716796875  :    (DEBUG) 
> igstk::TrackerTool::TrackerToolConfigurationFailureProcessing called ...
> 1224095016.48903608322143554688  :    (DEBUG) 
> igstk::AuroraTrackerTool::RequestSelect6DOFTrackerTool called ...
> 1224095016.48906397819519042969  :    (DEBUG) State transition is being 
> made : AuroraTrackerTool  PointerID 0x851a790 IdleState(332)  with 
> Select6DOFTrackerToolInput(343) ---> 6DOFTrackerToolSelectedState(334).
> 1224095016.48911595344543457031  :    (DEBUG) 
> igstk::AuroraTrackerTool::Report6DOFTrackerToolSelectedProcessing called 
> ...
> 1224095016.48912811279296875  :    (DEBUG) 6DOF Tracker tool selected 
> 1224095016.48913908004760742188  :    (DEBUG) 
> igstk::TrackerTool::RequestConfigure called...
> 1224095016.48915910720825195312  :    (DEBUG) State transition is being 
> made : AuroraTrackerTool  PointerID 0x851a790 IdleState(293)  with 
> ConfigureToolInput(280) ---> AttemptingToConfigureTrackerToolState(294).
> 1224095016.48917102813720703125  :    (DEBUG) 
> igstk::TrackerTool::AttemptToConfigureProcessing called ...
> 1224095016.48918199539184570312  :    (DEBUG) 
> igstk::AuroraTrackerTool::CheckIfTrackerToolIsConfigured called...
> 1224095016.48919892311096191406  :    (DEBUG) State transition is being 
> made : AuroraTrackerTool  PointerID 0x851a790 
> AttemptingToConfigureTrackerToolState(294)  with 
> ToolConfigurationFailureInput(282) ---> IdleState(293).
> 1224095016.48921108245849609375  :    (DEBUG) 
> igstk::TrackerTool::TrackerToolConfigurationFailureProcessing called ...
> 1224095016.4892330169677734375  :    (DEBUG) 
> igstk::TrackerTool::RequestAttachToTracker called...
> 1224095016.4892520904541015625  :    (DEBUG) State transition is being 
> made : AuroraTrackerTool  PointerID 0x851a790 IdleState(293)  with 
> AttachToolToTrackerInput(283) ---> IdleState(293).
> 1224095016.48926401138305664062  :    (DEBUG) 
> igstk::TrackerTool::ReportInvalidRequestToAttachTrackerToolProcessing 
> called ...
> 1224095016.48928594589233398438  :    (DEBUG) 
> igstk::Tracker::RequestStartTracking called ...
> 1224095016.48930692672729492188  :    (DEBUG) State transition is being 
> made : PolarisTracker  PointerID 0x8506da0 
> CommunicationEstablishedState(99)  with StartTrackingInput(107) ---> 
> AttemptingToTrackState(102).
> 1224095016.48931908607482910156  :    (DEBUG) 
> igstk::Tracker::AttemptToStartTrackingProcessing  called ...
> 1224095016.48932909965515136719  :    (DEBUG) 
> igstk::NDITracker::InternalStartTracking called ...
> 1224095016.48934197425842285156  :    (DEBUG) 
> SerialCommunication::PurgeBuffers called ...
> 1224095016.48936200141906738281  :    (DEBUG) State transition is being 
> made : SerialCommunicationForPosix  PointerID 0x8500528 
> ReadyForCommunicationState(73)  with PurgeBuffersInput(90) ---> 
> AttemptingToPurgeBuffersState(78).
> 1224095016.48937392234802246094  :    (DEBUG) 
> SerialCommunicationForPosix::InternalPurgeBuffers called ...
> 1224095016.48939490318298339844  :    (DEBUG) State transition is being 
> made : SerialCommunicationForPosix  PointerID 0x8500528 
> AttemptingToPurgeBuffersState(78)  with SuccessInput(81) ---> 
> ReadyForCommunicationState(73).
> 1224095016.48941802978515625  :    (DEBUG) 
> SerialCommunication::Write(TSTART:5423\x0D, 12) called...
> 
> Patrick Cheng wrote:
>> Hi Anka,
>>
>> The igstkPolarisTrackerToolTest only exercise the TrackerTool class' 
>> state machine. It doesn't really do much.
>>
>> If you want to test your trackers. You should run the 
>> igtkPolarisTrackerTest.
>>
>> In your previous email:
>> ./igstkTests igstkPolarisTrackerTest logIgstkPolarisTrackerTest.txt 
>> /opt/polaris_rom_files/passive_pointer/1400394.rom
>>
>> It seems like you are missing one argument: port number.
>>
>> You might be using an older version of the test code, which has the 
>> port number hard coded (configured by CMake). The latest version take 
>> the port number as an input.
>>
>> Patrick
>>
>> Anka Kochanowska wrote:
>>>
>>>  // Set the port number
>>> //  std::istringstream inputstream( argv[1] ); //Anka
>>>  if ( argc > 2 ) // Anka
>>>  std::istringstream inputstream( argv[2] );
>>>
>>>  unsigned int portNumber;
>>>
>>>  inputstream >> portNumber;
>>>
>>>  trackerTool->RequestSetPortNumber( portNumber );
>>>
>>>
>>>  // Set the SROM filename if specified
>>> //  if ( argc >= 3 ) //Anka
>>>  if ( argc > 3 )
>>>
>>> _______________________________________________
>>> IGSTK-Users mailing list
>>> IGSTK-Users at public.kitware.com
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
>>>
>>>
>>
> 
> 



More information about the IGSTK-Users mailing list