Commit 858512df authored by czb5793's avatar czb5793
Browse files

Add an abstract class for controllers

parent 1c036ea6
......@@ -20,9 +20,9 @@
from math import *
from utils import linalg2_util as linalg
from supervisor.controllers.Controller import Controller
class AvoidObstaclesController:
class AvoidObstaclesController(Controller):
def __init__(self, supervisor):
"""
......
class Controller:
def execute(self):
"""
Generates and store new heading and obstacle vectors
"""
raise NotImplemented()
def execute(self):
"""
Executes the controllers update during one simulation cycle
"""
raise NotImplemented()
\ No newline at end of file
......@@ -25,9 +25,9 @@ from math import *
from supervisor.ControlState import *
from utils import linalg2_util as linalg
from supervisor.controllers.Controller import Controller
class FollowWallController:
class FollowWallController(Controller):
def __init__(self, supervisor):
"""
......
......@@ -19,9 +19,9 @@
from supervisor.controllers.AvoidObstaclesController import *
from supervisor.controllers.GoToGoalController import *
from supervisor.controllers.Controller import Controller
class GTGAndAOController:
class GTGAndAOController(Controller):
def __init__(self, supervisor):
"""
......
......@@ -18,9 +18,9 @@
from utils import math_util
from supervisor.controllers.Controller import Controller
class GoToAngleController:
class GoToAngleController(Controller):
def __init__(self, supervisor):
"""
......
......@@ -20,9 +20,9 @@
from math import *
from utils import linalg2_util as linalg
from supervisor.controllers.Controller import Controller
class GoToGoalController:
class GoToGoalController(Controller):
def __init__(self, supervisor):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment