aboutsummaryrefslogtreecommitdiff
path: root/behaviors
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-29 12:43:05 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-29 12:43:05 -0500
commitc8209d01f9ddf4c6670caee08073924cb33e447f (patch)
tree1e649deb239e56d8f5c5f95482bf78c70c393ebf /behaviors
parentf9aeaf10e3c9077504a78374640e79415734546b (diff)
setting up some more behaviors to get inherited from
Diffstat (limited to 'behaviors')
-rw-r--r--behaviors/BehaviorChain.py8
-rw-r--r--behaviors/DebugBehavior.py3
2 files changed, 7 insertions, 4 deletions
diff --git a/behaviors/BehaviorChain.py b/behaviors/BehaviorChain.py
index 98585c9..ce161f9 100644
--- a/behaviors/BehaviorChain.py
+++ b/behaviors/BehaviorChain.py
@@ -1,5 +1,6 @@
from operationscore.Behavior import *
import util.ComponentRegistry as compReg
+import logging as main_log
import pdb
class BehaviorChain(Behavior):
def behaviorInit(self):
@@ -20,11 +21,12 @@ class BehaviorChain(Behavior):
if behaviorId in self.hooks: #process recursive hook if there is one
hookBehavior = compReg.getComponent(self.hooks[behaviorId])
-#we feed its recurrence in as input to the behavior.
+ #we feed its recurrence in as input to the behavior.
(recurrence, hookRecurrence) = \
hookBehavior.immediateProcessInput(recurrence, \
[])
if hookRecurrence != []:
- print 'Hook recurrences are not currently supported. Implement it yourself or bug russell'
- self.feedback[behaviorId] = recurrence
+ main_log.warn('Hook recurrences are not currently supported. Implement it\
+ yourself or bug russell')
+ self.feedback[behaviorId] = recurrence
return response
diff --git a/behaviors/DebugBehavior.py b/behaviors/DebugBehavior.py
index a00346b..2f8db80 100644
--- a/behaviors/DebugBehavior.py
+++ b/behaviors/DebugBehavior.py
@@ -1,7 +1,8 @@
from operationscore.Behavior import *
+from logger import main_log
import pdb
class DebugBehavior(Behavior):
def processResponse(self, sensorInputs, recursiveInputs):
if sensorInputs != []:
- print 'Sensor Inputs: ', sensorInputs
+ main_log.debug('Sensor Inputs: ', sensorInputs)
return []