コード例 #1
0
ファイル: gz_osm.py プロジェクト: ZdenekM/gazebo_osm
                        root[0].get('maxlon'),
                        root[0].get('maxlat')]
if TIMER:
    tic()
print "Downloading the osm data ... "
osmDictionary = getOsmFile(args.boundingbox,
                           args.osmFile, args.inputOsmFile)
if TIMER:
    toc()

if args.imageFile:
    if TIMER:
        tic()
    print "Building the image file ..."
    args.imageFile = args.directory + args.imageFile
    getMapImage(args.osmFile, args.imageFile)
    if TIMER:
        toc()

#Initialize the class
if TIMER:
    tic()
osmRoads = Osm2Dict(args.boundingbox[0], args.boundingbox[1],
                    osmDictionary, flags)

print "Extracting the map data for gazebo ..."
#get Road and model details
roadPointWidthMap, modelPoseMap, buildingLocationMap = osmRoads.getMapDetails()
if TIMER:
    toc()
if TIMER:
コード例 #2
0
 def testFail(self):
     '''tests if no names for input and output files are specifed'''
     self.assertEqual(getMapImage('', ''), -1)
コード例 #3
0
ファイル: gz_osm.py プロジェクト: lwcworld/gazebo_osm
        root[0].get('minlon'), root[0].get('minlat'), root[0].get('maxlon'),
        root[0].get('maxlat')
    ]
if TIMER:
    tic()
print "Downloading the osm data ... "
osmDictionary = getOsmFile(args.boundingbox, args.osmFile, args.inputOsmFile)
if TIMER:
    toc()

if args.imageFile:
    if TIMER:
        tic()
    print "Building the image file ..."
    args.imageFile = args.directory + args.imageFile
    getMapImage(args.osmFile, args.imageFile)
    if TIMER:
        toc()

#Initialize the class
if TIMER:
    tic()
osmRoads = Osm2Dict(args.boundingbox[0], args.boundingbox[1], osmDictionary,
                    flags)

print "Extracting the map data for gazebo ..."
#get Road and model details
roadPointWidthMap, modelPoseMap, buildingLocationMap = osmRoads.getMapDetails()
if TIMER:
    toc()
if TIMER:
コード例 #4
0
 def testPass(self):
     '''tests if the .png file opens correctly'''
     self.assertEqual(getMapImage('map.osm', 'map.png'), 0)