本文整理了Java中us.ihmc.simulationconstructionset.SimulationConstructionSet.stepBackwardNow()
方法的一些代码示例,展示了SimulationConstructionSet.stepBackwardNow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SimulationConstructionSet.stepBackwardNow()
方法的具体详情如下:
包路径:us.ihmc.simulationconstructionset.SimulationConstructionSet
类名称:SimulationConstructionSet
方法名:stepBackwardNow
暂无
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
public static void testInitialValuesStoredCorrectly(SimulationConstructionSet scs, List<String> namesToSkipOver, double maximumClockRunTimeInSeconds) throws SimulationExceededMaximumTimeException, ControllerFailureException
{
// TODO: Not sure why the qdd are different on the very first tick, but we should probably fix this.
namesToSkipOver.add("qdd_");
int nStateFiles = 2;
ArrayList<File> stateFiles = SimulationTestTools.createStateFiles(nStateFiles);
// write state file, run, rewind, write state file
scs.writeState(stateFiles.get(0));
BlockingSimulationRunner blockingSimulationRunner = new BlockingSimulationRunner(scs, maximumClockRunTimeInSeconds, true);
blockingSimulationRunner.simulateNTicksAndBlock(1);
scs.stepBackwardNow();
scs.writeState(stateFiles.get(1));
// compare
SimulationTestTools.compare(stateFiles, scs, namesToSkipOver);
}
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@ContinuousIntegrationTest(estimatedDuration = 9.2)
@Test(timeout = 520000)
public void testCanRewindAndGoForward() throws UnreasonableAccelerationException
{
BambooTools.reportTestStartedMessage(simulationTestingParameters.getShowWindows());
int numberOfSteps = 100;
SimulationConstructionSet scs = setupScs();
scs.simulateOneRecordStepNow();
scs.simulateOneRecordStepNow();
for (int i = 0; i < numberOfSteps; i++)
{
scs.simulateOneRecordStepNow();
scs.simulateOneRecordStepNow();
scs.stepBackwardNow();
}
scs.closeAndDispose();
BambooTools.reportTestFinishedMessage(simulationTestingParameters.getShowWindows());
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
scs.stepBackwardNow();
int currentIndexFromSCS = scs.getIndex();
assertEquals(keyPoint - 1, currentIndexFromSCS, epsilon);
内容来源于网络,如有侵权,请联系作者删除!