if __name__ == '__main__': rospy.init_node('cover') import time import signal import sys import traceback def handler(signum, frame): print "....all right already, I'm stopping. Jeez what a nag." raise signal.signal(signal.SIGINT, handler) room = TwoDRoomModel(0.1, 500, neighborDistance=2.0, perimeter=[[0.0, 0.0], [0.0, 10.0], [7., 10.0], [7., 5.], [10.0, 5.], [10.0, 2.5], [7., 2.5], [7., 0.0], [0.0, 0.0]]) robots = [] def addRobot(name, xloc, yloc, color, p): robots.append(TwoDRobotModel(name, xloc, yloc, color, perimeter=p)) room.addRobot(robots[-1]) sp = lambda (x): x + (np.random.random() - 0.5) / 1.5 addRobot("abel", sp(5.), sp(5.), 0.0, room.perimeter) addRobot("baker", sp(5.), sp(5.), 20.0, room.perimeter) addRobot("charlie", sp(5.), sp(5.), 40.0, room.perimeter) addRobot("dog", sp(5.), sp(5.), 60.0, room.perimeter)
room = TwoDRoomModel(0.1, 650, neighborDistance=3.2, perimeter=[[0.0132450331125828, 7.37748344370861], [0.582781456953642, 7.94701986754967], [0.90066225165563, 7.82781456953642], [1.28476821192053, 7.86754966887417], [1.28476821192053, 7.37748344370861], [3.44370860927152, 7.37748344370861], [3.44370860927152, 7.17880794701987], [3.82781456953642, 7.17880794701987], [3.82781456953642, 7.37748344370861], [4.17218543046358, 7.37748344370861], [4.17218543046358, 7.11258278145695], [3.96026490066225, 7.11258278145695], [3.96026490066225, 6.59602649006622], [4.17218543046358, 6.59602649006622], [4.17218543046358, 5.52317880794702], [4.7682119205298, 5.52317880794702], [4.7682119205298, 4.99337748344371], [5.54966887417219, 4.99337748344371], [5.54966887417219, 4.56953642384106], [4.19867549668874, 4.56953642384106], [4.18543046357616, 4.35761589403973], [4.18543046357616, 4.31788079470199], [4.75496688741722, 4.31788079470199], [4.75496688741722, 4.13245033112583], [5.58940397350993, 4.13245033112583], [5.58940397350993, 4.34437086092715], [5.74834437086093, 4.34437086092715], [5.74834437086093, 4.99337748344371], [6.34437086092715, 4.96688741721854], [6.33112582781457, 4.13245033112583], [8.23841059602649, 4.13245033112583], [8.23841059602649, 6.75496688741722], [7.88079470198676, 6.75496688741722], [7.88079470198676, 7.09933774834437], [7.24503311258278, 7.09933774834437], [7.24503311258278, 7.90728476821192], [7.6158940397351, 7.90728476821192], [7.6158940397351, 7.54966887417219], [8.23841059602649, 7.54966887417219], [8.23841059602649, 7.68211920529801], [7.73509933774834, 7.68211920529801], [7.73509933774834, 10.00000], [9.78807947019868, 10.00000], [9.74834437086093, 9.72185430463576], [9.90728476821192, 9.72185430463576], [9.90728476821192, 8.13245033112583], [9.68211920529801, 8.13245033112583], [9.68211920529801, 7.54966887417219], [8.7682119205298, 7.54966887417219], [8.7682119205298, 7.68211920529801], [8.63576158940397, 7.68211920529801], [8.63576158940397, 7.4569536423841], [9.96026490066225, 7.4569536423841], [9.96026490066225, 7.13907284768212], [8.72847682119205, 7.13907284768212], [8.72847682119205, 3.28476821192053], [8.52980132450331, 3.28476821192053], [8.52980132450331, 3.65562913907285], [4.59602649006623, 3.65562913907285], [4.4635761589404, 3.85430463576159], [4.19867549668874, 3.85430463576159], [4.19867549668874, 3.57615894039735], [3.50993377483444, 3.57615894039735], [3.50993377483444, 3.20529801324503], [2.92715231788079, 3.20529801324503], [2.92715231788079, 1.86754966887417], [2.47682119205298, 1.86754966887417], [2.43708609271523, 3.84105960264901], [0.370860927152318, 3.81456953642384], [0.370860927152318, 4.31788079470199], [0.649006622516556, 4.35761589403973], [0.649006622516556, 6.71523178807947], [0.132450331125828, 6.87417218543046], [0.0132450331125828, 7.37748344370861]])
if __name__ == '__main__': rospy.init_node('cover') import time import signal import sys import traceback def handler(signum, frame): print "....all right already, I'm stopping. Jeez what a nag." raise signal.signal(signal.SIGINT, handler) room = TwoDRoomModel(0.1, 500, neighborDistance=2.0, perimeter = [[0.0,0.0],[0.0,10.0],[7.,10.0], [7.,5.],[10.0,5.],[10.0,2.5], [7.,2.5],[7.,0.0], [0.0,0.0]]) robots = [] def addRobot(name, xloc, yloc, color, p): robots.append(TwoDRobotModel(name, xloc, yloc, color, perimeter = p)) room.addRobot(robots[-1]) sp = lambda(x): x + (np.random.random()-0.5)/1.5 addRobot("abel", sp(5.), sp(5.), 0.0, room.perimeter) addRobot("baker", sp(5.), sp(5.), 20.0, room.perimeter) addRobot("charlie", sp(5.), sp(5.), 40.0, room.perimeter) addRobot("dog", sp(5.), sp(5.), 60.0, room.perimeter) addRobot("easy", sp(5.), sp(5.), 80.0, room.perimeter)
room = TwoDRoomModel(0.1, 650, neighborDistance=3.2, perimeter = [[0.0132450331125828, 7.37748344370861], [0.582781456953642, 7.94701986754967], [0.90066225165563, 7.82781456953642], [1.28476821192053, 7.86754966887417], [1.28476821192053, 7.37748344370861], [3.44370860927152, 7.37748344370861], [3.44370860927152, 7.17880794701987], [3.82781456953642, 7.17880794701987], [3.82781456953642, 7.37748344370861], [4.17218543046358, 7.37748344370861], [4.17218543046358, 7.11258278145695], [3.96026490066225, 7.11258278145695], [3.96026490066225, 6.59602649006622], [4.17218543046358, 6.59602649006622], [4.17218543046358, 5.52317880794702], [4.7682119205298, 5.52317880794702], [4.7682119205298, 4.99337748344371], [5.54966887417219, 4.99337748344371], [5.54966887417219, 4.56953642384106], [4.19867549668874, 4.56953642384106], [4.18543046357616, 4.35761589403973], [4.18543046357616, 4.31788079470199], [4.75496688741722, 4.31788079470199], [4.75496688741722, 4.13245033112583], [5.58940397350993, 4.13245033112583], [5.58940397350993, 4.34437086092715], [5.74834437086093, 4.34437086092715], [5.74834437086093, 4.99337748344371], [6.34437086092715, 4.96688741721854], [6.33112582781457, 4.13245033112583], [8.23841059602649, 4.13245033112583], [8.23841059602649, 6.75496688741722], [7.88079470198676, 6.75496688741722], [7.88079470198676, 7.09933774834437], [7.24503311258278, 7.09933774834437], [7.24503311258278, 7.90728476821192], [7.6158940397351, 7.90728476821192], [7.6158940397351, 7.54966887417219], [8.23841059602649, 7.54966887417219], [8.23841059602649, 7.68211920529801], [7.73509933774834, 7.68211920529801], [7.73509933774834, 10.00000], [9.78807947019868, 10.00000], [9.74834437086093, 9.72185430463576], [9.90728476821192, 9.72185430463576], [9.90728476821192, 8.13245033112583], [9.68211920529801, 8.13245033112583], [9.68211920529801, 7.54966887417219], [8.7682119205298, 7.54966887417219], [8.7682119205298, 7.68211920529801], [8.63576158940397, 7.68211920529801], [8.63576158940397, 7.4569536423841], [9.96026490066225, 7.4569536423841], [9.96026490066225, 7.13907284768212], [8.72847682119205, 7.13907284768212], [8.72847682119205, 3.28476821192053], [8.52980132450331, 3.28476821192053], [8.52980132450331, 3.65562913907285], [4.59602649006623, 3.65562913907285], [4.4635761589404, 3.85430463576159], [4.19867549668874, 3.85430463576159], [4.19867549668874, 3.57615894039735], [3.50993377483444, 3.57615894039735], [3.50993377483444, 3.20529801324503], [2.92715231788079, 3.20529801324503], [2.92715231788079, 1.86754966887417], [2.47682119205298, 1.86754966887417], [2.43708609271523, 3.84105960264901], [0.370860927152318, 3.81456953642384], [0.370860927152318, 4.31788079470199], [0.649006622516556, 4.35761589403973], [0.649006622516556, 6.71523178807947], [0.132450331125828, 6.87417218543046], [0.0132450331125828, 7.37748344370861]])