コード例 #1
0
ファイル: seek.py プロジェクト: JasonHagler/tortuga
    def __init__(self, target, maxSpeed=0.0):
        """
        @type  target: ram.motion.seek.PointTarget
        @param target: Target to attempt to reach
        """
        Motion.__init__(self)

        self._running = False
        self._target = target
        self._maxSpeed = maxSpeed
        self._conn = target.subscribe(PointTarget.UPDATE, self._onBouyUpdate)
コード例 #2
0
    def __init__(self, target, maxSpeed=0.0):
        """
        @type  target: ram.motion.seek.PointTarget
        @param target: Target to attempt to reach
        """
        Motion.__init__(self)

        self._running = False
        self._target = target
        self._maxSpeed = maxSpeed
        self._conn = target.subscribe(PointTarget.UPDATE, self._onBouyUpdate)
コード例 #3
0
ファイル: seek.py プロジェクト: JasonHagler/tortuga
    def __init__(
        self,
        target,
        maxSpeed=0.0,
        depthGain=1,
        translate=False,
        translateGain=1,
        iDepthGain=0,
        dDepthGain=0,
        iTranslateGain=0,
        dTranslateGain=0,
        yawGain=1.0,
        maxDepthDt=0,
        alignmentThreshold=0.1,
        maxYaw=None,
    ):
        """
        @type  target: ram.motion.seek.PointTarget
        @param target: Target to attempt to reach
        """
        _type = Motion.ORIENTATION
        if 0 != depthGain:
            _type = _type | Motion.DEPTH
        if 0 != maxSpeed or translate:
            _type = _type | Motion.IN_PLANE
        Motion.__init__(self, _type=_type)

        self._first = True
        self._running = False
        self._target = target
        self._maxSpeed = maxSpeed
        self._alignmentThreshold = alignmentThreshold

        self._yawGain = yawGain
        self._maxYaw = maxYaw

        self._translate = translate
        self._translateGain = translateGain
        self._iTranslateGain = iTranslateGain
        self._dTranslateGain = dTranslateGain
        self._sumX = 0
        self._oldX = 0

        self._depthGain = depthGain
        self._iDepthGain = iDepthGain
        self._dDepthGain = dDepthGain
        self._maxDepthDt = maxDepthDt
        self._sumDepth = 0
        self._oldDepth = 0

        self._lastSeekTime = 0.0

        self._conn = target.subscribe(PointTarget.UPDATE, self._onBouyUpdate)
コード例 #4
0
    def __init__(self,
                 target,
                 maxSpeed=0.0,
                 depthGain=1,
                 translate=False,
                 translateGain=1,
                 iDepthGain=0,
                 dDepthGain=0,
                 iTranslateGain=0,
                 dTranslateGain=0,
                 yawGain=1.0,
                 maxDepthDt=0,
                 alignmentThreshold=0.1,
                 maxYaw=None):
        """
        @type  target: ram.motion.seek.PointTarget
        @param target: Target to attempt to reach
        """
        _type = Motion.ORIENTATION
        if 0 != depthGain:
            _type = _type | Motion.DEPTH
        if 0 != maxSpeed or translate:
            _type = _type | Motion.IN_PLANE
        Motion.__init__(self, _type=_type)

        self._first = True
        self._running = False
        self._target = target
        self._maxSpeed = maxSpeed
        self._alignmentThreshold = alignmentThreshold

        self._yawGain = yawGain
        self._maxYaw = maxYaw

        self._translate = translate
        self._translateGain = translateGain
        self._iTranslateGain = iTranslateGain
        self._dTranslateGain = dTranslateGain
        self._sumX = 0
        self._oldX = 0

        self._depthGain = depthGain
        self._iDepthGain = iDepthGain
        self._dDepthGain = dDepthGain
        self._maxDepthDt = maxDepthDt
        self._sumDepth = 0
        self._oldDepth = 0

        self._lastSeekTime = 0.0

        self._conn = target.subscribe(PointTarget.UPDATE, self._onBouyUpdate)
コード例 #5
0
ファイル: search.py プロジェクト: gsulliva/tortuga
 def __init__(self, legTime, sweepAngle, speed, direction = None):
     """
     Drives a forward zig-zag pattern
     """
     Motion.__init__(self, _type = Motion.IN_PLANE | Motion.ORIENTATION)
     
     self._first = True
     self._legTime = legTime
     self._sweepAngle = sweepAngle
     self._speed = speed
     self._connections = []
     self._timer = None
     self._inLeg = False
     self._direction = direction
コード例 #6
0
ファイル: search.py プロジェクト: ChrisCarlsen/tortuga
 def __init__(self, legTime, sweepAngle, speed, direction = None):
     """
     Drives a forward zig-zag pattern
     """
     Motion.__init__(self, _type = Motion.IN_PLANE | Motion.ORIENTATION)
     
     self._first = True
     self._legTime = legTime
     self._sweepAngle = sweepAngle
     self._speed = speed
     self._connections = []
     self._timer = None
     self._inLeg = False
     self._direction = direction
コード例 #7
0
ファイル: search.py プロジェクト: gsulliva/tortuga
 def __init__(self, legTime, sweepAngle, speed):
     """
     Drives a zig-zag which is indepdent of orientation
     """
     Motion.__init__(self, _type = Motion.IN_PLANE)
     
     self._first = True
     self._legTime = legTime
     self._sweepAngle = sweepAngle
     self._speed = speed
     self._connections = []
     
     self._timer = None
     self._direction = None
     self._forwardDirection = None
コード例 #8
0
ファイル: search.py プロジェクト: ChrisCarlsen/tortuga
 def __init__(self, legTime, sweepAngle, speed):
     """
     Drives a zig-zag which is indepdent of orientation
     """
     Motion.__init__(self, _type = Motion.IN_PLANE)
     
     self._first = True
     self._legTime = legTime
     self._sweepAngle = sweepAngle
     self._speed = speed
     self._connections = []
     
     self._timer = None
     self._direction = None
     self._forwardDirection = None
コード例 #9
0
    def __init__(self, target, maxSpeed = 0.0, maxSidewaysSpeed = 0.0,
                 speedGain = 1.0, sidewaysSpeedGain = 1.0,
                 _type = Motion.IN_PLANE,
                 iSpeedGain = 0.0, dSpeedGain = 0.0, iSidewaysSpeedGain = 0.0,
                 dSidewaysSpeedGain = 0.0):
        """
        @type  target: ram.motion.common.Target
        @param target: Target to attempt to reach
        """
        Motion.__init__(self, _type = _type)
        
        self._xDesired = 0
        self._yDesired = 0

        self._running = False
        self._target = target

        self._maxSpeed = maxSpeed
        self._minSpeed = -1 * maxSpeed
        self._sumSpeed = 0.0
        self._oldSpeed = 0.0
        self._iSpeedGain = iSpeedGain
        self._dSpeedGain = dSpeedGain
        self._lastSpeedRunTime = 0.0

        self._maxSidewaysSpeed = maxSidewaysSpeed
        self._minSidewaysSpeed = -1 * maxSidewaysSpeed
        self._sumSidewaysSpeed = 0.0
        self._oldSidewaysSpeed = 0.0
        self._iSidewaysSpeedGain = iSidewaysSpeedGain
        self._dSidewaysSpeedGain = dSidewaysSpeedGain
        self._lastSidewaysSpeedRunTime = 0.0

        self._speedGain = speedGain
        self._sidewaysSpeedGain = sidewaysSpeedGain
        
        self._conn = target.subscribe(Target.UPDATE, self._onTargetUpdate)