本文整理了Java中us.ihmc.yoVariables.variable.YoEnum.create()
方法的一些代码示例,展示了YoEnum.create()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoEnum.create()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoEnum
类名称:YoEnum
方法名:create
[英]Create a new YoEnum. This will call YoEnum(String, YoVariableRegistry, Class) with the given values.
[中]创建一个新的YoEnum。这将使用给定的值调用YoEnum(String,YoVariableRegistry,Class)。
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
public <T extends Enum<T>> EnumGlobalParameter(String name, String description, Class<T> enumType, GlobalParameter[] parents, GlobalParameterChangedListener listener)
{
super(parents, listener);
yoVariable = YoEnum.create(name, description, enumType, registry, false);
if (changedListener != null)
changedListener.globalParameterCreated(this);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
private void addGoalMarkerRobot()
{
goalMarkerRobot.setGravity(0.0);
environmentRobots.add(goalMarkerRobot);
YoVariableRegistry robotsYoVariableRegistry = goalMarkerRobot.getRobotsYoVariableRegistry();
YoEnum<GoalMarkerLocation> goalMarkerLocationYoEnum = YoEnum.create("DesiredGoalMarkerLocation", GoalMarkerLocation.class, robotsYoVariableRegistry);
goalMarkerLocationYoEnum.addVariableChangedListener(new GoalMarkerLocationUpdater());
goalMarkerLocationYoEnum.set(GoalMarkerLocation.TOP_OF_STAIRS);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public FilteredDiscreteVelocityYoVariable(String name, String description, double alpha, YoDouble time, YoVariableRegistry registry)
{
super(name, description, registry);
this.alpha = alpha;
this.alphaVariable = null;
this.position = null;
this.time = time;
lastPosition = new YoDouble(name + "_lastPosition", registry);
lastUpdateTime = new YoDouble(name + "_lastUpdateTime", registry);
lastUpdateDirection = YoEnum.create(name + "_lastUpdateDirection", Direction.class, registry);
unfilteredVelocity = new YoDouble(name + "_unfilteredVelocity", registry);
reset();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public FilteredDiscreteVelocityYoVariable(String name, String description, double alpha, YoDouble positionVariable, YoDouble time,
YoVariableRegistry registry)
{
super(name, description, registry);
this.alpha = alpha;
this.position = positionVariable;
this.alphaVariable = null;
this.time = time;
lastPosition = new YoDouble(name + "_lastPosition", registry);
lastUpdateTime = new YoDouble(name + "_lastUpdateTime", registry);
lastUpdateDirection = YoEnum.create(name + "_lastUpdateDirection", Direction.class, registry);
unfilteredVelocity = new YoDouble(name + "_unfilteredVelocity", registry);
reset();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public FilteredDiscreteVelocityYoVariable(String name, String description, YoDouble alphaVariable, YoDouble positionVariable,
YoDouble time, YoVariableRegistry registry)
{
super(name, description, registry);
position = positionVariable;
this.alphaVariable = alphaVariable;
this.alpha = 0.0;
this.time = time;
lastPosition = new YoDouble(name + "_lastPosition", registry);
lastUpdateTime = new YoDouble(name + "_lastUpdateTime", registry);
lastUpdateDirection = YoEnum.create(name + "_lastUpdateDirection", Direction.class, registry);
unfilteredVelocity = new YoDouble(name + "_unfilteredVelocity", registry);
reset();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public YoFunctionGeneratorVisualizer(YoFunctionGenerator yoFunctionGenerator)
{
this.yoFunctionGenerator = yoFunctionGenerator;
mode = YoEnum.create("Mode", YoFunctionGeneratorMode.class, registry);
resetTime = new YoDouble("resetTime", registry);
resetTime.set(20.0);
maxSweepFreq = new YoDouble("maxSweepFreq", registry);
maxSweepFreq.set(60.0);
amplitude = new YoDouble("amplitude", registry);
amplitude.set(1.0);
valueCheck = new YoDouble("valueCheck", registry);
hasBeenReset = new YoBoolean("hasBeenReset", registry);
hasBeenReset.set(true);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public FilteredDiscreteVelocityYoVariable2(String name, String description, double alpha, YoDouble time, YoVariableRegistry registry)
{
super(name, description, registry);
this.alpha = alpha;
this.alphaVariable = null;
this.position = null;
this.time = time;
lastPosChangeTimeInterval = new YoDouble(name + "_lastUpdateTimeInterval", registry);
lastPosChangeDirection = YoEnum.create(name + "_lastUpdateDirection", Direction.class, registry);
finiteDifferenceVelocity = new TimestampedVelocityYoVariable(name + "_finiteDiff", "", position, time, registry, 1e-20);
unfilteredVelocity = new YoDouble(name + "_unfiltered", registry);
finiteDifferenceAccel = new TimestampedVelocityYoVariable(name + "_finiteDiffAccel", "", finiteDifferenceVelocity, time, registry, 1e-20);
timeSinceLastPosChange = new YoDouble(name + "_timeSinceLastTick", registry);
lastPositionIncrement = new YoDouble(name + "_lastPositionIncrement", registry);
positionPredicted = new YoDouble(name + "_positionPredicted", registry);
velocityIfEncoderTicksNow = new YoDouble(name + "_velocityIfEncoderTicksNow", registry);
velocityIfEncoderTicksNowConstantAccel = new YoDouble(name + "_velocityIfEncoderTicksNowConstantAccel", registry);
useDecay = new YoBoolean(name + "_useDecay", registry);
reset();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public FilteredDiscreteVelocityYoVariable2(String name, String description, double alpha, YoDouble positionVariable, YoDouble time,
YoVariableRegistry registry)
{
super(name, description, registry);
this.alpha = alpha;
this.position = positionVariable;
this.alphaVariable = null;
this.time = time;
lastPosChangeTimeInterval = new YoDouble(name + "_lastUpdateTimeInterval", registry);
lastPosChangeDirection = YoEnum.create(name + "_lastUpdateDirection", Direction.class, registry);
finiteDifferenceVelocity = new TimestampedVelocityYoVariable(name + "_finiteDiff", "", position, time, registry, 1e-20);
unfilteredVelocity = new YoDouble(name + "_unfiltered", registry);
finiteDifferenceAccel = new TimestampedVelocityYoVariable(name + "_finiteDiffAccel", "", finiteDifferenceVelocity, time, registry, 1e-20);
timeSinceLastPosChange = new YoDouble(name + "_timeSinceLastTick", registry);
lastPositionIncrement = new YoDouble(name + "_lastPositionIncrement", registry);
positionPredicted = new YoDouble(name + "_positionPredicted", registry);
velocityIfEncoderTicksNow = new YoDouble(name + "_velocityIfEncoderTicksNow", registry);
velocityIfEncoderTicksNowConstantAccel = new YoDouble(name + "_velocityIfEncoderTicksNowConstantAccel", registry);
useDecay = new YoBoolean(name + "_useDecay", registry);
reset();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public FilteredDiscreteVelocityYoVariable2(String name, String description, YoDouble alphaVariable, YoDouble positionVariable,
YoDouble time, YoVariableRegistry registry)
{
super(name, description, registry);
position = positionVariable;
this.alphaVariable = alphaVariable;
this.alpha = 0.0;
this.time = time;
lastPosChangeTimeInterval = new YoDouble(name + "_lastUpdateTimeInterval", registry);
lastPosChangeDirection = YoEnum.create(name + "_lastUpdateDirection", Direction.class, registry);
finiteDifferenceVelocity = new TimestampedVelocityYoVariable(name + "_finiteDiff", "", position, time, registry, 1e-20);
unfilteredVelocity = new YoDouble(name + "_unfiltered", registry);
finiteDifferenceAccel = new TimestampedVelocityYoVariable(name + "_finiteDiffAccel", "", unfilteredVelocity, time, registry, 1e-20);
timeSinceLastPosChange = new YoDouble(name + "_timeSinceLastTick", registry);
lastPositionIncrement = new YoDouble(name + "_lastPositionIncrement", registry);
positionPredicted = new YoDouble(name + "_positionPredicted", registry);
velocityIfEncoderTicksNow = new YoDouble(name + "_velocityIfEncoderTicksNow", registry);
velocityIfEncoderTicksNowConstantAccel = new YoDouble(name + "_velocityIfEncoderTicksNowConstantAccel", registry);
useDecay = new YoBoolean(name + "_useDecay", registry);
reset();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
kRateForExponentialChirp = new YoDouble(name + "KRateForExponentialChirp", registry);
mode = YoEnum.create(name + "Mode", YoFunctionGeneratorMode.class, registry);
modePrevious = YoEnum.create(name + "ModePrevious", YoFunctionGeneratorMode.class, registry);
内容来源于网络,如有侵权,请联系作者删除!