public RateLimitedYoVariable(String name, YoVariableRegistry registry, DoubleProvider maxRateVariable, YoDouble positionVariable, double dt) { super(name, registry); this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry); this.limited = new YoBoolean(name + "Limited", registry); position = positionVariable; this.maxRateVariable = maxRateVariable; this.dt = dt; reset(); }
private AlphaFilteredYoFrameVector2d(String namePrefix, String nameSuffix, YoVariableRegistry registry, DoubleProvider alpha, ReferenceFrame referenceFrame, FrameTuple2DReadOnly unfilteredFrameTuple2D) { super(namePrefix, nameSuffix, referenceFrame, registry); alphaProvider = alpha; position = unfilteredFrameTuple2D; hasBeenCalled = new YoBoolean(namePrefix + nameSuffix + "HasBeenCalled", registry); reset(); }
private AlphaFilteredYoFramePoint(String namePrefix, String nameSuffix, YoVariableRegistry registry, DoubleProvider alpha, ReferenceFrame referenceFrame, FrameTuple3DReadOnly unfilteredFrameTuple3D) { super(namePrefix, nameSuffix, referenceFrame, registry); alphaProvider = alpha; position = unfilteredFrameTuple3D; hasBeenCalled = new YoBoolean(namePrefix + nameSuffix + "HasBeenCalled", registry); reset(); }
private AlphaFilteredYoFrameQuaternion(String namePrefix, String nameSuffix, YoFrameQuaternion unfilteredQuaternion, DoubleProvider alpha, ReferenceFrame referenceFrame, YoVariableRegistry registry) { super(namePrefix, nameSuffix, referenceFrame, registry); this.unfilteredQuaternion = unfilteredQuaternion; if (alpha == null) alpha = createAlphaYoDouble(namePrefix, 0.0, registry); this.alpha = alpha; this.hasBeenCalled = new YoBoolean(namePrefix + nameSuffix + "HasBeenCalled", registry); }
public BetaFilteredYoVariable(String name, String description, YoVariableRegistry registry, int beta, YoDouble positionVariable) { super(name, description, registry); this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry); this.beta = beta; this.position = positionVariable; this.betaVariable = null; raw = new double[beta]; reset(); }
private AlphaFilteredYoFrameVector(String namePrefix, String nameSuffix, YoVariableRegistry registry, DoubleProvider alpha, ReferenceFrame referenceFrame, FrameTuple3DReadOnly unfilteredFrameTuple3D) { super(namePrefix, nameSuffix, referenceFrame, registry); alphaProvider = alpha; position = unfilteredFrameTuple3D; hasBeenCalled = new YoBoolean(namePrefix + nameSuffix + "HasBeenCalled", registry); reset(); }
private AlphaFilteredYoFramePoint2d(String namePrefix, String nameSuffix, YoVariableRegistry registry, DoubleProvider alpha, ReferenceFrame referenceFrame, FrameTuple2DReadOnly unfilteredFrameTuple2D) { super(namePrefix, nameSuffix, referenceFrame, registry); alphaProvider = alpha; position = unfilteredFrameTuple2D; hasBeenCalled = new YoBoolean(namePrefix + nameSuffix + "HasBeenCalled", registry); reset(); }
public FilteredVelocityYoVariable(String name, String description, DoubleProvider alphaVariable, double dt, YoVariableRegistry registry) { super(name, description, registry); this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry); this.position = null; this.alphaVariable = alphaVariable; this.alphaDouble = 0.0; this.dt = dt; lastPosition = new YoDouble(name + "_lastPosition", registry); reset(); }
private FiniteDifferenceAngularVelocityYoFrameVector(String namePrefix, YoFrameQuaternion orientationToDifferentiate, ReferenceFrame referenceFrame, double dt, YoVariableRegistry registry) { super(namePrefix, referenceFrame, registry); this.dt = dt; orientation = orientationToDifferentiate; orientationPreviousValue = new YoFrameQuaternion(namePrefix + "_previous", referenceFrame, registry); hasBeenCalled = new YoBoolean(namePrefix + "HasBeenCalled", registry); hasBeenCalled.set(false); }
public FilteredVelocityYoVariable(String name, String description, double alpha, YoDouble positionVariable, double dt, YoVariableRegistry registry) { super(name, description, registry); this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry); this.alphaDouble = alpha; this.position = positionVariable; this.dt = dt; this.alphaVariable = null; lastPosition = new YoDouble(name + "_lastPosition", registry); reset(); }
public FilteredVelocityYoVariable(String name, String description, DoubleProvider alphaVariable, YoDouble positionVariable, double dt, YoVariableRegistry registry) { super(name, description, registry); this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry); position = positionVariable; this.alphaVariable = alphaVariable; this.alphaDouble = 0.0; this.dt = dt; lastPosition = new YoDouble(name + "_lastPosition", registry); reset(); }
public ButterworthFilteredYoVariable(String name, YoVariableRegistry registry, YoDouble alphaVariable, YoDouble positionVariable, ButterworthFilterType butterworthFilterType) { super(name, registry); this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry); this.alpha = 0.0; this.alphaVariable = alphaVariable; this.position = positionVariable; this.previousInput = new YoDouble(name + "_prevIn", registry); this.butterworthFilterType = butterworthFilterType; reset(); }
public AlphaFusedYoVariable(String name, YoVariableRegistry yoVariableRegistry, double alpha, YoDouble slowSignal, YoDouble fastSignal) { super(name, yoVariableRegistry); this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", yoVariableRegistry); this.alpha = alpha; this.alphaVariable = null; this.slowSignal = slowSignal; this.fastSignal = fastSignal; steadyStateOffset = new YoDouble(name + "_off", yoVariableRegistry); reset(); }
public BooleanGlobalParameter(String name, String description, boolean value, GlobalParameterChangedListener listener) { super(listener); yoVariable = new YoBoolean(name, description, registry); ((YoBoolean)yoVariable).set(value); if (changedListener != null) changedListener.globalParameterCreated(this); }
public ButterworthFilteredYoVariable(String name, YoVariableRegistry registry, double alpha, ButterworthFilterType butterworthFilterType) { super(name, registry); this.hasBeenCalled = new YoBoolean(name + "HasBeenCalled", registry); this.alpha = alpha; this.alphaVariable = null; this.position = null; this.previousInput = new YoDouble(name + "_prevIn", registry); this.butterworthFilterType = butterworthFilterType; reset(); }
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()); } }
public FilteredVelocityYoFrameVector(String namePrefix, String nameSuffix, DoubleProvider alpha, double dt, YoVariableRegistry registry, FrameTuple3DReadOnly frameTuple3DToDifferentiate) { super(namePrefix, nameSuffix, frameTuple3DToDifferentiate.getReferenceFrame(), registry); this.alphaProvider = alpha; this.dt = dt; hasBeenCalled = new YoBoolean(namePrefix + nameSuffix + "HasBeenCalled", registry); currentPosition = frameTuple3DToDifferentiate; lastPosition = new YoFrameVector3D(namePrefix + "_lastPosition", nameSuffix, getReferenceFrame(), registry); reset(); }
public DelayedYoBoolean(String name, String description, YoBoolean variableToDelay, int ticksToDelay, YoVariableRegistry registry) { super(name, description, registry); this.variableToDelay = variableToDelay; previousYoVariables = new YoBoolean[ticksToDelay]; for (int i = 0; i < ticksToDelay; i++) { previousYoVariables[i] = new YoBoolean(name + "_previous" + i, registry); previousYoVariables[i].set(variableToDelay.getBooleanValue()); } this.set(variableToDelay.getBooleanValue()); }
public YoStopwatch(String name, YoDouble timeYoVariable, YoVariableRegistry registry) { this(timeYoVariable); yoLapStart = new YoDouble(name + "LapStart", registry); yoLapCount = new YoLong(name + "LapCount", registry); yoRecordedLapTotal = new YoDouble(name + "RecordedLapTotal", registry); yoSuspended = new YoBoolean(name + "Suspended", registry); yoSuspendStart = new YoDouble(name + "SuspendStart", registry); yoResumedSuspensionTotal = new YoDouble(name + "ResumedSuspensionTotal", registry); yoLapStart.setToNaN(); }
public HeadTrajectoryBehavior(String robotName, String namePrefix, Ros2Node ros2Node, YoDouble yoTime) { super(robotName, namePrefix, ros2Node); this.yoTime = yoTime; String behaviorNameFirstLowerCase = StringUtils.uncapitalize(getName()); packetHasBeenSent = new YoBoolean(behaviorNameFirstLowerCase + "HasPacketBeenSent", registry); startTime = new YoDouble(behaviorNameFirstLowerCase + "StartTime", registry); startTime.set(Double.NaN); trajectoryTime = new YoDouble(behaviorNameFirstLowerCase + "TrajectoryTime", registry); trajectoryTime.set(Double.NaN); publisher = createPublisherForController(HeadTrajectoryMessage.class); }