00001 #! /usr/bin/env python 00002 # 00003 # Copyright (c) 2010, Georgia Tech Research Corporation 00004 # All rights reserved. 00005 # 00006 # Redistribution and use in source and binary forms, with or without 00007 # modification, are permitted provided that the following conditions are met: 00008 # * Redistributions of source code must retain the above copyright 00009 # notice, this list of conditions and the following disclaimer. 00010 # * Redistributions in binary form must reproduce the above copyright 00011 # notice, this list of conditions and the following disclaimer in the 00012 # documentation and/or other materials provided with the distribution. 00013 # * Neither the name of the Georgia Tech Research Corporation nor the 00014 # names of its contributors may be used to endorse or promote products 00015 # derived from this software without specific prior written permission. 00016 # 00017 # THIS SOFTWARE IS PROVIDED BY GEORGIA TECH RESEARCH CORPORATION ''AS IS'' AND 00018 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00019 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00020 # DISCLAIMED. IN NO EVENT SHALL GEORGIA TECH BE LIABLE FOR ANY DIRECT, INDIRECT, 00021 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00022 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 00023 # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00024 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 00025 # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 00026 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00027 # 00028 00029 # \author Martin Schuster (Healthcare Robotics Lab, Georgia Tech.) 00030 00031 import scanner 00032 import Processor 00033 import configuration 00034 import hrl_lib.util as ut 00035 00036 # Import Psyco if available 00037 #try: 00038 # import psyco 00039 # psyco.full() 00040 # print "Psyco loaded" 00041 #except ImportError: 00042 # pass 00043 00044 #from labeling import label_object, scan_dataset, scans_database 00045 #database = scans_database.scans_database() 00046 #database.load('/home/martin/robot1_data/usr/martin/laser_camera_segmentation/labeling','database.pkl') 00047 #dataset = scan_dataset.scan_dataset() 00048 #print dataset 00049 00050 cfg = configuration.configuration('/home/martin/robot1_data/usr/martin/laser_camera_segmentation/labeling') 00051 sc = scanner.scanner(cfg) 00052 pc = Processor.Processor(cfg) 00053 00054 name = ut.formatted_time() 00055 name='2009Oct17_122644' 00056 #sc.capture_and_save(name) 00057 pc.load_data(name) 00058 00059 #pc.load_raw_data('pill_table/2009Sep12_142422') 00060 pc.process_raw_data() 00061 pc.save_mapped_image(name) 00062 pc.display_all_data() 00063 print 'done' 00064 00065 00066 00067 00068