[IGSTK-Users] Multiple tracking systems
Patrick Cheng
cheng at isis.georgetown.edu
Mon Jul 27 09:49:25 EDT 2009
Hi Alberto,
When I said "add spatial object to view", I meant "spatial object
representation". Sorry for the confusion.
Your scene graph connection should work. You can check your scene graph
tree construction by enabling the IGSTK_USE_SceneGraphVisualization in
CMake, and use the following code after you making the scene graph tree
connection.
You can either output the graph to a dot file, or display it on the fly
in a FLTK GUI.
// Output to file
igstk::SceneGraph * sg = igstk::SceneGraph::getInstance();
sg->ExportSceneGraphToDot("sg.dot");
// Display it in a window. You need to include igstkSceneGraphUI.h
sg->ShowSceneGraph(true);
igstk::SceneGraphUI * sgUI = igstk::SceneGraphUI::getInstance();
sgUI->DrawSceneGraph(sg);
Patrick
alberto.vaccarella at mail.polimi.it wrote:
> Hi Patrick,
>
> I'm trying to add also the spatial objects to the view3D as you
> suggested, but the RequestAddObject() method seems to accept only
> spatial object representation pointer as parameter...
> About the scene graph, I connected both the view3D and the optical
> tracker controller to an axes object acting as a world coordinate
> system, shouldn't this work?
> Thanks for helping
>
> Alberto
>
>
>
>
>
>
> Citando Patrick Cheng <cheng at isis.georgetown.edu>:
>
>> Hi Alberto,
>>
>> Your approach is quite novel. Normally people think about register EM
>> and Optical trackers together first, now you are tracking the EM
>> tracker using Optical tracker.
>>
>> 1. One quick question:
>> Did you calibrate the EM FieldGenerator with the opticalTrackerTool(0)?
>> opticalTrackerTool(0) --> FieldGeneratorBoxObject
>>
>> You need to have this transform set properly to get the accurate
>> position of the EM sensor in the optical tracker space.
>>
>> 2. To answer your question about what should be added to View3D.
>> You need to add also the spatial objects into View3D so it can
>> render it.
>> You also need to connect your View3D to the scene graph tree, so it
>> knows where to render those objects. In this case, you should try:
>>
>> View3D --> opticalTracker --> opticalTrackerTool(0) -->
>> FieldGeneratorBoxObject --> magneticTracker --> magneticTrackerTool -->
>> EM_Sensor_CylinderObject
>>
>> Hope this helps,
>>
>> Patrick
>>
>>
>> alberto.vaccarella at mail.polimi.it wrote:
>>> Hi everyone,
>>>
>>> I'm trying to develop an application using both an optoelectronic
>>> and a magnetic tracking system, the setup is as follows:
>>>
>>> - the optoelectronic device tracks some tools and the EM field generator
>>>
>>> - the magnetic device tracks one sensor with respect to the
>>> coordinate system of its EM field generator
>>>
>>> I want all the tools and the EM sensor to be displayed in the same
>>> coordinate system (the optical device one); to do that I:
>>>
>>> - instantiated 2 tracker controllers
>>> - built the scene graph as follows (after the tracking has started ):
>>>
>>> opticalTracker --> opticalTrackerTool(0) --> FieldGeneratorBoxObject
>>> --> magneticTracker --> magneticTrackerTool -->
>>> EM_Sensor_CylinderObject
>>>
>>> where:
>>> - opticalTrackerTool(0) is the rigid body associated to the EM field
>>> generator
>>>
>>> Is this approach correct? What should I add to the view3D? I added
>>> the representations of the two objects but it doesn't work, it
>>> doesn't display anything...
>>> Once I solve this I guess I have to use:
>>>
>>> EM_Sensor_CylinderObject->RequestComputeTransformTo(opticalTracker)
>>>
>>> I'm not sure I got how to use this method...should I call it once or
>>> each time I need the transform? How could I make the
>>> EM_Sensor_CylinderObject to be always displayed in the
>>> opticalTracker coordinate system?
>>>
>>> Thanks in advance for any help
>>> Alberto
>>>
>>>
>>> _______________________________________________
>>> 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