ROS Bug when importing new brain


#1

Dear all,

I coded a PyNN brain but the simulation does not start and claims that there is a problem with the parameter, which should not be the case as the parameters have been written correctly. I coded the bibi file as well and it seems to be correct.
It says the following:
Error starting the simulation. (‘service [/ros_cle_simulation/create_new_simulation] responded with an error: error processing request: tau_facil (valid parameters for unknown are: delay, weight)’) (host: 148.187.82.127), weight)’) (host: 148.18

Could you please let me know where to look for the error and what is the issue if I am importing the file in the wrong way?

Kind regards,
neurogeek953


#2

Hi there,

from the error message I would guess the problem do is in your pyNN file, in a projection that is created with incorrect parameters… Perhaps you can copy that piece of code?

Alexander


#3

Absolutely !

There you go !

#!/usr/bin/env python2

-- coding: utf-8 --

“”"
Created on Sun Apr 15 15:30:50 2018

@author: TEB
“”"

-- coding: utf-8 --

“”"
This File contains my Virtual Brain Controller based on the architecture of the fruit fly brain.
“”"

pragma: no cover

author = ‘Teddy Edmond Benkohen’

from hbp_nrp_cle.brainsim import simulator as sim
import numpy as np
from random import randint
import logging
logger = logging.getLogger(name)

def create_brain():
“”"
Initializes PyNN with the neuronal network that has to be simulated
:returns: The population object
“”"
##
## Set up neurons
##
INPUT_PARAMS = {‘a’: 4.0,
‘b’: 0.0000805,
‘delta_T’: 2.0,
‘tau_w’: 144.0,
‘v_spike’: 0.0,
‘cm’: .281, # ev. /1000
‘v_rest’: -70.6,
‘tau_m’: 9.3666667,
‘e_rev_E’: 0.0,
‘e_rev_I’: -80.0,
‘v_reset’: -70.6,
‘v_thresh’: -50.4,
‘tau_refrac’: 10.0,
‘tau_syn_E’: 5.,
‘tau_syn_I’: 5.}

SENSORPARAMS = {'b': 0.0,
                'tau_w': 10.0,
                'v_spike': 0.0,
                'cm': 0.025,
                'v_rest': -60.5,
                'tau_m': 10.,
                'e_rev_E': 0.0,
                'e_rev_I': -75.0,
                'v_reset': -60.5,
                'v_thresh': -60.0,
                'tau_refrac': 10.0,
                'tau_syn_E': 2.5,
                'tau_syn_I': 7.5}

GO_ON_PARAMS = {'cm': .025,
                'v_rest': -60.5,
                'tau_m': 10.,
                'e_rev_E': 0.0,
                'e_rev_I': -75.0,
                'v_reset': -61.6,
                'v_thresh': -60.51,
                'tau_refrac': 10.0,
                'tau_syn_E': 2.5,
                'tau_syn_I': 7.5}


INTERMEDIATE_PARAMS = {'a': 4.0,
                       'b': 0.0000805,
                       'delta_T': 2.0,
                       'tau_w': 144.0,
                       'v_spike': 0.0,
                       'cm': .281, # ev. /1000
                       'v_rest': -70.6,
                       'tau_m': 112.4,
                       'e_rev_E': 0.0,
                       'e_rev_I': -80.0,
                       'v_reset': -70.6,
                       'v_thresh': -50.4,
                       'tau_refrac': 10.0,
                       'tau_syn_E': 5.,
                       'tau_syn_I': 5.}

population = sim.Population(47, sim.EIF_cond_alpha_isfa_ista())
population[:47].set(**INPUT_PARAMS)
population[0:19].set(**SENSORPARAMS)
population[20:24].set(**INTERMEDIATE_PARAMS)
population[25:26].set(**GO_ON_PARAMS)
population[27:46].set(**SENSORPARAMS)




##
## Set up synapse types
##
STATIC_SYNAPSE_PARAMS = {'delay': 0.1}
FACILITATING_SYNAPSE_PARAMS = {'delay':0.2, 'U':0.5 , 'tau_rec':800.0, 'tau_facil':0}
DEPRESSING_SYNAPSE_PARAMS = {'delay':0.5, 'U':0.04, 'tau_rec': float(randint(10,100))}
ACTION_SYNAPSE_PARAMS = {'delay':0.0001, 'U':1.0 , 'tau_rec':1.0, 'tau_facil':1.0}


# Synaptic weights

#weight_camera_to_retinal_phoreceptor = 10.0
weight_retinalphotoreceptor_to_lamina = 5.0
weight_lamina_to_lamina = 5.0
weight_lamina_to_medula = 5.0
weight_medula_to_medula = 8.75e-5
weight_medula_to_lobula = 1000
weight_lobula_to_lobula = 1.4e-4
weight_lobula_to_cortex = 1.0
weight_cortex_to_cortex = 1.5e-2
weight_cortex_to_lobula = 5.0
weight_cortex_to_actors = 1000

# Set Synapse types

#synapse_camera_to_retinal_phoreceptor = sim.StaticSynapse(weight = weight_camera_to_retinal_phoreceptor, **SYNAPSE_PARAMS)
synapse_retinalphotoreceptor_to_lamina = sim.StaticSynapse(weight = weight_retinalphotoreceptor_to_lamina, **STATIC_SYNAPSE_PARAMS)
synapse_lamina_to_lamina = sim.StaticSynapse(weight = weight_lamina_to_lamina, **STATIC_SYNAPSE_PARAMS)
synapse_lamina_to_medula = sim.StaticSynapse(weight = weight_lamina_to_medula, **STATIC_SYNAPSE_PARAMS)
synapse_medula_to_medula = sim.StaticSynapse(weight = weight_medula_to_medula, **STATIC_SYNAPSE_PARAMS)
synapse_medula_to_lobula = sim.StaticSynapse(weight = weight_medula_to_lobula, **STATIC_SYNAPSE_PARAMS)
synapse_lobula_to_lobula = sim.StaticSynapse(weight = weight_lobula_to_lobula, **STATIC_SYNAPSE_PARAMS)
synapse_lobula_to_cortex = sim.StaticSynapse(weight = weight_lobula_to_cortex, **ACTION_SYNAPSE_PARAMS)
synapse_cortex_to_lobula = sim.TsodyksMarkramSynapse(weight = weight_cortex_to_lobula, **DEPRESSING_SYNAPSE_PARAMS)
synapse_cortex_to_cortex = sim.TsodyksMarkramSynapse(weight = weight_cortex_to_cortex, **FACILITATING_SYNAPSE_PARAMS)
synapse_cortex_to_actors = sim.TsodyksMarkramSynapse(weight = weight_cortex_to_actors, **ACTION_SYNAPSE_PARAMS)


# Create the Connections

"""Right Compound Eye"""

# Nodes: Inputs: {0, 1} --> Outputs: {8}
sim.Projection(population[0:1], population[8],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_retinalphotoreceptor_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {2, 3} --> Outputs: {9}
sim.Projection(population[2:3], population[9],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_retinalphotoreceptor_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {4, 5} --> Outputs: {10}
sim.Projection(population[4:5], population[10],
               connector=sim.AllToAllConnector(),
               synapse_type=synapse_retinalphotoreceptor_to_lamina,
               receptor_type='inhibitory')

# Nodes: Inputs: {6, 7} --> Outputs: {11}
sim.Projection(population[6:7], population[11],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_retinalphotoreceptor_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {8} --> Outputs: {12}
sim.Projection(population[8], population[12],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {9} --> Outputs: {13}
sim.Projection(population[9], population[13],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {10} --> Outputs: {14}
sim.Projection(population[10], population[14],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {11} --> Outputs: {15}
sim.Projection(population[11], population[15],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {12} --> Outputs: {17}
sim.Projection(population[12], population[17],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_medula,
               receptor_type = 'excitatory')

# Nodes: Inputs: {13, 14, 15} --> Outputs: {16}
sim.Projection(population[13:15], population[16],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_medula,
               receptor_type = 'excitatory')

# Nodes: Inputs: {16} --> Outputs: {17}
sim.Projection(population[16], population[17],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_medula_to_medula,
               receptor_type = 'excitatory')

# # Nodes: Inputs: {17} --> Outputs: {18, 19}
sim.Projection(population[17], population[18:19],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_medula_to_lobula,
               receptor_type = 'excitatory')

# # Nodes: Inputs: {19} --> Outputs: {18}
sim.Projection(population[19], population[18],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lobula_to_lobula,
               receptor_type = 'inhibitory')

# Nodes: Inputs: {18} --> Outputs: {20}
sim.Projection(population[18], population[20],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lobula_to_cortex,
               receptor_type = 'excitatory')


"""Cortex and Motor Region"""

# Nodes: Inputs: {20} --> Outputs: {21, 22}
sim.Projection(population[20], population[21:22],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_cortex,
               receptor_type = 'excitatory')

# Nodes: Inputs: {20} --> Outputs: {19}
sim.Projection(population[20], population[19],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_lobula,
               receptor_type = 'excitatory')

# Nodes: Inputs: {21} --> Outputs: {19}
sim.Projection(population[21], population[19],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_lobula,
               receptor_type = 'excitatory')

# Nodes: Inputs: {21} --> Outputs {25}
sim.Projection(population[21], population[25],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_actors,
               receptor_type = 'excitatory')

# Nodes: Inputs: {22} --> Outputs {25, 26}
sim.Projection(population[22], population[25:26],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_actors,
               receptor_type = 'excitatory')

# Nodes: Inputs: {24} --> Outputs {26}
sim.Projection(population[24], population[26],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_actors,
               receptor_type = 'excitatory')

# Nodes: Inputs: {22} --> Outputs: {21}
sim.Projection(population[22], population[21],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_cortex,
               receptor_type = 'excitatory')

# Nodes: Inputs: {22} --> Outputs: {24}
sim.Projection(population[22], population[24],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_cortex,
               receptor_type = 'excitatory')

# Nodes: Inputs: {23} --> Outputs: {22}
sim.Projection(population[23], population[22],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_cortex,
               receptor_type = 'excitatory')

# Nodes: Inputs: {23} --> Outputs: {24}
sim.Projection(population[23], population[24],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_cortex,
               receptor_type = 'excitatory')

# Nodes: Inputs: {23} --> Outputs: {27}
sim.Projection(population[24], population[27],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_lobula,
               receptor_type = 'excitatory')

# Nodes: Inputs: {24} --> Outputs: {27}
sim.Projection(population[24], population[27],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_cortex_to_lobula,
               receptor_type = 'excitatory')


"""Left Compound Eye"""

# Nodes: Inputs: {39, 40} --> Outputs: {35}
sim.Projection(population[39:40], population[35],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_retinalphotoreceptor_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {41, 42} --> Outputs: {36}
sim.Projection(population[41:42], population[36],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_retinalphotoreceptor_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {43, 44} --> Outputs: {37}
sim.Projection(population[45:46], population[39],
               connector=sim.AllToAllConnector(),
               synapse_type=synapse_retinalphotoreceptor_to_lamina,
               receptor_type='inhibitory')

# Nodes: Inputs: {45, 46} --> Outputs: {38}
sim.Projection(population[47:48], population[40],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_retinalphotoreceptor_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {35} --> Outputs: {31}
sim.Projection(population[35], population[31],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {36} --> Outputs: {32}
sim.Projection(population[36], population[32],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {37} --> Outputs: {33}
sim.Projection(population[37], population[33],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {38} --> Outputs: {34}
sim.Projection(population[38], population[34],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_lamina,
               receptor_type = 'excitatory')

# Nodes: Inputs: {31} --> Outputs: {29}
sim.Projection(population[31], population[29],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_medula,
               receptor_type = 'excitatory')

# Nodes: Inputs: {32, 33, 34} --> Outputs: {30}
sim.Projection(population[32, 33, 34], population[30],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lamina_to_medula,
               receptor_type = 'excitatory')

# Nodes: Inputs: {30} --> Outputs: {29}
sim.Projection(population[30], population[29],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_medula_to_medula,
               receptor_type = 'excitatory')

# Nodes: Inputs: {29} --> Outputs: {27, 28}
sim.Projection(population[29], population[27:28],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_medula_to_lobula,
               receptor_type = 'excitatory')

# Nodes: Inputs: {27} --> Outputs: {28}
sim.Projection(population[27], population[28],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lobula_to_lobula,
               receptor_type = 'inhibitory')

# Nodes: Inputs: {28} --> Outputs: {23}
sim.Projection(population[28], population[23],
               connector = sim.AllToAllConnector(),
               synapse_type = synapse_lobula_to_cortex,
               receptor_type = 'excitatory')


sim.initialize(population, v=population.get('v_reset'))
logger.debug("Circuit description: " + str(population.describe()))
return population

circuit = create_brain()

sensors_righteye = circuit[0:19]
evaluators = circuit[20:24]
actors = circuit[25:26]
sensors_lefteye = circuit[27:46]
record = circuit[0:46]


Stuck in the CLE engine
#4

I solved this issue but know I have a new one …
I obtained the following error: [/ros_cle_simulation/create_new_simulation] responded with an error: error processing request: :3:0: junk after document element’) (host: 148.187.82.126)
Any idea what it is?
I personally think this is in BIBI file.


#5

Hi there I manage to fix the BIBI file but now I am getting this mistake for my PyNN file:

[/ros_cle_simulation/create_new_simulation] responded with an error: error processing request: len() of unsized object’) (host: 148.187.82.127)

Can you let me know what type of mistake this is?

Kind regards,
neurogeek953