Hi,

I'm not sure if this is something particular to OS X but its a really
frustrating thing so I thought I'd see if anyone else has had this
problem and/or a work around.

I'm using Pyrobot w/very few frills (e.g. no vision, stage, etc.)
because I was unable to get SWIG to work on my P4 running Mac OS X
10.8.4.

I often run pyrobot from the command line and have written some
scripts to do just that which I'd like to deploy to my students in
lab. The issue, however, is that often I get "waiting for simulator"
warnings. Towards addressing these issues, I've written two shell
scripts, "reset" (which kills any open pyrobot processes) and "pyro",
which invokes python from the command line.

The pyro script contains:

#!/bin/tcsh
set simulator = PyrobotSimulator
set robot = PyrobotRobot60000
set brain = $1
set world = $2
pyrobot -s $simulator -w $world -r $robot -b $brain &

and frequently results in:

8 % sh: line 1: taskset: command not found
PYROBOT WARNING: can't find 'taskset'
Using PYROBOT on posix with default CPUs in
'/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/pyrobot'...
Loading.Attempting to import 'SubsumptionFindLight'...
Loaded 'SubsumptionFindLight.pyc'!
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/pyrobot/plugins/simulators/PyrobotSimulator",
line 83, in ?
   gui = INIT(worldFile)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/pyrobot/plugins/simulators/PyrobotSimulator",
line 26, in INIT
   retval = userspace.INIT()
TypeError: INIT() takes exactly 1 argument (0 given)
 . Attempting to import 'PyrobotRobot60000'...
ManualFakeCamera not loaded! Won't be able to use camera.
Loaded '/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/pyrobot/plugins/robots/PyrobotRobot60000.pyc'!
Waiting on PyrobotSimulator...
Waiting on PyrobotSimulator...
Waiting on PyrobotSimulator...
Waiting on PyrobotSimulator...
Waiting on PyrobotSimulator...

at which point I break in (hit return) and quickly type "reset", whose contents is:

#!/bin/tcshset tag = pyrobot
echo "Reseting pyrobot by killing processes..."
echo `ps ww | grep $tag | grep -v grep`
ps ww | grep $tag | grep -v grep | awk '{ print $1; }' | xargs kill -9
echo "Done"

Sometimes I have to run pyro and reset several times before the
simulator is ready to accept the robot. I've tried splitting the
pyrobot command into several lines:

pyrobot -s ...  -w .. &
sleep 2
pyrobot -r .... -b ... &

which seems to help but doesn't always do the trick.

Advice?

--b
_______________________________________________
Pyro-users mailing list
[email protected]
http://emergent.brynmawr.edu/mailman/listinfo/pyro-users

Reply via email to