private void setupHeightQuadTreeToolboxModule(DRCRobotModel robotModel, DRCNetworkModuleParameters params) throws IOException { if (params.isHeightQuadTreeToolboxEnabled()) new HeightQuadTreeToolboxModule(robotModel.getSimpleRobotName(), robotModel.createFullRobotModel(), robotModel.getLogModelProvider()); }
public KinematicsToolboxModule(DRCRobotModel robotModel, boolean startYoVariableServer) throws IOException { super(robotModel.createFullRobotModel(), robotModel.getLogModelProvider(), startYoVariableServer, PACKET_DESTINATION, NETWORK_PORT); kinematicsToolBoxController = new KinematicsToolboxController(commandInputManager, statusOutputManager, fullRobotModel, robotModel, yoGraphicsListRegistry, registry); packetCommunicator.attachListener(RobotConfigurationData.class, kinematicsToolBoxController.createRobotConfigurationDataConsumer()); startYoVariableServer(); }
public KinematicsPlanningToolboxModule(DRCRobotModel robotModel, boolean startYoVariableServer, PubSubImplementation pubSubImplementation) throws IOException { super(robotModel.getSimpleRobotName(), robotModel.createFullRobotModel(), robotModel.getLogModelProvider(), startYoVariableServer, DEFAULT_UPDATE_PERIOD_MILLISECONDS, pubSubImplementation); kinematicsPlanningToolboxController = new KinematicsPlanningToolboxController(robotModel, fullRobotModel, commandInputManager, statusOutputManager, yoGraphicsListRegistry, registry); commandInputManager.registerConversionHelper(new KinematicsPlanningToolboxCommandConverter(fullRobotModel)); startYoVariableServer(); }
public KinematicsToolboxModule(DRCRobotModel robotModel, boolean startYoVariableServer, PubSubImplementation pubSubImplementation) throws IOException { super(robotModel.getSimpleRobotName(), robotModel.createFullRobotModel(), robotModel.getLogModelProvider(), startYoVariableServer, DEFAULT_UPDATE_PERIOD_MILLISECONDS, pubSubImplementation); kinematicsToolBoxController = new HumanoidKinematicsToolboxController(commandInputManager, statusOutputManager, fullRobotModel, yoGraphicsListRegistry, registry); commandInputManager.registerConversionHelper(new KinematicsToolboxCommandConverter(fullRobotModel)); startYoVariableServer(); }
private void setupYoVariableServer() { if (createYoVariableServer.get()) { yoVariableServer = new YoVariableServer(getClass(), new PeriodicNonRealtimeThreadSchedulerFactory(), robotModel.get().getLogModelProvider(), robotModel.get().getLogSettings(), robotModel.get().getEstimatorDT()); } }
private void setupHeightQuadTreeToolboxModule(DRCRobotModel robotModel, DRCNetworkModuleParameters params) throws IOException { if (params.isHeightQuadTreeToolboxEnabled()) { new HeightQuadTreeToolboxModule(robotModel.createFullRobotModel(), robotModel.getLogModelProvider()); PacketCommunicator heightQuadTreeToolboxCommunicator = PacketCommunicator .createIntraprocessPacketCommunicator(NetworkPorts.HEIGHT_QUADTREE_TOOLBOX_MODULE_PORT, NET_CLASS_LIST); packetRouter.attachPacketCommunicator(PacketDestination.HEIGHT_QUADTREE_TOOLBOX_MODULE, heightQuadTreeToolboxCommunicator); heightQuadTreeToolboxCommunicator.connect(); String methodName = "setupHeightQuadTreeToolboxModule"; printModuleConnectedDebugStatement(PacketDestination.HEIGHT_QUADTREE_TOOLBOX_MODULE, methodName); } }
private void setupYoVariableServer() { if (robotModel.get().getLogSettings().isLog()) { yoVariableServer = new YoVariableServer(getClass(), new PeriodicNonRealtimeThreadScheduler("DRCSimulationYoVariableServer"), robotModel.get().getLogModelProvider(), robotModel.get().getLogSettings(), robotModel.get().getEstimatorDT()); } else { yoVariableServer = null; } }
public WholeBodyTrajectoryToolboxModule(DRCRobotModel drcRobotModel, boolean startYoVariableServer, PubSubImplementation pubSubImplementation) throws IOException { super(drcRobotModel.getSimpleRobotName(), drcRobotModel.createFullRobotModel(), drcRobotModel.getLogModelProvider(), startYoVariableServer, DEFAULT_UPDATE_PERIOD_MILLISECONDS, pubSubImplementation); setTimeWithoutInputsBeforeGoingToSleep(Double.POSITIVE_INFINITY); wholeBodyTrajectoryToolboxController = new WholeBodyTrajectoryToolboxController(drcRobotModel, fullRobotModel, commandInputManager, statusOutputManager, registry, yoGraphicsListRegistry, startYoVariableServer); controllerNetworkSubscriber.registerSubcriberWithMessageUnpacker(WholeBodyTrajectoryToolboxMessage.class, 10, MessageUnpackingTools.createWholeBodyTrajectoryToolboxMessageUnpacker()); commandInputManager.registerConversionHelper(new WholeBodyTrajectoryToolboxCommandConverter(fullRobotModel)); }
public IHMCMOCAPLocalizationModule(DRCRobotModel drcRobotModel, MocapPlanarRegionsListManager planarRegionsListManager) { MocapDataClient mocapDataClient = new MocapDataClient(); mocapDataClient.registerRigidBodiesListener(this); packetCommunicator.attachListener(RobotConfigurationData.class, this); packetCommunicator.attachListener(FootstepStatusMessage.class, walkingStatusManager); PeriodicThreadSchedulerFactory scheduler = new PeriodicNonRealtimeThreadSchedulerFactory(); LogModelProvider logModelProvider = drcRobotModel.getLogModelProvider(); this.planarRegionsListManager = planarRegionsListManager; yoVariableServer = new YoVariableServer(getClass(), scheduler, logModelProvider, drcRobotModel.getLogSettings(), MOCAP_SERVER_DT); fullRobotModel = drcRobotModel.createFullRobotModel(); yoVariableServer.setMainRegistry(registry, fullRobotModel.getElevator(), null); PrintTools.info("Starting server"); yoVariableServer.start(); try { packetCommunicator.connect(); } catch (IOException e) { e.printStackTrace(); } }
private void setupBehaviorModule(DRCRobotModel robotModel, DRCNetworkModuleParameters params) throws IOException { if (params.isBehaviorModuleEnabled()) { DRCRobotSensorInformation sensorInformation = robotModel.getSensorInformation(); LogModelProvider logModelProvider = robotModel.getLogModelProvider(); if (params.isAutomaticDiagnosticEnabled()) { IHMCHumanoidBehaviorManager.createBehaviorModuleForAutomaticDiagnostic(robotModel.getSimpleRobotName(), robotModel, robotModel, logModelProvider, params.isBehaviorVisualizerEnabled(), sensorInformation, params.getTimeToWaitBeforeStartingDiagnostics()); } else { new IHMCHumanoidBehaviorManager(robotModel.getSimpleRobotName(), robotModel, robotModel, logModelProvider, params.isBehaviorVisualizerEnabled(), sensorInformation); } String methodName = "setupBehaviorModule "; printModuleConnectedDebugStatement(PacketDestination.BEHAVIOR_MODULE, methodName); } }
private void setupBehaviorModule(DRCRobotModel robotModel, DRCNetworkModuleParameters params) throws IOException { if (params.isBehaviorModuleEnabled()) { DRCRobotSensorInformation sensorInformation = robotModel.getSensorInformation(); LogModelProvider logModelProvider = robotModel.getLogModelProvider(); if (params.isAutomaticDiagnosticEnabled()) { IHMCHumanoidBehaviorManager .createBehaviorModuleForAutomaticDiagnostic(robotModel, logModelProvider, params.isBehaviorVisualizerEnabled(), sensorInformation, params.getTimeToWaitBeforeStartingDiagnostics()); } else { new IHMCHumanoidBehaviorManager(robotModel, logModelProvider, params.isBehaviorVisualizerEnabled(), sensorInformation); } PacketCommunicator behaviorModuleCommunicator = PacketCommunicator .createIntraprocessPacketCommunicator(NetworkPorts.BEHAVIOUR_MODULE_PORT, NET_CLASS_LIST); packetRouter.attachPacketCommunicator(PacketDestination.BEHAVIOR_MODULE, behaviorModuleCommunicator); behaviorModuleCommunicator.connect(); String methodName = "setupBehaviorModule "; printModuleConnectedDebugStatement(PacketDestination.BEHAVIOR_MODULE, methodName); } }