us.ihmc.simulationconstructionset.SimulationConstructionSet.getIndex()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(72)

本文整理了Java中us.ihmc.simulationconstructionset.SimulationConstructionSet.getIndex()方法的一些代码示例,展示了SimulationConstructionSet.getIndex()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SimulationConstructionSet.getIndex()方法的具体详情如下:
包路径:us.ihmc.simulationconstructionset.SimulationConstructionSet
类名称:SimulationConstructionSet
方法名:getIndex

SimulationConstructionSet.getIndex介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test

assertEquals("Indices are not equal after final action. Most likely that you overran the data buffer. Check the data buffer size!", scs0.getIndex(),
       scs1.getIndex());

代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test

scss.get(0).simulate(1);
BlockingSimulationRunner.waitForSimulationToFinish(scss.get(0), maximumClockRunTimeInSeconds, true);
assertEquals("indices not the same", scss.get(0).getIndex(), scss.get(1).getIndex());
assertEquals("times not the same", scss.get(0).getRobots()[0].getTime(), scss.get(1).getRobots()[0].getTime(), epsilon);
boolean result = comparer.compare(scss.get(0), scss.get(1));

代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test

public static void testRewindabilityNumberOfTicks(SimulationConstructionSet scs, int nTicks, List<String> namesToSkipOver)
      throws SimulationExceededMaximumTimeException
  {
   // create state files
   int nStateFiles = 2;
   ArrayList<File> stateFiles = createStateFiles(nStateFiles);

//      System.out.println("Simulation created");

   // run, write state file, rewind, repeat
   for (int i = 0; i < nStateFiles; i++)
   {
     scs.simulate(nTicks);
     BlockingSimulationRunner.waitForSimulationToFinish(scs, 120.0, true);
     scs.writeState(stateFiles.get(i));
//         System.out.println("Run " + i + " done.");
     scs.gotoInPointNow();
     assertEquals(scs.getIndex(), 0);
   }

   compare(stateFiles, scs, namesToSkipOver);
  }

代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test

/**
  * Simple rewindability test.
  * run, write state file, rewind, run, write state file.
  * @throws SimulationExceededMaximumTimeException
  */
  public static void testRewindabilitySimple(SimulationConstructionSet scs, double simulationTime, ArrayList<String> namesToSkipOver)
      throws SimulationExceededMaximumTimeException
  {
   // create state files
   int nStateFiles = 2;
   ArrayList<File> stateFiles = createStateFiles(nStateFiles);

//      System.out.println("Simulation created");

   // run, write state file, rewind, repeat
   for (int i = 0; i < nStateFiles; i++)
   {
     scs.simulate(simulationTime);
     BlockingSimulationRunner.waitForSimulationToFinish(scs, 120.0, true);
     scs.writeState(stateFiles.get(i));
//         System.out.println("Run " + i + " done.");
     scs.gotoInPointNow();
     assertEquals(scs.getIndex(), 0);
   }

   // compare
   compare(stateFiles, scs, namesToSkipOver);
  }

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces

break;
if (simulationConstructionSet.getIndex() == simulationConstructionSet.getOutPoint())
 break;
if (simulationConstructionSet.getIndex() == simulationConstructionSet.getOutPoint())

代码示例来源:origin: us.ihmc/IHMCAvatarInterfaces

break;
if (simulationConstructionSet.getIndex() == simulationConstructionSet.getOutPoint())
 break;
if (simulationConstructionSet.getIndex() == simulationConstructionSet.getOutPoint())

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

break;
if (simulationConstructionSet.getIndex() == simulationConstructionSet.getOutPoint())
 break;
if (simulationConstructionSet.getIndex() == simulationConstructionSet.getOutPoint())

代码示例来源:origin: us.ihmc/simulation-construction-set-test

assertEquals(100, scs.getIndex());
assertEquals(0, scs.getIndex());
assertEquals(1, scs.getIndex());
assertEquals(6, scs.getIndex());
assertEquals(5, scs.getIndex());
assertEquals(6, scs.getIndex());
assertEquals(6, scs.getIndex());

代码示例来源:origin: us.ihmc/simulation-construction-set-test

int indexFromSCS = scs.getIndex();
assertEquals(index, indexFromSCS, epsilon);
simulationRewoundListenerHasBeenNotified.set(false);
scs.tickButDoNotNotifySimulationRewoundListeners(ticksIncrease);
double currentSCSIndex = scs.getIndex();
assertFalse(simulationRewoundListenerHasBeenNotified.getBooleanValue());
assertEquals(ticksIncrease, currentSCSIndex, epsilon);
simulationRewoundListenerHasBeenNotified.set(false);
scs.tick();
double currentSCSIndex2 = scs.getIndex();
assertTrue(simulationRewoundListenerHasBeenNotified.getBooleanValue());
assertEquals(ticksPerCycle, currentSCSIndex2, epsilon);
simulationRewoundListenerHasBeenNotified.set(false);
scs.unTick();
int currentSCSIndex3 = scs.getIndex();
assertTrue(simulationRewoundListenerHasBeenNotified.getBooleanValue());
assertEquals(0.0, currentSCSIndex3, epsilon);
simulationRewoundListenerHasBeenNotified.set(false);
scs.tick(ticksIncrease);
double currentSCSIndex4 = scs.getIndex();
assertTrue(simulationRewoundListenerHasBeenNotified.getBooleanValue());
assertEquals(ticksIncrease, currentSCSIndex4, epsilon);
simulationRewoundListenerHasBeenNotified.set(false);
scs.setTick(ticksIncrease);

代码示例来源:origin: us.ihmc/simulation-construction-set-test

int index = scs.getIndex();
int inPoint = scs.getInPoint();
assertEquals(index, inPoint);
index = scs.getIndex();
assertEquals(stepsForward, index);
testFixture.clickAddKeyPointButton();
index = scs.getIndex();
assertEquals(2 * stepsForward, index);
testFixture.clickAddKeyPointButton();
index = scs.getIndex();
assertEquals(3 * stepsForward, index);
testFixture.clickAddKeyPointButton();
index = scs.getIndex();
assertEquals(stepsForward, index);
index = scs.getIndex();
assertEquals(2 * stepsForward, index);
index = scs.getIndex();
assertEquals(stepsForward, index);
index = scs.getIndex();
assertEquals(stepsForward, index);
index = scs.getIndex();

相关文章

微信公众号

最新文章

更多

SimulationConstructionSet类方法