public LogVisualizer(int bufferSize, boolean showOverheadView, File logFile) throws IOException { if (logFile == null) { logFile = FileSelectionDialog.loadDirectoryWithFileNamed(YoVariableLoggerListener.propertyFile); } if (logFile != null) { System.out.println("loading log from folder:" + logFile); SimulationConstructionSetParameters parameters = new SimulationConstructionSetParameters(); parameters.setCreateGUI(true); parameters.setDataBufferSize(bufferSize); scs = new SimulationConstructionSet(parameters); scs.setFastSimulate(true, 50); readLogFile(logFile, showOverheadView); if (PRINT_OUT_YOVARIABLE_NAMES) printOutYoVariableNames(); } else { scs = null; } }
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 boolean isGuiShown() { return simulationConstructionSetParameters.getCreateGUI(); }
public void setShowWindow(boolean showWindow) { this.simulationConstructionSetParameters.setShowSplashScreen(showWindow); this.simulationConstructionSetParameters.setShowWindows(showWindow); }
private SimulationConstructionSet createSimulation() { SimulationConstructionSetParameters parameters = new SimulationConstructionSetParameters(); parameters.setCreateGUI(false); return new SimulationConstructionSet(createRobot(), parameters); }
private SimulationConstructionSet constructSimulationConstructionSet(Robot robot, RobotController controller) { SimulationConstructionSetParameters parameters = SimulationConstructionSetParameters.createFromSystemProperties();; parameters.setCreateGUI(SHOW_GUI); SimulationConstructionSet scs = new SimulationConstructionSet(robot, parameters); scs.setDT(DT, 1); Thread thread = new Thread(scs); thread.start(); try { Thread.sleep(2000); } catch (InterruptedException e) { } return scs; }
public static void main(String[] args) { final SimulationConstructionSet scs; // initialize SCS DRCRobotModel robotModel = new ValkyrieRobotModel(RobotTarget.REAL_ROBOT, false); final FloatingRootJointRobot robot =robotModel.createHumanoidFloatingRootJointRobot(false); SimulationConstructionSetParameters parameters = new SimulationConstructionSetParameters(); parameters.setDataBufferSize(65536); scs = new SimulationConstructionSet(robot, parameters); // add sysid button JButton button = new JButton("findCOM"); button.addActionListener(new LinkComIDActionListener(scs.getDataBuffer(), robot)); scs.addButton(button); scs.startOnAThread(); } }
SimulationConstructionSetParameters parameters = SimulationConstructionSetParameters.createFromSystemProperties();; parameters.setDataBufferSize(5000); scs = new SimulationConstructionSet(robot, parameters); SimulationConstructionSetParameters parameters = SimulationConstructionSetParameters.createFromSystemProperties();; parameters.setCreateGUI(true); parameters.setDataBufferSize(5000); scs = new SimulationConstructionSet(parameters);
public DRCGuiInitialSetup(boolean groundProfileVisible, boolean drawPlaneAtZeroHeight, boolean showGUI) { this(groundProfileVisible, drawPlaneAtZeroHeight, new SimulationConstructionSetParameters(showGUI)); }
private void setupSimulationConstructionSet() { SimulationConstructionSetParameters simulationConstructionSetParameters = guiInitialSetup.get().getSimulationConstructionSetParameters(); simulationConstructionSetParameters.setDataBufferSize(scsInitialSetup.get().getSimulationDataBufferSize()); List<Robot> allSimulatedRobotList = new ArrayList<Robot>(); allSimulatedRobotList.add(humanoidFloatingRootJointRobot); if (commonAvatarEnvironment.get() != null && commonAvatarEnvironment.get().getEnvironmentRobots() != null) { allSimulatedRobotList.addAll(commonAvatarEnvironment.get().getEnvironmentRobots()); commonAvatarEnvironment.get().addContactPoints(humanoidFloatingRootJointRobot.getAllGroundContactPoints()); commonAvatarEnvironment.get().createAndSetContactControllerToARobot(); } simulationConstructionSet = new SimulationConstructionSet(allSimulatedRobotList.toArray(new Robot[0]), guiInitialSetup.get().getGraphics3DAdapter(), simulationConstructionSetParameters); simulationConstructionSet.setDT(robotModel.get().getSimulateDT(), 1); }
SimulationConstructionSetParameters simulationConstructionSetParameters = SimulationConstructionSetParameters.createFromSystemProperties(); simulationConstructionSetParameters.setCreateGUI(false); simulationConstructionSetParameters.setShowSplashScreen(false); SimulationConstructionSet scs = new SimulationConstructionSet(robot, simulationConstructionSetParameters);
public void setCreateGUI(boolean createGUI) { this.simulationConstructionSetParameters.setCreateGUI(createGUI); }
SimulationConstructionSetParameters parameters = SimulationConstructionSetParameters.createFromSystemProperties();; parameters.setDataBufferSize(100);
public boolean getShowWindow() { return simulationConstructionSetParameters.getShowWindows(); }
public static void main(String[] args) { YoGraphicsListRegistry yoGraphicsListRegistry = new YoGraphicsListRegistry(); DRCDemoEnvironmentSimpleSteeringWheelContact env = new DRCDemoEnvironmentSimpleSteeringWheelContact(yoGraphicsListRegistry); List<Robot> robots = env.getEnvironmentRobots(); Robot[] robotArray = new Robot[robots.size()]; robots.toArray(robotArray); SimulationConstructionSetParameters parameters = new SimulationConstructionSetParameters(); parameters.setDataBufferSize(36000); SimulationConstructionSet scs = new SimulationConstructionSet(robotArray, parameters); scs.setDT(1e-4, 20); TerrainObject3D terrainObject = env.getTerrainObject3D(); scs.addStaticLinkGraphics(terrainObject.getLinkGraphics()); scs.addYoGraphicsListRegistry(yoGraphicsListRegistry); scs.setGroundVisible(false); scs.startOnAThread(); }
public <T extends RobotControllerWithAttachRobot> SimulationConstructionSet setupSCS(T controller) throws InterruptedException { boolean showGUI = true; FallingBrickRobot robot = new FallingBrickRobot(); controller.attachRobot(robot); assertFalse(controller.getYoVariableRegistry() == null); robot.setController(controller); SimulationConstructionSetParameters parameters = SimulationConstructionSetParameters.createFromSystemProperties();; parameters.setCreateGUI(showGUI); parameters.setDataBufferSize(2000); SimulationConstructionSet scs = new SimulationConstructionSet(robot, parameters); scs.setFrameMaximized(); scs.startOnAThread(); Thread.sleep(DELAY_TIME_FOR_HUMAN_CONVENIENT_VIEWING); StandardSimulationGUI scsGUI = scs.getStandardSimulationGUI(); EntryBoxArrayPanel temp = scsGUI.getEntryBoxArrayPanel(); temp.removeAllEntryBoxes(); scsGUI.getEntryBoxArrayPanel().updateUI(); Thread.sleep(DELAY_TIME_FOR_HUMAN_CONVENIENT_VIEWING); return scs; }
private void setupSim() { SimulationConstructionSetParameters parameters = new SimulationConstructionSetParameters(); parameters.setCreateGUI(simulationTestingParameters.getCreateGUI()); simulationConstructionSet = new SimulationConstructionSet(robot, parameters); simulationConstructionSet.setDT(0.001, 1); bsr = new BlockingSimulationRunner(simulationConstructionSet, 60.0 * 10.0); Thread simThread = new Thread(simulationConstructionSet); simThread.start(); }
public DRCGuiInitialSetup(boolean groundProfileVisible, boolean drawPlaneAtZeroHeight, boolean showGUI) { this(groundProfileVisible, drawPlaneAtZeroHeight, new SimulationConstructionSetParameters(showGUI)); }
YoDouble variableOne = new YoDouble("variableOne", registryOne); SimulationConstructionSetParameters parameters = SimulationConstructionSetParameters.createFromSystemProperties(); parameters.setCreateGUI(SHOW_GUI); SimulationConstructionSet scs = new SimulationConstructionSet(robot, parameters); sleep(1000);
private void setupSimulationConstructionSet() { SimulationConstructionSetParameters simulationConstructionSetParameters = guiInitialSetup.get().getSimulationConstructionSetParameters(); simulationConstructionSetParameters.setDataBufferSize(scsInitialSetup.get().getSimulationDataBufferSize()); List<Robot> allSimulatedRobotList = new ArrayList<Robot>(); allSimulatedRobotList.add(humanoidFloatingRootJointRobot); if (commonAvatarEnvironment.get() != null && commonAvatarEnvironment.get().getEnvironmentRobots() != null) { allSimulatedRobotList.addAll(commonAvatarEnvironment.get().getEnvironmentRobots()); commonAvatarEnvironment.get().addContactPoints(humanoidFloatingRootJointRobot.getAllGroundContactPoints()); commonAvatarEnvironment.get().createAndSetContactControllerToARobot(); } simulationConstructionSet = new SimulationConstructionSet(allSimulatedRobotList.toArray(new Robot[0]), guiInitialSetup.get().getGraphics3DAdapter(), simulationConstructionSetParameters); simulationConstructionSet.setDT(robotModel.get().getSimulateDT(), 1); }