Skip to content
Snippets Groups Projects
Commit 2da57d09 authored by lguyot's avatar lguyot Committed by Luc Guyot
Browse files

[NRRPLT-6557]

- Implements the (missing) method _create_robot_adapters
- Changes NRP_MODELS_DIRECTORY into NRP_SIMULATION_DIR as required

Change-Id: I94a3e6efde1627d1d2099da91ae84819046ceafb
parent 81b7afc2
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,7 @@ import hbp_nrp_cle.brainsim.pynn_nest # pylint: disable=unused-import
import logging
from hbp_nrp_cleserver.server.CLEGazeboSimulationAssembly import CLEGazeboSimulationAssembly
from hbp_nrp_cleserver.server.ServerConfigurations import robot_gazebo_ros_adapters
from hbp_nrp_distributed_nest.cle.DistributedPyNNCommunicationAdapter \
import DistributedPyNNCommunicationAdapter
from hbp_nrp_distributed_nest.cle.DistributedPyNNControlAdapter \
......@@ -61,6 +62,14 @@ class DistributedCLESimulationAssembly(CLEGazeboSimulationAssembly):
"""
super(DistributedCLESimulationAssembly, self).__init__(sim_id, exc, bibi_model, **par)
def _create_robot_adapters(self):
"""
Creates the adapter components for the robot side
:return: A tuple of the communication and control adapter for the robot side
"""
return robot_gazebo_ros_adapters()
def _create_brain_adapters(self):
"""
Creates the adapter components for the neural simulator
......
......@@ -72,9 +72,9 @@ class NestBrainProcess(object):
pop_dict = get_all_neurons_as_dict(self._bibi.brainModel.populations)
# load the models path on this node and set absolute bibi path
models_path = os.environ.get('NRP_MODELS_DIRECTORY')
models_path = os.environ.get('NRP_SIMULATION_DIR')
if models_path is None:
raise Exception("Unable to determine bibi path, NRP_MODELS_DIRECTORY is not "
raise Exception("Unable to determine bibi path, NRP_SIMULATION_DIR is not "
"defined on target node!")
brain_file = os.path.join(models_path, self._bibi.brainModel.file)
......
......@@ -29,6 +29,7 @@ import logging
import sys
from hbp_nrp_cleserver.server.CLEGazeboSimulationAssembly import CLEGazeboSimulationAssembly
from hbp_nrp_cleserver.server.ServerConfigurations import robot_gazebo_ros_adapters
from hbp_nrp_music_interface.cle.MUSICPyNNCommunicationAdapter import MUSICPyNNCommunicationAdapter
from hbp_nrp_music_interface.cle.MUSICPyNNControlAdapter import MUSICPyNNControlAdapter
......@@ -56,6 +57,14 @@ class MusicCLESimulationAssembly(CLEGazeboSimulationAssembly):
"""
super(MusicCLESimulationAssembly, self).__init__(sim_id, exc, bibi_model, **par)
def _create_robot_adapters(self):
"""
Creates the adapter components for the robot side
:return: A tuple of the communication and control adapter for the robot side
"""
return robot_gazebo_ros_adapters()
def _create_brain_adapters(self):
"""
Creates the adapter components for the neural simulator
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment