concepts.benchmark.manip_tabletop.paint_factory.paint_factory.PaintFactoryEnv#

class PaintFactoryEnv[source]#

Bases: TableTopEnv

The paint-and-sort environment. The environment contains a table with a few objects on it. There are two types of objects:

  1. receptacles, including the paint bucket and the sorting bin.

  2. paintable objects. Right now we only have the paintable cube.

The goal of the environment is to paint the cube with the paint bucket, and then sort the painted cube into the sorting bin.

Methods

add_bar(size_2d, thickness, location_2d[, ...])

add_bowl(location_2d[, name, static, z, ...])

add_box(size, location_2d[, name, static, ...])

add_cliport_block(location_2d[, name, ...])

add_cliport_workspace()

add_container(size_2d, depth, location_2d[, ...])

add_igibson_object_by_category(category, ...)

add_l_shape(size1_2d, size2_2d, thickness, ...)

add_l_shape_with_tip(size1_2d, size2_2d, ...)

add_ocrtoc_object(identifier, location_3d[, ...])

add_plate(scale, location_2d[, name, ...])

add_region(size_2d, location_2d[, name, ...])

Add a visual-only region indicator to the environment.

add_robot([robot, pos, quat])

Add a robot to the environment.

add_shape_net_core_object(synset_identifier, ...)

add_t_shape(size1_2d, size2_2d, thickness, ...)

add_t_shape_with_tip(size1_2d, size2_2d, ...)

add_thin_plate(scale, location_2d[, name, ...])

add_workspace([large])

Add a table-top workspace to the environment.

add_ycb_simplified_object(identifier, ...[, ...])

find_igibson_object_by_category(category)

get_support(body_id[, return_name])

initialize_shapenet_core_loader(shapenet_dir)

is_goal_achieved()

is_goal_achieved_color()

is_goal_achieved_in()

is_goal_achieved_relation()

is_relation_satisfied(id1, id2, relation)

is_relation_satisfied_in(id1, id2)

iter_objects()

list_ocrtoc_objects()

list_shape_net_core_objects()

list_ycb_simplified_objects()

reconfigure([nr_bowls, nr_blocks])

reset([nr_bowls, nr_blocks])

restore()

Restore the environment to the last saved state.

scene_step()

seed(seed)

set_default_debug_camera([distance])

Set the default debug camera of the environment.

step(pick_location, place_location, ...)

step_object_name(pick_object, place_object)

Attributes

__init__(client=None, nr_bowls=3, nr_blocks=3, *, seed=1234)[source]#
Parameters:
__new__(**kwargs)#
add_bar(size_2d, thickness, location_2d, name='bar-shape', *, static=False, quat=(0, 0, 0, 1))#
Parameters:
Return type:

int

add_bowl(location_2d, name='bowl', *, static=True, z=0, color_rgba=None, quat=None)[source]#
Parameters:
Return type:

int

add_box(size, location_2d, name='box', *, static=False, z_height=0, mass=0.2, lateral_friction=1.0, color_rgba=(1, 0.34, 0.34, 1.), quat=None)#
Parameters:
Return type:

int

add_cliport_block(location_2d, name='box', *, static=False, z=0.02, color_rgba=None, quat=None)[source]#
Parameters:
add_cliport_workspace()#
add_container(size_2d, depth, location_2d, name='container', *, static=True, color_rgba=None, quat=None)#
Parameters:
Return type:

int

add_igibson_object_by_category(category, location_3d, scale=1.0, name=None, *, urdf_file=None, static=False, quat=(0, 0, 0, 1))#
Parameters:
add_l_shape(size1_2d, size2_2d, thickness, location_2d, name='l-shape', *, static=False, quat=(0, 0, 0, 1))#
Parameters:
Return type:

int

add_l_shape_with_tip(size1_2d, size2_2d, size3_2d, thickness, location_2d, name='l-shape-with-tip', *, static=False, quat=(0, 0, 0, 1))#
Parameters:
Return type:

int

add_ocrtoc_object(identifier, location_3d, scale=1.0, name=None, *, static=False, quat=(0, 0, 0, 1))#
Parameters:
add_plate(scale, location_2d, name='plate', *, static=False, z_height=0.0)#
Parameters:
Return type:

int

add_region(size_2d, location_2d, name='region', *, color_rgba=(0.5, 0.5, 0.5, 1))#

Add a visual-only region indicator to the environment.

Parameters:
Returns:

the body id of the region.

Return type:

int

add_robot(robot='panda', pos=None, quat=None)#

Add a robot to the environment.

Parameters:
  • robot (str) – the type of the robot. Currently only ['ur5', 'panda'] are supported.

  • pos (Tuple[float, float, float] | List[float] | ndarray | None) – the initial position of the robot. If not given, the robot will be placed at the origin.

  • quat (Tuple[float, float, float, float] | List[float] | ndarray | None) – the initial orientation of the robot. If not given, the robot will be placed in the default orientation.

Returns:

the body id of the robot.

Return type:

int

add_shape_net_core_object(synset_identifier, model_identifier, location_3d, scale=1.0, name=None, *, static=False, quat=(0, 0, 0, 1))#
Parameters:
add_t_shape(size1_2d, size2_2d, thickness, location_2d, name='t-shape', *, static=False, quat=(0, 0, 0, 1))#
Parameters:
Return type:

int

add_t_shape_with_tip(size1_2d, size2_2d, size3_2d, thickness, location_2d, name='t-shape-with-tip', *, static=False, quat=(0, 0, 0, 1))#
Parameters:
Return type:

int

add_thin_plate(scale, location_2d, name='plate', *, static=False, z_height=0.0)#
Parameters:
Return type:

int

add_workspace(large=False)#

Add a table-top workspace to the environment.

Returns:

the body id of the collision shape of the body.

Parameters:

large (bool)

Return type:

int

add_ycb_simplified_object(identifier, location_3d, scale=1.0, name=None, *, static=False, quat=(0, 0, 0, 1))#
Parameters:
find_igibson_object_by_category(category)#
Parameters:

category (str)

Return type:

List[str]

get_support(body_id, return_name=True)#
Parameters:
Return type:

List[str | int]

initialize_shapenet_core_loader(shapenet_dir)#
Parameters:

shapenet_dir (str)

is_goal_achieved()[source]#
is_goal_achieved_color()[source]#
is_goal_achieved_in()[source]#
is_goal_achieved_relation()[source]#
is_relation_satisfied(id1, id2, relation)[source]#
Parameters:
Return type:

bool

is_relation_satisfied_in(id1, id2)[source]#
Parameters:
Return type:

bool

iter_objects()[source]#
Return type:

Iterator[Tuple[int, dict]]

list_ocrtoc_objects()#
Return type:

List[str]

list_shape_net_core_objects()#
Return type:

Dict[str, Dict[str, Any]]

list_ycb_simplified_objects()#
Return type:

List[str]

reconfigure(nr_bowls=None, nr_blocks=None)[source]#
Parameters:
  • nr_bowls (int | None)

  • nr_blocks (int | None)

reset(nr_bowls=None, nr_blocks=None)[source]#
Parameters:
  • nr_bowls (int | None)

  • nr_blocks (int | None)

restore()#

Restore the environment to the last saved state.

Return type:

None

scene_step()[source]#
seed(seed)#
Parameters:

seed (int)

set_default_debug_camera(distance=1.5)#

Set the default debug camera of the environment.

Parameters:

distance (float)

step(pick_location, place_location, place_orientation)[source]#
Parameters:
step_object_name(pick_object, place_object, additional_pick_offset=None, additional_place_offset=None)[source]#
CLIPORT_PLANE_FILE = 'assets://cliport/plane/plane.urdf'#
CLIPORT_WORKSPACE_FILE = 'assets://cliport/workspace/workspace.urdf'#
PLANE_FILE = 'assets://basic/plane/plane.urdf'#
PLANE_LARGE_FILE = 'assets://basic/plane/plane_large.urdf'#
WORKSPACE_FILE = 'assets://basic/plane/workspace.urdf'#
WORKSPACE_LARGE_FILE = 'assets://basic/plane/workspace_large.urdf'#
property block_info: Dict[int, dict]#
property bowl_info: Dict[int, dict]#
property clean_box: int#
property client: BulletClient#
property dry_box: int#
property igibson_root: str#
property np_random: RandomState#
property ocrtoc_root: str#
property p#
property shapenet_core_loader: ShapeNetCoreLoader#
property target_box: int#
property w#
property world#
property ycb_simple_root: str#