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

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

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

SimulationConstructionSet.startOnAThread介绍

暂无

代码示例

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

public void startSimulationOnAThread()
{
 if (scs != null)
   scs.startOnAThread();
}

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

private void displaySimulationConstructionSet()
{
  if (visualize) scs.startOnAThread();
}

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

public void start()
{
 if (yoVariableServer != null)
 {
   yoVariableServer.start();
 }
 simulationConstructionSet.startOnAThread();
}

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

public void start()
{
 if (yoVariableServer != null)
 {
   yoVariableServer.start();
 }
 simulationConstructionSet.startOnAThread();
}

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

public WholeBodyVisualizier(DRCRobotModel robotModel)
  {
   //model = AtlasRobotModelFactory.selectSimulationModelFromFlag(args);
     FloatingRootJointRobot simulatedRobot = robotModel.createHumanoidFloatingRootJointRobot(false);

   scs = new SimulationConstructionSet(simulatedRobot);
   scs.startOnAThread();
  }
}

代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test

public void showAndSleep(boolean autoplay)
{
 if (autoplay)
   scs.play();
 scs.startOnAThread();
 ThreadTools.sleepForever();
}

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

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);
}

代码示例来源:origin: us.ihmc/ihmc-simulation-toolkit

public void startVisualizer()
{
 scs.addYoGraphicsListRegistry(yoGraphicsListRegistry);
 scs.addYoVariableRegistry(registry);
 scs.setupGraphGroup("step times", new String[][]
 {
   {"t"}
 });
 scs.startOnAThread();
 scs.tickAndUpdate();
}

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

public void startVisualizer()
{
 scs.addYoGraphicsListRegistry(yoGraphicsListRegistry);
 scs.addYoVariableRegistry(registry);
 scs.setupGraphGroup("step times", new String[][]
 {
   {"t"}
 });
 scs.startOnAThread();
 scs.tickAndUpdate();
}

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

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();
}

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

public static void main(String[] args)
{
 SimulationConstructionSet scs = new SimulationConstructionSet();
 scs.setGroundVisible(false);
 scs.addStaticLinkGraphics(new CinderBlockFieldPlanarRegionEnvironment().getTerrainObject3D().getLinkGraphics());
 scs.startOnAThread();
}

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

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();
}

代码示例来源: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

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();
  }
}

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

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();
}

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

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);
}

代码示例来源: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/valkyrie

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();
}

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

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();
}

代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test

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();
}

相关文章

SimulationConstructionSet类方法