private String assertTrue(String datasetName, String message, boolean condition) { if (VISUALIZE || DEBUG) { if (!condition) PrintTools.error(datasetName + ": " + message); } return !condition ? "\n" + message : ""; }
private String assertTrue(String datasetName, String message, boolean condition) { if (VISUALIZE || DEBUG) { if (!condition) PrintTools.error(datasetName + ": " + message); } return !condition ? "\n" + message : ""; }
private String assertTrue(String datasetName, String message, boolean condition) { if (VISUALIZE || DEBUG) { if (!condition) PrintTools.error(datasetName + ": " + message); } return !condition ? "\n" + message : ""; }
public static Path getRunAllTestSuitesPath(Map<String, AgileTestingClassPath> nameToPathMap) { AgileTestingClassPath runAllFastTestSuitesPath = nameToPathMap.get(RUN_ALL_FAST_TEST_SUITES_CLASS_NAME); if (runAllFastTestSuitesPath == null) { PrintTools.error(SourceTools.class, "Please create a file RunAllFastTestSuites.java in RunAllBambooTestSuites"); return null; } return runAllFastTestSuitesPath.getPath().getParent(); } }
private void tryToStartModule(ModuleStarter runnable) { try { runnable.startModule(); } catch (RuntimeException | IOException e) { PrintTools.error(this, "Failed to start a module in the network processor, stack trace:"); e.printStackTrace(); } }
private void tryToStartModule(ModuleStarter runnable) { try { runnable.startModule(); } catch (RuntimeException | IOException e) { PrintTools.error(this, "Failed to start a module in the network processor, stack trace:"); e.printStackTrace(); } }
@Override public void simulationDoneWithException(Throwable throwable) { if (simulationTestingParameters.getKeepSCSUp()) { PrintTools.error(throwable.getMessage()); } scsCrashedException = throwable.getMessage(); scsHasCrashed.set(true); } }
@Override public boolean isSimulationDone() { double errorMag = Math.abs(pelvisOrientationError.getDoubleValue()); boolean largeError = errorMag > 0.15; if (largeError) PrintTools.error(DRCObstacleCourseFlatTest.class, "Large pelvis orientation error, stopping sim. Error magnitude: " + errorMag); return largeError; } };
public static Path getRunAllTestSuitesPath(Map<String, AgileTestingClassPath> nameToPathMap) { AgileTestingClassPath runAllFastTestSuitesPath = nameToPathMap.get(RUN_ALL_FAST_TEST_SUITES_CLASS_NAME); if (runAllFastTestSuitesPath == null) { PrintTools.error(SourceTools.class, "Please create a file RunAllFastTestSuites.java in RunAllBambooTestSuites"); return null; } return runAllFastTestSuitesPath.getPath().getParent(); } }
public static void logMessagesToFile(File file) { if (guiMessageFrame == null) { PrintTools.error("GUI message frame null. Returning"); return; } guiMessageFrame.save(file); }
private void tryToStartModule(ModuleStarter runnable) { try { runnable.startModule(); } catch (RuntimeException | IOException e) { PrintTools.error(this, "Failed to start a module in the network processor, stack trace:"); e.printStackTrace(); } }
private void tryToStartModule(ModuleStarter runnable) { try { runnable.startModule(); } catch (RuntimeException | IOException e) { PrintTools.error(this, "Failed to start a module in the network processor, stack trace:"); e.printStackTrace(); } }
private void tryToStartModule(ModuleStarter runnable) { try { runnable.startModule(); } catch (RuntimeException | IOException e) { PrintTools.error(this, "Failed to start a module in the network processor, stack trace:"); e.printStackTrace(); } }
private void recursivelyAddPinJoints(Joint joint, List<PinJoint> pinJoints) { if (joint instanceof PinJoint) pinJoints.add((PinJoint) joint); else if (DEBUG && !(joint instanceof FloatingJoint)) PrintTools.error("Joint " + joint.getName() + " not currently handled by " + getClass().getSimpleName()); for (Joint child : joint.getChildrenJoints()) { recursivelyAddPinJoints(child, pinJoints); } } }
private static void recursivelyAddPinJoints(Joint joint, List<PinJoint> pinJoints) { if (joint instanceof PinJoint) pinJoints.add((PinJoint) joint); else if (DEBUG && !(joint instanceof FloatingJoint)) PrintTools.error("Joint " + joint.getName() + " not currently handled by " + DataExporterExcelWorkbookCreator.class.getSimpleName()); for (Joint child : joint.getChildrenJoints()) { recursivelyAddPinJoints(child, pinJoints); } }
private void setControl(int channel, YoVariable<?> var, double min, double max, double exponent, MidiControl.SliderType sliderType, MidiControl.ControlType controlType) { if (var == null) { PrintTools.error("YoVariable was null. It's not getting added to the sliderboard"); return; } setControl(channel, var, var.getName(), min, max, exponent, (min + max) / 2.0, sliderType, controlType); }
public static void reportErrorMessage(String errorMessage, boolean showGUI) { PrintTools.error(BambooTools.class, errorMessage); if (showGUI) { createGUIMessageFrame(); guiMessageFrame.appendErrorMessage(errorMessage); } }
public void subtractTorqueOffset(OneDoFJointBasics oneDoFJoint, double torqueOffset) { ValkyrieRosControlEffortJointControlCommandCalculator jointCommandCalculator = effortJointToControlCommandCalculatorMap.get(oneDoFJoint.getName()); if (jointCommandCalculator != null) jointCommandCalculator.subtractTorqueOffset(torqueOffset); else PrintTools.error("Command calculator is NULL for the joint: " + oneDoFJoint.getName()); }
public void setSlider(int channel, YoVariable<?> var, double min, double max, double exponent, double hires) { if (var == null) { PrintTools.error(this, "YoVariable was null. It's not getting added to the sliderboard"); return; } setControl(channelMapper.getSliderChannel(channel), var, var.getName(), min, max, exponent, hires, MidiControl.SliderType.NUMBER, MidiControl.ControlType.SLIDER); }
public void setKnob(int channel, YoVariable<?> var, double min, double max, double exponent, double hires) { if (var == null) { PrintTools.error(this, "YoVariable was null. It's not getting added to the sliderboard"); return; } setControl(channelMapper.getKnobChannel(channel), var, var.getName(), min, max, exponent, hires, MidiControl.SliderType.NUMBER, MidiControl.ControlType.KNOB); }