def get_problem_1_2(object_meshes): surfaces = [ Surface('table', get_table_pose(TABLE_X, 0, TABLE_Z), get_rectangle(0.6, 1.2)) ] items = [Object('block', None, False)] return Belief(None, surfaces, items), Task(holding='block')
def get_problem_4(object_meshes): table_x = 0.5 block_z = np.min(object_meshes['block'].vertices[:, 2]) surfaces = [ Surface('table', get_table_pose(table_x, 0, TABLE_Z), get_rectangle(0.6, 1.2)) ] items = [Object('block', get_table_pose(table_x, 0.2, TABLE_Z - block_z))] return Belief(None, surfaces, items), Task(holding='block')
def get_world_3(object_meshes): soup_z = np.min(object_meshes['soup'].vertices[:, 2]) surfaces = [ Surface('table', get_table_pose(TABLE_X, 0, TABLE_Z), get_rectangle(0.6, 1.2)) ] items = [ Object('soup', get_table_pose(TABLE_X, 0, TABLE_Z - soup_z), None) ] return World(None, surfaces, items), Task(holding='soup')
def get_problem_3_2(object_meshes): block_z = np.min(object_meshes['block'].vertices[:, 2]) surfaces = [ Surface('table', get_table_pose(TABLE_X, 0, TABLE_Z), get_rectangle(0.6, 1.2)) ] items = [ Object('block', get_table_pose(TABLE_X, 0, TABLE_Z - block_z), True) ] return Belief(None, surfaces, items), Task(object_surfaces=[('block', 'table')])
def get_world_4(object_meshes): block_z = np.min(object_meshes['block'].vertices[:, 2]) surfaces = [ Surface('table', get_table_pose(TABLE_X, 0, TABLE_Z), get_rectangle(0.6, 1.2)) ] items = [ Object('block', get_table_pose(TABLE_X, 0.3, TABLE_Z - block_z), None) ] #return World(None, surfaces, items), Task(localized_items=['block']) return World(None, surfaces, items), Task(registered_items=['block'])
def get_world_7(object_meshes): block_z = np.min(object_meshes['block'].vertices[:, 2]) surfaces = [ Surface('table', get_table_pose(0, -TABLE_X, TABLE_Z), get_rectangle(1.2, 0.6)), Surface('table', get_table_pose(0, TABLE_X, TABLE_Z), get_rectangle(1.2, 0.6)) ] items = [ Object('block', get_table_pose(0.3, -TABLE_X, TABLE_Z - block_z), None) ] return World(None, surfaces, items), Task(left_items=['block'])
def get_world_2(object_meshes): block_z = np.min(object_meshes['block'].vertices[:, 2]) surfaces = [ Surface('table', get_table_pose(TABLE_X, 0, TABLE_Z), get_rectangle(0.6, 1.2)), Surface('dinner', get_table_pose(0, TABLE_X, TABLE_Z), get_rectangle(1.2, 0.6)) ] items = [ Object('block', get_table_pose(TABLE_X, 0, TABLE_Z - block_z), None) ] return World(None, surfaces, items), Task(object_surfaces=[('block', 'dinner')])
def get_lis_world(object_meshes): block_z = np.min(object_meshes['block'].vertices[:, 2]) surfaces = [ Surface('table', get_table_pose(1.5, 0.5, TABLE_Z), get_rectangle(0.6, 1.2)), Surface('table', get_table_pose(0, -1.5, TABLE_Z), get_rectangle(1.2, 0.6)), #Surface('table', get_table_pose(-1.5, 1.5, TABLE_Z, np.pi/4), get_rectangle(1.2, 0.6)), ] items = [ Object('block', get_table_pose(1.25, 0.0, TABLE_Z - block_z), None) ] return World(None, surfaces, items), Task(right_items=['block'])
def get_world_5(object_meshes): block_z = np.min(object_meshes['block'].vertices[:, 2]) soup_z = np.min(object_meshes['soup'].vertices[:, 2]) surfaces = [ Surface('table', get_table_pose(TABLE_X, 0, TABLE_Z), get_rectangle(0.6, 1.2)), Surface('table', get_table_pose(0, TABLE_X, TABLE_Z), get_rectangle(1.2, 0.6)) ] items = [ Object('block', get_table_pose(TABLE_X, 0.3, TABLE_Z - block_z), None), Object('soup', get_table_pose(TABLE_X, -0.3, TABLE_Z - soup_z), None) ] return World(None, surfaces, items), Task(holding='block')
def get_problem_5_3(object_meshes): oil_z = np.min(object_meshes['oil'].vertices[:, 2]) block_z = np.min(object_meshes['block'].vertices[:, 2]) soup_z = np.min(object_meshes['soup'].vertices[:, 2]) surfaces = [ Surface('table', get_table_pose(2, 0, TABLE_Z), get_rectangle(0.6, 1.2)) ] items = [ Object('oil', get_table_pose(TABLE_X, -0.25, TABLE_Z - oil_z), True), Object('block', get_table_pose(TABLE_X, 0, TABLE_Z - block_z), True), Object('soup', get_table_pose(TABLE_X, 0.25, TABLE_Z - soup_z), True) ] return Belief(None, surfaces, items), Task(holding='block')
def get_problem_2_1(_): surfaces = [Surface('table', None, None), Surface('dinner', None, None)] items = [Object('block', None, False)] return Belief(None, surfaces, items), Task(object_surfaces=[('block', 'dinner')])
def get_problem_1_1(object_meshes): surfaces = [Surface('table', None, None)] items = [Object('block', None, False)] return Belief(None, surfaces, items), Task(holding='block')
def get_problem_1_0(object_meshes): task = Task(holding='block') return belief_from_task(Belief(None, [], []), task), task