예제 #1
0
 def __init__(self):
    """ initializes LauncherDriver object to have a Launcher
    """
    self.launcher = Launcher()
예제 #2
0
 def __init__(self):
     """ initializes LauncherDriver object to have a Launcher
   """
     self.launcher = Launcher()
예제 #3
0
class LauncherDriver:

   def __init__(self):
      """ initializes LauncherDriver object to have a Launcher
      """
      self.launcher = Launcher()
      
   ###########################################
   ## Responses to requests
   ## Note: each function takes in a required request variable req
   ##       that currently has no value due to *.srv files in
   ##       missile_launcher/srv/, but the driver is currently set
   ##       to have no service arguments. To change these responses
   ##       to have some input argument, you must first change the
   ##       .srv files and then remake the package with catkin_make.
   ###########################################
   def pan_left(self, req):
       """ Response to request to pan left """
       self.launcher.pan_left()
       return PanLeftResponse(True)

   def pan_right(self, req):
       """ Response to request to pan right """
       self.launcher.pan_right()
       return PanRightResponse(True)

   def tilt_up(self, req):
      """ Response to request to tilt up """
      self.launcher.tilt_up()
      return TiltUpResponse(True)

   def tilt_down(self, req):
      """ Response to request to tilt down """
      self.launcher.tilt_down()
      return TiltDownResponse(True)

   def stop(self, req):
      """ Response to request to stop """
      self.launcher.stop()
      return StopResponse(True)

   def fire(self, req):
      """ Response to request to fire missile """
      self.launcher.fire()
      return FireResponse(True)
예제 #4
0
class LauncherDriver:
    def __init__(self):
        """ initializes LauncherDriver object to have a Launcher
      """
        self.launcher = Launcher()

    ###########################################
    ## Responses to requests
    ## Note: each function takes in a required request variable req
    ##       that currently has no value due to *.srv files in
    ##       missile_launcher/srv/, but the driver is currently set
    ##       to have no service arguments. To change these responses
    ##       to have some input argument, you must first change the
    ##       .srv files and then remake the package with catkin_make.
    ###########################################
    def pan_left(self, req):
        """ Response to request to pan left """
        self.launcher.pan_left()
        return PanLeftResponse(True)

    def pan_right(self, req):
        """ Response to request to pan right """
        self.launcher.pan_right()
        return PanRightResponse(True)

    def tilt_up(self, req):
        """ Response to request to tilt up """
        self.launcher.tilt_up()
        return TiltUpResponse(True)

    def tilt_down(self, req):
        """ Response to request to tilt down """
        self.launcher.tilt_down()
        return TiltDownResponse(True)

    def stop(self, req):
        """ Response to request to stop """
        self.launcher.stop()
        return StopResponse(True)

    def fire(self, req):
        """ Response to request to fire missile """
        self.launcher.fire()
        return FireResponse(True)