XML format description

From Tamp Benchmarking
Jump to: navigation, search

The following describes the format used to wrap the geometric information describing the problem single XML file. Meshes, kinematic models and task domain/problem are given in separate files. The xml file contains information about the initial geometric state, and invariants such as grasps, surfaces supporting stable placements, stable objects poses, movability, initial attachments.

General structure[edit]

The file is overall structured as follows:

 1 <problem>
 2    <objects>
 3       object1
 4       object2
 5       ...
 6    </objects>
 7 
 8    <robots>
 9       robot1
10       robot2
11       ...
12    </robots>
13 </problem>

Grasps, SSSP, and SOP are relative to objects, therefore object description follows the following template:

 1 <obj>
 2    <name>obj1_name</name>
 3    <geom>filename.obj</geom>
 4    <pose>...</pose>
 5    <moveable>true/false</moveable>
 6    <grasps>
 7       <gf>...</gf> and/or
 8       <gc>...</gc> 
 9    </grasps>
10    <sssp>...</sssp>
11    <sop>...</sop>
12    <attachments>...</attachments>
13 </obj>

Note: The label used for the object's name is identical to the PDDL constant referring to that object.

Parameters[edit]

All numerical values are expressed in standard units: meters (distances) and radians (angles).

Single values[edit]

Example:

<torso>0.15</tordo>

The initial value for the torso joint is 15cm.

Vectors[edit]

Vectors are used for 3D vectors (e.g., rotation axis), but also to specify robot configurations (e.g., arm configurations).

Examples:

<axis>0.0 0.0 1.0</axis>
<left_arm>0.5 0.0 0.0 -0.16 0.0 -0.11 0.0</left_arm>

Transformation matrices[edit]

Transformation matrices are used to represent the initial poses of objects, or the initial pose of a robot's base. A 3x4 transformation matrix Tmatrix.gif

is represented by a 12-uplet (row-wise) as follow:

<tag>a0 a1 a2 a3 b0 b1 b2 b3 c0 c1 c2 c3</tag>

Grasps[edit]

Grasps can be specified in two ways:

  • discrete set of grasps: a list of grasp frames (<gf>...</gf>)
  • continuous set of grasps: a template grasp and a rotation axis (<gc>...</gc>)

Xml attributes are used to specify grasp types (up to the TMP planner to use it or not):

<gf type="top">0.0 0.0 1.0 -0.0015 0.0 -1.0 0.0 0.027 1.0 0.0 0.0 -0.051</gf>
<gf type="side">0.0 0.0 1.0 -0.005 0.0 1.0 0.0 0.005 -1.0 0.0 0.0 0.123</gf>

In the case of continuous grasps, a template frame and a rotation axis are given:

<gc type="top">
   <template>0.0 0.0 1.0 -0.0015 0.0 -1.0 0.0 0.027 1.0 0.0 0.0 -0.051</template>
   <axis>0.0 0.0 1.0</axis>
</gc>

Any number/type of grasps can be combined within a <grasps>...</grasps> tag.
They refer to the object in which they are declared.

SSSP[edit]

The surfaces supporting stable placements are specified by 6 values (xmin, xmax, ymin, ymax, zmin, zmax) representing a rectangular region in the reference frame of the object.

1 <sssp>
2    <xmin>-0.25<xmax><xmin>0.25<xmax>
3    <ymin>-0.25<ymax><ymin>0.25<ymax>
4    <zmin>0.5<zmax><zmin>0.5<zmax>
5 </sssp>

Alternatively, SSSP can be represented by polygonal regions. Then, the tag <pssp> (polygon supporting stable placements) is used and a polygonal region is specified as a list of 3D coordinates in the reference frame of the object, assumed to lie in a plane:

1 <pssp>
2    <point><x>-0.15</x><y>0.33</y><z>0.5</z></point>
3    <point><x>-0.22</x><y>0.25</y><z>0.5</z></point>
4    <point><x>0.25</x><y>0.12</y><z>0.5</z></point>
5    ...
6 </pssp>

Remarks:

  • In stacking problems, the SSSP is defined by a single point centred on top of the object (i.e., xmin=xmax, ymin=ymax) therefore objects will be aligned on top of each other (e.g., disc2 and disc3 in the example below).
  • The number of SSSP per object is currently limited to one. This assumes that if an object is rotated about the x or y axis, it is no longer possible to place something on it. This assumption is sufficient for the current set of benchmark problems, but it may be relaxed later, i.e., by allowing lists of SSOP.

SOP[edit]

The stable object poses are defined similarly to continuous grasps: a template rotation and a rotation axis (both expressed in the world frame of reference, plus the distance parameter, which is the distance between the centre of the object and the SSSP.

1 <sop>
2    <template>1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0</template>
3    <axis>0.0 0.0 1.0</axis>
4    <distance>0.08</distance>
5 </sop>


Remark:

  • Several SOP can be defined for one object, to represent, e.g., SOP in upright position and SOP in up-side-down position.
  • SOP is not required for objects which are not moveable.
  • Together, SOP and SSSP define the semantics of the PDDL "on" predicate.

Initial object attachments[edit]

Initial object attachments are represented by a list of which elements refer to the name specified in the <name> tag of other objects. The elements of the list are linked to the parent by a fixed joint, i.e., they move together with their parent (unless their attachment is modified by subsequent actions).

Example for a tray initially with 2 glasses and a cup:

1 <attachments>
2    <name>glass1</name>
3    <name>glass2</name>
4    <name>cup1</name>
5 </attachments>

Action-Motion mapping[edit]

There are many ways of designing motion primitives, therefore, we only specify the joints which are allowed to be actuated for a given action. Note that it is allowed to actuate only a subset of the proposed joints.

The set of joints is given at the root of the XML file by the following data:

 1 <AMmapping>
 2    <action>
 3       <name>pick-right</name>
 4       <joints>r_shoulder_pan_joint r_shoulder_lift_joint r_upper_arm_roll_joint r_forearm_roll_joint r_elbow_flex_joint r_wrist_flex_joint r_wrist_roll_joint r_gripper_motor_slider_joint</joints>
 5    </action>
 6    <action>
 7       <name>pick-left</name>
 8       <joints>l_shoulder_pan_joint l_shoulder_lift_joint l_upper_arm_roll_joint l_forearm_roll_joint l_elbow_flex_joint l_wrist_flex_joint l_wrist_roll_joint  l_gripper_motor_slider_joint</joints>
 9    </action>
10 </AMmapping>

More often, the following mapping is given:

1 <AMmapping>
2    <action>
3       <name>pick</name>
4       <joints>r_shoulder_pan_joint r_shoulder_lift_joint r_upper_arm_roll_joint r_forearm_roll_joint r_elbow_flex_joint r_wrist_flex_joint r_wrist_roll_joint r_gripper_motor_slider_joint l_shoulder_pan_joint l_shoulder_lift_joint l_upper_arm_roll_joint l_forearm_roll_joint l_elbow_flex_joint l_wrist_flex_joint l_wrist_roll_joint  l_gripper_motor_slider_joint</joints>
5    </action>
6 </AMmapping>

which means that a dual-arm motion planner can be used, or that if one arm is used for a pick action, the other arm may be moved as well (e.g., in case of obstruction). Whether the base can be moved or not is specified with the <movebase> tag in the description of the robot (see next section).

The tag <name></name> contains an operator name corresponding to an operator in the PDDL domain file, and the tag <joints></joints> contains a list of corresponding joints labels in the URDF file of the robot.

Other tags[edit]

  • for objects

<name>: Name of the object. Refers to the name used in the PDDL files.
<geom>: Specifies the OBJ file for that object.
<pose>: Initial transformation matrix of the object.
<moveable>: true/false: if the object is moveable or not.

  • for robots

<name>: Name of the robot. Refers to the name used in the pddl files.
<urdf>: File for the urdf model of the robot.
<basepose>: Initial transformation matrix of the base of the robot.
<movebase>: true/false: if the base is moveable or not.
<torso>: Configuration of the torso (depends on robots).
<left_arm>: Configuration of the left manipulator (depends on robots).
<right_arm>: Configuration of the right manipulator (depends on robots).

Example[edit]

Example for problem1 (disc3 and pegs omitted for clarity).

 1 <problem>
 2    <objects>
 3 
 4       <obj>
 5          <name>disc1</name>
 6          <geom>cylinder1.obj</geom>
 7          <pose>1.0 0.0 0.0 0.7 0.0 1.0 0.0 0.2 0.0 0.0 1.0 0.028)</pose>
 8          <moveable>true</moveable>
 9          <grasps>
10             <!-- discrete set of grasps for that object -->
11             <gf type="side">0.0 0.0 1.0 -0.0015 0.0 -1.0 0.0 0.027 1.0 0.0 0.0 -0.051</gf>
12             <gf type="side">0.0 0.0 1.0 -0.0015 0.0 1.0 0.0 0.0 -1.0 0.0 0.0 0.051</gf>
13             .....
14          </grasps>         
15          <sop>
16             <template>1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0</template> <!-- all z-rotations of the -->
17             <axis>0.0 0.0 1.0</axis>                                 <!-- "natural" position     -->
18             <distance>0.0625</distance>
19          </sop>         
20       </obj>
21 
22       <obj>
23          <name>disc2</name>
24          <geom>cylinder2.obj</geom>
25          <pose>1.0 0.0 0.0 0.7 0.0 1.0 0.0 0.2 0.0 0.0 1.0 -0.038)</pose>
26          <moveable>true</moveable>
27          <grasps>
28             <!-- continuous set of grasps for that object -->
29             <gc type="side">
30                <template>0.0 0.0 1.0 -0.0015 0.0 -1.0 0.0 0.027 1.0 0.0 0.0 -0.051</template>
31                <axis>0.0 0.0 1.0</axis>
32             </gc>
33          </grasps>
34          <sssp> <!-- sssp = single point -->
35             <xmin>0.0<xmax><xmin>0.0<xmax>
36             <ymin>0.0<ymax><ymin>0.0<ymax>
37             <zmin>0.065<zmax><zmin>0.065<zmax>
38          </sssp>
39          <sop>
40             <template>1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0</template> <!-- all z-rotations of the -->
41             <axis>0.0 0.0 1.0</axis>                                 <!-- "natural" position     -->
42             <distance>0.0625</distance>
43          </sop>
44          <attachments> <!-- disc1 attached to disc2 -->
45             <name>disc1</name>
46          </attachments>
47       </obj>
48 
49       ...
50 
51       <obj>
52          <name>table</name>
53          <geom>table_narrow.obj</geom>
54          <pose>1.0 0.0 0.0 0.9 0.0 1.0 0.0 -0.4 0.0 0.0 1.0 -0.87)</pose>
55          <moveable>false</moveable>
56          <sssp> <!-- sssp = horizontal rectangular region -->
57             <xmin>-0.68<xmax><xmin>0.0<xmax>
58             <ymin>0.0<ymax><ymin>0.83<ymax>
59             <zmin>0.78<zmax><zmin>0.78<zmax>
60          </sssp>
61          <attachments> <!-- does not really apply, but for the sake of example -->
62             <name>peg1</name>
63             <name>peg2</name>
64             <name>peg3</name>
65             <name>disc3</name>
66          </attachments>
67      </obj>
68 
69       ...
70 
71    </objects>
72 
73    <robots>
74       <robot>
75          <name>pr2</name>
76          <urdf>models/pr2.urdf</urdf> <!-- or some other format -->
77          <basepose>1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0)</basepose>
78          <movebase>false</movebase> <!-- in problems 1 and 2, the base should not move -->
79          <torso>0.1</torso>
80          <left_arm>0.5 0.0 0.0 -0.16 0.0 -0.11 0.0</left_arm>
81          <right_arm>-0.5 0.0 0.0 -0.16 0.0 -0.11 0.0</right_arm>
82       </robot>
83    </robots>
84 
85 </problem>