Ejemplo n.º 1
0
 def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, daemon=None, sensorConversionThread=None):
   '''
   Initializes the control planner
   @param Refer to the Python Thread class for documentation on all thread specific parameters
   @param sensorConversionThread - the sensor conversion thread
   '''
   Thread.__init__(self, group=group, target=target, name=name, daemon=daemon)
   Publisher.__init__(self)
   self.args = args
   self.kwargs = kwargs
   self.sensorConversionThread = sensorConversionThread
   self.shutDown = False
   self.wallFollowPID = PID(Constants.WALL_FOLLOW_PID_P, Constants.WALL_FOLLOW_PID_I, Constants.WALL_FOLLOW_PID_D, Constants.WALL_FOLLOW_PID_WINDUP)
   self.wallFollowPID.setGoal(Constants.WALL_FOLLOW_PID_DIST_GOAL)
   self.vehicleLeftDistance = 0.0
   self.vehicleRightDistance = 0.0
   self.vehicleSteeringAngle = 0.0
   self.steeringAngleGoal = 0.0
   # TODO: Velocity goals?
   self.velocityGoal = 0.5
   self.currentTime = time.time()
Ejemplo n.º 2
0
 def __init__(self,
              group=None,
              target=None,
              name=None,
              args=(),
              kwargs={},
              daemon=None,
              courseMap=None,
              sensorConversionThread=None):
     '''
 Initializes the control planner
 @param Refer to the Python Thread class for documentation on all thread specific parameters
 @param courseMap - the course map
 @param sensorConversionThread - the sensor conversion thread
 '''
     Thread.__init__(self,
                     group=group,
                     target=target,
                     name=name,
                     daemon=daemon)
     Publisher.__init__(self)
     self.args = args
     self.kwargs = kwargs
     self.courseMap = courseMap
     self.particleFilter = ParticleFilter(Constants.PARTICLE_NUMBER,
                                          Constants.MAP_START_BOX,
                                          Constants.MAP_HEADING_RANGE,
                                          self.courseMap,
                                          sensorConversionThread)
     self.shutDown = False
     self.estVehicleX = 0.0
     self.estVehicleY = 0.0
     self.estVehicleHeading = 0.0
     self.covarVehicle = None
     self.waypoint = 0
     self.waypointCheck = 0
     self.steeringAngleGoal = 0.0
     self.velocityGoal = 0.0
Ejemplo n.º 3
0
 def __init__(self, name):
     Publisher.__init__(self)
     self.name = name
     self._data = 0
Ejemplo n.º 4
0
 def __init__(self, **kwargs):
     Publisher.__init__(self, **kwargs)
     self._xslt = XsltTransformer(caller=self)
     if not self.script:
         self.script = self._xslt.script
Ejemplo n.º 5
0
 def __init__(self, **kwargs):
     Publisher.__init__(self, **kwargs)
     self._xslt = XsltTransformer(caller=self)
     if not self.script:
         self.script = self._xslt.script