本文整理了Java中us.ihmc.simulationconstructionset.Robot.<init>
方法的一些代码示例,展示了Robot.<init>
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Robot.<init>
方法的具体详情如下:
包路径:us.ihmc.simulationconstructionset.Robot
类名称:Robot
方法名:<init>
暂无
代码示例来源:origin: us.ihmc/simulation-construction-set-test
private SimulationConstructionSet createNewSCSWithEmptyRobot(String robotName)
{
return new SimulationConstructionSet(new Robot(robotName), parameters);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
@Test// timeout = 30000
public void testSimulationConstructionSetWithARobot()
{
Robot robot = new Robot("NullRobot");
SimulationConstructionSet scs = new SimulationConstructionSet(robot, parameters);
Thread thread = new Thread(scs);
thread.start();
sleep(pauseTimeForGUIs);
scs.closeAndDispose();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
private SimulationConstructionSet constructRewindableSimulationConstructionSet()
{
Robot robot = new Robot("Test");
RobotController controller = new RewindableController(robot);
robot.setController(controller);
return constructSimulationConstructionSet(robot, controller);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
private SimulationConstructionSet constructDifficultToDetectNonRewindableSimulationConstructionSet()
{
Robot robot = new Robot("Test");
RobotController controller = new DifficultToDetectNonRewindableController(robot);
robot.setController(controller);
return constructSimulationConstructionSet(robot, controller);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
private SimulationConstructionSet constructEasilyDetectableNonRewindableSimulationConstructionSet()
{
Robot robot = new Robot("Test");
RobotController controller = new EasilyDetectableNonRewindableController(robot);
robot.setController(controller);
return constructSimulationConstructionSet(robot, controller);
}
代码示例来源: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-test
@BeforeEach
public void setUp()
{
offset = new Vector3D(1.0, 2.0, 3.0);
robot = new Robot("testRobot");
kinematicPoint = new KinematicPoint("testPoint", offset, robot.getRobotsYoVariableRegistry());
}
代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge
public static void main(String[] args)
{
Robot nullRobot = new Robot("FootstepVisualizerRobot");
ImmutablePair<List<Footstep>, List<ContactablePlaneBody>> footstepsAndContactablePlaneBodies = generateDefaultFootstepList();
visualizeFootsteps(nullRobot, footstepsAndContactablePlaneBodies.getLeft(), footstepsAndContactablePlaneBodies.getRight());
}
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
private void setupSCS()
{
SimulationTestingParameters simulationTestingParameters = SimulationTestingParameters.createFromSystemProperties();
simulationTestingParameters.setKeepSCSUp(visualize);
Robot robot = new Robot("Dummy");
yoTime = robot.getYoTime();
scs = new SimulationConstructionSet(robot, simulationTestingParameters);
}
代码示例来源: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/simulation-construction-set-tools-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout=300000)
public void testAddScsJointUsingIDJoint()
{
Joint scsRootJoint = RobotTools.addSCSJointUsingIDJoint(getRandomFloatingChain().getRootJoint(), new Robot("robot"), true);
assertNotNull(scsRootJoint);
}
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
private Robot createRobot()
{
Robot robot = new Robot("RandomRobot");
PinJoint pinJoint = new PinJoint("TestPinJoint", new Vector3D(), robot, new Vector3D(0, 0, 1));
robot.addRootJoint(pinJoint);
return robot;
}
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
@Test// timeout=300000
public void testChangeableOffset()
{
Robot robot = new Robot("testRobot");
KinematicPoint kinematicPoint = new KinematicPoint("kp_test", robot.getRobotsYoVariableRegistry());
Vector3D offset = new Vector3D(0.1, 0.2, 0.3);
kinematicPoint.setOffsetJoint(offset);
Vector3D offsetCopy = kinematicPoint.getOffsetCopy();
EuclidCoreTestTools.assertTuple3DEquals(offset, offsetCopy, 1e-14);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout=300000)
public void testGravityCompensationForChain()
{
Robot robot = new Robot("robot");
ReferenceFrame worldFrame = ReferenceFrame.getWorldFrame();
LinkedHashMap<RevoluteJoint, PinJoint> jointMap = new LinkedHashMap<RevoluteJoint, PinJoint>();
RigidBodyBasics elevator = new RigidBody("elevator", worldFrame);
Vector3D[] jointAxes = {X, Y, Z, X};
double gravity = -9.8;
createRandomChainRobotAndSetJointPositionsAndVelocities(robot, jointMap, worldFrame, elevator, jointAxes, gravity, false, false, random);
createInverseDynamicsCalculatorAndCompute(elevator, gravity, worldFrame, false, false);
copyTorques(jointMap);
doRobotDynamics(robot);
assertZeroAccelerations(jointMap);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
private Robot createSimpleRobotOne(String name)
{
Robot robot = new Robot(name);
PinJoint joint1 = new PinJoint("joint", new Vector3D(0.0, 0.0, 0.0), robot, Axis.Y);
Link link1 = link1();
joint1.setLink(link1);
robot.addRootJoint(joint1);
joint1.setInitialState(0.11, 0.22);
joint1.setTau(33.3);
return robot;
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
private Robot createSimpleRobotTwo(String name)
{
Robot robot = new Robot(name);
PinJoint joint2 = new PinJoint("joint", new Vector3D(0.0, 0.0, 0.0), robot, Axis.Y);
Link link2 = link2();
joint2.setLink(link2);
robot.addRootJoint(joint2);
joint2.setInitialState(0.11, 0.22);
joint2.setTau(33.3);
return robot;
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
private Robot createSimpleRobot()
{
Robot robot0 = new Robot("robot");
FloatingJoint floatingJoint0 = new FloatingJoint("floatingJoint", new Vector3D(), robot0);
Link link0 = new Link("body");
link0.setMass(1.0);
link0.setMomentOfInertia(0.1, 0.1, 0.1);
floatingJoint0.setLink(link0);
robot0.addRootJoint(floatingJoint0);
return robot0;
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000, expected=RuntimeException.class)
public void testSetMaxLessThanMin()
{
Robot robot = new Robot("Derivative");
YoVariableRegistry registry = new YoVariableRegistry("variables");
YoDouble position = new YoDouble("position", registry);
robot.addYoVariableRegistry(registry);
SimulationConstructionSet scs = new SimulationConstructionSet(robot, simulationTestingParameters);
ValueDataCheckerParameters valueDataCheckerParameters = new ValueDataCheckerParameters();
YoVariableValueDataChecker yoVariableValueDataChecker = new YoVariableValueDataChecker(scs, position, robot.getYoTime(), valueDataCheckerParameters);
double value = 10.0;
yoVariableValueDataChecker.setMinimumValue(value);
yoVariableValueDataChecker.setMaximumValue(value - 10.0);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000, expected=RuntimeException.class)
public void testSetMinGreaterThanMax()
{
Robot robot = new Robot("Derivative");
YoVariableRegistry registry = new YoVariableRegistry("variables");
YoDouble position = new YoDouble("position", registry);
robot.addYoVariableRegistry(registry);
SimulationConstructionSet scs = new SimulationConstructionSet(robot, simulationTestingParameters);
ValueDataCheckerParameters valueDataCheckerParameters = new ValueDataCheckerParameters();
YoVariableValueDataChecker yoVariableValueDataChecker = new YoVariableValueDataChecker(scs, position, robot.getYoTime(), valueDataCheckerParameters);
double value = 10.0;
yoVariableValueDataChecker.setMaximumValue(value);
yoVariableValueDataChecker.setMinimumValue(value + 1.0);
}
内容来源于网络,如有侵权,请联系作者删除!