def __init__(self): self._param = NodeHandle() if (CONTROL == 'PIDCONTROL'): self.control = PIDControl() self.controlY = PIDControl_Y() self.controlYaw = PIDControl_Yaw() elif (CONTROL == 'FUZZYCONTROL'): self.control = FUZZYControl() self.prev_dis = 0 self.prev_ang = 0 self.prev_vel = [] self.initPID = 0 self.state = 0 self.pre_state = 0 self.not_find = 0 # self._kp = 6 # self._ki = 0.1 # self._kd = 4.0 # self.prevIntegral = 0 # self.lastError = 0 ''' rotate ''' self.rotateAng = self._param.errorRotate90 ''' cross ''' self.timer = TimeCounter(time=self._param.crossTime) ''' home ''' self.homeFlag = 0 self.homeTimes = 0
def __init__(self): self._param = NodeHandle() self.images = None self._direction = 0 self._multiPos = [] self._angle = 999 self.Init_Images()
def __init__(self): self._param = NodeHandle() self._env = CarEnv() self._ddpg = None self._state = None self._action = None # self._behavior = ROBOT # self._behavior = TRAIN self._behavior = VIEW_RESULT self.Init_DDPG() if (self._behavior == TRAIN): self.Init_Train() if (self._behavior == VIEW_RESULT): self.Init_View_Result()
def __init__(self): self._param = NodeHandle() if (CONTROL == 'PIDCONTROL'): self.control = PIDControl() self.controlY = PIDControl_Y() self.controlYaw = PIDControl_Yaw() # self.controlQRX = PIDControl_Qr(20.0,0.05,10.0) # self.controlQRY = PIDControl_Qr(20.0,0.05,10.0) # self.controlQRX = PIDControl_Qr(15,0.05,12.0) self.controlQRX = PIDControl_Qr(15, 0.05, 14.0) self.controlQRY = PIDControl_Qr(30.0, 0.05, 15.0) elif (CONTROL == 'FUZZYCONTROL'): self.control = FUZZYControl() self.prev_dis = 0 self.prev_ang = 0 self.prev_vel = [] self.initPID = 0 self.state = 0 self.pre_state = 0 self.not_find = 0 self.stopTimes = 0 self.dualArm = 0 ''' rotate ''' self.rotateAng = self._param.errorRotate0 self.pre_rotateYaw = 0 ''' cross ''' self.timer = TimeCounter(time=self._param.crossTime) self.timerQr = TimeCounter(time=1.0) self.timerQrFlag = False ''' home ''' self.homeFlag = 0 self.homeTimes = 0
def __init__(self): self._param = NodeHandle()
def __init__(self): self._param = NodeHandle() self.scanLine = ScanLine() self.decideGrid = DecideGrid()
def __init__(self): self._param = NodeHandle() self.image = None self.scanImage = None self._scanState = None