def __init__(self, params, servoNum, output): Device.__init__(self, params.getServoName(servoNum), output) self._servoNum = servoNum self._pub = Publisher('%s/Position' % self._name, Float32, queue_size=params.getServoPublishHz(servoNum)) Subscriber('%s/command' % self._name, Float32, self.servoCallBack) self._haveRightToPublish = False
def __init__(self, param, output): Device.__init__(self, param.getIMUName(), output) self._frameId = param.getIMUFrameId() self._angle = param.getIMUOrientation() self._pub = Publisher("%s_AGQ" % self._name, Imu, queue_size=param.getIMUPubHz()) self._pubMag = Publisher("%s_M" % self._name, MagneticField, queue_size=param.getIMUPubHz()) Service("%s_Calibration" % self._name, calibIMU, self.serviceCallBack) self._haveRightToPublish = False
def __init__(self, param, output): Device.__init__(self, param.getGpsName(), output) self._frameId = param.getGpsFrameId() self._pub = Publisher('%s' % self._name, NavSatFix, queue_size=param.getGpsPubHz()) self._haveRightToPublish = False self._old_fix = 0 self._wd = int(round(time.time() * 1000)) KeepAliveHandler(self._name, NavSatFix)
def __init__(self, params, servoNum, output): Device.__init__(self, params.getServoName(servoNum), output) self._servoNum = servoNum self._pub = Publisher('%s/Position' % self._name, Float32, queue_size=params.getServoPublishHz(servoNum)) Subscriber('%s/command' % self._name, Float32, self.servoCallBack) #KeepAliveHandler('%s/Position' % self._name, Float32) self._haveRightToPublish = False
def __init__(self, param, motorL, motorR): Device.__init__(self, param.getCloseDiffName(), None) self._maxAng = param.getCloseDiffMaxAng() self._rWheel = param.getCloseDiffRWheel() self._width = param.getCloseDiffWidth() self._maxLin = param.getCloseDiffMaxLin() self._motorL = motorL self._motorR = motorR Subscriber('%s/command' % self._name, Twist, self.diffCallback)
def __init__(self, devId, param, output): Device.__init__(self, param.getURFName(devId), output) self._urfType = param.getURFType(devId) self._frameId = param.getURFFrameId(devId) self._pub = Publisher('%s' % self._name, Range, queue_size=param.getURFPubHz(devId)) #KeepAliveHandler(self._name, Range) self._devId = devId self._haveRightToPublish = False
def __init__(self, param, output): Device.__init__(self, param.getCloseDiffName(), output) self._baseLink = param.getCloseDiffBaseLink() self._odom = param.getCloseDiffOdom() self._maxAng = param.getCloseDiffMaxAng() self._maxLin = param.getCloseDiffMaxLin() self._pub = Publisher("%s/odometry" % self._name, Odometry, queue_size=param.getCloseDiffPubHz()) self._broadCase = TransformBroadcaster() Subscriber('%s/command' % self._name, Twist, self.diffServiceCallback, queue_size=1) Service('%s/setOdometry' % self._name, set_odom, self.setOdom)
def __init__(self, motorNum ,param,output): Device.__init__(self, param.getCloseLoopMotorName(motorNum), output) self._motorId = motorNum self._kp = param.getCloseLoopMotorKp(motorNum) self._ki = param.getCloseLoopMotorKi(motorNum) self._kd = param.getCloseLoopMotorKd(motorNum) self._pub = Publisher('%s/feedback' % self._name, Motor, queue_size=param.getCloseLoopMotorPubHz(motorNum)) Subscriber('%s/command' % self._name, Float32, self.MotorCallback, queue_size=1) self._haveRightToPublish = False
def __init__(self, param, output): """ :param param: :type param: RiCParam :param output: :return: """ Device.__init__(self, param.getBatteryName(), output) self._pub = Publisher('%s' % self._name, Battery, queue_size=param.getBatteryPubHz()) self._haveRightToPublish = False self._min = param.getBatteryMin() self._max = param.getBatteryMax()
def __init__(self, param, output): Device.__init__(self, param.getIMUName(), output) self._frameId = param.getIMUFrameId() self._angle = param.getIMUOrientation() self._pub = Publisher('%s_AGQ' % self._name, Imu, queue_size=param.getIMUPubHz()) self._pubMag = Publisher('%s_M' % self._name, MagneticField, queue_size=param.getIMUPubHz()) self._pubCalib = Publisher('/imu_calib_publisher', imuCalib, queue_size=param.getIMUPubHz()) Service('/imu_Calibration', calibIMU, self.serviceCallBack) self._haveRightToPublish = False self._calib = False self._xMax = 0.0 self._yMax = 0.0 self._zMax = 0.0 self._xMin = 0.0 self._yMin = 0.0 self._zMin = 0.0
def __init__(self, motorNum, param, output): Device.__init__(self, param.getCloseLoopMotorName(motorNum), output) self._motorId = motorNum self._kp = param.getCloseLoopMotorKp(motorNum) self._ki = param.getCloseLoopMotorKi(motorNum) self._kd = param.getCloseLoopMotorKd(motorNum) self._pub = Publisher( '%s/feedback' % self._name, Motor, queue_size=param.getCloseLoopMotorPubHz(motorNum)) Subscriber('%s/command' % self._name, Float32, self.MotorCallback, queue_size=1) self._haveRightToPublish = False
def __init__(self, param, output): Device.__init__(self, param.getCloseDiffName(), output) self._baseLink = param.getCloseDiffBaseLink() self._odom = param.getCloseDiffOdom() self._maxAng = param.getCloseDiffMaxAng() self._maxLin = param.getCloseDiffMaxLin() self._pub = Publisher("%s/odometry" % self._name, Odometry, queue_size=param.getCloseDiffPubHz()) self._broadCase = TransformBroadcaster() Subscriber('%s/command' % self._name, Twist, self.diffServiceCallback, queue_size=1) Service('%s/setOdometry' % self._name, set_odom, self.setOdom) self._haveRightToPublish = False self._prevOdom = None self._firstTimePub = True
def __init__(self, devId,param, output): Device.__init__(self, param.getSwitchName(devId), output) self._pub = Publisher('%s' % self._name, Bool, queue_size=param.getSwitchPubHz(devId)) self._switchId = devId self._haveRightToPublish = False
def __init__(self, param, output): Device.__init__(self, param.getPPMName(), output) self._pub = Publisher('%s' % self._name, PPM, queue_size=param.getPPMPubHz()) self._haveRightToPublish = False
def __init__(self, param): Device.__init__(self, param.getPPMName(), None) self._pub = Publisher('%s' % self._name, PPM, queue_size=param.getPPMPubHz())
def __init__(self, param): Device.__init__(self, param.getBatteryName(), None) self._pub = Publisher('%s' % self._name, Float32, queue_size=param.getBatteryPubHz())
def __init__(self, motorId, param, output): Device.__init__(self, param.getOpenLoopName(motorId), output) self._id = motorId self._direction = param.getOpenLoopDirection(motorId) Subscriber('%s/command' % self._name, Float32, self.openLoopCallback)
def __init__(self, devId, param): Device.__init__(self, param.getURFName(devId), None) self._urfType = param.getURFType(devId) self._frameId = param.getURFFrameId(devId) self._pub = Publisher('%s' % self._name, Range, queue_size=param.getURFPubHz(devId))
def __init__(self, param, output): Device.__init__(self, param.getGpsName(), output) self._frameId = param.getGpsFrameId() self._pub = Publisher('%s' % self._name, NavSatFix, queue_size=param.getGpsPubHz()) self._haveRightToPublish = False
def __init__(self,param ,output): Device.__init__(self, param.getIMUName(), output) self._frameId = param.getIMUFrameId() self._pub = Publisher('%s_AGQ' % self._name, Imu, queue_size=param.getIMUPubHz()) self._pubMag = Publisher('%s_M' % self._name, MagneticField, queue_size=param.getIMUPubHz())
def __init__(self, param, output): Device.__init__(self, param.getBatteryName(), output) self._pub = Publisher('%s' % self._name, Float32, queue_size=param.getBatteryPubHz()) self._haveRightToPublish = False
def __init__(self, motorId,param, output): Device.__init__(self, param.getOpenLoopName(motorId), output) self._id = motorId self._direction = param.getOpenLoopDirection(motorId) Subscriber('%s/command' % self._name, Float32, self.openLoopCallback)
def __init__(self, motorNum ,param,output): Device.__init__(self, param.getCloseLoopMotorName(motorNum), output) self._motorId = motorNum self._pub = Publisher('%s/feedback' % self._name, Motor, queue_size=param.getCloseLoopMotorPubHz(motorNum)) Subscriber('%s/command' % self._name, Float32, self.MotorCallback)
def __init__(self, param, relayNum, output): Device.__init__(self, param.getRelayName(relayNum), output) self._relayNum = relayNum Service('%s/setRelay' % self._name, Relay, self.setRelayCallBack)
def __init__(self, devId,param): Device.__init__(self, param.getSwitchName(devId), None) self._pub = Publisher('%s' % self._name, Bool, queue_size=param.getSwitchPubHz(devId))