def generate_paths(self, algo="a-star"): if algo == "a-star": for robot in self.robots: astar = Astar(robot.pose, robot.goal, self.obstacles) robot.path = astar.generate_path() elif algo == "rrt": for robot in self.robots: rrt = RRT(robot.pose, robot.goal, self.obstacles) robot.path = rrt.generate_path() else: print "No such algo currently exists." return