/** * Retrieves this YoBoolean's value as a long. * * @return long value of internal boolean state (0 or 1) */ @Override public long getValueAsLongBits() { return getBooleanValue() ? 1 : 0; }
@Override public boolean isDone() { return ballFound.getBooleanValue(); }
public boolean hasInputBeenSet() { if (haveFootstepsBeenGenerated.getBooleanValue()) return true; else return false; }
@Override public boolean isDone() { // return true; return validAcknoledged.getBooleanValue(); }
public boolean hasInputBeenSet() { return hasInputBeenSet.getBooleanValue(); } }
@Override public boolean isDone() { return isDone.getBooleanValue(); }
@Override public boolean isDone() { if (!haveFootstepsBeenGenerated.getBooleanValue() || !hasTargetBeenProvided.getBooleanValue()) return false; if (haveFootstepsBeenGenerated.getBooleanValue() && footsteps.size() == 0) return true; return footstepListBehavior.isDone(); }
@Override public GroundContactPoint getLockedContactPoint(int contactPointIndex) { if (contactsAvailable.get(contactPointIndex).getBooleanValue()) { throw new RuntimeException("Trying to get a contact point that isn't checked out!"); } return allGroundContactPoints.get(contactPointIndex); }
private void sendPacketToNetworkProcessor() { if (!isPaused.getBooleanValue() && !isAborted.getBooleanValue()) { System.out.println("EnableLidarBehavior: sending enable packet"); // sendPacket(enableLidarPacket); packetHasBeenSent.set(true); } }
/** * Returns String representation of this YoBoolean. * * @return String representing this YoBoolean and its current value as a boolean */ @Override public String toString() { return String.format("%s: %s", getName(), getBooleanValue()); }
public void reset() { for (YoBoolean var : previousYoVariables) { var.set(variableToDelay.getBooleanValue()); } this.set(variableToDelay.getBooleanValue()); }
private void sendOutgoingPacketToControllerAndNetworkProcessor() { if (!isPaused.getBooleanValue() && !isAborted.getBooleanValue()) { goHomePublisher.publish(outgoingMessage); hasPacketBeenSent.set(true); if (DEBUG) PrintTools.debug(this, "sending packet to controller and network processor: " + outgoingMessage); } }
@Override public void doControl() { if (!packetHasBeenSent.getBooleanValue() && (outgoingFootLoadBearingMessage != null)) { sendFootStateToController(); } }
@Override public void doControl() { if (!packetHasBeenSent.getBooleanValue() && (outgoingHeadTrajectoryMessage != null)) { sendHeadOrientationPacketToController(); } }
private void initialize(YoBoolean yoVariableToFilter, int windowSize) { if (windowSize < 0) throw new RuntimeException("window size must be greater than 0"); variableToFilter = yoVariableToFilter; this.windowSize.set(windowSize); if (variableToFilter != null) this.set(yoVariableToFilter.getBooleanValue()); this.set(false); }
private void sendHandDesiredConfigurationToController() { if (!isPaused.getBooleanValue() && !isAborted.getBooleanValue()) { publisher.publish(outgoingHandDesiredConfigurationMessage); hasPacketBeenSet.set(true); startTime.set(yoTime.getDoubleValue()); if (DEBUG) PrintTools.debug(this, "Sending HandDesiredConfigurationMessage to Controller: " + outgoingHandDesiredConfigurationMessage); } }
public void update() { if (initialize.getBooleanValue()) { if (!initialize()) return; initialize.set(false); } updateInternal(); }
/** * Creates a new YoBoolean with the same parameters as this one, and registers it to the passed {@link YoVariableRegistry}. * * @param newRegistry YoVariableRegistry to duplicate this YoBoolean to * @return the newly created and registered YoBoolean */ @Override public YoBoolean duplicate(YoVariableRegistry newRegistry) { YoBoolean newVar = new YoBoolean(getName(), getDescription(), newRegistry); newVar.set(getBooleanValue()); return newVar; }
public void updateForAngles(double currentPosition) { if (!hasBeenCalled.getBooleanValue()) { hasBeenCalled.set(true); lastPosition.set(currentPosition); set(0.0); } double difference = AngleTools.computeAngleDifferenceMinusPiToPi(currentPosition, lastPosition.getDoubleValue()); updateUsingDifference(difference); lastPosition.set(currentPosition); }
public void update(double perfectValue) { perfect.set(perfectValue); if (isNoisy.getBooleanValue()) { double noise = getBias() + getRandomNoise(); super.set(perfect.getDoubleValue() + noise); } else super.set(perfect.getDoubleValue()); // System.out.println("NoisyYoDouble Diff: (" + this.getName() + ")" + (super.getDoubleValue() - perfect.getDoubleValue())); }