Skip to content

Layout Config

GenManip provides many layout presets and exposes them through layout_config. Two basic keys in a layout_config are:

  • ignored_objects: a list of object names/UIDs that should be excluded from layouting.
  • type: a string specifying the layout type.

Below we describe supported layout types.

None is the simplest layout: respect the scene’s original layout and do not randomize. Use this when your scene is already positioned as you want.

Note: objects added via add_additional_object_from_path or load_object_from_path are by default not placed into a None layout (they are placed away from the table). Use another layout type to place them on the table.

random_all randomly places all objects on the table while avoiding collisions. All objects except those listed in ignored_objects will be tiled randomly on the table.

random_custom_tableset allows you to define a per-object placement type. Add a custom_tableset dict where each key is a meta-object name and the value is a dict describing that object’s placement.

Example overall structure:

layout_config:
ignored_objects: []
type: random_custom_tableset
in_order: true # whether to place objects in the order of custom_tableset
custom_tableset:
"apple":
type: global_range
random_range_angle: 360
random_range_h: 0.7
random_range_w: 0.4
random_range_x: -0.2
random_range_y: -0.35
"plate":
type: global_range
random_range_angle: 360
random_range_h: 0.7
random_range_w: 0.4
random_range_x: -0.2
random_range_y: -0.35
"banana":
type: global_range
random_range_angle: 360
random_range_h: 20
random_range_w: 20
random_range_x: -10
random_range_y: -10

Common placement types per object:

  • global_range: place the object within a global XYWH rectangle (in world coordinates), put the object’s bottom on the table (height is set accordingly). XYWH region is defined by random_range_x, random_range_y, random_range_w, random_range_h. The object is also randomly rotated within [0, random_range_angle] degrees. The placement is intersected with the table area. The object’s edge must be inside the bbox — if the bbox is smaller than the object, placement may fail. (random_all is equivalent to global_range with a bbox covering the table.)

    Example:

    "apple":
    type: global_range
    random_range_angle: 360
    random_range_h: 0.7
    random_range_w: 0.4
    random_range_x: -0.2
    random_range_y: -0.35
  • fixed_global_range: place the object at a fixed XY position (pos_x, pos_y), put the object’s bottom on the table (height is set accordingly). The object will still have random rotation in [0, random_range_angle] unless random_range_angle is 0. You can specify pos_z to fix z explicitly. Collision avoidance is not guaranteed.

    Example:

    "bread":
    pos_x: -0.17217
    pos_y: -0.45642
    random_range_angle: 0
    type: fixed_global_range
  • centric_range: randomly place the object within a neighborhood around some center while avoiding collisions. The neighborhood is computed from the object’s bounding box expanded by h/2 and w/2. Rotation is sampled from [0, angle]; if angle_bilateral=true, rotation is sampled from [-angle, +angle].

    Example:

    "box":
    w: 0.05
    h: 0.05
    angle: 0
    angle_bilateral: false
    type: centric_range

All layout types support the following optional parameters:

  • additional_height: float, place the object additional_height meters above the table.
  • reset_orientation: bool, whether to reset object orientation at the start. Default reset quaternion is [0.5, 0.5, 0.5, 0.5].
  • orientation: specify an orientation to override the default reset orientation.