本文整理了Java中us.ihmc.yoVariables.variable.YoEnum.set()
方法的一些代码示例,展示了YoEnum.set()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoEnum.set()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoEnum
类名称:YoEnum
方法名:set
[英]Calls #set(int,boolean) with the given value and true.
[中]
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void doTransitionAction()
{
requestedState.set(null);
}
};
代码示例来源:origin: us.ihmc/ihmc-yovariables
/**
* 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);
}
代码示例来源:origin: us.ihmc/ihmc-humanoid-behaviors
@Override
protected void setBehaviorInput()
{
coactiveElement.currentState.set(PickUpBallBehaviorState.STOPPED);
}
};
代码示例来源:origin: us.ihmc/ihmc-humanoid-behaviors
@Override
protected void setBehaviorInput()
{
coactiveElement.currentState.set(PickUpBallBehaviorState.CLEARING_LIDAR);
}
};
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
/**
* 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);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public Status update()
{
if (variableToCheck.getDoubleValue() > upperLimit)
status.set(Status.ABOVE_LIMIT);
else if (variableToCheck.getDoubleValue() < lowerLimit)
status.set(Status.BELOW_LIMIT);
else
status.set(Status.IN_RANGE);
return status.getEnumValue();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void setRandomBound(double randomBound)
{
this.noiseType.set(NoiseType.UNIFORM);
this.randomBound.set(randomBound);
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
/**
* 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);
}
代码示例来源:origin: us.ihmc/robotiq-hand-drivers
@Override
public void onEntry()
{
isStopped.set(false);
graspMode.set(RobotiqGraspMode.PINCH_MODE);
handConfiguration.set(HandConfiguration.OPEN);
computeAllFinalDesiredAngles(1.0, RobotiqHandsDesiredConfigurations.getOpenPinchGripDesiredConfiguration(robotSide));
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void reset()
{
hasBeenCalled.set(false);
backlashState.set(null);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void reset()
{
hasBeenCalled.set(false);
backlashState.set(null);
}
代码示例来源:origin: us.ihmc/acsell
@Override
public void initialize(long timestamp)
{
startStandprep.set(false);
standPrepState.set(StandPrepState.WAIT);
enableOutput.set(false);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
private boolean determineIfDirectionChanged(double currentPosition)
{
Direction currentDirection = computeDirectionOfMotion(currentPosition);
boolean directionOfMotionChanged = lastPosChangeDirection.getEnumValue() != currentDirection; lastPosChangeDirection.set(currentDirection);
return directionOfMotionChanged;
}
代码示例来源:origin: us.ihmc/ihmc-whole-body-controller
public double[] getSpineJointAngles()
{
HumanoidJointPose humanoidJointPose = humanoidJointPoses.get(humanoidJointPoseIndex.getIntegerValue());
desiredSpinePose.set(humanoidJointPose.getSpinePose());
return humanoidJointPose.getSpineJointAngles();
}
代码示例来源:origin: us.ihmc/acsell
public StepprFunctionGeneratorJointController()
{
super();
funcGen.setAmplitude(0);
funcGen.setOffset(0);
funcGen.setMode(YoFunctionGeneratorMode.OFF);
funcGenJoint.set(StepprJoint.LEFT_KNEE_Y);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@Override
public void notifyOfVariableChange(YoVariable<?> v)
{
E newEvent = yoTrigger.getEnumValue();
if (newEvent != null)
{
eventTrigger.fireEvent(yoTrigger.getEnumValue());
yoTrigger.set(null);
}
}
});
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@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);
}
}
});
代码示例来源:origin: us.ihmc/ihmc-humanoid-behaviors
@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);
}
};
代码示例来源:origin: us.ihmc/ihmc-humanoid-behaviors
@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());
}
};
代码示例来源:origin: us.ihmc/ihmc-quadruped-robotics-test
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();
}
内容来源于网络,如有侵权,请联系作者删除!