- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains
类的一些代码示例,展示了YoPIDGains
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoPIDGains
类的具体详情如下:
包路径:us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains
类名称:YoPIDGains
暂无
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
public void setLinearGains(double kp, double ki, double kd)
{
linearPidGains.setKp(kp);
linearPidGains.setKi(ki);
linearPidGains.setKd(kd);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void set(PIDGainsReadOnly pidGains)
{
super.set(pidGains);
setKi(pidGains.getKi());
setMaximumIntegralError(pidGains.getMaxIntegralError());
setIntegralLeakRatio(pidGains.getIntegralLeakRatio());
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public PIDController(YoPIDGains yoPIDGains, String suffix, YoVariableRegistry registry)
{
super(suffix, registry);
pdController = new PDController(yoPIDGains, suffix, registry);
this.integralGain = yoPIDGains.getYoKi();
this.maxIntegralError = yoPIDGains.getYoMaxIntegralError();
this.maxFeedback = yoPIDGains.getYoMaximumFeedback();
integralLeakRatio = yoPIDGains.getYoIntegralLeakRatio();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.3)
@Test(timeout=300000)
public void testComputeFromYoPIDGains()
{
YoVariableRegistry registry = new YoVariableRegistry("robert");
double proportional = 3.0;
double integral = 2.0;
double derivative = 1.0;
double maxError = 10.0;
YoPIDGains pidGains = new YoPIDGains("", registry);
pidGains.setKp(proportional);
pidGains.setKi(integral);
pidGains.setKd(derivative);
pidGains.setMaximumIntegralError(maxError);
PIDController pid = new PIDController(pidGains, "", registry);
double currentPosition = 0.0;
double desiredPosition = 5.0;
double currentRate = 0.0;
double desiredRate = 1.0;
assertEquals(17.0, pid.compute(currentPosition, desiredPosition, currentRate, desiredRate, 0.1), 0.001);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
public void testParameters_2()
YoPIDGains pidGains = new YoPIDGains("test", new YoVariableRegistry("PIDGainsRegistry"));
double zeta = random.nextDouble() * 100;
pidGains.setPDGains(kp, zeta);
pidGains.setKd(kd);
pidGains.setKi(ki);
pidGains.setMaximumFeedback(maxAcc);
pidGains.setMaximumFeedbackRate(maxJerk);
pidGains.setMaximumIntegralError(maxIntegralError);
pidGains.setIntegralLeakRatio(integratorLeakRatio);
assertEquals(kp, pidGains.getKp(), 1e-6);
assertEquals(kd, pidGains.getKd(), 1e-6);
assertEquals(kp, pidGains.getYoKp().getDoubleValue(), 1e-6);
assertEquals(kd, pidGains.getYoKd().getDoubleValue(), 1e-6);
assertEquals(ki, pidGains.getYoKi().getDoubleValue(), 1e-6);
assertEquals(maxAcc, pidGains.getMaximumFeedback(), 1e-6);
assertEquals(maxJerk, pidGains.getMaximumFeedbackRate(), 1e-6);
assertEquals(maxAcc, pidGains.getYoMaximumFeedback().getDoubleValue(), 1e-6);
assertEquals(maxJerk, pidGains.getYoMaximumFeedbackRate().getDoubleValue(), 1e-6);
assertEquals(integratorLeakRatio, pidGains.getYoIntegralLeakRatio().getDoubleValue(), 1e-6);
assertEquals(zeta, pidGains.getZeta(), 1e-6);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
public void testParameters_3()
YoPIDGains pidGains = new YoPIDGains("test", new YoVariableRegistry("PIDGainsRegistry"));
double zeta = random.nextDouble() * 100;
pidGains.setPIDGains(kp, zeta, ki, maxIntegralError);
pidGains.setKd(kd);
pidGains.setMaximumFeedback(maxAcc);
pidGains.setMaximumFeedbackRate(maxJerk);
pidGains.setIntegralLeakRatio(integratorLeakRatio);
assertEquals(kp, pidGains.getKp(), 1e-6);
assertEquals(kd, pidGains.getKd(), 1e-6);
assertEquals(kp, pidGains.getYoKp().getDoubleValue(), 1e-6);
assertEquals(kd, pidGains.getYoKd().getDoubleValue(), 1e-6);
assertEquals(ki, pidGains.getYoKi().getDoubleValue(), 1e-6);
assertEquals(maxAcc, pidGains.getMaximumFeedback(), 1e-6);
assertEquals(maxJerk, pidGains.getMaximumFeedbackRate(), 1e-6);
assertEquals(maxAcc, pidGains.getYoMaximumFeedback().getDoubleValue(), 1e-6);
assertEquals(maxJerk, pidGains.getYoMaximumFeedbackRate().getDoubleValue(), 1e-6);
assertEquals(zeta, pidGains.getZeta(), 1e-6);
assertEquals(integratorLeakRatio, pidGains.getYoIntegralLeakRatio().getDoubleValue(), 1e-6);
assertEquals(maxIntegralError, pidGains.getYoMaxIntegralError().getDoubleValue(), 1e-6);
代码示例来源:origin: us.ihmc/ihmc-simulation-toolkit
public LowLevelActuatorSimulator(OneDegreeOfFreedomJoint simulatedJoint, LowLevelStateReadOnly jointDesiredOutput, double controlDT, double kp, double kd,
LowLevelActuatorMode actuatorMode)
{
this.controlDT = controlDT;
this.actuatorMode = actuatorMode;
registry = new YoVariableRegistry(simulatedJoint.getName() + name);
gains = new YoPIDGains(simulatedJoint.getName() + "Actuator", registry);
jointController = new PIDController(gains, simulatedJoint.getName() + "LowLevelActuatorSimulator", registry);
gains.setKp(kp);
gains.setKd(kd);
this.simulatedJoint = simulatedJoint;
this.actuatorDesireds = jointDesiredOutput;
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testClippingLeakRate()
{
YoPIDGains pidGains = new YoPIDGains("test", new YoVariableRegistry("PIDGainsRegistry"));
Random random = new Random();
for (int i = 0; i < 1000; i++)
{
double integratorLeakRatio = random.nextDouble() * 100;
pidGains.setIntegralLeakRatio(integratorLeakRatio);
assertTrue(pidGains.getYoIntegralLeakRatio().getDoubleValue() <= 1.0);
integratorLeakRatio = -random.nextDouble() * 100;
pidGains.setIntegralLeakRatio(integratorLeakRatio);
assertTrue(pidGains.getYoIntegralLeakRatio().getDoubleValue() >= 0.0);
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public YoLimitedPIDGains(String suffix, double controlDT, YoVariableRegistry registry)
{
super(suffix, registry);
maxKpRate = new YoDouble("maxKpRate" + suffix, registry);
maxKdRate = new YoDouble("maxKdRate" + suffix, registry);
maxKiRate = new YoDouble("maxKiRate" + suffix, registry);
limitedKi = new RateLimitedYoVariable("limitedKi" + suffix, registry, maxKiRate, super.getYoKi(), controlDT);
limitedKp = new RateLimitedYoVariable("limitedKp" + suffix, registry, maxKpRate, super.getYoKp(), controlDT);
limitedKd = new RateLimitedYoVariable("limitedKd" + suffix, registry, maxKdRate, super.getYoKd(), controlDT);
maxKpRate.set(Double.POSITIVE_INFINITY);
maxKdRate.set(Double.POSITIVE_INFINITY);
maxKiRate.set(Double.POSITIVE_INFINITY);
}
代码示例来源:origin: us.ihmc/ihmc-simulation-toolkit
public void setKd(double kd)
{
gains.setKd(kd);
}
代码示例来源:origin: us.ihmc/ihmc-simulation-toolkit
public void setKp(double kp)
{
gains.setKp(kp);
}
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
jointspaceGains.put(joint1.getName(), new YoPIDGains("Joint1Gains", testRegistry));
jointspaceGains.put(joint2.getName(), new YoPIDGains("Joint2Gains", testRegistry));
YoPID3DGains taskspaceOrientationGains = new SymmetricYoPIDSE3Gains("OrientationGains", testRegistry);
YoPID3DGains taskspacePositionGains = new SymmetricYoPIDSE3Gains("PositionGains", testRegistry);
代码示例来源:origin: us.ihmc/valkyrie
pidController.setProportionalGain(gains.getKp());
pidController.setIntegralGain(gains.getKi());
YoEffortJointHandleHolder handle = jointHandles.get(fingerMotorNameEnum);
代码示例来源:origin: us.ihmc/valkyrie
YoPIDGains gains = new YoPIDGains("Hand", registry);
gains.setKp(7.0);
gains.setKi(3.0);
gains.setKd(0.0);
gains.setMaximumFeedback(3.0);
gains.setIntegralLeakRatio(0.999);
gains.setMaximumIntegralError(0.5);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
public void test()
YoPIDGains pidGains = new YoPIDGains("test", new YoVariableRegistry("PIDGainsRegistry"));
double zeta = random.nextDouble() * 100;
pidGains.setKp(kp);
pidGains.setKd(kd);
pidGains.setKi(ki);
pidGains.setMaximumFeedback(maxAcc);
pidGains.setMaximumFeedbackRate(maxJerk);
pidGains.setMaximumIntegralError(maxIntegralError);
pidGains.setIntegralLeakRatio(integratorLeakRatio);
pidGains.setZeta(zeta);
assertEquals(kp, pidGains.getKp(), 1e-6);
assertEquals(kd, pidGains.getKd(), 1e-6);
assertEquals(kp, pidGains.getYoKp().getDoubleValue(), 1e-6);
assertEquals(kd, pidGains.getYoKd().getDoubleValue(), 1e-6);
assertEquals(ki, pidGains.getYoKi().getDoubleValue(), 1e-6);
assertEquals(maxAcc, pidGains.getMaximumFeedback(), 1e-6);
assertEquals(maxJerk, pidGains.getMaximumFeedbackRate(), 1e-6);
assertEquals(maxAcc, pidGains.getYoMaximumFeedback().getDoubleValue(), 1e-6);
assertEquals(maxJerk, pidGains.getYoMaximumFeedbackRate().getDoubleValue(), 1e-6);
assertEquals(integratorLeakRatio, pidGains.getYoIntegralLeakRatio().getDoubleValue(), 1e-6);
assertEquals(zeta, pidGains.getZeta(), 1e-6);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.3)
@Test(timeout=300000)
public void testPIDControllerConstructorFromGains()
{
YoVariableRegistry registry = new YoVariableRegistry("robert");
double proportional = random.nextDouble();
double integral = random.nextDouble();
double derivative = random.nextDouble();
double maxError = random.nextDouble();
double deadband = random.nextDouble();
double leakRate = random.nextDouble();
double maxOutput = 100 * random.nextDouble();
YoPIDGains pidGains = new YoPIDGains("", registry);
pidGains.setKp(proportional);
pidGains.setKi(integral);
pidGains.setKd(derivative);
pidGains.setMaximumIntegralError(maxError);
pidGains.setPositionDeadband(deadband);
pidGains.setIntegralLeakRatio(leakRate);
pidGains.setMaximumFeedback(maxOutput);
PIDController pid = new PIDController(pidGains, "", registry);
assertEquals(proportional, pid.getProportionalGain(), 0.001);
assertEquals(integral, pid.getIntegralGain(), 0.001);
assertEquals(derivative, pid.getDerivativeGain(), 0.001);
assertEquals(maxError, pid.getMaxIntegralError(), 0.001);
assertEquals(deadband, pid.getPositionDeadband(), 0.001);
assertEquals(leakRate, pid.getIntegralLeakRatio(), 0.001);
assertEquals(maxOutput, pid.getMaximumFeedback(), 1e-5);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.2)
@Test(timeout=300000)
public void testPIDControllerConstructorFromGains2()
{
YoVariableRegistry registry = new YoVariableRegistry("robert");
double proportional = random.nextDouble();
double integral = random.nextDouble();
double derivative = random.nextDouble();
double maxError = random.nextDouble();
double deadband = random.nextDouble();
double maxOutput = random.nextDouble() * 100;
YoPIDGains pidGains = new YoPIDGains("", registry);
pidGains.setKp(proportional);
pidGains.setKi(integral);
pidGains.setKd(derivative);
pidGains.setMaximumIntegralError(maxError);
pidGains.setPositionDeadband(deadband);
pidGains.setMaximumFeedback(maxOutput);
PIDController pid = new PIDController(pidGains, "", registry);
assertEquals(proportional, pid.getProportionalGain(), 0.001);
assertEquals(integral, pid.getIntegralGain(), 0.001);
assertEquals(derivative, pid.getDerivativeGain(), 0.001);
assertEquals(maxError, pid.getMaxIntegralError(), 0.001);
assertEquals(deadband, pid.getPositionDeadband(), 0.001);
assertEquals(maxOutput, pid.getMaximumFeedback(), 0.001);
assertEquals(1.0, pid.getIntegralLeakRatio(), 0.001);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.2)
@Test(timeout=300000)
public void testPIDControllerConstructorFromGains3()
{
YoVariableRegistry registry = new YoVariableRegistry("robert");
double proportional = random.nextDouble();
double integral = random.nextDouble();
double derivative = random.nextDouble();
double maxIntegralError = random.nextDouble();
double maxOutput = random.nextDouble() * 100;
YoPIDGains pidGains = new YoPIDGains("", registry);
pidGains.setKp(proportional);
pidGains.setKi(integral);
pidGains.setKd(derivative);
pidGains.setMaximumIntegralError(maxIntegralError);
pidGains.setMaximumFeedback(maxOutput);
PIDController pid = new PIDController(pidGains, "", registry);
assertEquals(proportional, pid.getProportionalGain(), 0.001);
assertEquals(integral, pid.getIntegralGain(), 0.001);
assertEquals(derivative, pid.getDerivativeGain(), 0.001);
assertEquals(maxIntegralError, pid.getMaxIntegralError(), 0.001);
assertEquals(maxOutput, pid.getMaximumFeedback(), 1e-5);
assertEquals(0.0, pid.getPositionDeadband(), 0.001);
assertEquals(1.0, pid.getIntegralLeakRatio(), 0.001);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.2)
@Test(timeout=300000)
public void testPIDControllerConstructorFromGains4()
{
YoVariableRegistry registry = new YoVariableRegistry("robert");
double proportional = random.nextDouble();
double integral = random.nextDouble();
double derivative = random.nextDouble();
double maxIntegralError = random.nextDouble();
YoPIDGains pidGains = new YoPIDGains("", registry);
pidGains.setKp(proportional);
pidGains.setKi(integral);
pidGains.setKd(derivative);
pidGains.setMaximumIntegralError(maxIntegralError);
PIDController pid = new PIDController(pidGains, "", registry);
assertEquals(proportional, pid.getProportionalGain(), 0.001);
assertEquals(integral, pid.getIntegralGain(), 0.001);
assertEquals(derivative, pid.getDerivativeGain(), 0.001);
assertEquals(maxIntegralError, pid.getMaxIntegralError(), 0.001);
assertEquals(Double.POSITIVE_INFINITY, pid.getMaximumFeedback(), 0.001);
assertEquals(0.0, pid.getPositionDeadband(), 0.001);
assertEquals(1.0, pid.getIntegralLeakRatio(), 0.001);
}
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
linearPidGains = new YoPIDGains(forcePoint.getName() + "_linear" + suffix, registry);
linearPidGains.setKp(linearKp);
linearPidGains.setKi(linearKi);
linearPidGains.setKd(linearKd);
linearPidGains.setMaximumIntegralError(linearMaxIntegral);
linearPidGains.setPositionDeadband(linearDeadband);
angularPidGains = new YoPIDGains(forcePoint.getName() + "_angular" + suffix, registry);
angularPidGains.setKp(angularKp);
angularPidGains.setKi(angularKi);
angularPidGains.setKd(angularKd);
angularPidGains.setMaximumIntegralError(angularMaxIntegral);
angularPidGains.setPositionDeadband(angularDeadband);
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.setIntegralLeakRatio()方法的
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.getYoKd()方法的一些代码示例,展示了YoP
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.setKi()方法的一些代码示例,展示了YoPID
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.setKd()方法的一些代码示例,展示了YoPID
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.setMaximumIntegralError()
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.getKp()方法的一些代码示例,展示了YoPID
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.getYoKp()方法的一些代码示例,展示了YoP
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.()方法的一些代码示例,展示了YoPIDGains
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.getYoKi()方法的一些代码示例,展示了YoP
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.setKp()方法的一些代码示例,展示了YoPID
我是一名优秀的程序员,十分优秀!