예제 #1
0
def sample_goal_region_paps(oracle): # TODO - base this off of the area of the region
  if DEBUG: print function_name(inspect.stack())
  for object_name, region_name in oracle.problem.goal_regions.items():
    if object_name in oracle.reachable_objects:
      random_sample_regions(oracle, object_name, [region_name], num_poses=NUM_GOAL_REGION_POSES,
                            num_grasps=NUM_GRASPS, max_failures=NUM_GOAL_REGION_FAILURES)
    if DEBUG: print object_name, sum(1 for pap in oracle.get_paps(object_name) if oracle.region_contains(region_name, object_name, pap.pose)), 'placements'
예제 #2
0
def sample_special_paps(oracle):
  if DEBUG: print function_name(inspect.stack())
  for region_name in oracle.sinks + oracle.stoves:
    for object_name in oracle.get_counter_objects():
      if object_name in oracle.reachable_objects:
        random_sample_regions(oracle, object_name, [region_name], num_poses=NUM_SPECIAL_POSES, num_grasps=NUM_GRASPS, max_failures=NUM_SPECIAL_FAILURES)