Package pyrobot :: Package brain :: Class Brain
[frames | no frames]

Type Brain

object --+        
         |        
  _Verbose --+    
             |    
        Thread --+
                 |
                Brain

Known Subclasses:
Avoid, BehaviorBasedBrain, CleanUp, CollectDataBrain, Controller, JoystickControl, KonanePlayer, Map, NNBrain, NNBrain, NNBrain, NNBrain, NNPredict, NNPredict, Reinforce, SimpleBrain, SimpleBrain, SimpleBrain, SimpleBrain, SimpleBrain, SimpleBrain, SimpleBrain, SimpleBrain, SubsumptionBrain, TrackBall, Vehicle, Vehicle, Vehicle, Vehicle, Vehicle, VisionBrain

The Brain is the basis for all brains.

Method Summary
  __init__(self, name, engine, **kwargs)
Constructor for Brain class.
  destroy(self)
Method to override if you create objects (such as devices).
  getDevice(self, *args)
Short-cut to call the robot's getDevice method.
  getEngine(self)
Returns the engine property.
  hasA(self, *args)
Short-cut to call the robot's hasA method.
  makeWindow(self)
Method that creates a window; seen under Brain -> Watch.
  motors(self, *args)
Short-cut to call the robot's motors method.
  move(self, *args)
Short-cut to call the robot's move method.
  pleaseQuit(self)
Signals the thread that we need to stop running.
  pleaseRun(self, callback)
Signals the thread that we need to start stepping.
  pleaseStep(self)
Signals the thread to make a step.
  pleaseStop(self)
Signals the thread that we need to stop stepping the robot.
  quit(self)
Signals the thread that we need to stop running.
  redraw(self)
Redraws the brain watch window.
  removeDevice(self, *args, **keywords)
Short-cut to call the robot's removeDevice method.
  requires(self, *args)
Short-cut to call the robot's requires method.
  rotate(self, *args)
Short-cut to call the robot's rotate method.
  run(self)
Runs the brain/thread.
  setup(self, **kwargs)
User init method.
  startDevice(self, *args, **keywords)
Short-cut to call the robot's startDevice method.
  step(self)
This is the method that does all of the work.
  stop(self)
Short-cut to call the robot's stop method.
  translate(self, *args)
Short-cut to call the robot's translate method.
  update(self)
Short-cut to call the robot's update method.
    Inherited from Thread
  __repr__(self)
  getName(self)
  isAlive(self)
  isDaemon(self)
  join(self, timeout)
  setDaemon(self, daemonic)
  setName(self, name)
  start(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...

Method Details

__init__(self, name='brain', engine=0, **kwargs)
(Constructor)

Constructor for Brain class.

You should set the engine, if nothing else.
Overrides:
threading.Thread.__init__

destroy(self)

Method to override if you create objects (such as devices).

getDevice(self, *args)

Short-cut to call the robot's getDevice method.

getEngine(self)

Returns the engine property.

hasA(self, *args)

Short-cut to call the robot's hasA method.

makeWindow(self)

Method that creates a window; seen under Brain -> Watch.

motors(self, *args)

Short-cut to call the robot's motors method.

move(self, *args)

Short-cut to call the robot's move method.

pleaseQuit(self)

Signals the thread that we need to stop running.

pleaseRun(self, callback=0)

Signals the thread that we need to start stepping.

pleaseStep(self)

Signals the thread to make a step.

pleaseStop(self)

Signals the thread that we need to stop stepping the robot.

quit(self)

Signals the thread that we need to stop running.

redraw(self)

Redraws the brain watch window.

removeDevice(self, *args, **keywords)

Short-cut to call the robot's removeDevice method.

requires(self, *args)

Short-cut to call the robot's requires method.

rotate(self, *args)

Short-cut to call the robot's rotate method.

run(self)

Runs the brain/thread.

self.pauseTime determines how many times a second it is called.
Overrides:
threading.Thread.run

setup(self, **kwargs)

User init method. Call this instead of overloading __init__.

startDevice(self, *args, **keywords)

Short-cut to call the robot's startDevice method.

step(self)

This is the method that does all of the work.

stop(self)

Short-cut to call the robot's stop method.

translate(self, *args)

Short-cut to call the robot's translate method.

update(self)

Short-cut to call the robot's update method.

Generated by Epydoc 2.1 on Mon Jul 25 01:39:27 2005 http://epydoc.sf.net