Example #1
0
g.addNC(vvv, "vivaeSimulator", "java");   # run the simulator..
g.addNC(modem,"modem","modem")              # add default modem..
g.startGroup()                              # start group normally

################################## 
modem = g.getModem()
time.sleep(3)    # if the process is native, it takes longer time to init the services !!                 
simulator = NeuralModule('VivaeTest',modem)  # create NeuralModule which is able to add/remove agents

Controls = simulator.getControls();     # this starts the control services..
Controls.setVisible(False);
many=net.add(simulator)                 # add it to the Nengo network

#Controls.loadMap('data/scenarios/arena2.svg')  
#Controls.loadMap('data/scenarios/ushape.svg')
Controls.loadMap('data/scenarios/arena1.svg') 
#Controls.loadMap('data/scenarios/manyAgents.svg') 

Controls.addAgent('a',4)
Controls.addAgent('b',18)
Controls.addAgent('c',18,30,50)

"""
Controls.addAgent('d')
Controls.addAgent('e',8)
Controls.addAgent('f',20,10,50)
Controls.addAgent('g')
Controls.addAgent('h',39)
Controls.addAgent('i',22,30,1)
Controls.addAgent('j')
"""
Example #2
0
##################################
################# get modem, create smart neuron with inputs/outputs

modem = g.getModem()
simulator = NeuralModule("VivaeTest", modem)  # create NeuralModule which is able to add/remove agents

Controls = simulator.getControls()
# this starts the control services..
many = net.add(simulator)  # add it to the Nengo network

time.sleep(2)  # give it some time to init services

# Controls.loadMap('data/scenarios/arena2.svg')
# Controls.loadMap('data/scenarios/ushape.svg')
# Controls.loadMap('data/scenarios/arena1.svg')
Controls.loadMap("data/scenarios/arena1.svg")

Controls.addAgent("a", 4)
Controls.addAgent("b", 18)
Controls.addAgent("c", 18, 30, 50)
Controls.addAgent("d")  # adding more agents than is in the simulation
Controls.addAgent("e", 8)  # will result just in error message in console
Controls.addAgent("f", 20, 10, 50)  # these agents are not created
Controls.addAgent("g")
Controls.addAgent("h", 39)
Controls.addAgent("i", 22, 30, 1)
Controls.addAgent("j")

Controls.start()

##################################
Example #3
0
g.addNC(modem,"modem","modem")              # add default modem..
g.startGroup()                              # start group normally

################################## 
modem = g.getModem()
time.sleep(3)    # if the process is native, it takes longer time to init the services !!                 
simulator = NeuralModule('VivaeTest',modem)  # create NeuralModule which is able to add/remove agents

Controls = simulator.getControls();     # this starts the control services..
Controls.setVisible(True);
many=net.add(simulator)                 # add it to the Nengo network


#Controls.loadMap('data/scenarios/test/arena2.svg')  
#Controls.loadMap('data/scenarios/test/oneagent.svg')  
Controls.loadMap('data/scenarios/test/walls.svg')  

#Controls.loadMap('data/scenarios/ushape.svg')
#Controls.loadMap('data/scenarios/arena1.svg') 
#Controls.loadMap('data/scenarios/manyAgents.svg') 


"""
Notes about agents: (see screenshot to this script)

Friction sensor [dots]
    -measures [binary] presence of ANY OBJECT (including grass)
    -black and blue lines gere
    -road=0, everything other=1

Distance sensor [lines]
Example #4
0
################################## 
################# get modem, create smart neuron with inputs/outputs

modem = g.getModem()                    
simulator = NeuralModule('VivaeTest',modem)  # create NeuralModule which is able to add/remove agents

Controls = simulator.getControls();     # this starts the control services..
many=net.add(simulator)                 # add it to the Nengo network

time.sleep(2)    # give it some time to init services

#Controls.loadMap('data/scenarios/arena2.svg')  
#Controls.loadMap('data/scenarios/ushape.svg')
#Controls.loadMap('data/scenarios/arena1.svg') 
Controls.loadMap('data/scenarios/manyAgents.svg') 

Controls.addAgent('a',4)
Controls.addAgent('b',18)
Controls.addAgent('c',18,30,50)
Controls.addAgent('d')
Controls.addAgent('e',8)
Controls.addAgent('f',20,10,50)
Controls.addAgent('g')
Controls.addAgent('h',39)
Controls.addAgent('i',22,30,1)
Controls.addAgent('j')

Controls.start()

################################## 
Example #5
0
from ca.nengo.model.impl import FunctionInput
from ca.nengo.model import Units
from nengoros.modules.impl.vivae import VivaeNeuralModule as NeuralModule
from nengoros.comm.nodeFactory import NodeGroup as NodeGroup
from nengoros.comm.rosutils import RosUtils as RosUtils
from nengoros.modules.impl.vivae.impl import SimulationControls as Controls

Controls = simulator.getControls();     # this starts the control services..

Controls.stop()

Controls.destroy()


#Controls.loadMap('data/scenarios/arena2.svg') 
Controls.loadMap('data/scenarios/ushape.svg')
#Controls.loadMap('data/scenarios/arena1.svg') 
#Controls.loadMap('data/scenarios/manyAgents.svg') 
Controls.init()
"""
Controls.addAgent('a',4)
Controls.addAgent('b',18)
Controls.addAgent('c',18,30,50)

Controls.addAgent('d')
Controls.addAgent('e',8)
Controls.addAgent('f',20,10,50)
Controls.addAgent('g')
Controls.addAgent('h',39)
Controls.addAgent('i',22,30,1)
Controls.addAgent('j')
Example #6
0
g.addNC(vvv, "vivaeSimulator", "java");   # run the simulator..
g.addNC(modem,"modem","modem")              # add default modem..
g.startGroup()                              # start group normally

################################## 
modem = g.getModem()
time.sleep(3)    # if the process is native, it takes longer time to init the services !!                 
simulator = NeuralModule('VivaeTest',modem)  # create NeuralModule which is able to add/remove agents

Controls = simulator.getControls();     # this starts the control services..
Controls.setVisible(True);
many=net.add(simulator)                 # add it to the Nengo network


#Controls.loadMap('data/scenarios/test/arena2.svg')  
Controls.loadMap('data/scenarios/test/oneagent.svg')  
#Controls.loadMap('data/scenarios/test/walls.svg')  

#Controls.loadMap('data/scenarios/ushape.svg')
#Controls.loadMap('data/scenarios/arena1.svg') 
#Controls.loadMap('data/scenarios/manyAgents.svg') 


"""
Notes about agents: (see screenshot to this script)

Friction sensor [dots]
    -measures [binary] presence of ANY OBJECT (including grass)
    -black and blue lines gere
    -road=0, everything other=1