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

x33g5p2x  于2022-01-29 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(73)

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

Robot.doDynamicsButDoNotIntegrate介绍

暂无

代码示例

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

private void doRobotDynamics(Robot robot) 
  {
   try
   {
     robot.doDynamicsButDoNotIntegrate();
   } 
   catch (UnreasonableAccelerationException e)
   {
     throw new RuntimeException(e);
   }
   
//      SimulationConstructionSet scs = new SimulationConstructionSet(robot, false);
//      scs.disableGUIComponents();
//      scs.setRecordDT(scs.getDT());
//      Thread simThread = new Thread(scs, "InverseDynamicsCalculatorTest sim thread");
//      simThread.start();
//      scs.simulate(1);
//      waitForSimulationToFinish(scs);
  }

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

private static void updateRobot(Robot robot)
{
 try
 {
   robot.update();
   robot.doDynamicsButDoNotIntegrate();
   robot.update();
 }
 catch (UnreasonableAccelerationException e)
 {
   throw new RuntimeException("UnreasonableAccelerationException");
 }
}

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

@Test// timeout=300000
public void testFloatingJointAndPinJointWithMassiveBody() throws UnreasonableAccelerationException
{
 Random random = new Random(1659L);
 Robot robot = new Robot("r1");
 robot.setGravity(0.0);
 FloatingJoint root1 = new FloatingJoint("root1", new Vector3D(), robot);
 robot.addRootJoint(root1);
 Link floatingBody = new Link("floatingBody");
 floatingBody.setMass(random.nextDouble());
 floatingBody.setComOffset(random.nextDouble(), random.nextDouble(), random.nextDouble());
 floatingBody.setMomentOfInertia(getRotationalInertiaMatrixOfSolidEllipsoid(floatingBody.getMass(), random.nextDouble(),
     random.nextDouble(), random.nextDouble()));
 root1.setLink(floatingBody);
 Vector3D offset = EuclidCoreRandomTools.nextVector3D(random);
 PinJoint pin1 = new PinJoint("pin1", offset, robot, EuclidCoreRandomTools.nextVector3D(random));
 pin1.setLink(massiveLink());
 root1.addJoint(pin1);
 pin1.setTau(random.nextDouble());
 robot.doDynamicsButDoNotIntegrate();
 double scalarInertiaAboutJointAxis = computeScalarInertiaAroundJointAxis(floatingBody, pin1);
 double torqueFromDynamics = scalarInertiaAboutJointAxis * pin1.getQDDYoVariable().getDoubleValue();
 assertEquals(pin1.getTauYoVariable().getDoubleValue(), torqueFromDynamics, pin1.getTauYoVariable().getDoubleValue() * 1e-3);
}

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

@Override
public void doScript(double t)
{
  try
  {
   robot.doDynamicsButDoNotIntegrate();
  }
  catch (UnreasonableAccelerationException e)
  {
   e.printStackTrace();
  }
  calculator.setGravitionalAcceleration(robot.getGravityZ());
  getFloatingJointStateFromSCS();
  getOneDoFJointStateFromSCS();
  multiBodySystem.getRootBody().updateFramesRecursively();
  getExternalWrenchesFromSCS();
  calculator.compute();
  calculator.writeComputedJointAccelerations(multiBodySystem.getJointsToConsider());
  if (performAssertions)
   compareJointAccelerations(1.0e-5 * Math.max(1.0, findAccelerationGreatestMagnitude()));
  compareJointAccelerations(1.0e-3);
}

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

externalForcePoint.setForce(force);
robot.doDynamicsButDoNotIntegrate();

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

testHelper.setRobotRootJointExternalForcesRandomly(random, maxRootJointExternalForceAndTorque);
robot.doDynamicsButDoNotIntegrate();
testHelper.setFullRobotModelStateAndAccelerationToMatchRobot();

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

testHelper.setRobotTorquesToMatchFullRobotModel();
robot.doDynamicsButDoNotIntegrate();

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

pinJointOne.addJoint(pinJointTwo);
robot.doDynamicsButDoNotIntegrate();
robot.doDynamicsButDoNotIntegrate();

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

robot.doDynamicsButDoNotIntegrate();

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

robotB.update();
robotA.doDynamicsButDoNotIntegrate();
robotB.doDynamicsButDoNotIntegrate();

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

robotB.update();
robotA.doDynamicsButDoNotIntegrate();
robotB.doDynamicsButDoNotIntegrate();

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

assertEquals(computeScalarInertiaAroundJointAxis(link21, pin1), computeScalarInertiaAroundJointAxis(link22, pin2), epsilonBefore);
robot1.doDynamicsButDoNotIntegrate();
robot2.doDynamicsButDoNotIntegrate();

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

robotB.update();
robotA.doDynamicsButDoNotIntegrate();
robotB.doDynamicsButDoNotIntegrate();

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

robot.doDynamicsButDoNotIntegrate();
robot.update();
robot.updateVelocities();
robot.doDynamicsButDoNotIntegrate();

相关文章