aboutsummaryrefslogtreecommitdiff
path: root/behaviors/ResponseMover.py
blob: 59e353aba47362294042351a3a1ff9319a5f0ea4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import pdb
from operationscore.Behavior import *
import util.ComponentRegistry as compReg
class ResponseMover(Behavior):
    """ResponseMover is a scaffold for behaviors that spawn 'walkers' which act autonomously on input.
    To control the movment, use the behavior as part of a BehaviorChain and add a recursive hook which
    modulates the location."""

    def processResponse(self, sensorInputs, recursiveInputs):
        newResponses = sensorInputs 
        ret = []
        for recurInput in recursiveInputs:
            outDict = dict(recurInput)
            ret.append(outDict)
        ret += newResponses
        return (ret, ret)