本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.setKp()方法
本文整理了Java中us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains.setKp()
方法的一些代码示例,展示了YoPIDGains.setKp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoPIDGains.setKp()
方法的具体详情如下:
包路径:us.ihmc.robotics.controllers.pidGains.implementations.YoPIDGains
类名称:YoPIDGains
方法名:setKp
YoPIDGains.setKp介绍
暂无
代码示例
代码示例来源:origin: us.ihmc/ihmc-simulation-toolkit
public void setKp(double kp)
{
gains.setKp(kp);
}
代码示例来源: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-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/valkyrie
gains.setKp(7.0);
gains.setKi(3.0);
gains.setKd(0.0);
代码示例来源: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-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
double zeta = random.nextDouble() * 100;
pidGains.setKp(kp);
pidGains.setKd(kd);
pidGains.setKi(ki);
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
linearPidGains.setKp(linearKp);
linearPidGains.setKi(linearKi);
linearPidGains.setKd(linearKd);
angularPidGains.setKp(angularKp);
angularPidGains.setKi(angularKi);
angularPidGains.setKd(angularKd);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
double maxIntegral = 10.0;
pidGains.setKp(proportional);
pidGains.setKi(integral);
pidGains.setKd(derivative);