本文整理了Java中us.ihmc.simulationconstructionset.SimulationConstructionSet.setCameraPosition()
方法的一些代码示例,展示了SimulationConstructionSet.setCameraPosition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SimulationConstructionSet.setCameraPosition()
方法的具体详情如下:
包路径:us.ihmc.simulationconstructionset.SimulationConstructionSet
类名称:SimulationConstructionSet
方法名:setCameraPosition
暂无
代码示例来源: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/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-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/IHMCSimulationToolkit
public void visualizeFootstep(ContactablePlaneBody bipedFoot, Footstep footstep)
{
bagOfSingleFootstepVisualizers.visualizeFootstep(footstep, bipedFoot);
nullRobot.setTime(nullRobot.getTime() + scs.getDT());
FramePoint solePositon = new FramePoint(footstep.getSoleReferenceFrame());
solePositon.changeFrame(worldFrame);
updateFocus(solePositon);
scs.setCameraFix(focusX, focusY, 0.0);
scs.setCameraPosition(focusX, focusY - 1.5, 6.0);
scs.tickAndUpdate();
}
代码示例来源:origin: us.ihmc/ihmc-simulation-toolkit
public void visualizeFootstep(ContactablePlaneBody bipedFoot, Footstep footstep)
{
bagOfSingleFootstepVisualizers.visualizeFootstep(footstep, bipedFoot);
nullRobot.setTime(nullRobot.getTime() + scs.getDT());
FramePoint3D solePositon = new FramePoint3D(footstep.getSoleReferenceFrame());
solePositon.changeFrame(worldFrame);
updateFocus(solePositon);
scs.setCameraFix(focusX, focusY, 0.0);
scs.setCameraPosition(focusX, focusY - 1.5, 6.0);
scs.tickAndUpdate();
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
private DRCRobotModel setup(DRCStartingLocation startingLocation) throws SimulationExceededMaximumTimeException
{
String className = getClass().getSimpleName();
FlatGroundEnvironment environment = new FlatGroundEnvironment();
DRCRobotModel robotModel = getRobotModel();
drcSimulationTestHelper = new DRCSimulationTestHelper(simulationTestingParameters, robotModel, environment);
drcSimulationTestHelper.setStartingLocation(startingLocation);
drcSimulationTestHelper.createSimulation(className);
drcSimulationTestHelper.getSimulationConstructionSet().setCameraPosition(0.0, -3.0, 1.0);
drcSimulationTestHelper.getSimulationConstructionSet().setCameraFix(0.0, 0.0, 0.2);
pushController = new PushRobotController(drcSimulationTestHelper.getRobot(), robotModel.createFullRobotModel().getChest().getParentJoint().getName(),
new Vector3D(0, 0, 0.15));
ThreadTools.sleep(1000);
assertTrue(drcSimulationTestHelper.simulateAndBlockAndCatchExceptions(0.5));
return robotModel;
}
代码示例来源: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();
}
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test
scs.setMaxBufferSize(64000);
scs.setCameraFix(0.0, 0.0, 0.0);
scs.setCameraPosition(-0.001, 0.0, 15.0);
scs.tickAndUpdate();
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
private void setupTest() throws SimulationExceededMaximumTimeException
{
BambooTools.reportTestStartedMessage(simulationTestingParameters.getShowWindows());
DRCObstacleCourseStartingLocation selectedLocation = DRCObstacleCourseStartingLocation.DEFAULT;
FlatGroundEnvironment environment = new FlatGroundEnvironment();
drcSimulationTestHelper = new DRCSimulationTestHelper(simulationTestingParameters, getRobotModel());
drcSimulationTestHelper.setTestEnvironment(environment);
drcSimulationTestHelper.setStartingLocation(selectedLocation);
drcSimulationTestHelper.createSimulation(getClass().getSimpleName());
ThreadTools.sleep(1000);
FullHumanoidRobotModel fullRobotModel = drcSimulationTestHelper.getControllerFullRobotModel();
head = fullRobotModel.getHead();
chest = fullRobotModel.getChest();
neckJoints = MultiBodySystemTools.createOneDoFJointPath(chest, head);
numberOfJoints = neckJoints.length;
drcSimulationTestHelper.getSimulationConstructionSet().hideAllYoGraphics();
drcSimulationTestHelper.getSimulationConstructionSet().setCameraPosition(5.0, 0.0, 2.0);
drcSimulationTestHelper.getSimulationConstructionSet().setCameraFix(0.0, 0.0, 0.4);
assertTrue(drcSimulationTestHelper.simulateAndBlockAndCatchExceptions(1.0));
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces
scs.setCameraPosition(CAMPOS[0], CAMPOS[1], CAMPOS[2]);
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
scs.addYoGraphicsListRegistry(yoGraphicsListRegistry, true);
scs.setCameraFix(0.0, 0.0, 1.0);
scs.setCameraPosition(8.0, 0.0, 3.0);
scs.startOnAThread();
blockingSimulationRunner = new BlockingSimulationRunner(scs, 60.0 * 10.0);
代码示例来源:origin: us.ihmc/ihmc-path-planning-test
private static SimulationConstructionSet setupSCS(String testName, YoVariableRegistry testRegistry, PlanarRegionsList regions, Point3D start, Point3D goal)
{
Robot robot = new Robot(VisibilityGraphsOcclusionTest.class.getSimpleName());
robot.addYoVariableRegistry(testRegistry);
SimulationConstructionSet scs = new SimulationConstructionSet(robot, simulationTestingParameters);
Graphics3DObject graphics3DObject = new Graphics3DObject();
graphics3DObject.addCoordinateSystem(0.8);
if (regions != null)
{
Graphics3DObjectTools.addPlanarRegionsList(graphics3DObject, regions, YoAppearance.White(), YoAppearance.Grey(), YoAppearance.DarkGray());
scs.setGroundVisible(false);
}
graphics3DObject.identity();
graphics3DObject.translate(start);
graphics3DObject.translate(0.0, 0.0, 0.05);
graphics3DObject.addCone(0.3, 0.05, YoAppearance.Green());
graphics3DObject.identity();
graphics3DObject.translate(goal);
graphics3DObject.translate(0.0, 0.0, 0.05);
graphics3DObject.addCone(0.3, 0.05, YoAppearance.Red());
scs.addStaticLinkGraphics(graphics3DObject);
scs.setCameraPosition(-7.0, -1.0, 25.0);
scs.setCameraFix(0.0, 0.0, 0.0);
return scs;
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
ThreadTools.sleep(1000);
SimulationConstructionSet scs = drcSimulationTestHelper.getSimulationConstructionSet();
scs.setCameraPosition(8.0, -8.0, 5.0);
scs.setCameraFix(1.5, 0.0, 0.8);
assertTrue(drcSimulationTestHelper.simulateAndBlockAndCatchExceptions(0.5));
代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge
sdfRobot = drcSimulationFactory.getRobot();
simulationConstructionSet.setCameraPosition(scsCameraPosition.x, scsCameraPosition.y, scsCameraPosition.z);
simulationConstructionSet.setCameraFix(scsCameraFix.x, scsCameraFix.y, scsCameraFix.z);
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test
scs.setCameraPosition(-7.0, -1.0, 25.0);
scs.setCameraFix(0.0, 0.0, 0.0);
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test
scs.addStaticLinkGraphics(graphics3DObject);
scs.addYoGraphicsListRegistry(graphicsListRegistry);
scs.setCameraPosition(-0.01, 0.0, 10.0);
scs.setCameraFix(0.0, 0.0, 0.0);
scs.startOnAThread();
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
scs.addYoGraphicsListRegistry(yoGraphicsListRegistry, true);
scs.setCameraFix(0.0, 0.0, 1.0);
scs.setCameraPosition(8.0, 0.0, 3.0);
scs.startOnAThread();
blockingSimulationRunner = new BlockingSimulationRunner(scs, 60.0 * 10.0);
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
scs.addYoGraphicsListRegistry(yoGraphicsListRegistry, true);
scs.setCameraFix(0.0, 0.0, 1.0);
scs.setCameraPosition(8.0, 0.0, 3.0);
scs.startOnAThread();
blockingSimulationRunner = new BlockingSimulationRunner(scs, 60.0 * 10.0);
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
scs.addYoGraphicsListRegistry(yoGraphicsListRegistry, true);
scs.setCameraFix(0.0, 0.0, 1.0);
scs.setCameraPosition(8.0, 0.0, 3.0);
scs.startOnAThread();
内容来源于网络,如有侵权,请联系作者删除!