gpt4 book ai didi

us.ihmc.yoVariables.variable.YoEnum.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 17:00:40 26 4
gpt4 key购买 nike

本文整理了Java中us.ihmc.yoVariables.variable.YoEnum.<init>()方法的一些代码示例,展示了YoEnum.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoEnum.<init>()方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoEnum
类名称:YoEnum
方法名:<init>

YoEnum.<init>介绍

[英]Create a new YoEnum. This will call YoVariable(YoVariableType, String, String, YoVariableRegistry) with YoVariableType#ENUM and the given values.
[中]创建一个新的YoEnum。这将使用YoVariableType#ENUM和给定值调用YoVariable(YoVariableType,String,String,YoVariableRegistry)。

代码示例

代码示例来源:origin: us.ihmc/ihmc-footstep-planning

public AbstractWaypointsForFootstepsPlanner(String prefix, FootstepPlannerParameters parameters, YoVariableRegistry registry)
{
 this.parameters = parameters;
 yoResult = new YoEnum<>(prefix + "PathPlanningResult", registry, FootstepPlanningResult.class);
}

代码示例来源:origin: us.ihmc/ihmc-yovariables

/**
* Create a new YoEnum. This will call {@link YoEnum(String, YoVariableRegistry, Class)} with the given values.
*
* @param name String uniquely identifying this YoEnum
* @param registry YoVariableRegistry for this YoEnum to register itself to after initialization
* @param enumType the class representing the type of the enum
*/
public static <T extends Enum<T>> YoEnum<T> create(String name, Class<T> enumType, YoVariableRegistry registry)
{
 return new YoEnum<>(name, registry, enumType);
}

代码示例来源:origin: us.ihmc/ihmc-yovariables

/**
* Create a new YoEnum. This will call {@link YoEnum(String, String, YoVariableRegistry, Class, Boolean)} with the given values.
*
* @param name String uniquely identifying this YoEnum
* @param description String describing this YoEnum's purpose
* @param registry YoVariableRegistry for this YoEnum to register itself to after initialization
* @param enumType the class representing the type of the enum
* @param allowNullValue boolean determining if null enum values are permitted
*/
public static <T extends Enum<T>> YoEnum<T> create(String name, String description, Class<T> enumType, YoVariableRegistry registry, boolean allowNullValue)
{
 return new YoEnum<>(name, description, registry, enumType, allowNullValue);
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public YoVariableComparer(YoDouble variableA, YoDouble variableB, String name, ThresholdType thresholdType, double threshold,
   YoVariableRegistry registry)
{
 this.yoVariableA = variableA;
 this.yoVariableB = variableB;
 this.compareType = thresholdType;
 this.threshold = null;
 this.nonChangingThreshold = threshold;
 this.difference = new YoDouble(name, registry);
 this.status = new YoEnum<CompareStatus>(name + "_status", registry, CompareStatus.class);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

public YoVariableTogglerOutlet(String name, YoVariableRegistry parent)
{
 toggleMode = new YoEnum<ToggleMode>(name, parent, ToggleMode.class);
 toggleMode.set(ToggleMode.NO_CHANGE);
}

代码示例来源:origin: us.ihmc/acsell

public ControlMode(String name, YoVariableRegistry registry)
{
 controlMode = new YoEnum<>(name + "ControlMode", registry, ControlModeEnum.class, true);
 thermalShutdown = new YoBoolean(name + "ThermalShutdown", registry);
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public YoVariableComparer(YoDouble variableA, YoDouble variableB, String name, ThresholdType thresholdType, YoDouble threshold,
   YoVariableRegistry registry)
{
 this.yoVariableA = variableA;
 this.yoVariableB = variableB;
 this.compareType = thresholdType;
 this.threshold = threshold;
 this.nonChangingThreshold = Double.NaN;
 this.status = new YoEnum<CompareStatus>(name + "_status", registry, CompareStatus.class);
 this.difference = new YoDouble(name, registry);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

public <T extends Enum<T>> EnumGlobalParameter(String name, String description, T value, GlobalParameterChangedListener listener)
{
 super(null, listener);
 YoEnum<T> yoEnum = new YoEnum<T>(name, description, registry, value.getDeclaringClass(), false);
 yoEnum.set(value);
 this.yoVariable = yoEnum;
 if (changedListener != null)
   changedListener.globalParameterCreated(this);
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public YoVariableLimitChecker(YoDouble variableToCheck, String prefix, double lowerLimit, double upperLimit, YoVariableRegistry registry)
{
 status = new YoEnum<Status>(prefix + variableToCheck.getName() + "_Status", registry, Status.class);
 if (upperLimit < lowerLimit)
 {
   System.out.println("YoVariableLimitChecker: Disabling limits. Upper limit needs to be greater than lower limit for variable: "
      + variableToCheck.getName());
   this.lowerLimit = Double.NEGATIVE_INFINITY;
   this.upperLimit = Double.POSITIVE_INFINITY;
 }
 else
 {
   this.lowerLimit = lowerLimit;
   this.upperLimit = upperLimit;
 }
 this.variableToCheck = variableToCheck;
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public GenericStateMachine(String stateYoVariableName, String switchTimeName, Class<E> enumType, E initialState, DoubleProvider timeProvider,
   YoVariableRegistry registry)
{
 stateYoVariable = new YoEnum<E>(stateYoVariableName, "State machine variable to keep track of the state.", registry, enumType, false);
 previousStateYoVariable = new YoEnum<E>(stateYoVariableName + "PreviousState", "State machine variable to keep track of the previous state.",
    registry, enumType, true);
 enumsToStates = new EnumMap<>(enumType);
 if (initialState != null)
 {
   stateYoVariable.set(initialState);
 }
 previousStateYoVariable.set(null);
 switchTimeYoVariable = new YoDouble(switchTimeName, registry);
 this.time = timeProvider;
 switchTimeYoVariable.set(time.getValue());
}

代码示例来源:origin: us.ihmc/ihmc-robot-data-logger

private void createVariables()
{
 for (int i = 0; i < variablesPerType; i++)
 {
   new YoBoolean("Boolean" + i, registry);
   new YoDouble("Double" + i, registry);
   new YoInteger("Integer" + i, registry);
   new YoLong("Long" + i, registry);
   new YoEnum<>("Enum" + i, registry, SomeEnum.class, random.nextBoolean());
 }
}

代码示例来源:origin: us.ihmc/valkyrie

private YoMicroStrainIMUHandleHolder(MicroStrainIMUHandle handle, IMUDefinition imuDefinition, YoVariableRegistry parentRegistry)
{
 super(handle, imuDefinition, parentRegistry);
 this.microStrainIMUHandle = handle;
 filterTypeToUse = new YoEnum<>(handle.getName() + "_filterTypeToUse", parentRegistry, MicrostrainFilterType.class);
 filterTypeToUse.addVariableChangedListener(new VariableChangedListener()
 {
   @Override
   public void notifyOfVariableChange(YoVariable<?> v)
   {
    microStrainIMUHandle.setFilterTypeToReturn(filterTypeToUse.getEnumValue());
   }
 });
 filterTypeToUse.set(MicrostrainFilterType.COMPLIMENTARY_FILTER);
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public BacklashProcessingYoVariable(String name, String description, YoDouble velocityVariable, double dt, DoubleProvider slopTime,
   YoVariableRegistry registry)
{
 super(name, description, registry);
 this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry);
 backlashState = new YoEnum<BacklashState>(name + "BacklashState", registry, BacklashState.class, true);
 backlashState.set(null);
 timeSinceSloppy = new YoDouble(name + "TimeSinceSloppy", registry);
 velocity = velocityVariable;
 this.slopTime = slopTime;
 this.dt = dt;
 reset();
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public BacklashCompensatingVelocityYoVariable(String name, String description, YoDouble alphaVariable, double dt, YoDouble slopTime,
   YoVariableRegistry registry)
{
 super(name, description, registry);
 this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry);
 backlashState = new YoEnum<BacklashState>(name + "BacklashState", registry, BacklashState.class, true);
 backlashState.set(null);
 timeInState = new YoDouble(name + "timeInState", registry);
 this.position = null;
 this.alphaVariable = alphaVariable;
 this.slopTime = slopTime;
 this.dt = dt;
 lastPosition = new YoDouble(name + "_lastPosition", registry);
 reset();
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public BacklashCompensatingVelocityYoVariable(String name, String description, YoDouble alphaVariable, YoDouble positionVariable, double dt,
   YoDouble slopTime, YoVariableRegistry registry)
{
 super(name, description, registry);
 this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry);
 backlashState = new YoEnum<BacklashState>(name + "BacklashState", registry, BacklashState.class, true);
 backlashState.set(null);
 timeInState = new YoDouble(name + "TimeInState", registry);
 position = positionVariable;
 this.alphaVariable = alphaVariable;
 this.slopTime = slopTime;
 this.dt = dt;
 lastPosition = new YoDouble(name + "_lastPosition", registry);
 reset();
}

代码示例来源:origin: us.ihmc/ihmc-yovariables

/**
* Creates a new YoEnum with the same parameters as this one, and registers it to the passed {@link YoVariableRegistry}.
*
* @param newRegistry YoVariableRegistry to duplicate this YoEnum to
* @return the newly created and registered YoEnum
*/
@Override public YoEnum<T> duplicate(YoVariableRegistry newRegistry)
{
 YoEnum<T> retVar = new YoEnum<>(getName(), getDescription(), newRegistry, getEnumType(), getAllowNullValue());
 retVar.set(getEnumValue());
 return retVar;
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public RevisedBacklashCompensatingVelocityYoVariable(String name, String description, DoubleProvider alphaVariable, YoDouble positionVariable,
    double dt, DoubleProvider slopTime, YoVariableRegistry registry)
{
 super(name, description, registry);
 
 finiteDifferenceVelocity = new FilteredVelocityYoVariable(name + "finiteDifferenceVelocity", "", alphaVariable, dt, registry);
 
 
 this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry);
 backlashState = new YoEnum<BacklashState>(name + "BacklashState", registry, BacklashState.class, true);
 backlashState.set(null);
 timeSinceSloppy = new YoDouble(name + "TimeSinceSloppy", registry);
 position = positionVariable;
 this.alphaVariable = alphaVariable;
 this.slopTime = slopTime;
 this.dt = dt;
 lastPosition = new YoDouble(name + "_lastPosition", registry);
 reset();
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public RevisedBacklashCompensatingVelocityYoVariable(String name, String description, YoDouble alphaVariable, double dt, YoDouble slopTime,
    YoVariableRegistry registry)
{
 super(name, description, registry);
 
 finiteDifferenceVelocity = new FilteredVelocityYoVariable(name + "finiteDifferenceVelocity", "", alphaVariable, dt, registry);
 this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry);
 backlashState = new YoEnum<BacklashState>(name + "BacklashState", registry, BacklashState.class, true);
 backlashState.set(null);
 timeSinceSloppy = new YoDouble(name + "timeInState", registry);
 this.position = null;
 this.alphaVariable = alphaVariable;
 this.slopTime = slopTime;
 this.dt = dt;
 lastPosition = new YoDouble(name + "_lastPosition", registry);
 reset();
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public YoSignalDerivative(String name, YoVariableRegistry registry)
{
 this.name = name;
 differentiationMode = new YoEnum<DifferentiationMode>(name + "_differentiationMode", registry, DifferentiationMode.class);
 previousDerivative = new YoDouble(name + "_previousDerivative", registry);
 previousSignal = new YoDouble(name + "_previousSignal", registry);
 timeAtLastSignalChange = new YoDouble(name + "_timeAtLastSignalChange", registry);
 previousTime = new YoDouble(name + "_previousTime", registry);
 tolerance = new YoDouble(name + "_tolerance", registry);
 lastSignalChange = new YoDouble(name + "_lastSignalChange", registry);
 tolerance.set(DEFAULT_TOLERANCE);
 resetToZero();
}

代码示例来源:origin: us.ihmc/simulation-construction-set-test

@BeforeEach
public void setUp() throws Exception
{
 rootRegistry = new YoVariableRegistry("root");
 registryOne = new YoVariableRegistry("registryOne");
 registryTwo = new YoVariableRegistry("registryTwo");
 rootRegistry.addChild(registryOne);
 registryOne.addChild(registryTwo);
 doubleVariable = new YoDouble("doubleVariable", rootRegistry);
 booleanVariable = new YoBoolean("booleanVariable", registryOne);
 integerVariable = new YoInteger("integerVariable", registryTwo);
 enumVariable = new YoEnum<TimeScriptTestEnums>("enumVariable", registryTwo, TimeScriptTestEnums.class);
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com