Belinda,
The normal method of working with Pyro with multiple robots is:
1) start the server or simulator ("Server:" button)
2) connect onto first robot ("Robot:" button) select PyrobotRobot60000.py
3) load a brain ("Brain" button)
In the case of multiple robots, you can do the above, and then start
another copy of pyrobot, but:
1) connect onto second robot ("Robot:" button) select PyrobotRobot60001.py
2) load a brain ("Brain:" button)
When exiting, you should close the second Pyrobot, then the first. The
first pyrobot will shut down the simulator on exit.
Now, this method requires a running Pyrobot for each sim robot in the
world, and talks to them over sockets. This allows an entire class to
connect onto a server, and each student could control a robot in the
simulated world. If you display the sim world on a projection computer,
then you all can watch.
This method may not be practical if a single user wants to run dozens of
robots, and there are methods for talking directly to the simulator
without using sockets. There is an example of this style of processing in
the pyrobot/examples/evolang.py file.
Likewise, if you wanted to write a single brain that controls many robots,
you could do that too. But the default is above.
-Doug
On Mon, November 13, 2006 8:04 pm, belinda thom said:
> Hi,
>
> Can someone point me to some documentation on using multiple robots
> in a single world?
>
> I've looked at BigRoomWithLights2Pioneers.py, which shows me that you
> can create multiple robots, but I cannot figure out how to access the
> robots (both self.robot and robot evaluate to integer 0). Perhaps the
> problem is I haven't loaded a robot--but what does it mean to use the
> robot tab when multiple robots exist? The same question applies to
> loading brains.
>
> It appears from the code that I need a way to access "sim", but I've
> not been able to figure out how to do this.
>
> Many thanks,
>
> --b
> _______________________________________________
> Pyro-users mailing list
> [email protected]
> http://emergent.brynmawr.edu/mailman/listinfo/pyro-users
>
--
Douglas S. Blank
Associate Professor, Bryn Mawr College
http://cs.brynmawr.edu/~dblank/
Office: 610 526 601
_______________________________________________
Pyro-users mailing list
[email protected]
http://emergent.brynmawr.edu/mailman/listinfo/pyro-users