UserPreferences

PyroModuleMultirobot


This is an introduction to multi-robots, their tasks, and related issues. This module demonstrates the simulators and protocols necessary to implement multi-robot strategies. When completed, the reader should be ready to further explore these ideas.

Pyro Module Multirobot

This module was designed to explore issues in multirobot control.

This requires the Player/Stage software. If this hasn't been installed, see PlayerStageInstallation.

Demonstration

In the Player/Stage software, the Stage represents the simulated environment and the Players represent robots acting within that environment. This software includes some examples to demonstrate its features. Let's experiment with one of these examples. We'd like to have several robots moving independently within an environment. As a start, let's have each robot execute the simple avoid obstacles brain shown below.

  1 
  2 
  3 
  4 
  5 
  6 
  7 
  8 
  9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 

from pyrobot.brain import Brain

class Avoid(Brain):

    def wander(self, minSide):
        # if approaching an obstacle to the left side, turn right
        if min([s.distance() for s in self.robot.range["front-left"]]) < minSide:
            self.move(0,-0.3)
        # if approaching an obstacle to the right side, turn left
        elif min([s.distance() for s in self.robot.range["front-right"]]) < minSide:
            self.move(0,0.3)
        else: # go forward
            self.move(0.5, 0)

    def step(self):
        self.wander(1)

def INIT(engine):
   return Avoid('Avoid', engine)

First we will start up Pyro, using the Stage simulator, the robot called Player6665, and the avoid obstacles brain from above. Then we will start up a new instance of Pyro, without specifying the simulator, using the robot called Player6666, and the same brain.

pyro -s StageSimulator -w everything.world -r Player6665 -b AvoidProgram.py &
pyro -r Player6666 -b AvoidProgram.py

After executing the commands above, you should see that two of the robots in the simulator window have active sensory displays. Now press the Run button in each version of Pyro. Both robots should begin moving around the environment. The shapes with dark outlines are obstacles. There are also movable pucks, represented as small circles, that will slide away from the robot if bumped.

Example: Two robots chasing one another

In ExampleChase, two robots are placed into the same circular world as before. One robot is green and seeks out red, while the other robot is red and seeks out green. Both robots also avoid obstacles.

Example: Many brains in a Single Python File

As shown above, one can use the Player/Stage simulator and robots to examine multi-robot strategies. However, requiring a different Pyro GUI for each robot could get out of hand if you were dealing with many robots (imagine 100 robots all controlled by Pyro!). Another problem that could result is attempting to orchestrate the starting and stopping of more than one robot. For example, imagine that you are evolving a predator/prey pair of populations of robots. For these reasons, you might want to find a better way of starting and stopping many robots. To do this, you can skip the Pyro interface entirely, and just use Pyro classes. In ExampleMultipleBrains, we demonstrate how to do this.

Further Reading

  1. Lui, J., Wu, J. (2001). Multi-Agent Robotic Systems. New York : CRC Press.

  2. R.A. Watson, S.G. Ficici, and J.B. Pollack (2000). Embodied evolution: Distributing an evolutionary algorithm in a population of robots. Technical report CS-00-208.

Up: PyroModulesContents