@Before public void setUp() { MemoryTools.printCurrentMemoryUsageAndReturnUsedMemoryInMB( getClass().getSimpleName() + " before test."); behaviorCommunicatorServer = PacketCommunicator.createIntraprocessPacketCommunicator( NetworkPorts.BEHAVIOUR_MODULE_PORT, new IHMCCommunicationKryoNetClassList()); behaviorCommunicatorClient = PacketCommunicator.createIntraprocessPacketCommunicator( NetworkPorts.BEHAVIOUR_MODULE_PORT, new IHMCCommunicationKryoNetClassList()); try { behaviorCommunicatorClient.connect(); behaviorCommunicatorServer.connect(); } catch (IOException e) { throw new RuntimeException(e); } drcSimulationTestHelper = new DRCSimulationTestHelper( testEnvironment, getSimpleRobotName(), DRCObstacleCourseStartingLocation.DEFAULT, simulationTestingParameters, getRobotModel()); Robot robotToTest = drcSimulationTestHelper.getRobot(); yoTime = robotToTest.getYoTime(); robot = drcSimulationTestHelper.getRobot(); fullRobotModel = getRobotModel().createFullRobotModel(); forceSensorDataHolder = new ForceSensorDataHolder(Arrays.asList(fullRobotModel.getForceSensorDefinitions())); robotDataReceiver = new HumanoidRobotDataReceiver(fullRobotModel, forceSensorDataHolder); drcSimulationTestHelper.attachListener(RobotConfigurationData.class, robotDataReceiver); PacketRouter<PacketDestination> networkProcessor = new PacketRouter<>(PacketDestination.class); networkProcessor.attachPacketCommunicator( PacketDestination.CONTROLLER, drcSimulationTestHelper.getControllerCommunicator()); networkProcessor.attachPacketCommunicator( PacketDestination.BEHAVIOR_MODULE, behaviorCommunicatorClient); communicationBridge = new BehaviorCommunicationBridge( behaviorCommunicatorServer, robotToTest.getRobotsYoVariableRegistry()); }