boolean robotIsHanging = true; DiagnosticsWhenHangingControllerStateFactory diagnosticsWhenHangingHighLevelBehaviorFactory = new DiagnosticsWhenHangingControllerStateFactory(humanoidJointPoseList, useArms, robotIsHanging, null); diagnosticsWhenHangingHighLevelBehaviorFactory.setTransitionRequested(true); controllerFactory.addCustomControlState(diagnosticsWhenHangingHighLevelBehaviorFactory); controllerFactory.createControllerNetworkSubscriber(new PeriodicRealtimeThreadScheduler(poseCommunicatorPriority), packetCommunicator);
controllerFactory.setInitialState(HighLevelControllerName.DO_NOTHING_BEHAVIOR); DiagnosticsWhenHangingControllerStateFactory diagnosticsWhenHangingControllerStateFactory = new DiagnosticsWhenHangingControllerStateFactory(humanoidJointPoseList, useArms, robotIsHanging, null); diagnosticsWhenHangingControllerStateFactory.setTransitionRequested(true); controllerFactory.addCustomControlState(diagnosticsWhenHangingControllerStateFactory); throw new RuntimeException("This only works with model corruption on. Change DRCControllerThread.ALLOW_MODEL_CORRUPTION to true!"); controller = diagnosticsWhenHangingControllerStateFactory.getController(); analyzer = new HumanoidDiagnosticsWhenHangingAnalyzer(simulationConstructionSet, controller, fullRobotModelCorruptor);
boolean robotIsHanging = true; DiagnosticsWhenHangingControllerStateFactory diagnosticsWhenHangingHighLevelBehaviorFactory = new DiagnosticsWhenHangingControllerStateFactory(humanoidJointPoseList, useArms, robotIsHanging, null); diagnosticsWhenHangingHighLevelBehaviorFactory.setTransitionRequested(true); controllerFactory.addCustomControlState(diagnosticsWhenHangingHighLevelBehaviorFactory); controllerFactory.createControllerNetworkSubscriber(new PeriodicRealtimeThreadScheduler(poseCommunicatorPriority), packetCommunicator);