public void startSimulationOnAThread() { if (scs != null) scs.startOnAThread(); }
private void displaySimulationConstructionSet() { if (visualize) scs.startOnAThread(); }
public void start() { if (yoVariableServer != null) { yoVariableServer.start(); } simulationConstructionSet.startOnAThread(); }
public void start() { if (yoVariableServer != null) { yoVariableServer.start(); } simulationConstructionSet.startOnAThread(); }
public WholeBodyVisualizier(DRCRobotModel robotModel) { //model = AtlasRobotModelFactory.selectSimulationModelFromFlag(args); FloatingRootJointRobot simulatedRobot = robotModel.createHumanoidFloatingRootJointRobot(false); scs = new SimulationConstructionSet(simulatedRobot); scs.startOnAThread(); } }
public void showAndSleep(boolean autoplay) { if (autoplay) scs.play(); scs.startOnAThread(); ThreadTools.sleepForever(); }
public GoalOrientedTestConductor(SimulationConstructionSet scs, SimulationTestingParameters simulationTestingParameters) { this.scs = scs; this.simulationTestingParameters = simulationTestingParameters; YoDouble yoTime = (YoDouble) scs.getVariable("t"); yoTime.addVariableChangedListener(this::notifyOfVariableChange); scs.startOnAThread(); scs.addSimulateDoneListener(this); }
public void startVisualizer() { scs.addYoGraphicsListRegistry(yoGraphicsListRegistry); scs.addYoVariableRegistry(registry); scs.setupGraphGroup("step times", new String[][] { {"t"} }); scs.startOnAThread(); scs.tickAndUpdate(); }
public void startVisualizer() { scs.addYoGraphicsListRegistry(yoGraphicsListRegistry); scs.addYoVariableRegistry(registry); scs.setupGraphGroup("step times", new String[][] { {"t"} }); scs.startOnAThread(); scs.tickAndUpdate(); }
public void startSimulation() { SimulationConstructionSetParameters simulationParameters = new SimulationConstructionSetParameters(true, 16000); SimulationConstructionSet scs = new SimulationConstructionSet(simulatedRobot, simulationParameters); scs.setDT(robotModel.getSimulateDT(), 10); scs.setCameraPosition(scsCameraPosition.x, scsCameraPosition.y, scsCameraPosition.z); scs.setCameraFix(scsCameraFix.x, scsCameraFix.y, scsCameraFix.z); scs.startOnAThread(); }
public static void main(String[] args) { SimulationConstructionSet scs = new SimulationConstructionSet(); scs.setGroundVisible(false); scs.addStaticLinkGraphics(new CinderBlockFieldPlanarRegionEnvironment().getTerrainObject3D().getLinkGraphics()); scs.startOnAThread(); }
public void startSimulation() { SimulationConstructionSetParameters simulationParameters = new SimulationConstructionSetParameters(true, 16000); SimulationConstructionSet scs = new SimulationConstructionSet(simulatedRobot, simulationParameters); scs.setDT(robotModel.getSimulateDT(), 10); scs.setCameraPosition(scsCameraPosition.x, scsCameraPosition.y, scsCameraPosition.z); scs.setCameraFix(scsCameraFix.x, scsCameraFix.y, scsCameraFix.z); scs.startOnAThread(); }
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(); }
public static void main(String[] args) { SimulationConstructionSet scs = new SimulationConstructionSet(new Robot("robot")); scs.addStaticLinkGraphics(new TwoBollardEnvironment(0.75).getTerrainObject3D().getLinkGraphics()); scs.setGroundVisible(false); scs.startOnAThread(); } }
public TestMultiThreadedSimulation() { DoublePendulum doublePendulum = new DoublePendulum(); SimulationConstructionSet scs = new SimulationConstructionSet(doublePendulum); DoublePendulumController controller = new DoublePendulumController(doublePendulum); MultiThreadedRobotController multiThreadedRobotController = new MultiThreadedRobotController("threadedController", doublePendulum, scs); multiThreadedRobotController.addController(controller, 10, false); multiThreadedRobotController.initialize(); doublePendulum.setController(multiThreadedRobotController); scs.setDT(0.0001, 1); scs.startOnAThread(); }
public static void visualizeFootsteps(Robot nullRobot, List<Footstep> footsteps, List<ContactablePlaneBody> contactablePlaneBodies) { SimulationConstructionSet scs = new SimulationConstructionSet(nullRobot); scs.setDT(0.25, 1); YoVariableRegistry rootRegistry = scs.getRootRegistry(); YoGraphicsListRegistry yoGraphicsListRegistry = new YoGraphicsListRegistry(); int maxNumberOfContacts = 2; int maxPointsPerContact = 4; FootstepGeneratorVisualizer footstepGeneratorVisualizer = new FootstepGeneratorVisualizer(maxNumberOfContacts, maxPointsPerContact, rootRegistry, yoGraphicsListRegistry); scs.addYoGraphicsListRegistry(yoGraphicsListRegistry); footstepGeneratorVisualizer.addFootstepsAndTickAndUpdate(scs, footsteps, contactablePlaneBodies); scs.startOnAThread(); deleteFirstDataPointAndCropData(scs); }
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()); }
public ValkyrieDataFileNamespaceRenamer() { SimulationConstructionSet scs = new SimulationConstructionSet(new Robot("null")); YoVariableRegistry rootRegistry = scs.getRootRegistry(); NameSpaceRenamer valkyrieNameSpaceRenamer = new ValkyrieNameSpaceRenamer(); ChangeNamespacesToMatchSimButton changeNamespacesToMatchSimButton = new ChangeNamespacesToMatchSimButton("ChangeValkyrieNamespaces", rootRegistry, valkyrieNameSpaceRenamer); scs.addButton(changeNamespacesToMatchSimButton); NameSpaceRenamer stepprNameSpaceRenamer = new StepprNameSpaceRenamer(); ChangeNamespacesToMatchSimButton changeStepprNamespacesToMatchSimButton = new ChangeNamespacesToMatchSimButton("ChangeStepprNamespaces", rootRegistry, stepprNameSpaceRenamer); scs.addButton(changeStepprNamespacesToMatchSimButton); scs.startOnAThread(); }
public void startSimulation() { SimulationConstructionSetParameters simulationParameters = new SimulationConstructionSetParameters(true, 16000); SimulationConstructionSet scs = new SimulationConstructionSet(simulatedRobot, simulationParameters); scs.setDT(robotModel.getSimulateDT(), 10); scs.setCameraPosition(scsCameraPosition.getX(), scsCameraPosition.getY(), scsCameraPosition.getZ()); scs.setCameraFix(scsCameraFix.getX(), scsCameraFix.getY(), scsCameraFix.getZ()); scs.startOnAThread(); }
private void startSCS() { scs.addYoVariableRegistry(registry); scs.addYoGraphicsListRegistry(graphicsListRegistry); scs.setPlaybackRealTimeRate(0.025); Graphics3DObject linkGraphics = new Graphics3DObject(); linkGraphics.addCoordinateSystem(0.3); scs.addStaticLinkGraphics(linkGraphics); scs.setCameraFix(0.0, 0.0, 0.5); scs.setCameraPosition(-0.5, 0.0, 1.0); SimulationOverheadPlotterFactory simulationOverheadPlotterFactory = scs.createSimulationOverheadPlotterFactory(); simulationOverheadPlotterFactory.addYoGraphicsListRegistries(graphicsListRegistry); simulationOverheadPlotterFactory.createOverheadPlotter(); scs.startOnAThread(); }