Skip to content
Snippets Groups Projects
Commit 2a890e20 authored by Davis, Duane T's avatar Davis, Duane T
Browse files

Added project map factory function to maps.py

parent e9a8c379
No related branches found
No related tags found
No related merge requests found
......@@ -483,6 +483,26 @@ class GeometryMap(Map):
silo, well, tank, bldg1, bldg2, bldg3, bldg4, hedge, wall )
return GeometryMap((-35.01, -35.01), (35.01, 35.01), geometries)
@staticmethod
def mineWorldMapFactory():
''' CS4313-specific static method that creates and returns a map
of the cs4313_project/minesearch_project/worlds/minefield.world
Gazebo environment
'''
west_wall = geometry.LineSegment((-5.0, -5.0), (-5.0, 55.0))
north_wall = geometry.LineSegment((-5.0, 55.0), (85.0, 55.0))
east_wall = geometry.LineSegment((85.0, -5.0), (85.0, 55.0))
south_wall = geometry.LineSegment((-5.0, -5.0), (85.0, -5.0))
nogo1 = geometry.Polygon(((10, 43), (30, 41), (36, 31), (6, 27)))
nogo2 = geometry.Polygon(((48, 27), (62, 45), (74, 33)))
nogo3 = geometry.Polygon(((30, 13), (56, 21), (64, 13), (38, 5)))
nogo4 = geometry.Polygon(((5, 15), (20, 11), (22, 6), (9, 2)))
nogo5 = geometry.Polygon(((50, 3), (67, 8), (71, 3)))
nogo6 = geometry.Polygon(((37, 48), (50, 47), (41, 38)))
geometries = ( east_wall, north_wall, west_wall, south_wall, \
nogo1, nogo2, nogo3, nogo4, nogo5, nogo6 )
return GeometryMap((-7, -7), (87, 57), geometries)
def set_geometries(self, geometries):
''' Clears the current set of geometries representing non-free space
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment