[IGSTK-Users] PolarisTrackerExample Linking Error

Patrick Cheng patrick.p.cheng at gmail.com
Thu Aug 4 10:44:07 EDT 2011


Hi Jamie,

I looked at the log file, I noticed

24601376725.308189  :    (DEBUG)
SerialCommunication::Read(0101MISSING000000310000003D\x0A0000CF51\x0D, 2047,
37) called...

It looks like the tool is missing. It could be:
1. The tool is not clearly visible by the tracker
2. The SROM file doesn't match this particular tool you are using.

Can you double check these and give it a try again?

Patrick

On Thu, Aug 4, 2011 at 12:31 AM, Jiwon Jamie Ryu
<jjamieryu at melab.snu.ac.kr>wrote:

> Thanks so much.
>
> Jamie
>
> On Thu, Aug 4, 2011 at 12:58 PM, Patrick Cheng <patrick.p.cheng at gmail.com>wrote:
>
>>  Hmm....
>>
>> I will take a close look tomorrow morning.
>>
>> Patrick
>>
>>
>> On Aug 3, 2011, at 11:48 PM, Jiwon Jamie Ryu <jjamieryu at melab.snu.ac.kr>
>> wrote:
>>
>>    Hi Patrick,
>>
>> I tried it up to 10000 times,
>> but nothing comes out.
>> I'm attaching the code and logfile just in case.
>>
>> Thank you so much for the consideration and effort.
>> Jamie
>>
>>
>> On Thu, Aug 4, 2011 at 12:35 PM, Patrick Cheng <<patrick.p.cheng at gmail.com>
>> patrick.p.cheng at gmail.com> wrote:
>>
>>> Hi Jiwon,
>>>
>>> Try more iterations in your for loop, the tracker thread might not be
>>> started when your finished your main loop.
>>>
>>> And make sure your tool is visible to the tracker.
>>>
>>> Let me know how it goes,
>>>
>>> Patrick
>>>
>>>
>>> On Wed, Aug 3, 2011 at 11:25 PM, Jiwon Jamie Ryu <<jjamieryu at melab.snu.ac.kr>
>>> jjamieryu at melab.snu.ac.kr> wrote:
>>>
>>>>
>>>> Patrck.
>>>>
>>>> Here you go.
>>>> Thanks.
>>>>
>>>> Jamie
>>>>   On Thu, Aug 4, 2011 at 12:23 PM, Patrick Cheng <<patrick.p.cheng at gmail.com>
>>>> patrick.p.cheng at gmail.com> wrote:
>>>>
>>>>> Can you send me the log file?
>>>>>
>>>>>
>>>>> On Wed, Aug 3, 2011 at 11:21 PM, Jiwon Jamie Ryu <<jjamieryu at melab.snu.ac.kr>
>>>>> jjamieryu at melab.snu.ac.kr> wrote:
>>>>>
>>>>>> Patrick,
>>>>>>
>>>>>> When I fix that,
>>>>>>  std::string romFile =
>>>>>> "E:/Work/IGSTK_Robot/Polaris_RobotBin/Debug/Debug/CT191.rom";
>>>>>> and I also did
>>>>>>  std::string romFile =
>>>>>> "E:/Work/IGSTK_Robot/Polaris_RobotBin/CT191.rom";
>>>>>>  and
>>>>>>  std::string romFile = "./CT191.rom";
>>>>>>
>>>>>> still no position comes out.
>>>>>> Thanks.
>>>>>>
>>>>>> Jamie.
>>>>>>   On Thu, Aug 4, 2011 at 12:16 PM, Patrick Cheng <<patrick.p.cheng at gmail.com>
>>>>>> patrick.p.cheng at gmail.com> wrote:
>>>>>>
>>>>>>> Hi Jamie,
>>>>>>>
>>>>>>> Try use the fullpath to the SROM file.
>>>>>>>
>>>>>>> Patrick
>>>>>>>
>>>>>>>
>>>>>>> 2011/8/3 Jiwon Jamie Ryu < <jjamieryu at melab.snu.ac.kr>
>>>>>>> jjamieryu at melab.snu.ac.kr>
>>>>>>>
>>>>>>>>
>>>>>>>> Patrick.
>>>>>>>>
>>>>>>>> Here it is.
>>>>>>>> Thanks for your time.
>>>>>>>>
>>>>>>>> Jamie.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Aug 4, 2011 at 11:58 AM, Patrick Cheng <<patrick.p.cheng at gmail.com>
>>>>>>>> patrick.p.cheng at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Jiwon
>>>>>>>>>
>>>>>>>>> 24601373203.280037  :    (WARNING) NDI Error 0x08: Invalid port handle selected
>>>>>>>>>
>>>>>>>>> it looks like tracker tool setup probably has some problem. Can you send me the code for that part?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Patrick
>>>>>>>>>
>>>>>>>>> On Wed, Aug 3, 2011 at 10:48 PM, Jiwon Jamie Ryu <<jjamieryu at melab.snu.ac.kr>
>>>>>>>>> jjamieryu at melab.snu.ac.kr> wrote:
>>>>>>>>>
>>>>>>>>>> Hello...
>>>>>>>>>>
>>>>>>>>>> Thank you Patrick for the help.
>>>>>>>>>> Including ITK and IGSTK made it work.
>>>>>>>>>>
>>>>>>>>>> I finally got the polaris tracker to work. It does initialize and
>>>>>>>>>> get the correct rom file.
>>>>>>>>>> However, when I track the tracker tool, I get position of (0,0,0).
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> What I want to do is I want to get 2 tracker tool positions and
>>>>>>>>>> transform them to another coordinate space which may already be defined.
>>>>>>>>>> To do this, I need to get positions of tracker tools.
>>>>>>>>>>
>>>>>>>>>> It seems that transform.IsValidNow() is false, so that the code
>>>>>>>>>> does not go into this loop.
>>>>>>>>>>
>>>>>>>>>>  tracker->RequestStartTracking();
>>>>>>>>>>
>>>>>>>>>>   igstk::PulseGenerator::CheckTimeouts();
>>>>>>>>>>   coordSystemAObserver2->Clear();
>>>>>>>>>>   trackerTool2->RequestGetTransformToParent();
>>>>>>>>>>   //trackerTool2->RequestComputeTransformTo( referenceTool );
>>>>>>>>>>   // trackerTool2->ObserveTransformEventsFrom( trackerTool2 );
>>>>>>>>>>   if (coordSystemAObserver2->GotTransform())
>>>>>>>>>>   {
>>>>>>>>>>    transform = coordSystemAObserver2->GetTransform();
>>>>>>>>>>    if ( transform.IsValidNow() )
>>>>>>>>>>    {
>>>>>>>>>>      position = transform.GetTranslation();
>>>>>>>>>> ...}}
>>>>>>>>>>
>>>>>>>>>> I am working on this for so long, but I can't figure it out.
>>>>>>>>>> I am attaching my logfile just in case.
>>>>>>>>>> Please help.
>>>>>>>>>>
>>>>>>>>>> Thank you in advance.
>>>>>>>>>>
>>>>>>>>>> Jamie.
>>>>>>>>>>   On Thu, Aug 4, 2011 at 5:14 AM, Patrick Cheng <<patrick.p.cheng at gmail.com>
>>>>>>>>>> patrick.p.cheng at gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Jiwon Jamie Ryu,
>>>>>>>>>>>
>>>>>>>>>>> Try to include this in your CMakeLists.txt
>>>>>>>>>>>
>>>>>>>>>>>  FIND_PACKAGE (ITK)
>>>>>>>>>>> IF (ITK_FOUND)
>>>>>>>>>>>   INCLUDE (${ITK_USE_FILE})
>>>>>>>>>>> ELSE (ITK_FOUND)
>>>>>>>>>>>   MESSAGE (FATAL_ERROR "Need ITK.")
>>>>>>>>>>> ENDIF (ITK_FOUND)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Patrick
>>>>>>>>>>>
>>>>>>>>>>>   On Tue, Aug 2, 2011 at 10:17 AM, Jiwon Jamie Ryu <<jjamieryu at melab.snu.ac.kr>
>>>>>>>>>>> jjamieryu at melab.snu.ac.kr> wrote:
>>>>>>>>>>>
>>>>>>>>>>>>   Hi all.
>>>>>>>>>>>>
>>>>>>>>>>>> I'm trying to set up a new solution regarding Polaris tracker,
>>>>>>>>>>>> and I'm trying to use the functions that are in PolarisTracker.cxx in
>>>>>>>>>>>> IGSTKSandbox example.
>>>>>>>>>>>> So I start up with writing CMakeLists.txt shown as below.
>>>>>>>>>>>> Then, I used Cmake to configure and generate a solution.  (Code
>>>>>>>>>>>> added is the ones that I have written for other program and I'm trying to
>>>>>>>>>>>> combine everything that I've got.)
>>>>>>>>>>>> But when I compile the solution, I keep getting about 400 errors
>>>>>>>>>>>> as:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> 1>IGSTKSandbox.lib(igstkTracker.obj) : error LNK2001:
>>>>>>>>>>>> "__declspec(dllimport) public: unsigned long __thiscall
>>>>>>>>>>>> itk::Object::AddObserver(class itk::EventObject const &,class itk::Command
>>>>>>>>>>>> *)" (
>>>>>>>>>>>> __imp_?AddObserver at Object@itk@@QAEKABVEventObject at 2@PAVCommand at 2@@Z)
>>>>>>>>>>>>
>>>>>>>>>>>> 1>IGSTKSandbox.lib(igstkTrackerTool.obj) : error LNK2001:
>>>>>>>>>>>> "__declspec(dllimport) public: unsigned long __thiscall
>>>>>>>>>>>> itk::Object::AddObserver(class itk::EventObject const &,class itk::Command
>>>>>>>>>>>> *)" (
>>>>>>>>>>>> __imp_?AddObserver at Object@itk@@QAEKABVEventObject at 2@PAVCommand at 2@@Z)
>>>>>>>>>>>>
>>>>>>>>>>>> 1>IGSTKSandbox.lib(igstkCoordinateSystemDelegator.obj) : error
>>>>>>>>>>>> LNK2001: "__declspec(dllimport) public: unsigned long __thiscall
>>>>>>>>>>>> itk::Object::AddObserver(class itk::EventObject const &,class itk::Command
>>>>>>>>>>>> *)" (
>>>>>>>>>>>> __imp_?AddObserver at Object@itk@@QAEKABVEventObject at 2@PAVCommand at 2@@Z)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I'm thinking it relates to IGSTKSandbox Linking problem, but I
>>>>>>>>>>>> don't know what.
>>>>>>>>>>>> Please help me out.
>>>>>>>>>>>> Thanks.
>>>>>>>>>>>>
>>>>>>>>>>>> Jamie.
>>>>>>>>>>>> ========================================
>>>>>>>>>>>> INCLUDE (${IGSTK_USE_FILE} )
>>>>>>>>>>>> ELSE (IGSTK_USE_FILE)
>>>>>>>>>>>> MESSAGE( FATAL_ERROR "This application requires IGSTK. One of
>>>>>>>>>>>> these
>>>>>>>>>>>> components is missing. Please verify configuration")
>>>>>>>>>>>> ENDIF (IGSTK_USE_FILE)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> INCLUDE_DIRECTORIES(
>>>>>>>>>>>>   ${IGSTKSandbox_SOURCE_DIR}/IGSTK/Source
>>>>>>>>>>>>   ${IGSTKSandbox_SOURCE_DIR}/Source
>>>>>>>>>>>>   ${IGSTKSandbox_BINARY_DIR}
>>>>>>>>>>>>   ${IGSTKSandbox_BINARY_DIR}/SourceLatest
>>>>>>>>>>>> )
>>>>>>>>>>>>
>>>>>>>>>>>> IF(WIN32)
>>>>>>>>>>>>   LINK_LIBRARIES(
>>>>>>>>>>>>   AdeptTcpServer
>>>>>>>>>>>>   IGSTKSandbox
>>>>>>>>>>>>   )
>>>>>>>>>>>> ENDIF(WIN32)
>>>>>>>>>>>> INCLUDE_DIRECTORIES(./)
>>>>>>>>>>>> INCLUDE_DIRECTORIES(./PolarisHandler)
>>>>>>>>>>>> #INCLUDE_DIRECTORIES(E:/TK/IGSTKBIN2)
>>>>>>>>>>>> INCLUDE_DIRECTORIES(E:/TK/Sandbox-4-4/Sandbox-4.4)
>>>>>>>>>>>> #
>>>>>>>>>>>> # This option enables the scene graph observer to collect
>>>>>>>>>>>> relavant events to constuct the scene graph tree
>>>>>>>>>>>> #
>>>>>>>>>>>> OPTION(IGSTK_USE_SceneGraphVisualization "Enable scene graph
>>>>>>>>>>>> visualization by allowing the observer to listen to
>>>>>>>>>>>> relevant events" ON)
>>>>>>>>>>>> IF(IGSTK_USE_SceneGraphVisualization)
>>>>>>>>>>>>   INCLUDE_DIRECTORIES(
>>>>>>>>>>>> ${IGSTKSandbox_SOURCE_DIR}/Utilities/SceneGraphVisualization)
>>>>>>>>>>>> ENDIF(IGSTK_USE_SceneGraphVisualization)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> SET(Adept_SRC
>>>>>>>>>>>>   RobotTestV1.rc
>>>>>>>>>>>>   AdeptServerTest.cpp
>>>>>>>>>>>>   RobotTestV1.cpp
>>>>>>>>>>>>   RobotTestV1Dlg.cpp
>>>>>>>>>>>>   stdafx.cpp
>>>>>>>>>>>> )
>>>>>>>>>>>> SET(Adept_HRD
>>>>>>>>>>>>   AdeptServerTest.h
>>>>>>>>>>>>   AdeptTcpServer.h
>>>>>>>>>>>>   resource.h
>>>>>>>>>>>>   RobotTestV1.h
>>>>>>>>>>>>   RobotTestV1Dlg.h
>>>>>>>>>>>>   stdafx.h
>>>>>>>>>>>>   targetver.h
>>>>>>>>>>>> )
>>>>>>>>>>>> SET(Polaris_SRC
>>>>>>>>>>>>   PolarisTracker.cxx
>>>>>>>>>>>> )
>>>>>>>>>>>> SET(PolarisHandler
>>>>>>>>>>>>   ./PolarisHandler/APIStructures.h
>>>>>>>>>>>>   ./PolarisHandler/Comm32.cpp
>>>>>>>>>>>>   ./PolarisHandler/Comm32.h
>>>>>>>>>>>>   ./PolarisHandler/CommandConstruction.cpp
>>>>>>>>>>>>   ./PolarisHandler/CommandHandling.cpp
>>>>>>>>>>>>   ./PolarisHandler/CommandHandling.h
>>>>>>>>>>>>   ./PolarisHandler/Conversions.cpp
>>>>>>>>>>>>   ./PolarisHandler/Conversions.h
>>>>>>>>>>>>   ./PolarisHandler/Conversions.cpp
>>>>>>>>>>>>   ./PolarisHandler/Conversions.h
>>>>>>>>>>>>   ./PolarisHandler/INIFileRW.cpp
>>>>>>>>>>>>   ./PolarisHandler/INIFileRW.h
>>>>>>>>>>>>   ./PolarisHandler/MELAB_PolarisHandler.cpp
>>>>>>>>>>>>   ./PolarisHandler/MELAB_PolarisHandler.h
>>>>>>>>>>>>   ./PolarisHandler/SystemCRC.cpp
>>>>>>>>>>>> )
>>>>>>>>>>>>
>>>>>>>>>>>> ADD_EXECUTABLE(Polaris_Robot WIN32 ${Adept_SRC} ${Adept_HRD}
>>>>>>>>>>>> ${Polaris_SRC} ${PolarisHandler})
>>>>>>>>>>>> TARGET_LINK_LIBRARIES(Polaris_Robot IGSTKSandbox)
>>>>>>>>>>>> ==============================================
>>>>>>>>>>>> *
>>>>>>>>>>>> -----------------------------------------------------------------
>>>>>>>>>>>> *
>>>>>>>>>>>> * Jiwon Jamie Ryu**
>>>>>>>>>>>> *
>>>>>>>>>>>> **
>>>>>>>>>>>> **
>>>>>>>>>>>> * PhD Candidate*
>>>>>>>>>>>>  Dept. Bioengineering
>>>>>>>>>>>>  Seoul National University
>>>>>>>>>>>>  TEL:    +82 10 8868 3678
>>>>>>>>>>>>  Office: +82 2 2072 3128
>>>>>>>>>>>> *-------------------------------------------------------*
>>>>>>>>>>>> -------------
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Powered by <http://www.kitware.com/>www.kitware.com
>>>>>>>>>>>>
>>>>>>>>>>>> Visit other Kitware open-source projects at
>>>>>>>>>>>> <http://www.kitware.com/opensource/opensource.html>
>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>>>>>>
>>>>>>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>>>>>>> <http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users>
>>>>>>>>>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>   *
>>>>>>>>>> -----------------------------------------------------------------
>>>>>>>>>> *
>>>>>>>>>> * Jiwon Jamie Ryu**
>>>>>>>>>> *
>>>>>>>>>> **
>>>>>>>>>> **
>>>>>>>>>> * PhD Candidate*
>>>>>>>>>>  Dept. Bioengineering
>>>>>>>>>>  Seoul National University
>>>>>>>>>>  TEL:    +82 10 8868 3678
>>>>>>>>>>  Office: +82 2 2072 3128
>>>>>>>>>> *-------------------------------------------------------*
>>>>>>>>>> -------------
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>   *
>>>>>>>> -----------------------------------------------------------------*
>>>>>>>> * Jiwon Jamie Ryu**
>>>>>>>> *
>>>>>>>> **
>>>>>>>> **
>>>>>>>> * PhD Candidate*
>>>>>>>>  Dept. Bioengineering
>>>>>>>>  Seoul National University
>>>>>>>>  TEL:    +82 10 8868 3678
>>>>>>>>  Office: +82 2 2072 3128
>>>>>>>> *-------------------------------------------------------*
>>>>>>>> -------------
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>   *-----------------------------------------------------------------*
>>>>>> * Jiwon Jamie Ryu**
>>>>>> *
>>>>>> **
>>>>>> **
>>>>>> * PhD Candidate*
>>>>>>  Dept. Bioengineering
>>>>>>  Seoul National University
>>>>>>  TEL:    +82 10 8868 3678
>>>>>>  Office: +82 2 2072 3128
>>>>>> *-------------------------------------------------------*
>>>>>> -------------
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>   *-----------------------------------------------------------------*
>>>> * Jiwon Jamie Ryu**
>>>> *
>>>> **
>>>> **
>>>> * PhD Candidate*
>>>>  Dept. Bioengineering
>>>>  Seoul National University
>>>>  TEL:    +82 10 8868 3678
>>>>  Office: +82 2 2072 3128
>>>> *-------------------------------------------------------*-------------
>>>>
>>>>
>>>
>>
>>
>> --
>> *-----------------------------------------------------------------*
>> * Jiwon Jamie Ryu**
>> *
>> **
>> **
>> * PhD Candidate*
>>  Dept. Bioengineering
>>  Seoul National University
>>  TEL:    +82 10 8868 3678
>>  Office: +82 2 2072 3128
>> *-------------------------------------------------------*-------------
>>
>>  <logFile.txt>
>>
>>  <TestCode2.txt>
>>
>>
>
>
> --
> *-----------------------------------------------------------------*
> * Jiwon Jamie Ryu**
> *
> **
> **
> * PhD Candidate*
>  Dept. Bioengineering
>  Seoul National University
>  TEL:    +82 10 8868 3678
>  Office: +82 2 2072 3128
> *-------------------------------------------------------*-------------
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20110804/cfd68405/attachment.html>


More information about the IGSTK-Users mailing list