本文整理了Java中us.ihmc.simulationconstructionset.SimulationConstructionSet.closeAndDispose()
方法的一些代码示例,展示了SimulationConstructionSet.closeAndDispose()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SimulationConstructionSet.closeAndDispose()
方法的具体详情如下:
包路径:us.ihmc.simulationconstructionset.SimulationConstructionSet
类名称:SimulationConstructionSet
方法名:closeAndDispose
暂无
代码示例来源:origin: us.ihmc/RobotDataCommunication
public void closeAndDispose()
{
scs.closeAndDispose();
}
代码示例来源:origin: us.ihmc/IHMCRobotDataVisualizer
public void closeAndDispose()
{
scs.closeAndDispose();
}
代码示例来源:origin: us.ihmc/ihmc-robot-data-visualizer
public void closeAndDispose()
{
scs.closeAndDispose();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
private void closeGivenSCS(SimulationConstructionSet scs)
{
ThreadTools.sleep(CLOSING_SLEEP_TIME);
scs.closeAndDispose();
scs = null;
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
@Test// timeout = 30000
public void testSimulationConstructionSetWithoutARobot()
{
SimulationConstructionSet scs = new SimulationConstructionSet(parameters);
Thread thread = new Thread(scs);
thread.start();
sleep(pauseTimeForGUIs);
scs.closeAndDispose();
}
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
@After
public void cleanUpTest()
{
if (keepSCSUp)
{
ThreadTools.sleepForever();
}
if (scs != null && !keepSCSUp)
scs.closeAndDispose();
ReferenceFrameTools.clearWorldFrameTree();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
@Test// timeout = 30000
public void testSimulationConstructionSetWithARobot()
{
Robot robot = new Robot("NullRobot");
SimulationConstructionSet scs = new SimulationConstructionSet(robot, parameters);
Thread thread = new Thread(scs);
thread.start();
sleep(pauseTimeForGUIs);
scs.closeAndDispose();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
@Test// timeout=300000
public void testRewindableSimulation() throws UnreasonableAccelerationException
{
SimulationConstructionSet scs1 = constructRewindableSimulationConstructionSet();
SimulationConstructionSet scs2 = constructRewindableSimulationConstructionSet();
ArrayList<String> exceptions = new ArrayList<String>();
// exceptions.add("ticks_till_control");
SimulationRewindabilityVerifier verifier = new SimulationRewindabilityVerifier(scs1, scs2, exceptions);
int numTests = 5000;
double maxDifferenceAllowed = 1e-12;
ArrayList<VariableDifference> variableDifferences = verifier.checkRewindabilityWithSimpleMethod(numTests, maxDifferenceAllowed);
assertTrue(variableDifferences.isEmpty());
scs1.closeAndDispose();
scs2.closeAndDispose();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
@Test// timeout=300000
public void testEasilyDetectableNonRewindableSimulation() throws UnreasonableAccelerationException
{
SimulationConstructionSet scs1 = constructEasilyDetectableNonRewindableSimulationConstructionSet();
SimulationConstructionSet scs2 = constructEasilyDetectableNonRewindableSimulationConstructionSet();
ArrayList<String> exceptions = new ArrayList<String>();
// exceptions.add("ticks_till_control");
SimulationRewindabilityVerifier verifier = new SimulationRewindabilityVerifier(scs1, scs2, exceptions);
int numTests = 5000;
double maxDifferenceAllowed = 1e-12;
ArrayList<VariableDifference> variableDifferences = verifier.checkRewindabilityWithSimpleMethod(numTests, maxDifferenceAllowed);
if (VERBOSE)
{
System.out.println("\ntestEasilyDetectableNonRewindableSimulation differences:");
System.out.println(VariableDifference.allVariableDifferencesToString(variableDifferences));
}
assertEquals(2, variableDifferences.size());
scs1.closeAndDispose();
scs2.closeAndDispose();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
@Disabled // Throws an EdtViolationException at Runtime.
@Test// timeout=300000
public void testEnumDisplay() throws SimulationExceededMaximumTimeException, InterruptedException
{
SimpleController controller = new SimpleController();
SimulationConstructionSet scs = setupSCS(controller);
scs.setupEntryBox("largeEnumVariable");
scs.setupEntryBox("badGreekVariable");
scs.setupEntryBox("smallEnumVariable");
Thread.sleep(10000);
scs.closeAndDispose();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
public void concludeTesting(String videoName)
{
if (simulationTestingParameters.getKeepSCSUp())
{
ThreadTools.sleepForever();
}
if (simulationTestingParameters.getCreateSCSVideos())
{
BambooTools.createVideoWithDateTimeAndStoreInDefaultDirectory(scs, videoName);
}
ThreadTools.sleep(200);
scs.closeAndDispose();
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@After
public void tearDown()
{
if (simulationTestingParameters.getKeepSCSUp())
ThreadTools.sleepForever();
if (mainRegistry != null)
{
mainRegistry.closeAndDispose();
mainRegistry = null;
}
initializationSucceeded = null;
yoGraphicsListRegistry = null;
commandInputManager = null;
statusOutputManager = null;
toolboxController = null;
robot = null;
toolboxUpdater = null;
if (scs != null)
{
scs.closeAndDispose();
scs = null;
}
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@After
public void tearDown()
{
if (simulationTestingParameters.getKeepSCSUp())
ThreadTools.sleepForever();
if (mainRegistry != null)
{
mainRegistry.closeAndDispose();
mainRegistry = null;
}
initializationSucceeded = null;
yoGraphicsListRegistry = null;
commandInputManager = null;
toolboxController = null;
robot = null;
toolboxUpdater = null;
blockingSimulationRunner = null;
if (scs != null)
{
scs.closeAndDispose();
scs = null;
}
ReferenceFrameTools.clearWorldFrameTree();
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@After
public void tearDown()
{
if (simulationTestingParameters.getKeepSCSUp())
ThreadTools.sleepForever();
if (mainRegistry != null)
{
mainRegistry.closeAndDispose();
mainRegistry = null;
}
initializationSucceeded = null;
yoGraphicsListRegistry = null;
commandInputManager = null;
toolboxController = null;
robot = null;
toolboxUpdater = null;
blockingSimulationRunner = null;
if (scs != null)
{
scs.closeAndDispose();
scs = null;
}
ReferenceFrameTools.clearWorldFrameTree();
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@After
public void tearDown()
{
if (simulationTestingParameters.getKeepSCSUp())
ThreadTools.sleepForever();
if (mainRegistry != null)
{
mainRegistry.closeAndDispose();
mainRegistry = null;
}
initializationSucceeded = null;
yoGraphicsListRegistry = null;
commandInputManager = null;
toolboxController = null;
robot = null;
toolboxUpdater = null;
blockingSimulationRunner = null;
if (scs != null)
{
scs.closeAndDispose();
scs = null;
}
ReferenceFrameTools.clearWorldFrameTree();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
private void startSimAndDisplayLink(Link linkToDisplay)
{
// Robot nullRobot = new Robot("Null");
sim = new SimulationConstructionSet(parameters);
sim.addStaticLink(linkToDisplay);
// position the camera to view links
sim.setCameraPosition(6.0, 6.0, 3.0);
sim.setCameraFix(0.5, 0.5, 0.0);
sim.setGroundVisible(false);
sim.startOnAThread();
ThreadTools.sleep(3000);
sim.closeAndDispose();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
public void concludeTesting(int additionalStackDepthForRelevantCallingMethod)
{
if (simulationTestingParameters.getKeepSCSUp())
{
ThreadTools.sleepForever();
}
if (simulationTestingParameters.getCreateSCSVideos())
{
BambooTools.createVideoWithDateTimeClassMethodAndShareOnSharedDriveIfAvailable(scs.getRobots()[0].getName(), scs, additionalStackDepthForRelevantCallingMethod + 1);
}
ThreadTools.sleep(200);
scs.closeAndDispose();
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
private void doATestWithJustAnSCS() throws SimulationExceededMaximumTimeException
{
// BambooTools.reportTestStartedMessage(simulationTestingParameters.getShowWindows());
SimulationConstructionSetParameters simulationConstructionSetParameters = new SimulationConstructionSetParameters();
simulationConstructionSetParameters.setCreateGUI(true);
simulationConstructionSetParameters.setShowSplashScreen(false);
simulationConstructionSetParameters.setShowWindows(true);
SimulationConstructionSet scs = new SimulationConstructionSet(new Robot("TEST"), simulationConstructionSetParameters);
scs.startOnAThread();
ThreadTools.sleep(4000);
scs.closeAndDispose();
// BambooTools.reportTestFinishedMessage(simulationTestingParameters.getShowWindows());
}
代码示例来源: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
@Disabled //org.junit.runners.model.TestTimedOutException: test timed out after 300000 milliseconds
@Test// timeout=300000
public void testSimulationConstructionSetNewViewportWindowUsingGUITestFixture() throws AWTException
{
Assume.assumeTrue(!isGradleBuild());
FallingBrickRobot robot = new FallingBrickRobot();
SimulationConstructionSet scs = new SimulationConstructionSet(robot, parameters);
scs.setDT(0.0001, 100);
scs.setFrameMaximized();
scs.startOnAThread();
scs.setSimulateDuration(2.0);
ThreadTools.sleep(2000);
SimulationGUITestFixture testFixture = new SimulationGUITestFixture(scs);
testFixture.closeAllViewportWindows();
testFixture.selectNewViewportWindowMenu();
testFixture.focusNthViewportWindow(0);
ThreadTools.sleepForever();
testFixture.closeAndDispose();
scs.closeAndDispose();
scs = null;
testFixture = null;
}
内容来源于网络,如有侵权,请联系作者删除!