From swaffoj at allegheny.edu Sun Mar 2 21:34:18 2008 From: swaffoj at allegheny.edu (John Mark Swafford) Date: Sun Mar 2 21:34:36 2008 Subject: [Pyro-users] Pyrobot on OS X Leopard Message-ID: <47CB63AA.5040609@allegheny.edu> Hello All, Has anyone installed Pyrobot on Mac OS X Leopard? I tried and am not having much success. I don't get any errors when installing any of the packages, but I do get the following errors when I try and open it: bin/pyrobot: line 9: import: comand not found bin/pyrobot: line 11: __author__: command not found bin/pyrobot: line 12 __version__: command not found bin/pyrobot: line 20: syntax error near unexpected token `(' bin/pyrobot: line 20: ` cwd = os.getcwd() + '\\' + sys.argv[0]' Any input would be marvelous. Kind Regards, John Mark Swafford From dblank at brynmawr.edu Tue Mar 4 14:42:34 2008 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Tue Mar 4 14:42:56 2008 Subject: [Pyro-users] Pyrobot on OS X Leopard In-Reply-To: <47CB63AA.5040609@allegheny.edu> References: <47CB63AA.5040609@allegheny.edu> Message-ID: <47CDA62A.6060301@brynmawr.edu> John Mark Swafford wrote: > Hello All, > > Has anyone installed Pyrobot on Mac OS X Leopard? I tried and am not > having much success. I don't get any errors when installing any of the > packages, but I do get the following errors when I try and open it: > bin/pyrobot: line 9: import: comand not found > bin/pyrobot: line 11: __author__: command not found > bin/pyrobot: line 12 __version__: command not found > bin/pyrobot: line 20: syntax error near unexpected token `(' > bin/pyrobot: line 20: ` cwd = os.getcwd() + '\\' + sys.argv[0]' > > Any input would be marvelous. What are you doing that gives you that error? It looks like the shell is trying to interpret those commands, rather that python. You might try: python pyrobot/bin/pyrobot where pyrobot/bin/pyrobot is the path to where the bin/pyrobot file is. -Doug > Kind Regards, > John Mark Swafford > _______________________________________________ > Pyro-users mailing list > Pyro-users@pyrorobotics.org > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users > From bhanu128 at yahoo.com Tue Mar 11 11:41:12 2008 From: bhanu128 at yahoo.com (Maithreebhanu Wimalasekare) Date: Tue Mar 11 11:41:25 2008 Subject: [Pyro-users] Error Msg: system cannot find the file python Message-ID: <816003.85483.qm@web33007.mail.mud.yahoo.com> I am getting Error "Using PYROBOT in D:\Python24\Lib\site-packages\pyrobot'... The system cannot find the file python." when rinning the D:\Python24\Lib\site-packages\pyrobot\bin\pyrobot.py and then tryng to load the env. I am using windows xp and have installed according to spec. Can anyone help? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://emergent.brynmawr.edu/pipermail/pyro-users/attachments/20080311/5c3262aa/attachment.htm From D.Zoltok at sussex.ac.uk Fri Mar 21 08:28:30 2008 From: D.Zoltok at sussex.ac.uk (Dave Zoltok) Date: Fri Mar 21 08:28:41 2008 Subject: [Pyro-users] Pyrobot on OSX 10.5 Message-ID: Hi everyone. I am having an absolute nightmare of a time trying to get Pyrobot working correctly on my Mac running OSX 10.5.2. After spending 12 hours hunting down and installing dependencies, something is finally happening. I have Player 2.0.5 and Stage 2.0.4 set up (I think) and Pyrobot 5.0.0 under the default OSX Python installation. When I try running "python bin/pyrobot", I first get: sh: taskset: command not found PYROBOT WARNING: can't find 'taskset' Using PYROBOT on posix with default CPUs in '/Users/zoltok/Programming/ pyrobot'... And I cannot figure out where to get the taskset libraries from. Second, if I try loading Tutorial.py, I get the following. Attempting to import 'Tutorial'... Loaded '/Users/zoltok/Programming/pyrobot/plugins/worlds/Pyrobot/ Tutorial.pyc'! Traceback (most recent call last): File "/Users/zoltok/Programming/pyrobot/plugins/simulators/ PyrobotSimulator", line 83, in gui = INIT(worldFile) File "/Users/zoltok/Programming/pyrobot/plugins/simulators/ PyrobotSimulator", line 26, in INIT retval = userspace.INIT() File "/Users/zoltok/Programming/pyrobot/plugins/worlds/Pyrobot/ Tutorial.py", line 15, in INIT sim.addBox(0, 4, 1, 5, "blue", wallcolor="blue") TypeError: addBox() takes exactly 5 non-keyword arguments (6 given) No window comes up displaying the world. If I try loading another world (say Braitenburg.py) and loading a robot, I get a traceback ending in "ImportError: cannot import name colorMap". The only clue I have is that both of these errors are related to colors, and it took me forever to find rgb.txt on my system and link it to where pyrobot was looking. I have a feeling that out of the dozens of libraries and dependencies I had to install just to get to this point, one of them is the wrong version. Compiling Player and Stage alone required both Fink and MacPorts. I'm at my wit's end here. Any help would be appreciated. Dave From dblank at brynmawr.edu Fri Mar 21 08:46:45 2008 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Fri Mar 21 08:46:54 2008 Subject: [Pyro-users] Pyrobot on OSX 10.5 In-Reply-To: References: Message-ID: <47143.71.59.123.159.1206103605.squirrel@webmail.brynmawr.edu> On Fri, March 21, 2008 8:28 am, Dave Zoltok said: > Hi everyone. > > I am having an absolute nightmare of a time trying to get Pyrobot > working correctly on my Mac running OSX 10.5.2. After spending 12 > hours hunting down and installing dependencies, something is finally > happening. I have Player 2.0.5 and Stage 2.0.4 set up (I think) and > Pyrobot 5.0.0 under the default OSX Python installation. When I try > running "python bin/pyrobot", I first get: Of course, you don't need player/stage to use pyrobot. It has its own simulator included. > sh: taskset: command not found > PYROBOT WARNING: can't find 'taskset' > Using PYROBOT on posix with default CPUs in '/Users/zoltok/Programming/ > pyrobot'... > > And I cannot figure out where to get the taskset libraries from. I don't think I'd worry about that... I think that that may just be a Linux thing. That was added because having multi-cores could have different pieces of pyrobot running on different cores, and Tkinter (the Python GUI) would act funny occasionally. The taskset controls this on Linux. > Second, if I try loading Tutorial.py, I get the following. > > Attempting to import 'Tutorial'... > Loaded '/Users/zoltok/Programming/pyrobot/plugins/worlds/Pyrobot/ > Tutorial.pyc'! > Traceback (most recent call last): > File "/Users/zoltok/Programming/pyrobot/plugins/simulators/ > PyrobotSimulator", line 83, in > gui = INIT(worldFile) > File "/Users/zoltok/Programming/pyrobot/plugins/simulators/ > PyrobotSimulator", line 26, in INIT > retval = userspace.INIT() > File "/Users/zoltok/Programming/pyrobot/plugins/worlds/Pyrobot/ > Tutorial.py", line 15, in INIT > sim.addBox(0, 4, 1, 5, "blue", wallcolor="blue") > TypeError: addBox() takes exactly 5 non-keyword arguments (6 given) Looks like you have a world file from one version, and pyrobot from another. You are running the Python simulator (pyrobot simulator) so this should be easy to track down. I'll take a look. > No window comes up displaying the world. If I try loading another > world (say Braitenburg.py) and loading a robot, I get a traceback > ending in "ImportError: cannot import name colorMap". Again, it looks like a mismatch between versions. I'll check the pyrobot-5 files to make sure they include the right pieces... > The only clue I have is that both of these errors are related to > colors, and it took me forever to find rgb.txt on my system and link > it to where pyrobot was looking. I have a feeling that out of the > dozens of libraries and dependencies I had to install just to get to > this point, one of them is the wrong version. Compiling Player and > Stage alone required both Fink and MacPorts. I'm at my wit's end here. rgb.txt is only needed for stage. -Doug > Any help would be appreciated. > > Dave > _______________________________________________ > Pyro-users mailing list > Pyro-users@pyrorobotics.org > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users > -- Douglas S. Blank Associate Professor, Bryn Mawr College http://cs.brynmawr.edu/~dblank/ Office: 610 526 6501 From D.Zoltok at sussex.ac.uk Sat Mar 22 11:08:27 2008 From: D.Zoltok at sussex.ac.uk (Dave Zoltok) Date: Sat Mar 22 11:08:41 2008 Subject: [Pyro-users] Cannot import name colorMap Message-ID: <88B3872D-5E75-4C6A-867B-0C21F296BCA8@sussex.ac.uk> I'm running Pyrobot 5.0.0 on OSX 10.5.2 (with Python 2.5.1) and getting the following traceback when I try loading the default PyrobotRobot60000.py in the Braitenburg world: Exception in Tkinter callback Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/lib-tk/Tkinter.py", line 1403, in __call__ return self.func(*args) File "./gui/TK.py", line 202, in loadRobot gui.loadRobot(self) File "./gui/__init__.py", line 558, in loadRobot self.engine.loadRobot(f) File "./engine/__init__.py", line 174, in loadRobot self.robot = system.loadINIT(file) File "./system/__init__.py", line 86, in loadINIT exec("import " + module + " as userspace") File "", line 1, in File "./plugins/robots/PyrobotRobot60000.py", line 1, in from pyrobot.robot.symbolic import TCPRobot File "./robot/symbolic.py", line 14, in from pyrobot.simulators.pysim import colorMap, colorCode, colorUnCode ImportError: cannot import name colorMap I've tried Pyrobot 4.9.3 and 4.8.2, and both give slightly different tracebacks, but the same ImportError occurs regarding colorMap. Do I need to downgrade to Python 2.4.x for these to work? Do the included worlds/robots not work under certain versions of the simulator? Any tips anyone has would be appreciated. Dave From dblank at brynmawr.edu Sat Mar 22 11:39:40 2008 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Sat Mar 22 11:39:49 2008 Subject: [Pyro-users] Cannot import name colorMap In-Reply-To: <88B3872D-5E75-4C6A-867B-0C21F296BCA8@sussex.ac.uk> References: <88B3872D-5E75-4C6A-867B-0C21F296BCA8@sussex.ac.uk> Message-ID: <38088.71.59.123.159.1206200380.squirrel@webmail.brynmawr.edu> Dave, I think I see what is wrong... the tar file contained too much. Try deleting pyrobot/simulators/pysim/ : rm -rf pyrobot/simulators/pysim/ The older version of pyro had a directory named pysim, which is now a file pysim.py in the simulators subdir. I'll remove that subdir from the tar file. Thanks for the report; let us know if you have any other issues! -Doug On Sat, March 22, 2008 11:08 am, Dave Zoltok said: > I'm running Pyrobot 5.0.0 on OSX 10.5.2 (with Python 2.5.1) and > getting the following traceback when I try loading the default > PyrobotRobot60000.py in the Braitenburg world: > > Exception in Tkinter callback > Traceback (most recent call last): > File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/lib-tk/Tkinter.py", line 1403, in __call__ > return self.func(*args) > File "./gui/TK.py", line 202, in loadRobot > gui.loadRobot(self) > File "./gui/__init__.py", line 558, in loadRobot > self.engine.loadRobot(f) > File "./engine/__init__.py", line 174, in loadRobot > self.robot = system.loadINIT(file) > File "./system/__init__.py", line 86, in loadINIT > exec("import " + module + " as userspace") > File "", line 1, in > File "./plugins/robots/PyrobotRobot60000.py", line 1, in > from pyrobot.robot.symbolic import TCPRobot > File "./robot/symbolic.py", line 14, in > from pyrobot.simulators.pysim import colorMap, colorCode, > colorUnCode > ImportError: cannot import name colorMap > > I've tried Pyrobot 4.9.3 and 4.8.2, and both give slightly different > tracebacks, but the same ImportError occurs regarding colorMap. Do I > need to downgrade to Python 2.4.x for these to work? Do the included > worlds/robots not work under certain versions of the simulator? > > Any tips anyone has would be appreciated. > > Dave > _______________________________________________ > Pyro-users mailing list > Pyro-users@pyrorobotics.org > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users > -- Douglas S. Blank Associate Professor, Bryn Mawr College http://cs.brynmawr.edu/~dblank/ Office: 610 526 6501 From D.Zoltok at sussex.ac.uk Wed Mar 26 14:44:19 2008 From: D.Zoltok at sussex.ac.uk (Dave Zoltok) Date: Wed Mar 26 14:44:38 2008 Subject: [Pyro-users] CTRNN code crashing simulator Message-ID: I'm trying to set up my simulator to operate robots using a simple continuous-time recurrent neural network. At the moment I'm just configuring it by setting all of the parameters by hand; the settings below should allow the robot to chase after lights similar to a Braitenburg vehicle. But, behaviour aside, it seems this code is crashing the simulator instead! The line "self.motors(leftoutput, rightoutput)" seems to be the problem. It is meant to set the motors to the output from two of the nodes in the network. When I include this line, the simulator hangs without printing any of the statements I included below, and I have to abort the Python process. But if I comment this line out and replace it with something like "self.motors(rightinput, leftinput)," so that the light input is used directly to determine the motor output, the simulator works as expected. I can't figure out why one would work but the other wouldn't when both seem to be acceptable parameters to the method. Does anyone have an idea? I'm running version 5.0.0 on OSX 10.5.2. Dave --- code below --- # CTRNNBrain.py from pyrobot.brain import Brain from pyrobot.brain.ctrnn import * class CTRNNBrain(Brain): def setup(self): self.robot.light[0].units = "scaled" self.maxvalue = self.robot.light[0].getMaxvalue() self.net = CTRNN(name="brain") self.net.addNeuron(name="input_left", state=1.0, bias=-1.0, tau=0.5) self.net.addNeuron(name="input_right", state=1.0, bias=-1.0, tau=0.5) self.net.addNeuron(name="hidden", state=6.0, bias=-6.0, tau=0.5) self.net.addNeuron(name="motor_left", state=10.0, bias=-10.0, tau=0.2) self.net.addNeuron(name="motor_right", state=10.0, bias=-10.0, tau=0.2) self.net.setConnectionWeight("input_left", "hidden", 1.5) self.net.setConnectionWeight("input_right", "hidden", 1.5) self.net.setConnectionWeight("hidden", "hidden", 12.0) self.net.setConnectionWeight("input_right", "motor_left", 4.0) self.net.setConnectionWeight("hidden", "motor_left", 4.0) self.net.setConnectionWeight("motor_left", "motor_left", 7.0) self.net.setConnectionWeight("input_left", "motor_right", 4.0) self.net.setConnectionWeight("hidden", "motor_right", 4.0) self.net.setConnectionWeight("motor_right", "motor_right", 7.0) def step(self): # Get the inputs leftinput = max([s.value for s in self.robot.light[0]["left"]]) rightinput = max([s.value for s in self.robot.light[0] ["right"]]) print "left input = %f, right input = %f" % (leftinput, rightinput) self.net.setNeuronOutput("input_left", leftinput) self.net.setNeuronOutput("input_right", rightinput) self.net.EulerStep(0.01) leftoutput = self.net.getNeuronOutput("motor_left") rightoutput = self.net.getNeuronOutput("motor_right") print "left state = %f, right state = %f" % (self .net .getNeuronState("motor_left"),self.net.getNeuronState("motor_right")) print "left output = %f, right output = %f" % (leftoutput, rightoutput) #self.motors(rightinput, leftinput) self.motors(leftoutput, rightoutput) def INIT(eng): return CTRNNBrain(engine=eng) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://emergent.brynmawr.edu/pipermail/pyro-users/attachments/20080326/ff501a8b/attachment.htm From dblank at brynmawr.edu Wed Mar 26 15:33:49 2008 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Wed Mar 26 15:39:05 2008 Subject: [Pyro-users] CTRNN code crashing simulator In-Reply-To: References: Message-ID: <47EAA51D.5040402@brynmawr.edu> Dave Zoltok wrote: > I'm trying to set up my simulator to operate robots using a simple > continuous-time recurrent neural network. At the moment I'm just > configuring it by setting all of the parameters by hand; the settings > below should allow the robot to chase after lights similar to a > Braitenburg vehicle. But, behaviour aside, it seems this code is > crashing the simulator instead! > > The line "self.motors(leftoutput, rightoutput)" seems to be the problem. > It is meant to set the motors to the output from two of the nodes in the > network. When I include this line, the simulator hangs without printing > any of the statements I included below, and I have to abort the Python > process. But if I comment this line out and replace it with something > like "self.motors(rightinput, leftinput)," so that the light input is > used directly to determine the motor output, the simulator works as > expected. > > I can't figure out why one would work but the other wouldn't when both > seem to be acceptable parameters to the method. Does anyone have an > idea? I'm running version 5.0.0 on OSX 10.5.2. > > Dave Dave, What are the values you are feeding to the motors? They are expecting values between -1 and 1. -Doug > --- code below --- > > # CTRNNBrain.py > from pyrobot.brain import Brain > from pyrobot.brain.ctrnn import * > > class CTRNNBrain(Brain): > def setup(self): > self.robot.light[0].units = "scaled" > self.maxvalue = self.robot.light[0].getMaxvalue() > > > > self.net = CTRNN(name="brain") > self.net.addNeuron(name="input_left", state=1.0, bias=-1.0, > tau=0.5) > self.net.addNeuron(name="input_right", state=1.0, bias=-1.0, > tau=0.5) > self.net.addNeuron(name="hidden", state=6.0, bias=-6.0, > tau=0.5) > self.net.addNeuron(name="motor_left", state=10.0, bias=-10.0, > tau=0.2) > self.net.addNeuron(name="motor_right", state=10.0, bias=-10.0, > tau=0.2) > > > > self.net.setConnectionWeight("input_left", "hidden", 1.5) > self.net.setConnectionWeight("input_right", "hidden", 1.5) > self.net.setConnectionWeight("hidden", "hidden", 12.0) > self.net.setConnectionWeight("input_right", "motor_left", 4.0) > self.net.setConnectionWeight("hidden", "motor_left", 4.0) > self.net.setConnectionWeight("motor_left", "motor_left", 7.0) > self.net.setConnectionWeight("input_left", "motor_right", 4.0) > self.net.setConnectionWeight("hidden", "motor_right", 4.0) > self.net.setConnectionWeight("motor_right", "motor_right", 7.0) > > > def step(self): > # Get the inputs > leftinput = max([s.value for s in self.robot.light[0]["left"]]) > rightinput = max([s.value for s in self.robot.light[0]["right"]]) > print "left input = %f, right input = %f" % (leftinput, rightinput) > self.net.setNeuronOutput("input_left", leftinput) > self.net.setNeuronOutput("input_right", rightinput) > self.net.EulerStep(0.01) > leftoutput = self.net.getNeuronOutput("motor_left") > rightoutput = self.net.getNeuronOutput("motor_right") > print "left state = %f, right state = %f" % > (self.net.getNeuronState("motor_left"),self.net.getNeuronState("motor_right")) > print "left output = %f, right output = %f" % (leftoutput, > rightoutput) > #self.motors(rightinput, leftinput) > self.motors(leftoutput, rightoutput) > > > > def INIT(eng): > return CTRNNBrain(engine=eng) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pyro-users mailing list > Pyro-users@pyrorobotics.org > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users From D.Zoltok at sussex.ac.uk Thu Mar 27 06:51:08 2008 From: D.Zoltok at sussex.ac.uk (Dave Zoltok) Date: Thu Mar 27 06:51:19 2008 Subject: [Pyro-users] CTRNN code crashing simulator In-Reply-To: <47EAA51D.5040402@brynmawr.edu> References: <47EAA51D.5040402@brynmawr.edu> Message-ID: The values being sent out from the network are sigmoided to be between 0 and 1. I've compared my code to Randy Beer's C++ version and it's behaving as expected. Here's the output from the first step in the default Braitenburg.py world (the output): left input = 0.154401, right input = 0.147611 left state = 9.925388, right input = 9.925658 left output = 0.481356, right output = 0.481423 If I try passing the left and right outputs into self.motors(), none of this is output at all, even though the print statements occur before self.motors() is called. Dave On 26 Mar 2008, at 19:33, Douglas S. Blank wrote: > > Dave, > > What are the values you are feeding to the motors? They are > expecting values between -1 and 1. > > -Doug > From dblank at brynmawr.edu Thu Mar 27 10:51:57 2008 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Thu Mar 27 10:52:32 2008 Subject: [Pyro-users] CTRNN code crashing simulator In-Reply-To: References: <47EAA51D.5040402@brynmawr.edu> Message-ID: <47EBB48D.4080200@brynmawr.edu> Dave Zoltok wrote: > The values being sent out from the network are sigmoided to be between 0 > and 1. I've compared my code to Randy Beer's C++ version and it's > behaving as expected. > > Here's the output from the first step in the default Braitenburg.py > world (the output): > > left input = 0.154401, right input = 0.147611 > left state = 9.925388, right input = 9.925658 > left output = 0.481356, right output = 0.481423 > > If I try passing the left and right outputs into self.motors(), none of > this is output at all, even though the print statements occur before > self.motors() is called. Dave, The only thing I can think of is that the values you are passing in aren't actually floating point numbers. Perhaps your code is returning something else? You might try wrapping a float() around them before passing them to motors. BTW, would you be interested in contributing your ctrnn code to Pyro, or making a wiki page describing its use? -Doug > Dave > > On 26 Mar 2008, at 19:33, Douglas S. Blank wrote: >> >> Dave, >> >> What are the values you are feeding to the motors? They are expecting >> values between -1 and 1. >> >> -Doug >> > From D.Zoltok at sussex.ac.uk Thu Mar 27 11:51:05 2008 From: D.Zoltok at sussex.ac.uk (Dave Zoltok) Date: Thu Mar 27 11:51:20 2008 Subject: [Pyro-users] CTRNN code crashing simulator In-Reply-To: <47EBB48D.4080200@brynmawr.edu> References: <47EAA51D.5040402@brynmawr.edu> <47EBB48D.4080200@brynmawr.edu> Message-ID: <03C80839-4DEE-49BB-8803-AF90A6577AA1@sussex.ac.uk> That solved it. Not sure why the network wasn't returning floats already, but oh well. I'd definitely be interested in contributing once I get the code cleaned up enough for other people to make sense of it. It'll have to wait until my research projects are finished, so hopefully some time over the summer. Dave On 27 Mar 2008, at 14:51, Douglas S. Blank wrote: > Dave Zoltok wrote: >> The values being sent out from the network are sigmoided to be >> between 0 and 1. I've compared my code to Randy Beer's C++ version >> and it's behaving as expected. >> Here's the output from the first step in the default Braitenburg.py >> world (the output): >> left input = 0.154401, right input = 0.147611 >> left state = 9.925388, right input = 9.925658 >> left output = 0.481356, right output = 0.481423 >> If I try passing the left and right outputs into self.motors(), >> none of this is output at all, even though the print statements >> occur before self.motors() is called. > > Dave, > > The only thing I can think of is that the values you are passing in > aren't actually floating point numbers. Perhaps your code is > returning something else? You might try wrapping a float() around > them before passing them to motors. > > BTW, would you be interested in contributing your ctrnn code to > Pyro, or making a wiki page describing its use? > > -Doug > >> Dave >> On 26 Mar 2008, at 19:33, Douglas S. Blank wrote: >>> >>> Dave, >>> >>> What are the values you are feeding to the motors? They are >>> expecting values between -1 and 1. >>> >>> -Doug >>> > From fccoelho at gmail.com Thu Mar 27 14:06:25 2008 From: fccoelho at gmail.com (Flavio Coelho) Date: Thu Mar 27 14:06:36 2008 Subject: [Pyro-users] debuggin brains Message-ID: Hi, I am starting to play with Pyro recently and I was wondering what is the recommended way of debugging pyro modules such as brain modules. can I run them outside the pyrobot GUI in order to take advantage of the many graphical debugger available to python? thnx, Fl?vio -------------- next part -------------- An HTML attachment was scrubbed... URL: http://emergent.brynmawr.edu/pipermail/pyro-users/attachments/20080327/2eb25bc7/attachment.htm From dblank at brynmawr.edu Fri Mar 28 11:05:18 2008 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Fri Mar 28 11:05:45 2008 Subject: [Pyro-users] debuggin brains In-Reply-To: References: Message-ID: <47ED092E.4000906@brynmawr.edu> Flavio Coelho wrote: > Hi, > > I am starting to play with Pyro recently and I was wondering what is the > recommended way of debugging pyro modules such as brain modules. can I > run them outside the pyrobot GUI in order to take advantage of the many > graphical debugger available to python? > > thnx, > > Fl?vio Fl?vio, Unfortunately, it isn't easy to run Pyro (in the normal way) without the Pyro GUI. However, you can run it in some non-standard ways. Check out the page: http://pyrorobotics.org/?page=PyroFromPython The main issue is that the gui is the code that updates the sensors. If I were to rewrite Pyrobot, I'd have all of the updating done asynchronously, then you could run any any Python environment. I've been working on an example that doesn't use the standard Pyro GUI, but talks directly to the Python simulator. However, it still does use the threaded brain classes to load the brains. You might have some luck doing something like that. See attached code and run it like: python -i evolang.py If you do figure out a nice way to do this, please let us know. -Doug -------------- next part -------------- A non-text attachment was scrubbed... Name: evolang.py Type: application/x-python Size: 14344 bytes Desc: not available Url : http://emergent.brynmawr.edu/pipermail/pyro-users/attachments/20080328/f2e57f74/evolang.bin