| Functions | |
| def | create_default_scan_dataset | 
| def | define_ROI_polygons | 
| MAKE SURE THAT THESE MATCH ORIGINAL TAKE: CROP CAMERA IMAGE TO RIO. | |
| def | show_image | 
| Variables | |
| tuple | ac = acquire_pr2_data.AcquireCloud() | 
| CalibrationVisual = True | |
| tuple | cfg = configuration.configuration(DATA_LOCATION, ROBOT) | 
| CHANGE THIS TO THE DIRECTORY WITH RESULTS FROM CODY: change 'codyRobot' to 'dummyScanner' or code tries to find camera drivers, etc. | |
| colors = pc.map_polys | |
| tuple | crop_region = (0.3,0.3,0.3,0.3) | 
| tuple | data = np.asarray(pc.pts3d_bound) | 
| tuple | data_idx = np.where(np.asarray(pc.map_polys) == processor.LABEL_SURFACE) | 
| string | DATA_LOCATION = '/home/jokerman/Desktop/PR2/' | 
| string | DATASET_ID = 'pr2_example_0003' | 
| displayOn = True | |
| tuple | feature_data = pc.generate_features(NUMBER_OF_POINTS,False, True) | 
| string | filename = 'data/' | 
| h = image_size.height | |
| tuple | image_size = cv.cvGetSize(pc.img) | 
| pc.map = (pc.camPts_bound, pc.camPts, pc.idx_list, pc.pts3d_bound,pc.scan_indices_bound, pc.intensities_bound) | |
| IS_LABELED = True | |
| string | MODE = 'all_post' | 
| tuple | N = len(idx_list) | 
| tuple | Nbound = len( idx_list[idx_list] ) | 
| int | NUMBER_OF_POINTS = 3500 | 
| float | object_height = 0.1 | 
| Placement routine. | |
| tuple | overlay_img = pc.draw_mapped_laser_into_image(None, pc.pts3d, pc.img) | 
| tuple | pc = processor.processor(cfg) | 
| tuple | pl = Placement(pc, resolution) | 
| object_height = 0.1 | |
| tuple | placement_point = pl.test_placement(polygon, object_height) | 
| REPLACE WITH MY OWN CLASS DEFINITION WITH FUNCTIONs. | |
| tuple | polygon = label_object() | 
| tuple | polygon_labels = list(1 for x in range(m)) | 
| pc.display_3d('labels')### | |
| tuple | pub = rospy.Publisher('labeled_cloud', PointCloud) | 
| list | resolution = [.01*SCALE, .01*SCALE] | 
| string | ROBOT = 'PR2' | 
| SAVE_INTENSITY_IMAGE = False | |
| SAVE_UNUSED_NEIGHBORS_TO = False | |
| pc.display_all_data()### | |
| int | SCALE = 1 | 
| SHOW_IN_ROS = True | |
| previously 1000, False,True | |
| tuple | table_height = np.mean(data, axis=1) | 
| USE_POLYGONS = True | |
| w = image_size.width | |
| int | z_above_floor = 0 | 
| def test_on_PR2_try4.create_default_scan_dataset | ( | unique_id = DATASET_ID, | |
| z_above_floor = 1.32 | |||
| ) | 
Definition at line 89 of file test_on_PR2_try4.py.
| def test_on_PR2_try4.define_ROI_polygons | ( | w, | |
| h, | |||
| crop_regions | |||
| ) | 
MAKE SURE THAT THESE MATCH ORIGINAL TAKE: CROP CAMERA IMAGE TO RIO.
# Create dummy edges for placement
# Note this assumes we will be using a SQUARE region of interest -- not true in general.
Usage: 
    w = image_size.width; h = image_size.height
    crop_region = (0.2,0.1,.2,.1) # % to crop left, crop right, crop top, crop bot
    surface_ROI, list_of_edges = define_ROI_polygons(w, h, crop_region) 
    pc.scan_dataset.polygons.append(surface_ROI)
    for p in list_of_edges: pc.scan_dataset.polygons.append(p)
Definition at line 109 of file test_on_PR2_try4.py.
| def test_on_PR2_try4.show_image | ( | window_name, | |
| img, | |||
| wait = False | |||
| ) | 
Definition at line 145 of file test_on_PR2_try4.py.
Definition at line 179 of file test_on_PR2_try4.py.
Definition at line 78 of file test_on_PR2_try4.py.
CHANGE THIS TO THE DIRECTORY WITH RESULTS FROM CODY: change 'codyRobot' to 'dummyScanner' or code tries to find camera drivers, etc.
Definition at line 158 of file test_on_PR2_try4.py.
| test_on_PR2_try4::colors = pc.map_polys | 
Definition at line 308 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::crop_region = (0.3,0.3,0.3,0.3) | 
Definition at line 212 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::data = np.asarray(pc.pts3d_bound) | 
Definition at line 319 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::data_idx = np.where(np.asarray(pc.map_polys) == processor.LABEL_SURFACE) | 
Definition at line 318 of file test_on_PR2_try4.py.
| string test_on_PR2_try4::DATA_LOCATION = '/home/jokerman/Desktop/PR2/' | 
Definition at line 63 of file test_on_PR2_try4.py.
| string test_on_PR2_try4::DATASET_ID = 'pr2_example_0003' | 
Definition at line 62 of file test_on_PR2_try4.py.
Definition at line 82 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::feature_data = pc.generate_features(NUMBER_OF_POINTS,False, True) | 
Definition at line 274 of file test_on_PR2_try4.py.
| string test_on_PR2_try4::filename = 'data/' | 
Definition at line 329 of file test_on_PR2_try4.py.
Definition at line 211 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::image_size = cv.cvGetSize(pc.img) | 
pc.map = (pc.camPts_bound, pc.camPts, pc.idx_list, pc.pts3d_bound,pc.scan_indices_bound, pc.intensities_bound)
Definition at line 209 of file test_on_PR2_try4.py.
Definition at line 75 of file test_on_PR2_try4.py.
| string test_on_PR2_try4::MODE = 'all_post' | 
Definition at line 80 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::N = len(idx_list) | 
Definition at line 187 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::Nbound = len( idx_list[idx_list] ) | 
Definition at line 188 of file test_on_PR2_try4.py.
| int test_on_PR2_try4::NUMBER_OF_POINTS = 3500 | 
Definition at line 73 of file test_on_PR2_try4.py.
| float test_on_PR2_try4::object_height = 0.1 | 
Placement routine.
Definition at line 360 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::overlay_img = pc.draw_mapped_laser_into_image(None, pc.pts3d, pc.img) | 
Definition at line 236 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::pc = processor.processor(cfg) | 
Definition at line 159 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::pl = Placement(pc, resolution) | 
object_height = 0.1
Definition at line 372 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::placement_point = pl.test_placement(polygon, object_height) | 
REPLACE WITH MY OWN CLASS DEFINITION WITH FUNCTIONs.
Definition at line 375 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::polygon = label_object() | 
Definition at line 364 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::polygon_labels = list(1 for x in range(m)) | 
pc.display_3d('labels')###
Definition at line 258 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::pub = rospy.Publisher('labeled_cloud', PointCloud) | 
Definition at line 303 of file test_on_PR2_try4.py.
| list test_on_PR2_try4::resolution = [.01*SCALE, .01*SCALE] | 
Definition at line 362 of file test_on_PR2_try4.py.
| string test_on_PR2_try4::ROBOT = 'PR2' | 
Definition at line 61 of file test_on_PR2_try4.py.
Definition at line 77 of file test_on_PR2_try4.py.
pc.display_all_data()###
Definition at line 270 of file test_on_PR2_try4.py.
| int test_on_PR2_try4::SCALE = 1 | 
Definition at line 74 of file test_on_PR2_try4.py.
previously 1000, False,True
pc.display_3d('all')### Labels are now generated --> can be saved to file? pc.display_3d('baseline')###
Definition at line 299 of file test_on_PR2_try4.py.
| tuple test_on_PR2_try4::table_height = np.mean(data, axis=1) | 
Definition at line 320 of file test_on_PR2_try4.py.
Definition at line 76 of file test_on_PR2_try4.py.
Definition at line 210 of file test_on_PR2_try4.py.
| int test_on_PR2_try4::z_above_floor = 0 | 
Definition at line 64 of file test_on_PR2_try4.py.