BuiltWithNOF
The Goals

The goal of our Job is to place a base for a standar type of Robot representation, based on the Constructive Solid Geometry theory (CSG).

This format should:

  • Be an easy and compact way to represent solid objects
  • Be easy to comprehend and to be automatically validated
  • Guarantee data file portability
  • Make easy to program a loader

One of the file formats based on triangulation is the OFF file format. The folliwing is an example of OFF file:

OFF
12 8 0
0.432076 0.150177 0.193004
0.422076 0.167498 0.193004
0.402076 0.167498 0.193004
0.392076 0.150177 0.193004
0.402076 0.132857 0.193004
0.422076 0.132857 0.193004
0.432076 0.150177 0.197334
0.422076 0.167498 0.197334
0.402076 0.167498 0.197334
0.392076 0.150177 0.197334
0.402076 0.132857 0.197334
0.422076 0.132857 0.197334
6 0 1 2 3 4 5
6 6 11 10 9 8 7
4 6 7 1 0
4 7 8 2 1
4 8 9 3 2
4 9 10 4 3
4 10 11 5 4
4 11 6 0 5

The problem is that this file describes only a box. A single primitive object in 22 lines of code.
The same primitive object can be described, as we are going to see in the section
“Our Works” , with only a few lines as follow:

<csgShape xmlns="http://www.csg.org" xmlns:xsi="http://ww...
  <box X="0.019992" Y="0.039982" Z="0.039982"/>
  <relativePosition rotX="0" rotY="0" rotZ="90" X="0" Y="0" Z="0"/>
</csgShape>

It’s simple to understand this code. There is information about:
type, size and location (relative position) of the primitive.

To make data file interpretation and validation easy, we chose to use the grammar description based on XML schema.
XML schema is powerful like the description based on BNF language.
When two research laboratory working on motion planning want to test their algorithms on environment or robots created from other, or want to exchange information on their robots, if they have a unique type of data representation and a schema that help to create and validate this data, the work is semplified.

Because many programmer works with 3D oriented languages like Java3D, we chose to use a description that matches well the 3D object representation of J3D. This languages make working in 3D world easy and provides many functions that are very useful, like the triangularization, useful to convert from CSG format to other like OFF or Mesh format.

Last but not least, the use of XML schema make easier the use of parsers (like the ones based on the SAX Api) to program a loader for the 3D object with Object oriented programming tools.

To test the format we have realized a loader for the JAVA 3D Viewer realized by the group of RimLab, based on SAX, Java 3D & XML Schema.

[Home] [Introduction] [The Goals] [CSG] [Our Work] [XML Schema] [Results] [Links]