本文整理了Java中us.ihmc.yoVariables.variable.YoDouble.sub()
方法的一些代码示例,展示了YoDouble.sub()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoDouble.sub()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoDouble
类名称:YoDouble
方法名:sub
[英]Sets this YoDouble to its current value minus the given value.
[中]将该值设置为当前值减去给定值。
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@Override
public void subtractTimeOffset(double timeOffsetToSubtract)
{
time.sub(timeOffsetToSubtract);
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@Override
public void processData()
{
q_y.sub(4.0);
}
};
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@Override
public final void subtractTimeOffset(double timeOffsetToSubtract)
{
time.sub(timeOffsetToSubtract);
}
代码示例来源:origin: us.ihmc/valkyrie
public void subtractTorqueOffset(double torqueOffset)
{
tauOffset.sub(torqueOffset);
}
}
代码示例来源:origin: us.ihmc/ihmc-whole-body-controller
@Override
public void subtractTorqueOffset(OneDoFJointBasics oneDoFJoint, double torqueOffset)
{
YoDouble torqueOffsetVariable = torqueOffsetMap.get(oneDoFJoint);
torqueOffsetVariable.sub(torqueOffset);
}
}
代码示例来源:origin: us.ihmc/valkyrie
biases.get(jointName).sub(offset);
mean.clear();
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
teepeeLocation.getYoZ().sub(hoistUpDownSpeed.getDoubleValue() * updateDT);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout=300000)
public void testVelocityNegativeWithoutCrossingZero2()
{
Random rand = new Random(1798L);
YoVariableRegistry registry = new YoVariableRegistry("blop");
YoDouble alphaVariable = new YoDouble("alpha", registry);
alphaVariable.set(RandomNumbers.nextDouble(rand, 0.0, 1.0));
double dt = RandomNumbers.nextDouble(rand, 1e-8, 1.0);
YoDouble slopTime = new YoDouble("slop", registry);
YoDouble rawPosition = new YoDouble("rawPosition", registry);
FilteredVelocityYoVariable filtVelocity = new FilteredVelocityYoVariable("filtVelocity", "", alphaVariable, rawPosition, dt, registry);
BacklashCompensatingVelocityYoVariable backlashAndFiltered = new BacklashCompensatingVelocityYoVariable("", "", alphaVariable, rawPosition, dt, slopTime,
registry);
filtVelocity.update();
backlashAndFiltered.update();
for (int i = 0; i < 1000; i++)
{
slopTime.set(RandomNumbers.nextDouble(rand, 0.0, 100.0));
alphaVariable.set(RandomNumbers.nextDouble(rand, 0.0, 1.0));
rawPosition.sub(RandomNumbers.nextDouble(rand, 0.0, 101.0));
filtVelocity.update();
backlashAndFiltered.update();
assertEquals(filtVelocity.getDoubleValue(), backlashAndFiltered.getDoubleValue(), EPSILON);
}
}
内容来源于网络,如有侵权,请联系作者删除!