DsSpatialRelationshipGraph

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

Spatial Relationship Graph XML structure

TUM proposal

The structure is based on the following principles:

  • The SRG should contain all information required to build a data flow, INCLUDING tracker configuration.
  • The data flow graph also is an SRG, consisting of the subgraph of participating edges and nodes, augmented with new data flow edges that have connections to other input edges. This closely resembles what is actually happening in the pattern detection algorithm.
  • An instance of an edge in the data flow graph is configured by a 3-tuple: (configuration of source node, configuration of edge, configuration of destination node). This avoids unnecessary duplication of configuration.
  • Tracker configuration can be arbitrary XML and/or text data.

XML Schema: SRG.xsd

Example

This example shows the input to the pattern detection.

<!--?xml version="1.0" encoding="utf-8"?-->

<!-- example setup for displaying a sheep in an HMD -->

<SpatialRelationshipGraph xmlns="http://ar.in.tum.de/ubitrack/SRG" 
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          xsi:schemaLocation="http://ar.in.tum.de/ubitrack/SRG SRG.xsd">
  <Nodes>

    <!-- the art system configuration -->
    <Node name="Art">
      <DataflowConfiguration class="ArtTracker">
        <ArtConfiguration port="5000"/>
      </DataflowConfiguration>
    </Node>

    <Node name="ArtHmd"/>   <!-- HMD target -->
    <Node name="ArtSheep"/> <!-- sheep target -->
    <Node name="Sheep"/>    <!-- sheep coordinate frame -->

  </Nodes>
  <Edges>

    <!-- ARTs measurements of the HMD marker -->
    <Edge source="Art" destination="ArtHmd">
      <Attribute name="type" value="6D"/>
      <Dataflow class="ArtTracker">
        <Configuration>
          <ArtTarget id="0"/>
        </Configuration>
      </Dataflow>
    </Edge>

    <!-- ARTs measurements of the Sheep marker -->
    <Edge source="Art" destination="ArtSheep">
      <Attribute name="type" value="6D"/>
      <Dataflow class="ArtTracker">
        <Configuration>
          <ArtTarget id="2"/>
        </Configuration>
      </Dataflow>
    </Edge>

    <!-- the calibrated transformation from the sheep marker to the sheep -->
    <Edge source="ArtSheep" destination="Sheep">
      <Attribute name="type" value="6D"/>
      <Dataflow class="StaticTransformation">
        <Configuration>
          <Pose6D position="0.0 -0.1 0.052" rotation="0.0 0.0 0.7071 0.7071"/>
        </Configuration>
      </Dataflow>
    </Edge>
    
  </Edges>
</SpatialRelationshipGraph>

Resulting Dataflow SRG

This is the resulting dataflow SRG generated by the pattern detection. It should be possible to transform it into OpenTracker by means of an XSLT if the tree reuqirement is removed and DEF-USE-structures are used instead. Otherwise a bit of code needs to be written to transform the SRG dataflow into a tree.

<?xml version="1.0" encoding="utf-8"?>

<!-- example dataflow for displaying a sheep in an HMD -->

<SpatialRelationshipGraph xmlns="http://ar.in.tum.de/ubitrack/SRG" 
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          xsi:schemaLocation="http://ar.in.tum.de/ubitrack/SRG SRG.xsd">
  <Nodes>

    <!-- the art system configuration -->
    <Node name="Art">
      <DataflowConfiguration class="ArtTracker">
        <ArtConfiguration port="5000"/>
      </DataflowConfiguration>
    </Node>

    <Node name="ArtHmd"/>   <!-- HMD target -->
    <Node name="ArtSheep"/> <!-- sheep target -->
    <Node name="Sheep"/>    <!-- sheep coordinate frame -->

  </Nodes>
  <Edges>

    <!-- ARTs measurements of the HMD marker -->
    <Edge name="Art2ArtHmd" source="Art" destination="ArtHmd">
      <Attribute name="type" value="6D"/>
      <Dataflow class="ArtTracker">
        <Configuration>
          <ArtTarget id="0"/>
        </Configuration>
      </Dataflow>
    </Edge>

    <!-- ARTs measurements of the Sheep marker -->
    <Edge name="Art2ArtSheep" source="Art" destination="ArtSheep">
      <Attribute name="type" value="6D"/>
      <Dataflow class="ArtTracker">
        <Configuration>
          <ArtTarget id="2"/>
        </Configuration>
      </Dataflow>
    </Edge>

    <!-- the calibrated transformation from the sheep marker to the sheep -->
    <Edge name="ArtSheep2Sheep" source="ArtSheep" destination="Sheep">
      <Attribute name="type" value="6D"/>
      <Dataflow class="StaticTransformation">
        <Configuration>
          <Pose6D position="0.0 -0.1 0.052" rotation="0.0 0.0 0.7071 0.7071"/>
        </Configuration>
      </Dataflow>
    </Edge>

    <!-- create ART->Sheep edge by multiplying Art->ArtSheep with ArtSheep->Sheep -->
    <Edge name="Art2Sheep" source="Art" destination="Sheep">
      <Attribute name="type" value="6D"/>
      <Dataflow class="PoseMultiply">
        <Input port="InputA" edge="Art2ArtSheep"/>
        <Input port="InputB" edge="ArtSheep2Sheep"/>
      </Dataflow>
    </Edge>

    <!-- invert the Art->ArtHmd edge -->
    <Edge name="ArtHmd2Art" source="ArtHmd" destination="Art">
      <Attribute name="type" value="6D"/>
      <Dataflow class="PoseInvert">
        <Input port="Input" edge="Art2ArtHmd"/>
      </Dataflow>
    </Edge>

    <!-- compute the ArtHmd->Sheep edge -->
    <Edge name="ArtHmd2Sheep" source="ArtHmd" destination="Sheep">
      <Attribute name="type" value="6D"/>
      <Dataflow class="PoseMultiply">
        <Input port="InputA" edge="ArtHmd2Art"/>
        <Input port="InputB" edge="Art2Sheep"/>
      </Dataflow>
    </Edge>

  </Edges>
</SpatialRelationshipGraph>


Edit | Attach | Refresh | Diffs | More | Revision r1.2 - 10 Dec 2008 - 14:31 - PeterKeitler

Lehrstuhl für Computer Aided Medical Procedures & Augmented Reality    rss.gif