private void callSCSMethodSimulateOneTimeStep(SimulationConstructionSet scs) { try { scs.simulateOneTimeStep(); } catch (UnreasonableAccelerationException e) { e.printStackTrace(); } }
private void callSCSMethodSimulateOneRecordStepNow(SimulationConstructionSet scs) { try { scs.simulateOneRecordStepNow(); } catch (UnreasonableAccelerationException e) { e.printStackTrace(); } }
private void callSCSMethodSimulateOneRecordStep(SimulationConstructionSet scs) { try { scs.simulateOneRecordStep(); } catch (UnreasonableAccelerationException e) { e.printStackTrace(); } }
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); } } }
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); } } }
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); } } }
@Override public void doScript(double t) { try { robot.doDynamicsButDoNotIntegrate(); } catch (UnreasonableAccelerationException e) { e.printStackTrace(); } calculator.setGravitionalAcceleration(robot.getGravityZ()); getFloatingJointStateFromSCS(); getOneDoFJointStateFromSCS(); multiBodySystem.getRootBody().updateFramesRecursively(); getExternalWrenchesFromSCS(); calculator.compute(); calculator.writeComputedJointAccelerations(multiBodySystem.getJointsToConsider()); if (performAssertions) compareJointAccelerations(1.0e-5 * Math.max(1.0, findAccelerationGreatestMagnitude())); compareJointAccelerations(1.0e-3); }