evaluate_planes.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import roslib
00004 roslib.load_manifest('semanticmodel')
00005 
00006 import hand_planes
00007 import sys
00008 from semanticmodel import db
00009 import mongo_ros as mr
00010 import semanticmodel.msg as smm
00011 
00012 def main():
00013     if len(sys.argv)!=3:
00014         print "Usage: {0} BAG_ID RUN_ID".format(sys.argv[0])
00015         return 1
00016 
00017     planes = hand_planes.meters[int(sys.argv[1])]
00018     run_id = 'run{0}'.format(sys.argv[2])
00019     coll_name = db.collection_name(run_id, 'planes')
00020     coll = mr.MessageCollection('semantic_world_model', coll_name, smm.Planes)
00021     m = coll.find_one({})[0]
00022     print "There are {0} planes".format(len(m.planes))
00023 
00024 if __name__=='__main__':
00025     sys.exit(main())


semanticmodel
Author(s): Julian ("Mac") Mason
autogenerated on Thu Dec 12 2013 12:39:10