public void doTransitionAction() { requestedState.set(null); } };
/** * Calls {@link #set(T, boolean)} with the given value and true. * * @param enumValue enum to set this YoEnum's internal enum state to */ public void set(T enumValue) { set(enumValue, true); }
@Override protected void setBehaviorInput() { coactiveElement.currentState.set(PickUpBallBehaviorState.STOPPED); } };
@Override protected void setBehaviorInput() { coactiveElement.currentState.set(PickUpBallBehaviorState.CLEARING_LIDAR); } };
/** * Forcefully set the current state. * <p/> * NOTE: Use this method with caution. It does not enforce reachability of the new state. * * @param stateEnum the new state */ public void setState(S stateEnum) { this.stateEnum.set(stateEnum); }
public void setRandomBound(double randomBound) { this.noiseType.set(NoiseType.UNIFORM); this.randomBound.set(randomBound); }
/** * Sets the internal value of this YoEnum to the current value of the passed YoEnum. * * @param value YoEnum value to set this variable's value to * @param notifyListeners boolean determining whether or not to call {@link #notifyVariableChangedListeners()} * @return boolean whether or not internal state differed from the passed value */ @Override public boolean setValue(YoEnum<T> value, boolean notifyListeners) { return set(value.getEnumValue(), notifyListeners); }
public void reset() { hasBeenCalled.set(false); backlashState.set(null); }
public void reset() { hasBeenCalled.set(false); backlashState.set(null); }
@Override public void initialize(long timestamp) { startStandprep.set(false); standPrepState.set(StandPrepState.WAIT); enableOutput.set(false); }
private boolean determineIfDirectionChanged(double currentPosition) { Direction currentDirection = computeDirectionOfMotion(currentPosition); boolean directionOfMotionChanged = lastPosChangeDirection.getEnumValue() != currentDirection; lastPosChangeDirection.set(currentDirection); return directionOfMotionChanged; }
public double[] getSpineJointAngles() { HumanoidJointPose humanoidJointPose = humanoidJointPoses.get(humanoidJointPoseIndex.getIntegerValue()); desiredSpinePose.set(humanoidJointPose.getSpinePose()); return humanoidJointPose.getSpineJointAngles(); }
public StepprFunctionGeneratorJointController() { super(); funcGen.setAmplitude(0); funcGen.setOffset(0); funcGen.setMode(YoFunctionGeneratorMode.OFF); funcGenJoint.set(StepprJoint.LEFT_KNEE_Y); }
@Override public void notifyOfVariableChange(YoVariable<?> v) { E newEvent = yoTrigger.getEnumValue(); if (newEvent != null) { eventTrigger.fireEvent(yoTrigger.getEnumValue()); yoTrigger.set(null); } } });
@Override public void notifyOfVariableChange(YoVariable<?> v) { if (yoVariable.getEnumValue() != null) { stateMachine.trigger(enumType, yoVariable.getEnumValue()); // Reset to null to be ready for another event. yoVariable.set(null); } } });
@Override protected void setBehaviorInput() { publishTextToSpeack("Looking For The Ball Again"); coactiveElement.currentState.set(PickUpBallBehaviorState.SEARCHING_FOR_BALL_NEAR); coactiveElement.searchingForBall.set(true); coactiveElement.waitingForValidation.set(false); coactiveElement.foundBall.set(false); } };
@Override protected void setBehaviorInput() { publishTextToSpeack("Walking To The Ball"); coactiveElement.currentState.set(PickUpBallBehaviorState.WALKING_TO_BALL); coactiveElement.searchingForBall.set(false); coactiveElement.waitingForValidation.set(false); coactiveElement.foundBall.set(true); walkToLocationBehavior.setTarget(getoffsetPoint()); } };
public static void standUp(GoalOrientedTestConductor conductor, QuadrupedForceTestYoVariables variables) throws AssertionFailedError { variables.getUserTrigger().set(HighLevelControllerName.FREEZE_STATE); conductor.addTerminalGoal(YoVariableTestGoal.enumEquals(variables.getControllerState(), HighLevelControllerName.FREEZE_STATE)); conductor.addTerminalGoal(QuadrupedTestGoals.timeInFuture(variables, 0.25)); conductor.simulate(); variables.getUserTrigger().set(HighLevelControllerName.STAND_PREP_STATE); conductor.addTerminalGoal(YoVariableTestGoal.enumEquals(variables.getControllerState(), HighLevelControllerName.STAND_READY)); conductor.addTimeLimit(variables.getYoTime(), stateCompletionSafetyFactory * variables.getTimeInStandPrep()); conductor.simulate(); }