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

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

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

SimulationConstructionSet.isSimulating介绍

暂无

代码示例

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

private void waitForSimulationsToFinish(ArrayList<SimulationConstructionSet> simulationConstructionSets)
{
 boolean allDone = false;
 while (!allDone)
 {
   allDone = true;
   for (SimulationConstructionSet scs : simulationConstructionSets)
   {
    if (scs.isSimulating())
    {
      allDone = false;
    }
   }
 }
}

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

private static void waitForSimulationToFinish(SimulationConstructionSet scs)
{
 while (scs.isSimulating())
 {
   try
   {
    Thread.sleep(10);
   }
   catch (InterruptedException e)
   {
    e.printStackTrace();
   }
 }
}

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

private void waitForSimulationToFinish(SimulationConstructionSet scs)
  {
   while (scs.isSimulating())
   {
     try
     {
      Thread.sleep(10);
     }
     catch (InterruptedException e)
     {
      e.printStackTrace();
     }
   }
  }
}

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

private void waitForSimulationToFinish(SimulationConstructionSet scs)
  {
   while (scs.isSimulating())
   {
     try
     {
      Thread.sleep(10);
     }
     catch (InterruptedException e)
     {
      e.printStackTrace();
     }
   }
  }
}

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

private void simulateForTime(SimulationConstructionSet scs, double simulateTime)
{
 scs.simulate(simulateTime);
 while (scs.isSimulating())
 {
   ThreadTools.sleep(100L);
 }
}

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

while (scs.isSimulating())

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

private void seek(int newValue)
{
 synchronized (seekLock)
 {
   if (!isSeeking && !scs.isSimulating())
   {
    if(newValue > 0)
    {
      newValue -= 1;
    }
    robot.seek(newValue); //Do -1 so that we'll get to sliderValue after doing the seek.
    try
    {
      scs.simulateOneRecordStepNow();
      scs.setInPoint();
    }
    catch (UnreasonableAccelerationException e)
    {
      e.printStackTrace();
    }
    if (multiPlayer != null)
      multiPlayer.indexChanged(0, 0);
   }
 }
}

代码示例来源:origin: us.ihmc/ihmc-robot-data-visualizer

private void seek(int newValue)
{
 synchronized (seekLock)
 {
   if (!isSeeking && !scs.isSimulating())
   {
    if(newValue > 0)
    {
      newValue -= 1;
    }
    robot.seek(newValue); //Do -1 so that we'll get to sliderValue after doing the seek.
    try
    {
      scs.simulateOneRecordStepNow();
      scs.setInPoint();
    }
    catch (UnreasonableAccelerationException e)
    {
      e.printStackTrace();
    }
    if (multiPlayer != null)
      multiPlayer.notifyOfIndexChange(0);
   }
 }
}

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

private void seek(int newValue)
{
 synchronized (seekLock)
 {
   if (!isSeeking && !scs.isSimulating())
   {
    if(newValue > 0)
    {
      newValue -= 1;
    }
    robot.seek(newValue); //Do -1 so that we'll get to sliderValue after doing the seek.
    try
    {
      scs.simulateOneRecordStepNow();
      scs.setInPoint();
    }
    catch (UnreasonableAccelerationException e)
    {
      e.printStackTrace();
    }
    if (multiPlayer != null)
      multiPlayer.indexChanged(0, 0);
   }
 }
}

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

while (scs.isSimulating())

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

@Override
  public void notifyOfVariableChange(YoVariable<?> v)
  {
   if (scs == null || !scs.isSimulating())
     return; // Do not perform this check if the sim is not running, so the user can scrub the data when sim is done.
   desiredICP.setX(desiredICPX.getDoubleValue());
   if (xTicks.getValue() > ticksToInitialize && yTicks.getValue() > ticksToInitialize)
   {
     assertTrue("ICP plan desired jumped from " + previousDesiredICP + " to " + desiredICP + " in one control DT.",
          previousDesiredICP.distance(desiredICP) < maxICPPlanError);
   }
   previousDesiredICP.set(desiredICP);
   xTicks.setValue(xTicks.getValue() + 1);
  }
});

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

@Override
  public void notifyOfVariableChange(YoVariable<?> v)
  {
   if (scs == null || !scs.isSimulating())
     return; // Do not perform this check if the sim is not running, so the user can scrub the data when sim is done.
   desiredICP.setY(desiredICPY.getDoubleValue());
   if (xTicks.getValue() > ticksToInitialize && yTicks.getValue() > ticksToInitialize)
   {
     assertTrue("ICP plan desired jumped from " + previousDesiredICP + " to " + desiredICP + " in one control DT.",
          previousDesiredICP.distance(desiredICP) < maxICPPlanError);
   }
   previousDesiredICP.set(desiredICP);
   yTicks.setValue(yTicks.getValue() + 1);
  }
});

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

@ContinuousIntegrationTest(estimatedDuration = 7.2)
@Test(timeout = 36000)
public void test()
{
 TwoLinkRobotForTesting twoLinkRobotForTesting = new TwoLinkRobotForTesting();
 SimulationConstructionSet scs = new SimulationConstructionSet(twoLinkRobotForTesting, simulationTestingParameters);
 scs.setDT(0.00001, 100);
 scs.startOnAThread();
 twoLinkRobotForTesting.setElbowPosition(0.0);
 twoLinkRobotForTesting.setUpperPosition(3.0);
 
 twoLinkRobotForTesting.setElbowVelocity(-2.0);
 twoLinkRobotForTesting.setUpperVelocity(-3.0);
 
 scs.simulate(6.0);
 
 while(scs.isSimulating())
 {
   Thread.yield();
 }
 
 RobotAllJointsDataChecker robotAllJointsDataChecker = new RobotAllJointsDataChecker(scs, twoLinkRobotForTesting);
 robotAllJointsDataChecker.cropFirstPoint();
 
 scs.applyDataProcessingFunction(robotAllJointsDataChecker);
}

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

boolean isSimulatingFromSCS = scs.isSimulating();
assertTrue(isSimulatingFromSCS);
scs.simulate(numberOfSimulationTicks);
scs.stop();
boolean isSimulatingFromSCS2 = scs.isSimulating();
assertFalse(isSimulatingFromSCS2);
boolean isSimulatingFromSCS3 = scs.isSimulating();
assertTrue(isSimulatingFromSCS3);
boolean isSimulatingFromSCS4 = scs.isSimulating();
assertTrue(isSimulatingFromSCS4);

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

boolean isSCSSimulatingBeforeCriterion = scs.isSimulating();
setSimulationDoneCriterion.set(true);
ThreadTools.sleep(THREAD_SLEEP_TIME);
boolean isSCSSimulatingAfterCriterion = scs.isSimulating();
assertTrue(isSCSSimulatingBeforeCriterion);
assertFalse(isSCSSimulatingAfterCriterion);

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

while(scs.isSimulating())

相关文章

SimulationConstructionSet类方法