public void resetStictionCompensation() { this.stictionCompensationLimit.set(0.0); this.stictionCompensation.set(0.0); }
public void update(double currentPosition) { if (!hasBeenCalled.getBooleanValue()) { hasBeenCalled.set(true); set(currentPosition); } final double maxRateToUse; if (maxRateVariable != null) maxRateToUse = maxRateVariable.getDoubleValue(); else maxRateToUse = maxRate; if (maxRateToUse < 0) throw new RuntimeException("The maxRate parameter in the RateLimitedYoVariable constructor cannot be negative."); double difference = currentPosition - getDoubleValue(); if (Math.abs(difference) > maxRateToUse * dt) difference = Math.signum(difference) * maxRateToUse * dt; set(getDoubleValue() + difference); } }
private void updateLowLevelData(Map<InverseDynamicsJoint, Double> jointTorquesSolution) { rootJointDesiredConfiguration.setDesiredAccelerationFromJoint(rootJoint); for (OneDoFJoint joint : controlledOneDoFJoints) { if (jointTorquesSolution.containsKey(joint)) { if (USE_LIMITED_JOINT_TORQUES) { if (firstTick) jointTorqueSolutions.get(joint).set(jointTorquesSolution.get(joint)); else jointTorqueSolutions.get(joint).update(jointTorquesSolution.get(joint)); lowLevelOneDoFJointDesiredDataHolder.setDesiredJointTorque(joint, jointTorqueSolutions.get(joint).getDoubleValue()); } else { lowLevelOneDoFJointDesiredDataHolder.setDesiredJointTorque(joint, jointTorquesSolution.get(joint)); } } } }
public void update(double currentPosition) { if (!hasBeenCalled.getBooleanValue()) { hasBeenCalled.set(true); set(currentPosition); } if (maxRateVariable.getValue() < 0) throw new RuntimeException("The maxRate parameter in the RateLimitedYoVariable cannot be negative."); double difference = currentPosition - getDoubleValue(); if (Math.abs(difference) > maxRateVariable.getValue() * dt) { difference = Math.signum(difference) * maxRateVariable.getValue() * dt; this.limited.set(true); } else this.limited.set(false); set(getDoubleValue() + difference); } }